File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020from thirdparty import six
2121
2222# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23- VERSION = "1.10.9.22 "
23+ VERSION = "1.10.9.23 "
2424TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2525TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2626VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
Original file line number Diff line number Diff line change @@ -91,7 +91,8 @@ def create_sock():
9191 else :
9292 for header , value in conf .httpHeaders :
9393 if header .lower () == "host" :
94- hostname = value
94+ match = re .search (r"\A\[(?P<hostname>.+)\](:\d+)?\Z" , value .strip ())
95+ hostname = match .group ("hostname" ) if match else value .rsplit (":" , 1 )[0 ] if ":" in value else value
9596 break
9697 hostname = hostname if re .search (r"\A[\d.]+\Z" , hostname or "" ) is None else None
9798 result = _contexts [protocol ].wrap_socket (sock , do_handshake_on_connect = True , server_hostname = hostname )
You can’t perform that action at this time.
0 commit comments