mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-14 11:56:17 +00:00
Fix for retried requests (e.g. timeout, 429, dead proxy) losing the response page
This commit is contained in:
parent
7944f0e7e8
commit
445516b151
2 changed files with 6 additions and 4 deletions
|
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.11.36"
|
||||
VERSION = "1.10.11.37"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ class Connect(object):
|
|||
threadData = getCurrentThreadData()
|
||||
with kb.locks.request:
|
||||
kb.requestCounter += 1
|
||||
threadData.lastRequestUID = kb.requestCounter
|
||||
threadData.lastRequestUID = requestUID = kb.requestCounter
|
||||
|
||||
if conf.proxyFreq:
|
||||
if kb.requestCounter % conf.proxyFreq == 0:
|
||||
|
|
@ -1115,8 +1115,10 @@ class Connect(object):
|
|||
if kb.postHint == POST_HINT.GRPC_WEB:
|
||||
page = grpcDecodeResponse(page, responseHeaders)
|
||||
|
||||
threadData.lastPage = page
|
||||
threadData.lastCode = code
|
||||
# Note: in case of a (nested) retried request, its (last) response is the relevant one
|
||||
if threadData.lastRequestUID == requestUID:
|
||||
threadData.lastPage = page
|
||||
threadData.lastCode = code
|
||||
|
||||
socket.setdefaulttimeout(conf.timeout)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue