@@ -62,6 +62,7 @@ class WebSocketException(Exception):
62
62
from lib .core .common import urldecode
63
63
from lib .core .common import urlencode
64
64
from lib .core .common import wasLastResponseDelayed
65
+ from lib .core .compat import LooseVersion
65
66
from lib .core .compat import patchHeaders
66
67
from lib .core .compat import xrange
67
68
from lib .core .convert import encodeBase64
@@ -109,6 +110,7 @@ class WebSocketException(Exception):
109
110
from lib .core .settings import JAVASCRIPT_HREF_REGEX
110
111
from lib .core .settings import LARGE_READ_TRIM_MARKER
111
112
from lib .core .settings import LIVE_COOKIES_TIMEOUT
113
+ from lib .core .settings import MIN_HTTPX_VERSION
112
114
from lib .core .settings import MAX_CONNECTION_READ_SIZE
113
115
from lib .core .settings import MAX_CONNECTIONS_REGEX
114
116
from lib .core .settings import MAX_CONNECTION_TOTAL_SIZE
@@ -618,6 +620,9 @@ class _(dict):
618
620
except ImportError :
619
621
raise SqlmapMissingDependence ("httpx[http2] not available (e.g. 'pip%s install httpx[http2]')" % ('3' if six .PY3 else "" ))
620
622
623
+ if LooseVersion (httpx .__version__ ) < LooseVersion (MIN_HTTPX_VERSION ):
624
+ raise SqlmapMissingDependence ("outdated version of httpx detected (%s<%s)" % (httpx .__version__ , MIN_HTTPX_VERSION ))
625
+
621
626
try :
622
627
proxy_mounts = dict (("%s://" % key , httpx .HTTPTransport (proxy = "%s%s" % ("http://" if not "://" in kb .proxies [key ] else "" , kb .proxies [key ]))) for key in kb .proxies ) if kb .proxies else None
623
628
with httpx .Client (verify = False , http2 = True , timeout = timeout , follow_redirects = True , cookies = conf .cj , mounts = proxy_mounts ) as client :
0 commit comments