(self)
| 170 | self.options = AttribDict(self._original_options) |
| 171 | |
| 172 | def engine_start(self): |
| 173 | handle, configFile = tempfile.mkstemp(prefix=MKSTEMP_PREFIX.CONFIG, text=True) |
| 174 | os.close(handle) |
| 175 | saveConfig(self.options, configFile) |
| 176 | |
| 177 | if os.path.exists("sqlmap.py"): |
| 178 | self.process = Popen([sys.executable or "python", "sqlmap.py", "--api", "-c", configFile], shell=False, close_fds=not IS_WIN) |
| 179 | elif os.path.exists(os.path.join(os.getcwd(), "sqlmap.py")): |
| 180 | self.process = Popen([sys.executable or "python", "sqlmap.py", "--api", "-c", configFile], shell=False, cwd=os.getcwd(), close_fds=not IS_WIN) |
| 181 | elif os.path.exists(os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), "sqlmap.py")): |
| 182 | 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) |
| 183 | else: |
| 184 | self.process = Popen(["sqlmap", "--api", "-c", configFile], shell=False, close_fds=not IS_WIN) |
| 185 | |
| 186 | def engine_stop(self): |
| 187 | if self.process: |
no test coverage detected