Exemple #1
0
    def engine_start(self):
        handle, configFile = tempfile.mkstemp(prefix=MKSTEMP_PREFIX.CONFIG, text=True)
        os.close(handle)
        saveConfig(self.options, configFile)

        if os.path.exists("sqlmap.py"):
            self.process = Popen(["python", "sqlmap.py", "--api", "-c", configFile], shell=False, close_fds=not IS_WIN)
        elif os.path.exists(os.path.join(os.getcwd(), "sqlmap.py")):
            self.process = Popen(["python", "sqlmap.py", "--api", "-c", configFile], shell=False, cwd=os.getcwd(), close_fds=not IS_WIN)
        elif os.path.exists(os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), "sqlmap.py")):
            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)
        else:
            self.process = Popen(["sqlmap", "--api", "-c", configFile], shell=False, close_fds=not IS_WIN)
Exemple #2
0
 def engine_start(self):
     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)
Exemple #3
0
 def engine_start(self):
     self.process = Popen([
         "python", "./EagleX/sqlmap/sqlmap.py", "--pickled-options",
         base64pickle(self.options)
     ],
                          shell=False,
                          stdin=PIPE,
                          close_fds=not IS_WIN)
Exemple #4
0
 def engine_start(self):
     self.process = Popen("python sqlmap.py --pickled-options %s" % base64pickle(self.options),
                          shell=True, stdin=PIPE, close_fds=False)