mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-04 07:43:44 +03:00
parent
f04584bb68
commit
070e173067
|
@ -997,11 +997,6 @@ def readInput(message, default=None, checkBatch=True, boolean=False):
|
||||||
retVal = None
|
retVal = None
|
||||||
kb.stickyLevel = None
|
kb.stickyLevel = None
|
||||||
|
|
||||||
if kb.lastInputMessage == message:
|
|
||||||
checkBatch = False
|
|
||||||
else:
|
|
||||||
kb.lastInputMessage = message
|
|
||||||
|
|
||||||
message = getUnicode(message)
|
message = getUnicode(message)
|
||||||
|
|
||||||
if "\n" in message:
|
if "\n" in message:
|
||||||
|
|
|
@ -1792,7 +1792,6 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.injection = InjectionDict()
|
kb.injection = InjectionDict()
|
||||||
kb.injections = []
|
kb.injections = []
|
||||||
kb.laggingChecked = False
|
kb.laggingChecked = False
|
||||||
kb.lastInputMessage = None
|
|
||||||
kb.lastParserStatus = None
|
kb.lastParserStatus = None
|
||||||
|
|
||||||
kb.locks = AttribDict()
|
kb.locks = AttribDict()
|
||||||
|
|
|
@ -168,19 +168,8 @@ class Metasploit:
|
||||||
|
|
||||||
choice = readInput(message, default="%d" % default)
|
choice = readInput(message, default="%d" % default)
|
||||||
|
|
||||||
if not choice:
|
if not choice or not choice.isdigit() or int(choice) > maxValue or int(choice) < 1:
|
||||||
if lst:
|
choice = default
|
||||||
choice = getUnicode(default, UNICODE_ENCODING)
|
|
||||||
else:
|
|
||||||
return default
|
|
||||||
|
|
||||||
elif not choice.isdigit():
|
|
||||||
logger.warn("invalid value, only digits are allowed")
|
|
||||||
return self._skeletonSelection(msg, lst, maxValue, default)
|
|
||||||
|
|
||||||
elif int(choice) > maxValue or int(choice) < 1:
|
|
||||||
logger.warn("invalid value, it must be a digit between 1 and %d" % maxValue)
|
|
||||||
return self._skeletonSelection(msg, lst, maxValue, default)
|
|
||||||
|
|
||||||
choice = int(choice)
|
choice = int(choice)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user