From 924e31c4141dcfd37cca1fba11d4febbf33a4ebc Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 8 Sep 2015 11:04:36 +0200 Subject: [PATCH] Fixes #1394 --- lib/utils/api.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/utils/api.py b/lib/utils/api.py index 4b63fbfe6..dc88b8161 100644 --- a/lib/utils/api.py +++ b/lib/utils/api.py @@ -152,8 +152,10 @@ class Task(object): self.options = AttribDict(self._original_options) def engine_start(self): - self.process = Popen(["python", "sqlmap.py", "--pickled-options", base64pickle(self.options)], - shell=False, close_fds=not IS_WIN) + if os.path.exists("sqlmap.py"): + self.process = Popen(["python", "sqlmap.py", "--pickled-options", base64pickle(self.options)], shell=False, close_fds=not IS_WIN) + else: + self.process = Popen(["sqlmap", "--pickled-options", base64pickle(self.options)], shell=False, close_fds=not IS_WIN) def engine_stop(self): if self.process: