Skip to content

Commit

Permalink
Rollback server.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gnh1201 authored Feb 17, 2024
1 parent 4ecac82 commit 6cef3d6
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,11 @@ def proxy_server(webserver, port, scheme, method, url, conn, addr, data):
try:
print("[*] Started the request. %s" % (str(addr[0])))

retry = False
while True:
try:
if scheme in [b'https', b'tls', b'ssl'] and method == b'CONNECT':
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:
raise Exception("SSL negotiation failed. (%s:%s) %s" % (webserver.decode(client_encoding), str(port), str(e)))
try:
if scheme in [b'https', b'tls', b'ssl'] and method == b'CONNECT':
conn, data = proxy_connect(webserver, conn)
except Exception as e:
raise Exception("SSL negotiation failed. (%s:%s) %s" % (webserver.decode(client_encoding), str(port), str(e)))

response = b''

Expand Down

0 comments on commit 6cef3d6

Please sign in to comment.