This commit is contained in:
Miroslav Stampar
2017-08-16 03:08:58 +02:00
parent 5b6926ae05
commit a761e1d165
4 changed files with 7 additions and 11 deletions

View File

@@ -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.1.8.5"
VERSION = "1.1.8.6"
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)

View File

@@ -46,7 +46,7 @@ from lib.utils.htmlentities import htmlEntities
from thirdparty.chardet import detect
from thirdparty.odict.odict import OrderedDict
def forgeHeaders(items=None):
def forgeHeaders(items=None, base=None):
"""
Prepare HTTP Cookie, HTTP User-Agent and HTTP Referer headers to use when performing
the HTTP requests
@@ -58,7 +58,7 @@ def forgeHeaders(items=None):
if items[_] is None:
del items[_]
headers = OrderedDict(conf.httpHeaders)
headers = OrderedDict(base or conf.httpHeaders)
headers.update(items.items())
class _str(str):

View File

@@ -384,11 +384,7 @@ class Connect(object):
headers = forgeHeaders({HTTP_HEADER.COOKIE: cookie})
if auxHeaders:
for key, value in auxHeaders.items():
for _ in headers.keys():
if _.upper() == key.upper():
del headers[_]
headers[key] = value
headers = forgeHeaders(auxHeaders, headers)
for key, value in headers.items():
del headers[key]