Patch for an Issue #1434

This commit is contained in:
Miroslav Stampar
2015-09-27 15:59:17 +02:00
parent 38541b021a
commit 5ed106ecea
6 changed files with 15 additions and 13 deletions

View File

@@ -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,
}

View File

@@ -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(_)

View File

@@ -37,7 +37,7 @@ optDict = {
"headers": "string",
"authType": "string",
"authCred": "string",
"authPrivate": "string",
"authFile": "string",
"proxy": "string",
"proxyCred": "string",
"proxyFile": "string",