mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Implements #5295
This commit is contained in:
parent
1be7a5aea8
commit
c8eea24ac4
|
@ -204,6 +204,7 @@ optDict = {
|
|||
|
||||
"General": {
|
||||
"trafficFile": "string",
|
||||
"abortOnEmpty": "boolean",
|
||||
"answers": "string",
|
||||
"batch": "boolean",
|
||||
"base64Parameter": "string",
|
||||
|
|
|
@ -20,7 +20,7 @@ from thirdparty import six
|
|||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# 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_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)
|
||||
|
|
|
@ -628,6 +628,9 @@ def cmdLineParser(argv=None):
|
|||
general.add_argument("-t", dest="trafficFile",
|
||||
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",
|
||||
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
|
||||
|
||||
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 += "a switch '--no-cast' "
|
||||
warnMsg += "or switch '--hex'" if hasattr(queries[Backend.getIdentifiedDbms()], "hex") else ""
|
||||
|
|
|
@ -702,6 +702,9 @@ sessionFile =
|
|||
# Log all HTTP traffic into a textual file.
|
||||
trafficFile =
|
||||
|
||||
# Abort data retrieval on empty results.
|
||||
abortOnEmpty = False
|
||||
|
||||
# Set predefined answers (e.g. "quit=N,follow=N").
|
||||
answers =
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user