mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-09-06 09:51:06 +00:00
Update server.py
This commit is contained in:
parent
caaa4a2f98
commit
0ff6119d15
13
server.py
13
server.py
|
@ -143,11 +143,14 @@ 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])))
|
||||||
|
|
||||||
try:
|
while True:
|
||||||
if scheme in [b'https', b'tls', b'ssl'] and method == b'CONNECT':
|
try:
|
||||||
conn, data = proxy_connect(webserver, conn)
|
if scheme in [b'https', b'tls', b'ssl'] and method == b'CONNECT':
|
||||||
except Exception as e:
|
conn, data = proxy_connect(webserver, conn)
|
||||||
raise Exception("SSL negotiation failed. (%s:%s) %s" % (webserver.decode(client_encoding), str(port), str(e)))
|
except IOError as e:
|
||||||
|
print ("[*] Retrying SSL negotiation... (%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)))
|
||||||
|
|
||||||
response = b''
|
response = b''
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user