mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 09:57:38 +03:00 
			
		
		
		
	Implements #5295
This commit is contained in:
		
							parent
							
								
									1be7a5aea8
								
							
						
					
					
						commit
						c8eea24ac4
					
				| 
						 | 
					@ -204,6 +204,7 @@ optDict = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    "General": {
 | 
					    "General": {
 | 
				
			||||||
        "trafficFile": "string",
 | 
					        "trafficFile": "string",
 | 
				
			||||||
 | 
					        "abortOnEmpty": "boolean",
 | 
				
			||||||
        "answers": "string",
 | 
					        "answers": "string",
 | 
				
			||||||
        "batch": "boolean",
 | 
					        "batch": "boolean",
 | 
				
			||||||
        "base64Parameter": "string",
 | 
					        "base64Parameter": "string",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ from thirdparty import six
 | 
				
			||||||
from thirdparty.six import unichr as _unichr
 | 
					from thirdparty.six import unichr as _unichr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
 | 
					# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
 | 
				
			||||||
VERSION = "1.7.1.7"
 | 
					VERSION = "1.7.1.8"
 | 
				
			||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
 | 
					TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
 | 
				
			||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
 | 
					TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
 | 
				
			||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
 | 
					VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -628,6 +628,9 @@ def cmdLineParser(argv=None):
 | 
				
			||||||
        general.add_argument("-t", dest="trafficFile",
 | 
					        general.add_argument("-t", dest="trafficFile",
 | 
				
			||||||
            help="Log all HTTP traffic into a textual file")
 | 
					            help="Log all HTTP traffic into a textual file")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        general.add_argument("--abort-on-empty", dest="abortOnEmpty", action="store_true",
 | 
				
			||||||
 | 
					            help="Abort data retrieval on empty results")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        general.add_argument("--answers", dest="answers",
 | 
					        general.add_argument("--answers", dest="answers",
 | 
				
			||||||
            help="Set predefined answers (e.g. \"quit=N,follow=N\")")
 | 
					            help="Set predefined answers (e.g. \"quit=N,follow=N\")")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -501,6 +501,11 @@ def getValue(expression, blind=True, union=True, error=True, time=True, fromUser
 | 
				
			||||||
    kb.safeCharEncode = False
 | 
					    kb.safeCharEncode = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if not any((kb.testMode, conf.dummy, conf.offline, conf.noCast, conf.hexConvert)) and value is None and Backend.getDbms() and conf.dbmsHandler and kb.fingerprinted:
 | 
					    if not any((kb.testMode, conf.dummy, conf.offline, conf.noCast, conf.hexConvert)) and value is None and Backend.getDbms() and conf.dbmsHandler and kb.fingerprinted:
 | 
				
			||||||
 | 
					        if conf.abortOnEmpty:
 | 
				
			||||||
 | 
					            errMsg = "aborting due to empty data retrieval"
 | 
				
			||||||
 | 
					            logger.critical(errMsg)
 | 
				
			||||||
 | 
					            raise SystemExit
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
            warnMsg = "in case of continuous data retrieval problems you are advised to try "
 | 
					            warnMsg = "in case of continuous data retrieval problems you are advised to try "
 | 
				
			||||||
            warnMsg += "a switch '--no-cast' "
 | 
					            warnMsg += "a switch '--no-cast' "
 | 
				
			||||||
            warnMsg += "or switch '--hex'" if hasattr(queries[Backend.getIdentifiedDbms()], "hex") else ""
 | 
					            warnMsg += "or switch '--hex'" if hasattr(queries[Backend.getIdentifiedDbms()], "hex") else ""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -702,6 +702,9 @@ sessionFile =
 | 
				
			||||||
# Log all HTTP traffic into a textual file.
 | 
					# Log all HTTP traffic into a textual file.
 | 
				
			||||||
trafficFile = 
 | 
					trafficFile = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Abort data retrieval on empty results.
 | 
				
			||||||
 | 
					abortOnEmpty = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Set predefined answers (e.g. "quit=N,follow=N").
 | 
					# Set predefined answers (e.g. "quit=N,follow=N").
 | 
				
			||||||
answers =
 | 
					answers =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user