mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-04-25 19:33:48 +03:00
Minor adjustment to notify the user that the --auth-cred format for NTLM authentication is "DOMAIN\user:password"
This commit is contained in:
parent
652daa616e
commit
effc7dc41c
|
@ -581,12 +581,18 @@ def __setHTTPAuthentication():
|
||||||
errMsg = "HTTP authentication type value must be "
|
errMsg = "HTTP authentication type value must be "
|
||||||
errMsg += "Basic, Digest or NTLM"
|
errMsg += "Basic, Digest or NTLM"
|
||||||
raise sqlmapSyntaxException, errMsg
|
raise sqlmapSyntaxException, errMsg
|
||||||
|
elif aTypeLower in ( "basic", "digest" ):
|
||||||
|
regExp = "^(.*?):(.*?)$"
|
||||||
|
errMsg = "HTTP %s authentication credentials " % aTypeLower
|
||||||
|
errMsg += "value must be in format username:password"
|
||||||
|
elif aTypeLower == "ntlm":
|
||||||
|
regExp = "^(.*?)\\\(.*?):(.*?)$"
|
||||||
|
errMsg = "HTTP NTLM authentication credentials value must "
|
||||||
|
errMsg += "be in format DOMAIN\username:password"
|
||||||
|
|
||||||
aCredRegExp = re.search("^(.*?)\:(.*?)$", conf.aCred)
|
aCredRegExp = re.search(regExp, conf.aCred)
|
||||||
|
|
||||||
if not aCredRegExp:
|
if not aCredRegExp:
|
||||||
errMsg = "HTTP authentication credentials value must be "
|
|
||||||
errMsg += "in format username:password"
|
|
||||||
raise sqlmapSyntaxException, errMsg
|
raise sqlmapSyntaxException, errMsg
|
||||||
|
|
||||||
authUsername = aCredRegExp.group(1)
|
authUsername = aCredRegExp.group(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user