Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a64407d

Browse files
committed
minor bug fix for multithreading and lots of connection retries
1 parent 22a1870 commit a64407d

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

lib/core/option.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,6 @@ def __setKnowledgeBaseAttributes(flushAll=True):
13551355
kb.redirectSetCookie = None
13561356
kb.responseTimes = []
13571357
kb.resumedQueries = {}
1358-
kb.retriesCount = 0
13591358
kb.singleLogFlags = set()
13601359
kb.skipOthersDbms = None
13611360
kb.suppressSession = False

lib/request/connect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def getPage(**kwargs):
255255
conf.redirectHandled = True
256256

257257
# Reset the number of connection retries
258-
kb.retriesCount = 0
258+
threadData.retriesCount = 0
259259

260260
# Return response object
261261
if response:
@@ -379,8 +379,8 @@ def getPage(**kwargs):
379379
return None, None
380380
elif silent or (ignoreTimeout and any(map(lambda x: x in tbMsg, ["timed out", "IncompleteRead"]))):
381381
return None, None
382-
elif kb.retriesCount < conf.retries and not kb.threadException and not conf.realTest:
383-
kb.retriesCount += 1
382+
elif threadData.retriesCount < conf.retries and not kb.threadException and not conf.realTest:
383+
threadData.retriesCount += 1
384384

385385
warnMsg += ", sqlmap is going to retry the request"
386386
logger.critical(warnMsg)

0 commit comments

Comments
 (0)