mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-03-12 08:55:16 +00:00
Update server.py
This commit is contained in:
parent
41dd4b55f4
commit
4b76e4c954
|
@ -363,7 +363,7 @@ def proxy_server(webserver, port, scheme, method, url, conn, addr, data):
|
|||
|
||||
# when blocked
|
||||
if is_http_403:
|
||||
conn.sendall(b"HTTP/1.1 403 Forbidden\n\n{\"status\":403}")
|
||||
conn.sendall(b"HTTP/1.1 403 Forbidden\r\n\r\n{\"status\":403}")
|
||||
print ("[*] Blocked the request by remote server: %s" % (webserver.decode(client_encoding)))
|
||||
|
||||
sock_close(sock, is_ssl)
|
||||
|
@ -412,7 +412,7 @@ def proxy_server(webserver, port, scheme, method, url, conn, addr, data):
|
|||
except Exception as e:
|
||||
print(traceback.format_exc())
|
||||
print("[*] Exception on requesting the data. Cause: %s" % (str(e)))
|
||||
conn.sendall(b"HTTP/1.1 403 Forbidden\n\n{\"status\":403}")
|
||||
conn.sendall(b"HTTP/1.1 403 Forbidden\r\n\r\n{\"status\":403}")
|
||||
conn.close()
|
||||
|
||||
# journaling a filtered hosts
|
||||
|
|
Loading…
Reference in New Issue
Block a user