mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-31 18:39:46 +03:00
Merge 0b5032c503
into 5af6ca58a0
This commit is contained in:
commit
00995172f6
|
@ -58,14 +58,15 @@ def main():
|
|||
|
||||
try:
|
||||
paths.SQLMAP_ROOT_PATH = modulePath()
|
||||
setPaths()
|
||||
options = cmdLineParser()
|
||||
setPaths(options)
|
||||
banner()
|
||||
|
||||
dataToStdout("[!] legal disclaimer: %s\n\n" % LEGAL_DISCLAIMER, forceOutput=True)
|
||||
dataToStdout("[*] starting at %s\n\n" % time.strftime("%X"), forceOutput=True)
|
||||
|
||||
# Store original command line options for possible later restoration
|
||||
cmdLineOptions.update(cmdLineParser().__dict__)
|
||||
cmdLineOptions.update(options.__dict__)
|
||||
|
||||
init(cmdLineOptions)
|
||||
|
||||
|
|
|
@ -872,7 +872,7 @@ def cleanQuery(query):
|
|||
|
||||
return retVal
|
||||
|
||||
def setPaths():
|
||||
def setPaths(options):
|
||||
"""
|
||||
Sets absolute paths for project directories and files
|
||||
"""
|
||||
|
@ -886,7 +886,10 @@ def setPaths():
|
|||
paths.SQLMAP_UDF_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "udf")
|
||||
paths.SQLMAP_XML_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "xml")
|
||||
paths.SQLMAP_XML_BANNER_PATH = os.path.join(paths.SQLMAP_XML_PATH, "banner")
|
||||
paths.SQLMAP_OUTPUT_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "output")
|
||||
if options.output_dir:
|
||||
paths.SQLMAP_OUTPUT_PATH = options.output_dir
|
||||
else:
|
||||
paths.SQLMAP_OUTPUT_PATH = os.path.join(paths.SQLMAP_ROOT_PATH, "output")
|
||||
paths.SQLMAP_DUMP_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "dump")
|
||||
paths.SQLMAP_FILES_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "files")
|
||||
paths.SQLMAP_SEXEC_PATH = os.path.join(paths.SQLMAP_EXTRAS_PATH, "shellcodeexec")
|
||||
|
|
|
@ -570,6 +570,10 @@ def cmdLineParser():
|
|||
action="store_true",
|
||||
help="Update sqlmap")
|
||||
|
||||
general.add_option("--output-dir", dest="output_dir",
|
||||
action="store",
|
||||
help="Directory to store output files in.")
|
||||
|
||||
# Miscellaneous options
|
||||
miscellaneous = OptionGroup(parser, "Miscellaneous")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user