mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-30 18:03:08 +03:00
Fix for an Issue #125
This commit is contained in:
parent
6f529542e3
commit
f797a6d813
|
@ -993,6 +993,15 @@ def __setPrefixSuffix():
|
||||||
# to be tested for
|
# to be tested for
|
||||||
conf.boundaries = [ boundary ]
|
conf.boundaries = [ boundary ]
|
||||||
|
|
||||||
|
def __setAuthCred():
|
||||||
|
"""
|
||||||
|
Adds authentication credentials (if any) for current target to the password manager
|
||||||
|
(used by connection handler)
|
||||||
|
"""
|
||||||
|
|
||||||
|
if kb.passwordMgr:
|
||||||
|
kb.passwordMgr.add_password(None, "%s://%s" % (conf.scheme, conf.hostname), conf.authUsername, conf.authPassword)
|
||||||
|
|
||||||
def __setHTTPAuthentication():
|
def __setHTTPAuthentication():
|
||||||
"""
|
"""
|
||||||
Check and set the HTTP(s) authentication method (Basic, Digest, NTLM or Certificate),
|
Check and set the HTTP(s) authentication method (Basic, Digest, NTLM or Certificate),
|
||||||
|
@ -1044,6 +1053,8 @@ def __setHTTPAuthentication():
|
||||||
|
|
||||||
kb.passwordMgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
|
kb.passwordMgr = urllib2.HTTPPasswordMgrWithDefaultRealm()
|
||||||
|
|
||||||
|
__setAuthCred()
|
||||||
|
|
||||||
if aTypeLower == "basic":
|
if aTypeLower == "basic":
|
||||||
authHandler = SmartHTTPBasicAuthHandler(kb.passwordMgr)
|
authHandler = SmartHTTPBasicAuthHandler(kb.passwordMgr)
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ from lib.core.exception import sqlmapUserQuitException
|
||||||
from lib.core.option import authHandler
|
from lib.core.option import authHandler
|
||||||
from lib.core.option import __setDBMS
|
from lib.core.option import __setDBMS
|
||||||
from lib.core.option import __setKnowledgeBaseAttributes
|
from lib.core.option import __setKnowledgeBaseAttributes
|
||||||
|
from lib.core.option import __setAuthCred
|
||||||
from lib.core.settings import CUSTOM_INJECTION_MARK_CHAR
|
from lib.core.settings import CUSTOM_INJECTION_MARK_CHAR
|
||||||
from lib.core.settings import HOST_ALIASES
|
from lib.core.settings import HOST_ALIASES
|
||||||
from lib.core.settings import REFERER_ALIASES
|
from lib.core.settings import REFERER_ALIASES
|
||||||
|
@ -332,14 +333,6 @@ def __setResultsFile():
|
||||||
|
|
||||||
logger.info("using '%s' as results file" % conf.resultsFilename)
|
logger.info("using '%s' as results file" % conf.resultsFilename)
|
||||||
|
|
||||||
def __setAuthCred():
|
|
||||||
"""
|
|
||||||
Adds authentication credentials (if any) for current target to the password manager (used by connection handler).
|
|
||||||
"""
|
|
||||||
|
|
||||||
if kb.passwordMgr:
|
|
||||||
kb.passwordMgr.add_password(None, "%s://%s" % (conf.scheme, conf.hostname), conf.authUsername, conf.authPassword)
|
|
||||||
|
|
||||||
def __createFilesDir():
|
def __createFilesDir():
|
||||||
"""
|
"""
|
||||||
Create the file directory.
|
Create the file directory.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user