mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-24 16:39:04 +00:00
Adding switch --http1.0
This commit is contained in:
@@ -2517,7 +2517,7 @@ def _setTorSocksProxySettings():
|
||||
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5 if conf.torType == PROXY_TYPE.SOCKS5 else socks.PROXY_TYPE_SOCKS4, LOCALHOST, port)
|
||||
socks.wrapmodule(_http_client)
|
||||
|
||||
def _setHttpChunked():
|
||||
def _setHttpOptions():
|
||||
if conf.chunked and conf.data:
|
||||
if hasattr(_http_client.HTTPConnection, "_set_content_length"):
|
||||
_http_client.HTTPConnection._set_content_length = lambda self, *args, **kwargs: None
|
||||
@@ -2531,7 +2531,10 @@ def _setHttpChunked():
|
||||
|
||||
_http_client.HTTPConnection.putheader = putheader
|
||||
|
||||
def _checkWebSocket():
|
||||
if conf.http10:
|
||||
_http_client.HTTPConnection._http_vsn = 10
|
||||
_http_client.HTTPConnection._http_vsn_str = 'HTTP/1.0'
|
||||
|
||||
if conf.url and (conf.url.startswith("ws:/") or conf.url.startswith("wss:/")):
|
||||
try:
|
||||
from websocket import ABNF
|
||||
@@ -2918,8 +2921,7 @@ def init():
|
||||
_setPostprocessFunctions()
|
||||
_setTrafficOutputFP()
|
||||
_setupHTTPCollector()
|
||||
_setHttpChunked()
|
||||
_checkWebSocket()
|
||||
_setHttpOptions()
|
||||
|
||||
parseTargetDirect()
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import OS
|
||||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.9.8.5"
|
||||
VERSION = "1.9.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)
|
||||
|
||||
Reference in New Issue
Block a user