Skip to content

Commit 9c103b3

Browse files
committed
Fixes #5187
1 parent 7f62572 commit 9c103b3

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty.six import unichr as _unichr
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.6.9.3"
23+
VERSION = "1.6.10.0"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/request/connect.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,14 @@ class _(dict):
587587

588588
if not getRequestHeader(req, HTTP_HEADER.COOKIE) and conf.cj:
589589
conf.cj._policy._now = conf.cj._now = int(time.time())
590-
cookies = conf.cj._cookies_for_request(req)
591-
requestHeaders += "\r\n%s" % ("Cookie: %s" % ";".join("%s=%s" % (getUnicode(cookie.name), getUnicode(cookie.value)) for cookie in cookies))
590+
while True:
591+
try:
592+
cookies = conf.cj._cookies_for_request(req)
593+
except RuntimeError: # NOTE: https://github.com/sqlmapproject/sqlmap/issues/5187
594+
time.sleep(1)
595+
else:
596+
requestHeaders += "\r\n%s" % ("Cookie: %s" % ";".join("%s=%s" % (getUnicode(cookie.name), getUnicode(cookie.value)) for cookie in cookies))
597+
break
592598

593599
if post is not None:
594600
if not getRequestHeader(req, HTTP_HEADER.CONTENT_LENGTH) and not chunked:

0 commit comments

Comments
 (0)