mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
Patch for an Issue #1434
This commit is contained in:
@@ -223,6 +223,7 @@ DEPRECATED_OPTIONS = {
|
||||
"--replicate": "use '--dump-format=SQLITE' instead",
|
||||
"--no-unescape": "use '--no-escape' instead",
|
||||
"--binary": "use '--binary-fields' instead",
|
||||
"--auth-private": "use '--auth-file' instead",
|
||||
"--check-payload": None,
|
||||
"--check-waf": None,
|
||||
}
|
||||
|
||||
@@ -1264,13 +1264,13 @@ def _setHTTPAuthentication():
|
||||
|
||||
global authHandler
|
||||
|
||||
if not conf.authType and not conf.authCred and not conf.authPrivate:
|
||||
if not conf.authType and not conf.authCred and not conf.authFile:
|
||||
return
|
||||
|
||||
if conf.authPrivate and not conf.authType:
|
||||
if conf.authFile and not conf.authType:
|
||||
conf.authType = AUTH_TYPE.PKI
|
||||
|
||||
elif conf.authType and not conf.authCred and not conf.authPrivate:
|
||||
elif conf.authType and not conf.authCred and not conf.authFile:
|
||||
errMsg = "you specified the HTTP authentication type, but "
|
||||
errMsg += "did not provide the credentials"
|
||||
raise SqlmapSyntaxException(errMsg)
|
||||
@@ -1285,7 +1285,7 @@ def _setHTTPAuthentication():
|
||||
errMsg += "Basic, Digest, NTLM or PKI"
|
||||
raise SqlmapSyntaxException(errMsg)
|
||||
|
||||
if not conf.authPrivate:
|
||||
if not conf.authFile:
|
||||
debugMsg = "setting the HTTP authentication type and credentials"
|
||||
logger.debug(debugMsg)
|
||||
|
||||
@@ -1336,7 +1336,7 @@ def _setHTTPAuthentication():
|
||||
debugMsg = "setting the HTTP(s) authentication PEM private key"
|
||||
logger.debug(debugMsg)
|
||||
|
||||
_ = safeExpandUser(conf.authPrivate)
|
||||
_ = safeExpandUser(conf.authFile)
|
||||
checkFile(_)
|
||||
authHandler = HTTPSPKIAuthHandler(_)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ optDict = {
|
||||
"headers": "string",
|
||||
"authType": "string",
|
||||
"authCred": "string",
|
||||
"authPrivate": "string",
|
||||
"authFile": "string",
|
||||
"proxy": "string",
|
||||
"proxyCred": "string",
|
||||
"proxyFile": "string",
|
||||
|
||||
Reference in New Issue
Block a user