mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 06:01:29 +00:00
Minor code restyling
This commit is contained in:
@@ -95,9 +95,9 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||
if lastChar > 0 and length > ( lastChar - firstChar ):
|
||||
length = ( lastChar - firstChar )
|
||||
|
||||
showEta = conf.eta and isinstance(length, int)
|
||||
showEta = conf.eta and isinstance(length, int)
|
||||
numThreads = min(conf.threads, length)
|
||||
threads = []
|
||||
threads = []
|
||||
|
||||
if showEta:
|
||||
progress = ProgressBar(maxValue=length)
|
||||
@@ -250,7 +250,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||
logger.error(errMsg)
|
||||
|
||||
conf.timeSec += 1
|
||||
warnMsg = "increasing time delay to %d second%s " % (conf.timeSec, 's' if conf.timeSec > 1 else '')
|
||||
warnMsg = "increasing time delay to %d second%s " % (conf.timeSec, 's' if conf.timeSec > 1 else '')
|
||||
warnMsg += "(due to invalid char)"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
@@ -294,11 +294,11 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||
|
||||
# Go multi-threading (--threads > 1)
|
||||
if conf.threads > 1 and isinstance(length, int) and length > 1:
|
||||
value = [ None ] * length
|
||||
index = [ firstChar ] # As list for python nested function scoping
|
||||
value = [ None ] * length
|
||||
index = [ firstChar ] # As list for python nested function scoping
|
||||
idxlock = threading.Lock()
|
||||
iolock = threading.Lock()
|
||||
valuelock = threading.Lock()
|
||||
iolock = threading.Lock()
|
||||
valuelock = threading.Lock()
|
||||
kb.threadContinue = True
|
||||
|
||||
def downloadThread():
|
||||
|
||||
@@ -304,7 +304,7 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||
try:
|
||||
if stopLimit > TURN_OFF_RESUME_INFO_LIMIT:
|
||||
kb.suppressResumeInfo = True
|
||||
infoMsg = "suppressing resume console info because of "
|
||||
infoMsg = "suppressing resume console info because of "
|
||||
infoMsg += "large number of rows (possible slowdown)"
|
||||
logger.info(infoMsg)
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ def unionUse(expression, unpack=True, dump=False):
|
||||
try:
|
||||
if stopLimit > TURN_OFF_RESUME_INFO_LIMIT:
|
||||
kb.suppressResumeInfo = True
|
||||
infoMsg = "suppressing resume console info because of "
|
||||
infoMsg = "suppressing resume console info because of "
|
||||
infoMsg += "large number of rows (possible slowdown)"
|
||||
logger.info(infoMsg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user