Merge branch 'master' of github.com:sqlmapproject/sqlmap

This commit is contained in:
Bernardo Damele 2013-01-16 15:14:04 +00:00
commit 8d0ab2fd43
3 changed files with 7 additions and 4 deletions

View File

@ -1556,7 +1556,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
kb.lastParserStatus = None kb.lastParserStatus = None
kb.locks = AttribDict() kb.locks = AttribDict()
for _ in ("cache", "count", "index", "io", "limit", "log", "value"): for _ in ("cache", "count", "index", "io", "limit", "log", "request", "value"):
kb.locks[_] = threading.Lock() kb.locks[_] = threading.Lock()
kb.matchRatio = None kb.matchRatio = None
@ -1595,6 +1595,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
kb.redirectSetCookie = None kb.redirectSetCookie = None
kb.reflectiveMechanism = True kb.reflectiveMechanism = True
kb.reflectiveCounters = {REFLECTIVE_COUNTER.MISS: 0, REFLECTIVE_COUNTER.HIT: 0} kb.reflectiveCounters = {REFLECTIVE_COUNTER.MISS: 0, REFLECTIVE_COUNTER.HIT: 0}
kb.requestCounter = 0
kb.responseTimes = [] kb.responseTimes = []
kb.resumeValues = True kb.resumeValues = True
kb.safeCharEncode = False kb.safeCharEncode = False
@ -2007,7 +2008,7 @@ def _basicOptionValidation():
raise SqlmapSyntaxException(errMsg) raise SqlmapSyntaxException(errMsg)
if conf.threads > MAX_NUMBER_OF_THREADS: if conf.threads > MAX_NUMBER_OF_THREADS:
errMsg = "maximum number of used threads is %d avoiding possible connection issues" % MAX_NUMBER_OF_THREADS errMsg = "maximum number of used threads is %d avoiding potential connection issues" % MAX_NUMBER_OF_THREADS
raise SqlmapSyntaxException(errMsg) raise SqlmapSyntaxException(errMsg)
if conf.forms and not any((conf.url, conf.bulkFile)): if conf.forms and not any((conf.url, conf.bulkFile)):

View File

@ -110,7 +110,7 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
choice = readInput(message, default=str(numThreads)) choice = readInput(message, default=str(numThreads))
if choice and choice.isdigit(): if choice and choice.isdigit():
if int(choice) > MAX_NUMBER_OF_THREADS: if int(choice) > MAX_NUMBER_OF_THREADS:
errMsg = "maximum number of used threads is %d avoiding possible connection issues" % MAX_NUMBER_OF_THREADS errMsg = "maximum number of used threads is %d avoiding potential connection issues" % MAX_NUMBER_OF_THREADS
logger.critical(errMsg) logger.critical(errMsg)
else: else:
numThreads = int(choice) numThreads = int(choice)

View File

@ -179,7 +179,9 @@ class Connect(object):
cpuThrottle(conf.cpuThrottle) cpuThrottle(conf.cpuThrottle)
threadData = getCurrentThreadData() threadData = getCurrentThreadData()
threadData.lastRequestUID += 1 with kb.locks.request:
kb.requestCounter += 1
threadData.lastRequestUID = kb.requestCounter
url = kwargs.get('url', conf.url) url = kwargs.get('url', conf.url)
get = kwargs.get('get', None) get = kwargs.get('get', None)