Topic created on: March 22, 2013 16:05 CDT by drew77 .
I have a small program that displays a dialog box that requires clicking on Next to continue.
I used Ollydbg, but I can't find the dialog box so I can jmp past it.
Can someone help me ?
thanks.
This is what I have so far.
I am modifying some code I found, and there are things missing.
I will start a program and then send keystrokes to it so it goes unattended.
I need some help in where the code after WindowName goes.
I just noticed that some data is missing too.
.data
SuNam db "chklnks",0
.data?
.code
start:
; Start chklnks first
; get the full name and the handle
WindowName Proc ; FNameAdr:DWord,FHandle:DWord
Local A, X, Y, Z:DWord
mov FHandle,0
mov Z,0 ; GW_HWNDFIRST
Op2ToOp1 X,hwnd
.while X>0
invoke GetWindow, X, Z
mov X,eax
mov Z,2 ; GW_HWNDNEXT
.if X>0
invoke GetWindowLongA, X, -6 ; GWL_HINSTANCE
mov Y,eax
.if Y>0
; get (consecutive) the names of active applications
invoke GetWindowText,X,addr FName, 100
; lookup in proc "InstrStr" for the String (in SuNam) if found in FName
invoke InstrStr, addr SuNam,addr FName,1
; if the name starts in position 1 in addr FName: name has been found, termin. loop
.if eax==1
mov eax,X
mov FHandle,eax
mov X,0 ; beende Schleife
.endif
.endif
.endif
.endw
; full name of application is in addr FName, handle to the application is in FHandle
.if eax==0
mov FName,0 ; clear if not found Application has not been started yet
.endif
ret
WindowName Endp
; and hier the part for sending Alt+F4
invoke GetForegroundWindow ; save handle of own window
mov hwndTemp,eax
invoke SetForegroundWindow, FHandle ; activate VirtualDub-window
; and now simulate keyboard entries
invoke keybd_event, VK_RETURN, NULL, NULL, NULL ; Send ENTER key
invoke Sleep, 7000 ; give enuf time to find bad links
invoke keybd_event, VK_TAB, NULL, NULL, NULL ; Send tab key
invoke Sleep, 1500
invoke keybd_event, VK_TAB NULL, KEYEVENTF_KEYUP, NULL ; Send F4 key 'up'
invoke Sleep, 1500
invoke keybd_event, VK_RETURN, NULL, NULL, NULL ; Send ENTER key
invoke Sleep, 1500
invoke keybd_event, VK_RETURN, NULL, NULL, NULL ; Send ENTER key
invoke Sleep, 1500
invoke SetForegroundWindow, hwndTemp ; activate own window again
end start
|
Can you extend or rephrase the question?
As I understand it, you've got a little program (a crackme of sorts) where you want to remove a Nag-Screen.
For the removal of this nag-screen you've wrote this application in Assembler (the code) to auto-click it as you couldn't find the code to jump over or nop-out in the CracKMe?
Can you point me to the right direction? So you can help me help you :)
|
The program is chklnks.exe.
I want to be able to inject Tabs and Enter so the program will run by itself.
I hope that made it more clear.
I can upload a copy of the program if that would help.
|
Note: Registration is required to post to the forums.
|