mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
fix for those ugly DEBUG messages in brute mode
This commit is contained in:
parent
5b21352656
commit
228cc68747
|
@ -1234,9 +1234,8 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.authHeader = None
|
kb.authHeader = None
|
||||||
kb.bannerFp = advancedDict()
|
kb.bannerFp = advancedDict()
|
||||||
|
|
||||||
kb.brute = advancedDict()
|
kb.brute = advancedDict({'tables':[], 'columns':[]})
|
||||||
kb.brute.tables = []
|
kb.bruteMode = False
|
||||||
kb.brute.columns = []
|
|
||||||
|
|
||||||
kb.cache = advancedDict()
|
kb.cache = advancedDict()
|
||||||
kb.cache.content = {}
|
kb.cache.content = {}
|
||||||
|
|
|
@ -63,8 +63,9 @@ def __goInference(payload, expression, charsetType=None, firstChar=None, lastCha
|
||||||
|
|
||||||
count, value = bisection(payload, expression, length, charsetType, firstChar, lastChar, dump)
|
count, value = bisection(payload, expression, length, charsetType, firstChar, lastChar, dump)
|
||||||
|
|
||||||
debugMsg = "performed %d queries in %d seconds" % (count, calculateDeltaSeconds(start))
|
if not kb.bruteMode:
|
||||||
logger.debug(debugMsg)
|
debugMsg = "performed %d queries in %d seconds" % (count, calculateDeltaSeconds(start))
|
||||||
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ def tableExists(tableFile, regex=None):
|
||||||
tbllock = threading.Lock()
|
tbllock = threading.Lock()
|
||||||
iolock = threading.Lock()
|
iolock = threading.Lock()
|
||||||
kb.threadContinue = True
|
kb.threadContinue = True
|
||||||
|
kb.bruteMode = True
|
||||||
|
|
||||||
def tableExistsThread():
|
def tableExistsThread():
|
||||||
while count[0] < length and kb.threadContinue:
|
while count[0] < length and kb.threadContinue:
|
||||||
|
@ -140,6 +141,7 @@ def tableExists(tableFile, regex=None):
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
raise sqlmapThreadException, "user aborted"
|
raise sqlmapThreadException, "user aborted"
|
||||||
finally:
|
finally:
|
||||||
|
kb.bruteMode = False
|
||||||
kb.threadContinue = True
|
kb.threadContinue = True
|
||||||
kb.threadException = False
|
kb.threadException = False
|
||||||
|
|
||||||
|
@ -182,6 +184,7 @@ def columnExists(columnFile, regex=None):
|
||||||
collock = threading.Lock()
|
collock = threading.Lock()
|
||||||
iolock = threading.Lock()
|
iolock = threading.Lock()
|
||||||
kb.threadContinue = True
|
kb.threadContinue = True
|
||||||
|
kb.bruteMode = True
|
||||||
|
|
||||||
def columnExistsThread():
|
def columnExistsThread():
|
||||||
while count[0] < length and kb.threadContinue:
|
while count[0] < length and kb.threadContinue:
|
||||||
|
@ -256,6 +259,7 @@ def columnExists(columnFile, regex=None):
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
raise sqlmapThreadException, "user aborted"
|
raise sqlmapThreadException, "user aborted"
|
||||||
finally:
|
finally:
|
||||||
|
kb.bruteMode = False
|
||||||
kb.threadContinue = True
|
kb.threadContinue = True
|
||||||
kb.threadException = False
|
kb.threadException = False
|
||||||
|
|
||||||
|
|
|
@ -307,7 +307,8 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||||
|
|
||||||
duration = calculateDeltaSeconds(start)
|
duration = calculateDeltaSeconds(start)
|
||||||
|
|
||||||
debugMsg = "performed %d queries in %d seconds" % (reqCount, duration)
|
if not kb.bruteMode:
|
||||||
logger.debug(debugMsg)
|
debugMsg = "performed %d queries in %d seconds" % (reqCount, duration)
|
||||||
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
return outputs
|
return outputs
|
||||||
|
|
|
@ -269,7 +269,8 @@ def unionUse(expression, unpack=True, dump=False):
|
||||||
|
|
||||||
duration = calculateDeltaSeconds(start)
|
duration = calculateDeltaSeconds(start)
|
||||||
|
|
||||||
debugMsg = "performed %d queries in %d seconds" % (reqCount, duration)
|
if not kb.bruteMode:
|
||||||
logger.debug(debugMsg)
|
debugMsg = "performed %d queries in %d seconds" % (reqCount, duration)
|
||||||
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
return value
|
return value
|
||||||
|
|
Loading…
Reference in New Issue
Block a user