mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-03-12 17:05:16 +00:00
Rollback server.py
This commit is contained in:
parent
4ecac82238
commit
6cef3d688f
|
@ -143,17 +143,9 @@ def proxy_server(webserver, port, scheme, method, url, conn, addr, data):
|
||||||
try:
|
try:
|
||||||
print("[*] Started the request. %s" % (str(addr[0])))
|
print("[*] Started the request. %s" % (str(addr[0])))
|
||||||
|
|
||||||
retry = False
|
|
||||||
while True:
|
|
||||||
try:
|
try:
|
||||||
if scheme in [b'https', b'tls', b'ssl'] and method == b'CONNECT':
|
if scheme in [b'https', b'tls', b'ssl'] and method == b'CONNECT':
|
||||||
conn, data = proxy_connect(webserver, conn)
|
conn, data = proxy_connect(webserver, conn)
|
||||||
except IOError as e:
|
|
||||||
if not retry:
|
|
||||||
retry = True
|
|
||||||
print ("[*] Retrying SSL negotiation... (%s:%s) %s" % (webserver.decode(client_encoding), str(port), str(e)))
|
|
||||||
else:
|
|
||||||
raise Exception("IOError: %s" % (str(e)))
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise Exception("SSL negotiation failed. (%s:%s) %s" % (webserver.decode(client_encoding), str(port), str(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