@@ -160,11 +160,11 @@ def engine_start(self):
160160 saveConfig (self .options , configFile )
161161
162162 if os .path .exists ("sqlmap.py" ):
163- self .process = Popen (["python" , "sqlmap.py" , "--api" , "-c" , configFile ], shell = False , close_fds = not IS_WIN )
163+ self .process = Popen ([sys . executable or "python" , "sqlmap.py" , "--api" , "-c" , configFile ], shell = False , close_fds = not IS_WIN )
164164 elif os .path .exists (os .path .join (os .getcwd (), "sqlmap.py" )):
165- self .process = Popen (["python" , "sqlmap.py" , "--api" , "-c" , configFile ], shell = False , cwd = os .getcwd (), close_fds = not IS_WIN )
165+ self .process = Popen ([sys . executable or "python" , "sqlmap.py" , "--api" , "-c" , configFile ], shell = False , cwd = os .getcwd (), close_fds = not IS_WIN )
166166 elif os .path .exists (os .path .join (os .path .abspath (os .path .dirname (sys .argv [0 ])), "sqlmap.py" )):
167- self .process = Popen (["python" , "sqlmap.py" , "--api" , "-c" , configFile ], shell = False , cwd = os .path .join (os .path .abspath (os .path .dirname (sys .argv [0 ]))), close_fds = not IS_WIN )
167+ self .process = Popen ([sys . executable or "python" , "sqlmap.py" , "--api" , "-c" , configFile ], shell = False , cwd = os .path .join (os .path .abspath (os .path .dirname (sys .argv [0 ]))), close_fds = not IS_WIN )
168168 else :
169169 self .process = Popen (["sqlmap" , "--api" , "-c" , configFile ], shell = False , close_fds = not IS_WIN )
170170
0 commit comments