This commit is contained in:
Miroslav Stampar 2019-06-17 16:40:08 +02:00
parent 797bc7b75f
commit 60f69a5ca0
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.6.45" VERSION = "1.3.6.46"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} 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) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@ -14,12 +14,12 @@ class ChunkedHandler(_urllib.request.HTTPHandler):
""" """
def _http_request(self, request): def _http_request(self, request):
host = request.get_host() host = request.get_host() if hasattr(request, "get_host") else request.host
if not host: if not host:
raise _urllib.error.URLError("no host given") raise _urllib.error.URLError("no host given")
if request.has_data(): # POST if request.data is not None: # POST
data = request.get_data() data = request.data
if not request.has_header("Content-type"): if not request.has_header("Content-type"):
request.add_unredirected_header( request.add_unredirected_header(
"Content-type", "Content-type",