From c8ec52c777bcf0058da11e60a7765e58ab74397c Mon Sep 17 00:00:00 2001 From: nanotube Date: Thu, 29 Sep 2005 15:49:14 +0000 Subject: [PATCH] add exe cmdoptions bat script, remove old .bats from src dist. --- make_all_dist.py | 49 ++++++++++--------- run_exe_pykeylogger_with_cmdoptions.bat | 39 +++++++++++++++ run_pykeylogger_with_cmdoptions.bat | 64 +++++++++++++------------ 3 files changed, 99 insertions(+), 53 deletions(-) create mode 100644 run_exe_pykeylogger_with_cmdoptions.bat diff --git a/make_all_dist.py b/make_all_dist.py index a5fcc96..4394cbf 100644 --- a/make_all_dist.py +++ b/make_all_dist.py @@ -8,44 +8,47 @@ else: sys.exit() #delete old build dir. -print 'rd /S /Q build' -os.system('rd /S /Q build') +print r'rd /S /Q build' +os.system(r'rd /S /Q build') # create the exe -print 'c:\Python24\python setup.py py2exe -b1' -os.system('c:\Python24\python setup.py py2exe -b1') +print r'c:\Python24\python setup.py py2exe -b1' +os.system(r'c:\Python24\python setup.py py2exe -b1') #pause to see output #os.system('pause "done, press key to continue"') -print 'rename "dist" "pykeylogger""' -os.system('rename "dist" "pykeylogger""') +print r'rename "dist" "pykeylogger""' +os.system(r'rename "dist" "pykeylogger""') -print 'copy ".\*.txt" ".\pykeylogger""' -os.system('copy ".\*.txt" ".\pykeylogger""') +print r'copy ".\*.txt" ".\pykeylogger""' +os.system(r'copy ".\*.txt" ".\pykeylogger""') + +print r'copy ".\run_exe_pykeylogger_with_cmdoptions.bat" ".\pykeylogger""' +os.system(r'copy ".\run_exe_pykeylogger_with_cmdoptions.bat" ".\pykeylogger""') #command = '\"\"C:\Progra~1\WinRAR\WinRAR.exe" a -r "pykeylogger' + version.version + '_win32.zip" "pykeylogger\"\"' #print repr(command) #os.system(command) -print '""C:\Progra~1\WinRAR\WinRAR.exe" a -r "pykeylogger' + version.version + '_win32.zip" "pykeylogger""' -os.system('""C:\Progra~1\WinRAR\WinRAR.exe" a -r "pykeylogger' + version.version + '_win32.zip" "pykeylogger""') +print r'""C:\Progra~1\WinRAR\WinRAR.exe" a -r "pykeylogger' + version.version + '_win32.zip" "pykeylogger""' +os.system(r'""C:\Progra~1\WinRAR\WinRAR.exe" a -r "pykeylogger' + version.version + '_win32.zip" "pykeylogger""') -print 'mv "./pykeylogger' + version.version + '_win32.zip" "../pykeylogger' + version.version + '_win32.zip"' -os.system('mv "./pykeylogger' + version.version + '_win32.zip" "../pykeylogger' + version.version + '_win32.zip"') +print r'mv "./pykeylogger' + version.version + '_win32.zip" "../pykeylogger' + version.version + '_win32.zip"' +os.system(r'mv "./pykeylogger' + version.version + '_win32.zip" "../pykeylogger' + version.version + '_win32.zip"') -print 'rd /S /Q pykeylogger' -os.system('rd /S /Q pykeylogger') -print 'rd /S /Q build' -os.system('rd /S /Q build') +print r'rd /S /Q pykeylogger' +os.system(r'rd /S /Q pykeylogger') +print r'rd /S /Q build' +os.system(r'rd /S /Q build') #os.system('pause "done, now lets create the src dist"') -print '""C:\Progra~1\WinRAR\WinRAR.exe" a -r "pykeylogger' + version.version + '_src.zip" "keylogger.pyw" "logwriter.py" "setup.py" "version.py" "make_all_dist.py" "*.txt" "*.bat" "html""' -os.system('""C:\Progra~1\WinRAR\WinRAR.exe" a -r "pykeylogger' + version.version + '_src.zip" "keylogger.pyw" "logwriter.py" "setup.py" "version.py" "make_all_dist.py" "*.txt" "*.bat" "html""') +print r'""C:\Progra~1\WinRAR\WinRAR.exe" a -r "pykeylogger' + version.version + '_src.zip" "keylogger.pyw" "logwriter.py" "setup.py" "version.py" "make_all_dist.py" "*.txt" "*.bat" "html""' +os.system(r'""C:\Progra~1\WinRAR\WinRAR.exe" a -r "pykeylogger' + version.version + '_src.zip" "keylogger.pyw" "logwriter.py" "setup.py" "version.py" "make_all_dist.py" "*.txt" "run_exe_pykeylogger_with_cmdoptions.bat" "run_pykeylogger_with_cmdoptions.bat" "html""') -print 'mv "./pykeylogger' + version.version + '_src.zip" "../pykeylogger' + version.version + '_src.zip"' -os.system('mv "./pykeylogger' + version.version + '_src.zip" "../pykeylogger' + version.version + '_src.zip"') +print r'mv "./pykeylogger' + version.version + '_src.zip" "../pykeylogger' + version.version + '_src.zip"' +os.system(r'mv "./pykeylogger' + version.version + '_src.zip" "../pykeylogger' + version.version + '_src.zip"') #os.system('pause "now lets create the md5 sums"') -print '""C:\Progra~1\UnixUtils\md5sum.exe" "../pykeylogger' + version.version + '_src.zip" "../pykeylogger' + version.version + '_win32.zip" > "../pykeylogger' + version.version + '_md5sums.txt""' -os.system('""C:\Progra~1\UnixUtils\md5sum.exe" "../pykeylogger' + version.version + '_src.zip" "../pykeylogger' + version.version + '_win32.zip" > "../pykeylogger' + version.version + '_md5sums.txt""') +print r'""C:\Progra~1\UnixUtils\md5sum.exe" "../pykeylogger' + version.version + '_src.zip" "../pykeylogger' + version.version + '_win32.zip" > "../pykeylogger' + version.version + '_md5sums.txt""' +os.system(r'""C:\Progra~1\UnixUtils\md5sum.exe" "../pykeylogger' + version.version + '_src.zip" "../pykeylogger' + version.version + '_win32.zip" > "../pykeylogger' + version.version + '_md5sums.txt""') -os.system('pause "done, press to key to exit""') +os.system(r'pause "done, press to key to exit""') diff --git a/run_exe_pykeylogger_with_cmdoptions.bat b/run_exe_pykeylogger_with_cmdoptions.bat new file mode 100644 index 0000000..4747eef --- /dev/null +++ b/run_exe_pykeylogger_with_cmdoptions.bat @@ -0,0 +1,39 @@ +:: usage: keylogger.pyw [options] +:: +:: options: +:: --version show program's version number and exit +:: -h, --help show this help message and exit +:: -f DIRNAME, --file=DIRNAME +:: write log data to DIRNAME [default: C:\Temp\logdir] +:: -k, --keyboard log keyboard input [default: True] +:: -a, --addlinefeed add linefeed [\n] character when carriage return [\r] +:: character is detected (for Notepad compatibility) +:: [default: False] +:: -b, --parsebackspace translate backspace chacarter into printable string +:: [default: False] +:: -e, --parseescape translate escape chacarter into printable string +:: [default: False] +:: -x EXITKEY, --exitkey=EXITKEY +:: specify the key to press to exit keylogger [default: +:: F12] +:: -l FLUSHKEY, --flushkey=FLUSHKEY +:: specify the key to press to flush write buffer to file +:: [default: F11] +:: -d, --debug debug mode (print output to console instead of the log +:: file) [default: False] +:: -n NOLOG, --nolog=NOLOG +:: specify an application by full path name whose input +:: will not be logged. repeat option for multiple +:: applications. [default: none] +:: -o ONEFILE, --onefile=ONEFILE +:: log all output to one file ONEFILE, (inside DIRNAME, +:: as specified with -f option), rather than to multiple +:: files. [default: none] +:: -s SYSTEMLOG, --systemlog=SYSTEMLOG +:: log all output, plus some debug output, to a SYSTEMLOG +:: file (inside DIRNAME, as specified with -f option). +:: [default: none] + +@echo off + +start keylogger.exe -n "C:\Program Files\Gaim\gaim.exe" -s "systemlog.txt" -n "C:\Program Files\IrfanView\i_view32.exe" -n "C:\Program Files\Adobe\Photoshop 7.0\Photoshop.exe" diff --git a/run_pykeylogger_with_cmdoptions.bat b/run_pykeylogger_with_cmdoptions.bat index bc0b13c..960ca3e 100644 --- a/run_pykeylogger_with_cmdoptions.bat +++ b/run_pykeylogger_with_cmdoptions.bat @@ -1,34 +1,38 @@ -::usage: keylogger.pyw [options] +:: usage: keylogger.pyw [options] :: -::options: -:: --version show program's version number and exit -:: -h, --help show this help message and exit -:: -f DIRNAME, --file=DIRNAME -:: write log data to DIRNAME [default: C:\Temp\logdir] -:: -k, --keyboard log keyboard input [default: True] -:: -a, --addlinefeed add linefeed [\n] character when carriage return [\r] -:: character is detected (for Notepad compatibility) -:: [default: False] -:: -b, --parsebackspace translate backspace chacarter into printable string -:: [default: False] -:: -e, --parseescape translate escape chacarter into printable string -:: [default: False] -:: -x EXITKEY, --exitkey=EXITKEY -:: specify the key to press to exit keylogger [default: -:: F12] -:: -l FLUSHKEY, --flushkey=FLUSHKEY -:: specify the key to press to flush write buffer to file -:: [default: F11] -:: -d, --debug debug mode (print output to console instead of the log -:: file) [default: False] -:: -n NOLOG, --nolog=NOLOG -:: specify an application by full path name whose input -:: will not be logged. repeat option for multiple -:: applications. [default: none] -:: -o ONEFILE, --onefile=ONEFILE -:: log all output to one file ONEFILE, (inside DIRNAME, -:: as specified with -f option), rather than to multiple -:: files. [default: none] +:: options: +:: --version show program's version number and exit +:: -h, --help show this help message and exit +:: -f DIRNAME, --file=DIRNAME +:: write log data to DIRNAME [default: C:\Temp\logdir] +:: -k, --keyboard log keyboard input [default: True] +:: -a, --addlinefeed add linefeed [\n] character when carriage return [\r] +:: character is detected (for Notepad compatibility) +:: [default: False] +:: -b, --parsebackspace translate backspace chacarter into printable string +:: [default: False] +:: -e, --parseescape translate escape chacarter into printable string +:: [default: False] +:: -x EXITKEY, --exitkey=EXITKEY +:: specify the key to press to exit keylogger [default: +:: F12] +:: -l FLUSHKEY, --flushkey=FLUSHKEY +:: specify the key to press to flush write buffer to file +:: [default: F11] +:: -d, --debug debug mode (print output to console instead of the log +:: file) [default: False] +:: -n NOLOG, --nolog=NOLOG +:: specify an application by full path name whose input +:: will not be logged. repeat option for multiple +:: applications. [default: none] +:: -o ONEFILE, --onefile=ONEFILE +:: log all output to one file ONEFILE, (inside DIRNAME, +:: as specified with -f option), rather than to multiple +:: files. [default: none] +:: -s SYSTEMLOG, --systemlog=SYSTEMLOG +:: log all output, plus some debug output, to a SYSTEMLOG +:: file (inside DIRNAME, as specified with -f option). +:: [default: none] @echo off -- 2.45.1