mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
Adding a question for storing hashes to a temporary file (after a mention of it on Twitter)
This commit is contained in:
parent
e498694928
commit
db536427f0
|
@ -1661,6 +1661,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.reduceTests = None
|
kb.reduceTests = None
|
||||||
kb.stickyDBMS = False
|
kb.stickyDBMS = False
|
||||||
kb.stickyLevel = None
|
kb.stickyLevel = None
|
||||||
|
kb.storeHashesChoice = None
|
||||||
kb.suppressResumeInfo = False
|
kb.suppressResumeInfo = False
|
||||||
kb.technique = None
|
kb.technique = None
|
||||||
kb.testMode = False
|
kb.testMode = False
|
||||||
|
|
|
@ -358,11 +358,19 @@ def storeHashesToFile(attack_dict):
|
||||||
if not attack_dict:
|
if not attack_dict:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if kb.storeHashesChoice is None:
|
||||||
|
message = "do you want to store hashes to a temporary file "
|
||||||
|
message += "for eventual further processing with other tools [y/N] "
|
||||||
|
test = readInput(message, default="N")
|
||||||
|
kb.storeHashesChoice = test[0] in ("y", "Y")
|
||||||
|
|
||||||
|
if not kb.storeHashesChoice:
|
||||||
|
return
|
||||||
|
|
||||||
handle, filename = tempfile.mkstemp(prefix="sqlmaphashes-", suffix=".txt")
|
handle, filename = tempfile.mkstemp(prefix="sqlmaphashes-", suffix=".txt")
|
||||||
os.close(handle)
|
os.close(handle)
|
||||||
|
|
||||||
infoMsg = "writing hashes to file '%s' " % filename
|
infoMsg = "writing hashes to a temporary file '%s' " % filename
|
||||||
infoMsg += "for eventual further processing with other tools"
|
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
items = set()
|
items = set()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user