mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +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"
|
warnMsg += "so sqlmap could be able to run properly"
|
||||||
logger.warn(warnMsg)
|
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")
|
test = readInput(message, default="N")
|
||||||
if test[0] not in ("y", "Y"):
|
if test[0] not in ("y", "Y"):
|
||||||
raise SqlmapSilentQuitException
|
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 _:
|
elif not _:
|
||||||
warnMsg = "provided value for parameter '%s' is empty. " % parameter
|
warnMsg = "provided value for parameter '%s' is empty. " % parameter
|
||||||
warnMsg += "Please, always use only valid parameter values "
|
warnMsg += "Please, always use only valid parameter values "
|
||||||
|
@ -824,6 +829,9 @@ def dataToStdout(data, forceOutput=False, bold=False, content_type=None, status=
|
||||||
else:
|
else:
|
||||||
message = data
|
message = data
|
||||||
|
|
||||||
|
if kb.easterEgg:
|
||||||
|
message = "".join(kb.easterEgg.get(_, _) for _ in message)
|
||||||
|
|
||||||
if hasattr(conf, "api"):
|
if hasattr(conf, "api"):
|
||||||
sys.stdout.write(message, status, content_type)
|
sys.stdout.write(message, status, content_type)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -477,11 +477,14 @@ def _adjustLoggingFormatter():
|
||||||
return
|
return
|
||||||
|
|
||||||
def format(record):
|
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:
|
if kb.prependFlag:
|
||||||
_ = "\n%s" % _
|
message = "\n%s" % message
|
||||||
kb.prependFlag = False
|
kb.prependFlag = False
|
||||||
return _
|
return message
|
||||||
|
|
||||||
FORMATTER._format = FORMATTER.format
|
FORMATTER._format = FORMATTER.format
|
||||||
FORMATTER.format = format
|
FORMATTER.format = format
|
||||||
|
@ -1712,6 +1715,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.followSitemapRecursion = None
|
kb.followSitemapRecursion = None
|
||||||
kb.forcedDbms = None
|
kb.forcedDbms = None
|
||||||
kb.forcePartialUnion = False
|
kb.forcePartialUnion = False
|
||||||
|
kb.easterEgg = None
|
||||||
kb.headersFp = {}
|
kb.headersFp = {}
|
||||||
kb.heuristicDbms = None
|
kb.heuristicDbms = None
|
||||||
kb.heuristicMode = False
|
kb.heuristicMode = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user