mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-09 17:51:33 +00:00
minor fix (credentials were only set for the first target)
This commit is contained in:
parent
738073105e
commit
f94ebe3107
2 changed files with 19 additions and 7 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue