MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / engine_start

Method engine_start

lib/utils/api.py:172–184  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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:

Callers 1

scan_startFunction · 0.80

Calls 3

saveConfigFunction · 0.90
PopenClass · 0.90
closeMethod · 0.45

Tested by

no test coverage detected