1 way is through predefined text in the .Data
the other is through command line...
i found the GetCommandLineA from a Phrack exploit code
many thnx to them.... :)
NEW.ASM
.386P
Locals
jumps
.Model Flat ,StdCall
include windows.inc
mb_ok equ 0
hWnd equ 0
lpText equ offset Text
lpCaption equ offset caption
lpBlnk equ offset Blnk
extrn ExitProcess : PROC
extrn MessageBoxA : PROC
extern GetCommandLineA :proc
.Data
text db "Hello_World",13,10,0
caption db "",0
Blnk db "",0
.Code
Main:
call OPEN_PROGRAM
push mb_ok
push lpCaption
push lpText
push hWnd
call MessageBoxA
call ExitProcess
OPEN_PROGRAM PROC
ARG szP:DWORD
call GetCommandLineA
mov szP,eax
add szP,4 ;add bytes to remove the new from msgbox
PUSH MB_OK
push lpBlnk
PUSH szP
push hWnd
CALL MessageBoxA
ret
OPEN_PROGRAM ENDP
End Main
compile withtasm32 /mx /m3 /z /q new
tlink32 -x /Tpe /aa /c new,new,, import32.lib
if you want a dll then change /Tpe to /Tpd and also change
add szP,4 -> add szP,16
rename the file change the add szP according to filename_length
use rundll32 new.dll MESSAGE! for DLL example


Sign In
Create Account


Back to top









