mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
minor fix (credentials were only set for the first target)
This commit is contained in:
@@ -34,6 +34,7 @@ from lib.core.exception import sqlmapFilePathException
|
||||
from lib.core.exception import sqlmapGenericException
|
||||
from lib.core.exception import sqlmapSyntaxException
|
||||
from lib.core.exception import sqlmapUserQuitException
|
||||
from lib.core.option import authHandler
|
||||
from lib.core.option import __setDBMS
|
||||
from lib.core.option import __setKnowledgeBaseAttributes
|
||||
from lib.core.session import resumeConfKb
|
||||
@@ -331,6 +332,14 @@ def __setResultsFile():
|
||||
|
||||
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():
|
||||
"""
|
||||
Create the file directory.
|
||||
@@ -440,3 +449,4 @@ def setupTargetEnv():
|
||||
__setHashDB()
|
||||
__resumeHashDBValues()
|
||||
__setResultsFile()
|
||||
__setAuthCred()
|
||||
|
||||
Reference in New Issue
Block a user