mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 09:57:38 +03:00 
			
		
		
		
	added General cmdline group
This commit is contained in:
		
							parent
							
								
									e7a66371f8
								
							
						
					
					
						commit
						b9d9f18939
					
				| 
						 | 
					@ -21,6 +21,17 @@ optDict = {
 | 
				
			||||||
                               "configFile":        "string"
 | 
					                               "configFile":        "string"
 | 
				
			||||||
                             },
 | 
					                             },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            "General":       {
 | 
				
			||||||
 | 
					                               "xmlFile":           "string",
 | 
				
			||||||
 | 
					                               "sessionFile":       "string",
 | 
				
			||||||
 | 
					                               "trafficFile":       "string",
 | 
				
			||||||
 | 
					                               "flushSession":      "boolean",
 | 
				
			||||||
 | 
					                               "forms":             "boolean",
 | 
				
			||||||
 | 
					                               "eta":               "boolean",
 | 
				
			||||||
 | 
					                               "updateAll":         "boolean",
 | 
				
			||||||
 | 
					                               "batch":             "boolean"
 | 
				
			||||||
 | 
					                             },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            "Request":       {
 | 
					            "Request":       {
 | 
				
			||||||
                               "method":            "string",
 | 
					                               "method":            "string",
 | 
				
			||||||
                               "data":              "string",
 | 
					                               "data":              "string",
 | 
				
			||||||
| 
						 | 
					@ -152,19 +163,11 @@ optDict = {
 | 
				
			||||||
                             },
 | 
					                             },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            "Miscellaneous": {
 | 
					            "Miscellaneous": {
 | 
				
			||||||
                               "xmlFile":           "string",
 | 
					 | 
				
			||||||
                               "sessionFile":       "string",
 | 
					 | 
				
			||||||
                               "trafficFile":       "string",
 | 
					 | 
				
			||||||
                               "flushSession":      "boolean",
 | 
					 | 
				
			||||||
                               "forms":             "boolean",
 | 
					 | 
				
			||||||
                               "eta":               "boolean",
 | 
					 | 
				
			||||||
                               "googlePage":        "integer",
 | 
					 | 
				
			||||||
                               "updateAll":         "boolean",
 | 
					 | 
				
			||||||
                               "batch":             "boolean",
 | 
					 | 
				
			||||||
                               "cleanup":           "boolean",
 | 
					 | 
				
			||||||
                               "replicate":         "boolean",
 | 
					 | 
				
			||||||
                               "checkPayload":      "boolean",
 | 
					 | 
				
			||||||
                               "beep":              "boolean",
 | 
					                               "beep":              "boolean",
 | 
				
			||||||
 | 
					                               "checkPayload":      "boolean",
 | 
				
			||||||
 | 
					                               "cleanup":           "boolean",
 | 
				
			||||||
 | 
					                               "googlePage":        "integer",
 | 
				
			||||||
 | 
					                               "replicate":         "boolean",
 | 
				
			||||||
                               "verbose":           "integer"
 | 
					                               "verbose":           "integer"
 | 
				
			||||||
                             },
 | 
					                             },
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,6 +52,42 @@ def cmdLineParser():
 | 
				
			||||||
        target.add_option("-c", dest="configFile",
 | 
					        target.add_option("-c", dest="configFile",
 | 
				
			||||||
                          help="Load options from a configuration INI file")
 | 
					                          help="Load options from a configuration INI file")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # General options
 | 
				
			||||||
 | 
					        general = OptionGroup(parser, "General", "These options can be used "
 | 
				
			||||||
 | 
					                             "to set some general working parameters. " )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        general.add_option("-x", dest="xmlFile",
 | 
				
			||||||
 | 
					                            help="Dump the data into an XML file")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        general.add_option("-s", dest="sessionFile",
 | 
				
			||||||
 | 
					                            help="Save and resume all data retrieved "
 | 
				
			||||||
 | 
					                            "on a session file")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        general.add_option("-t", dest="trafficFile",
 | 
				
			||||||
 | 
					                            help="Log all HTTP traffic into a "
 | 
				
			||||||
 | 
					                            "textual file")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        general.add_option("--flush-session", dest="flushSession",
 | 
				
			||||||
 | 
					                            action="store_true", default=False,
 | 
				
			||||||
 | 
					                            help="Flush session file for current target")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        general.add_option("--eta", dest="eta",
 | 
				
			||||||
 | 
					                            action="store_true", default=False,
 | 
				
			||||||
 | 
					                            help="Display for each output the "
 | 
				
			||||||
 | 
					                                      "estimated time of arrival")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        general.add_option("--update", dest="updateAll",
 | 
				
			||||||
 | 
					                            action="store_true", default=False,
 | 
				
			||||||
 | 
					                            help="Update sqlmap")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        general.add_option("--save", dest="saveCmdline",
 | 
				
			||||||
 | 
					                            action="store_true", default=False,
 | 
				
			||||||
 | 
					                            help="Save options on a configuration INI file")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        general.add_option("--batch", dest="batch",
 | 
				
			||||||
 | 
					                            action="store_true", default=False,
 | 
				
			||||||
 | 
					                            help="Never ask for user input, use the default behaviour")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Request options
 | 
					        # Request options
 | 
				
			||||||
        request = OptionGroup(parser, "Request", "These options can be used "
 | 
					        request = OptionGroup(parser, "Request", "These options can be used "
 | 
				
			||||||
                              "to specify how to connect to the target url.")
 | 
					                              "to specify how to connect to the target url.")
 | 
				
			||||||
| 
						 | 
					@ -457,65 +493,33 @@ def cmdLineParser():
 | 
				
			||||||
        # Miscellaneous options
 | 
					        # Miscellaneous options
 | 
				
			||||||
        miscellaneous = OptionGroup(parser, "Miscellaneous")
 | 
					        miscellaneous = OptionGroup(parser, "Miscellaneous")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        miscellaneous.add_option("-x", dest="xmlFile",
 | 
					        miscellaneous.add_option("--beep", dest="beep",
 | 
				
			||||||
                                 help="Dump the data into an XML file")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("-s", dest="sessionFile",
 | 
					 | 
				
			||||||
                                 help="Save and resume all data retrieved "
 | 
					 | 
				
			||||||
                                      "on a session file")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("-t", dest="trafficFile",
 | 
					 | 
				
			||||||
                                 help="Log all HTTP traffic into a "
 | 
					 | 
				
			||||||
                                      "textual file")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("--flush-session", dest="flushSession",
 | 
					 | 
				
			||||||
                                 action="store_true", default=False,
 | 
					 | 
				
			||||||
                                 help="Flush session file for current target")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("--forms", dest="forms",
 | 
					 | 
				
			||||||
                                 action="store_true", default=False,
 | 
					 | 
				
			||||||
                                 help="Parse and test forms on target url")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("--eta", dest="eta",
 | 
					 | 
				
			||||||
                                 action="store_true", default=False,
 | 
					 | 
				
			||||||
                                 help="Display for each output the "
 | 
					 | 
				
			||||||
                                      "estimated time of arrival")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("--gpage", dest="googlePage", type="int",
 | 
					 | 
				
			||||||
                                 help="Use google dork results from specified page number")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("--update", dest="updateAll",
 | 
					 | 
				
			||||||
                                  action="store_true", default=False,
 | 
					                                  action="store_true", default=False,
 | 
				
			||||||
                                  help="Update sqlmap")
 | 
					                                  help="Alert when sql injection found")
 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("--save", dest="saveCmdline",
 | 
					 | 
				
			||||||
                                 action="store_true", default=False,
 | 
					 | 
				
			||||||
                                 help="Save options on a configuration INI file")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("--batch", dest="batch",
 | 
					 | 
				
			||||||
                                 action="store_true", default=False,
 | 
					 | 
				
			||||||
                                 help="Never ask for user input, use the default behaviour")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("--cleanup", dest="cleanup",
 | 
					 | 
				
			||||||
                                 action="store_true", default=False,
 | 
					 | 
				
			||||||
                                 help="Clean up the DBMS by sqlmap specific "
 | 
					 | 
				
			||||||
                                      "UDF and tables")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        miscellaneous.add_option("--replicate", dest="replicate",
 | 
					 | 
				
			||||||
                                 action="store_true", default=False,
 | 
					 | 
				
			||||||
                                 help="Replicate dumped data into a sqlite3 database")
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        miscellaneous.add_option("--check-payload", dest="checkPayload",
 | 
					        miscellaneous.add_option("--check-payload", dest="checkPayload",
 | 
				
			||||||
                                 action="store_true", default=False,
 | 
					                                  action="store_true", default=False,
 | 
				
			||||||
                                 help="IDS detection testing of injection payload")
 | 
					                                  help="IDS detection testing of injection payload")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        miscellaneous.add_option("--beep", dest="beep",
 | 
					        miscellaneous.add_option("--cleanup", dest="cleanup",
 | 
				
			||||||
                                 action="store_true", default=False,
 | 
					                                  action="store_true", default=False,
 | 
				
			||||||
                                 help="Alert with audio beep when sql injection found")
 | 
					                                  help="Clean up the DBMS by sqlmap specific "
 | 
				
			||||||
 | 
					                                  "UDF and tables")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        miscellaneous.add_option("--forms", dest="forms",
 | 
				
			||||||
 | 
					                                  action="store_true", default=False,
 | 
				
			||||||
 | 
					                                  help="Parse and test forms on target url")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        miscellaneous.add_option("--gpage", dest="googlePage", type="int",
 | 
				
			||||||
 | 
					                                  help="Use google dork results from specified page number")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        miscellaneous.add_option("--parse-errors", dest="parseErrors",
 | 
					        miscellaneous.add_option("--parse-errors", dest="parseErrors",
 | 
				
			||||||
                             action="store_true", default=False,
 | 
					                                  action="store_true", default=False,
 | 
				
			||||||
                             help="Try to parse and report error messages")
 | 
					                                  help="Try to parse and report error messages")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        miscellaneous.add_option("--replicate", dest="replicate",
 | 
				
			||||||
 | 
					                                  action="store_true", default=False,
 | 
				
			||||||
 | 
					                                  help="Replicate dumped data into a sqlite3 database")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Hidden and/or experimental options
 | 
					        # Hidden and/or experimental options
 | 
				
			||||||
        parser.add_option("--profile", dest="profile", action="store_true",
 | 
					        parser.add_option("--profile", dest="profile", action="store_true",
 | 
				
			||||||
| 
						 | 
					@ -531,6 +535,7 @@ def cmdLineParser():
 | 
				
			||||||
                          default=False, help=SUPPRESS_HELP)
 | 
					                          default=False, help=SUPPRESS_HELP)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        parser.add_option_group(target)
 | 
					        parser.add_option_group(target)
 | 
				
			||||||
 | 
					        parser.add_option_group(general)
 | 
				
			||||||
        parser.add_option_group(request)
 | 
					        parser.add_option_group(request)
 | 
				
			||||||
        parser.add_option_group(optimization)
 | 
					        parser.add_option_group(optimization)
 | 
				
			||||||
        parser.add_option_group(injection)
 | 
					        parser.add_option_group(injection)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										68
									
								
								sqlmap.conf
									
									
									
									
									
								
							
							
						
						
									
										68
									
								
								sqlmap.conf
									
									
									
									
									
								
							| 
						 | 
					@ -30,6 +30,36 @@ requestFile =
 | 
				
			||||||
googleDork = 
 | 
					googleDork = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# These options can be used to set some general working parameters.
 | 
				
			||||||
 | 
					[General]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Dump the data into an XML file.
 | 
				
			||||||
 | 
					xmlFile = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Save and resume all data retrieved on a session file.
 | 
				
			||||||
 | 
					sessionFile = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Log all HTTP traffic into a textual file.
 | 
				
			||||||
 | 
					trafficFile = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Flush session file for current target.
 | 
				
			||||||
 | 
					# Valid: True or False
 | 
				
			||||||
 | 
					flushSession = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Retrieve each query output length and calculate the estimated time of
 | 
				
			||||||
 | 
					# arrival in real time.
 | 
				
			||||||
 | 
					# Valid: True or False
 | 
				
			||||||
 | 
					eta = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Update sqlmap.
 | 
				
			||||||
 | 
					# Valid: True or False
 | 
				
			||||||
 | 
					updateAll = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Never ask for user input, use the default behaviour.
 | 
				
			||||||
 | 
					# Valid: True or False
 | 
				
			||||||
 | 
					batch = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# These options can be used to specify how to connect to the target url.
 | 
					# These options can be used to specify how to connect to the target url.
 | 
				
			||||||
[Request]
 | 
					[Request]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -504,55 +534,29 @@ regType =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Miscellaneous]
 | 
					[Miscellaneous]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Dump the data into an XML file.
 | 
					# Alert with audio beep when sql injection found.
 | 
				
			||||||
xmlFile = 
 | 
					beep = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Save and resume all data retrieved on a session file.
 | 
					# IDS detection testing of injection payload.
 | 
				
			||||||
sessionFile = 
 | 
					checkPayload = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Log all HTTP traffic into a textual file.
 | 
					# Clean up the DBMS by sqlmap specific UDF and tables
 | 
				
			||||||
trafficFile = 
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Flush session file for current target.
 | 
					 | 
				
			||||||
# Valid: True or False
 | 
					# Valid: True or False
 | 
				
			||||||
flushSession = False
 | 
					cleanup = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Parse and test forms on target url
 | 
					# Parse and test forms on target url
 | 
				
			||||||
# Valid: True or False
 | 
					# Valid: True or False
 | 
				
			||||||
forms = False
 | 
					forms = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Retrieve each query output length and calculate the estimated time of
 | 
					 | 
				
			||||||
# arrival in real time.
 | 
					 | 
				
			||||||
# Valid: True or False
 | 
					 | 
				
			||||||
eta = False
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Use google dork results from specified page number
 | 
					# Use google dork results from specified page number
 | 
				
			||||||
# Valid: integer
 | 
					# Valid: integer
 | 
				
			||||||
# Default: 1
 | 
					# Default: 1
 | 
				
			||||||
googlePage = 1
 | 
					googlePage = 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Update sqlmap.
 | 
					 | 
				
			||||||
# Valid: True or False
 | 
					 | 
				
			||||||
updateAll = False
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Never ask for user input, use the default behaviour.
 | 
					 | 
				
			||||||
# Valid: True or False
 | 
					 | 
				
			||||||
batch = False
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Clean up the DBMS by sqlmap specific UDF and tables
 | 
					 | 
				
			||||||
# Valid: True or False
 | 
					 | 
				
			||||||
cleanup = False
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Replicate dumped data into a sqlite3 database.
 | 
					# Replicate dumped data into a sqlite3 database.
 | 
				
			||||||
# Valid: True or False
 | 
					# Valid: True or False
 | 
				
			||||||
replicate = False
 | 
					replicate = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# IDS detection testing of injection payload.
 | 
					 | 
				
			||||||
checkPayload = False
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Alert with audio beep when sql injection found.
 | 
					 | 
				
			||||||
beep = False
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# Verbosity level.
 | 
					# Verbosity level.
 | 
				
			||||||
# Valid: integer between 0 and 6
 | 
					# Valid: integer between 0 and 6
 | 
				
			||||||
# 0: Show only critical messages
 | 
					# 0: Show only critical messages
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user