@@ -62,6 +62,7 @@ class WebSocketException(Exception):
6262from lib .core .common import urldecode
6363from lib .core .common import urlencode
6464from lib .core .common import wasLastResponseDelayed
65+ from lib .core .compat import LooseVersion
6566from lib .core .compat import patchHeaders
6667from lib .core .compat import xrange
6768from lib .core .convert import encodeBase64
@@ -109,6 +110,7 @@ class WebSocketException(Exception):
109110from lib .core .settings import JAVASCRIPT_HREF_REGEX
110111from lib .core .settings import LARGE_READ_TRIM_MARKER
111112from lib .core .settings import LIVE_COOKIES_TIMEOUT
113+ from lib .core .settings import MIN_HTTPX_VERSION
112114from lib .core .settings import MAX_CONNECTION_READ_SIZE
113115from lib .core .settings import MAX_CONNECTIONS_REGEX
114116from lib .core .settings import MAX_CONNECTION_TOTAL_SIZE
@@ -618,6 +620,9 @@ class _(dict):
618620 except ImportError :
619621 raise SqlmapMissingDependence ("httpx[http2] not available (e.g. 'pip%s install httpx[http2]')" % ('3' if six .PY3 else "" ))
620622
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+
621626 try :
622627 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
623628 with httpx .Client (verify = False , http2 = True , timeout = timeout , follow_redirects = True , cookies = conf .cj , mounts = proxy_mounts ) as client :
0 commit comments