mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-14 19:59:03 +00:00
Proper patch related to the #3009
This commit is contained in:
@@ -2359,7 +2359,7 @@ def _checkTor():
|
||||
logger.info(infoMsg)
|
||||
|
||||
try:
|
||||
page, _, _ = Request.getPage(url="https://check.torproject.org/", referer=None, raise404=False)
|
||||
page, _, _ = Request.getPage(url="https://check.torproject.org/", raise404=False)
|
||||
except SqlmapConnectionException:
|
||||
page = None
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.2.3.43"
|
||||
VERSION = "1.2.3.44"
|
||||
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)
|
||||
|
||||
@@ -61,7 +61,7 @@ def forgeHeaders(items=None, base=None):
|
||||
if items[_] is None:
|
||||
del items[_]
|
||||
|
||||
headers = OrderedDict(base or conf.httpHeaders)
|
||||
headers = OrderedDict(conf.httpHeaders if base is None else base)
|
||||
headers.update(items.items())
|
||||
|
||||
class _str(str):
|
||||
|
||||
@@ -346,7 +346,7 @@ class Connect(object):
|
||||
requestMsg += " %s" % httplib.HTTPConnection._http_vsn_str
|
||||
|
||||
# Prepare HTTP headers
|
||||
headers = forgeHeaders({HTTP_HEADER.COOKIE: cookie, HTTP_HEADER.USER_AGENT: ua, HTTP_HEADER.REFERER: referer, HTTP_HEADER.HOST: host})
|
||||
headers = forgeHeaders({HTTP_HEADER.COOKIE: cookie, HTTP_HEADER.USER_AGENT: ua, HTTP_HEADER.REFERER: referer, HTTP_HEADER.HOST: host}, base=None if target else {})
|
||||
|
||||
if HTTP_HEADER.COOKIE in headers:
|
||||
cookie = headers[HTTP_HEADER.COOKIE]
|
||||
|
||||
Reference in New Issue
Block a user