mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-13 11:25:27 +00:00
Fixes #6129
This commit is contained in:
parent
8ac458c6bc
commit
92b652177b
2 changed files with 3 additions and 2 deletions
|
|
@ -91,7 +91,8 @@ class HTTPSConnection(_http_client.HTTPSConnection):
|
|||
else:
|
||||
for header, value in conf.httpHeaders:
|
||||
if header.lower() == "host":
|
||||
hostname = value
|
||||
match = re.search(r"\A\[(?P<hostname>.+)\](:\d+)?\Z", value.strip())
|
||||
hostname = match.group("hostname") if match else value.rsplit(":", 1)[0] if ":" in value else value
|
||||
break
|
||||
hostname = hostname if re.search(r"\A[\d.]+\Z", hostname or "") is None else None
|
||||
result = _contexts[protocol].wrap_socket(sock, do_handshake_on_connect=True, server_hostname=hostname)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue