mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Minor enhancement
This commit is contained in:
parent
b7cfaa6ca5
commit
779db7cbc3
|
@ -582,10 +582,15 @@ def paramToDict(place, parameters=None):
|
|||
warnMsg += "so sqlmap could be able to run properly"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
message = "are you sure you want to continue? [y/N] "
|
||||
message = "are you really sure that you want to continue (sqlmap could have problems)? [y/N] "
|
||||
test = readInput(message, default="N")
|
||||
if test[0] not in ("y", "Y"):
|
||||
raise SqlmapSilentQuitException
|
||||
else:
|
||||
original = [_ for _ in string.ascii_letters + string.digits]
|
||||
shuffled = list(original)
|
||||
random.shuffle(shuffled)
|
||||
kb.easterEgg = dict(_ for _ in zip(original, shuffled))
|
||||
elif not _:
|
||||
warnMsg = "provided value for parameter '%s' is empty. " % parameter
|
||||
warnMsg += "Please, always use only valid parameter values "
|
||||
|
@ -824,6 +829,9 @@ def dataToStdout(data, forceOutput=False, bold=False, content_type=None, status=
|
|||
else:
|
||||
message = data
|
||||
|
||||
if kb.easterEgg:
|
||||
message = "".join(kb.easterEgg.get(_, _) for _ in message)
|
||||
|
||||
if hasattr(conf, "api"):
|
||||
sys.stdout.write(message, status, content_type)
|
||||
else:
|
||||
|
|
|
@ -477,11 +477,14 @@ def _adjustLoggingFormatter():
|
|||
return
|
||||
|
||||
def format(record):
|
||||
_ = boldifyMessage(FORMATTER._format(record))
|
||||
message = FORMATTER._format(record)
|
||||
if kb.easterEgg:
|
||||
message = "".join(kb.easterEgg.get(_, _) for _ in message)
|
||||
message = boldifyMessage(message)
|
||||
if kb.prependFlag:
|
||||
_ = "\n%s" % _
|
||||
message = "\n%s" % message
|
||||
kb.prependFlag = False
|
||||
return _
|
||||
return message
|
||||
|
||||
FORMATTER._format = FORMATTER.format
|
||||
FORMATTER.format = format
|
||||
|
@ -1712,6 +1715,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
|||
kb.followSitemapRecursion = None
|
||||
kb.forcedDbms = None
|
||||
kb.forcePartialUnion = False
|
||||
kb.easterEgg = None
|
||||
kb.headersFp = {}
|
||||
kb.heuristicDbms = None
|
||||
kb.heuristicMode = False
|
||||
|
|
Loading…
Reference in New Issue
Block a user