mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-02 20:54:13 +03:00
Adding a hidden switch --ignore-401
This commit is contained in:
parent
bd16bb7a6a
commit
2e96e3c924
|
@ -224,6 +224,7 @@ optDict = {
|
||||||
"cpuThrottle": "integer",
|
"cpuThrottle": "integer",
|
||||||
"forceDns": "boolean",
|
"forceDns": "boolean",
|
||||||
"identifyWaf": "boolean",
|
"identifyWaf": "boolean",
|
||||||
|
"ignore401": "boolean",
|
||||||
"smokeTest": "boolean",
|
"smokeTest": "boolean",
|
||||||
"liveTest": "boolean",
|
"liveTest": "boolean",
|
||||||
"stopFail": "boolean",
|
"stopFail": "boolean",
|
||||||
|
|
|
@ -714,6 +714,9 @@ def cmdLineParser():
|
||||||
parser.add_option("--force-dns", dest="forceDns", action="store_true",
|
parser.add_option("--force-dns", dest="forceDns", action="store_true",
|
||||||
help=SUPPRESS_HELP)
|
help=SUPPRESS_HELP)
|
||||||
|
|
||||||
|
parser.add_option("--ignore-401", dest="ignore401", action="store_true",
|
||||||
|
help=SUPPRESS_HELP)
|
||||||
|
|
||||||
parser.add_option("--smoke-test", dest="smokeTest", action="store_true",
|
parser.add_option("--smoke-test", dest="smokeTest", action="store_true",
|
||||||
help=SUPPRESS_HELP)
|
help=SUPPRESS_HELP)
|
||||||
|
|
||||||
|
|
|
@ -493,7 +493,7 @@ class Connect(object):
|
||||||
|
|
||||||
logger.log(CUSTOM_LOGGING.TRAFFIC_IN, responseMsg)
|
logger.log(CUSTOM_LOGGING.TRAFFIC_IN, responseMsg)
|
||||||
|
|
||||||
if e.code == httplib.UNAUTHORIZED:
|
if e.code == httplib.UNAUTHORIZED and not conf.ignore401:
|
||||||
errMsg = "not authorized, try to provide right HTTP "
|
errMsg = "not authorized, try to provide right HTTP "
|
||||||
errMsg += "authentication type and valid credentials (%d)" % code
|
errMsg += "authentication type and valid credentials (%d)" % code
|
||||||
raise SqlmapConnectionException(errMsg)
|
raise SqlmapConnectionException(errMsg)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user