mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
Adding change verbosity level in testing phase when Ctrl+C pressed
This commit is contained in:
parent
304c9822bd
commit
334c698d53
|
@ -570,11 +570,20 @@ def checkSqlInjection(place, parameter, value):
|
||||||
warnMsg = "user aborted during detection phase"
|
warnMsg = "user aborted during detection phase"
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
msg = "how do you want to proceed? [(S)kip current test/(e)nd detection phase/(n)ext parameter/(q)uit]"
|
msg = "how do you want to proceed? [(S)kip current test/(e)nd detection phase/(n)ext parameter/(c)hange verbosity/(q)uit]"
|
||||||
choice = readInput(msg, default="S", checkBatch=False)
|
choice = readInput(msg, default="S", checkBatch=False)
|
||||||
|
|
||||||
if choice[0] in ("s", "S"):
|
if choice[0] in ("s", "S"):
|
||||||
pass
|
pass
|
||||||
|
elif choice[0] in ("c", "C"):
|
||||||
|
choice = None
|
||||||
|
while not ((choice or "").isdigit() and 0 <= int(choice) <= 6):
|
||||||
|
if choice:
|
||||||
|
logger.warn("invalid value")
|
||||||
|
msg = "enter new verbosity level: [0-6] "
|
||||||
|
choice = readInput(msg, default=str(conf.verbose), checkBatch=False).strip()
|
||||||
|
conf.verbose = int(choice)
|
||||||
|
setVerbosity()
|
||||||
elif choice[0] in ("n", "N"):
|
elif choice[0] in ("n", "N"):
|
||||||
return None
|
return None
|
||||||
elif choice[0] in ("e", "E"):
|
elif choice[0] in ("e", "E"):
|
||||||
|
@ -1239,3 +1248,6 @@ def checkConnection(suppressOutput=False):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def setVerbosity(): # Cross-linked function
|
||||||
|
raise NotImplementedError
|
||||||
|
|
|
@ -19,6 +19,7 @@ import time
|
||||||
import urllib2
|
import urllib2
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
|
import lib.controller.checks
|
||||||
import lib.core.common
|
import lib.core.common
|
||||||
import lib.core.threads
|
import lib.core.threads
|
||||||
import lib.core.convert
|
import lib.core.convert
|
||||||
|
@ -2167,6 +2168,7 @@ def _resolveCrossReferences():
|
||||||
lib.core.common.getPageTemplate = getPageTemplate
|
lib.core.common.getPageTemplate = getPageTemplate
|
||||||
lib.core.convert.singleTimeWarnMessage = singleTimeWarnMessage
|
lib.core.convert.singleTimeWarnMessage = singleTimeWarnMessage
|
||||||
lib.request.connect.setHTTPProxy = _setHTTPProxy
|
lib.request.connect.setHTTPProxy = _setHTTPProxy
|
||||||
|
lib.controller.checks.setVerbosity = setVerbosity
|
||||||
|
|
||||||
def initOptions(inputOptions=AttribDict(), overrideOptions=False):
|
def initOptions(inputOptions=AttribDict(), overrideOptions=False):
|
||||||
if not inputOptions.disableColoring:
|
if not inputOptions.disableColoring:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user