mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-02-11 17:35:00 +00:00
Update server.py
This commit is contained in:
parent
6cef3d688f
commit
24285dbff6
|
@ -143,9 +143,16 @@ def proxy_server(webserver, port, scheme, method, url, conn, addr, data):
|
|||
try:
|
||||
print("[*] Started the request. %s" % (str(addr[0])))
|
||||
|
||||
retry = False
|
||||
try:
|
||||
if scheme in [b'https', b'tls', b'ssl'] and method == b'CONNECT':
|
||||
conn, data = proxy_connect(webserver, conn)
|
||||
except OSError as e:
|
||||
if not retry:
|
||||
print ("[*] Retrying SSL negotiation..." % (webserver.decode(client_encoding), str(port), str(e)))
|
||||
retry = True
|
||||
else:
|
||||
raise Exception("SSL negotiation failed. (%s:%s) %s" % (webserver.decode(client_encoding), str(port), str(e)))
|
||||
except Exception as e:
|
||||
raise Exception("SSL negotiation failed. (%s:%s) %s" % (webserver.decode(client_encoding), str(port), str(e)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user