From a55c61c47d9a75edc565a9712949b88c72d3c963 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 23 Apr 2025 07:17:02 -0700 Subject: [PATCH] Update web.py --- modules/web.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/web.py b/modules/web.py index f05ab65..22986cb 100644 --- a/modules/web.py +++ b/modules/web.py @@ -40,8 +40,8 @@ class QuietHandler(http.server.SimpleHTTPRequestHandler): # Change the current working directory to webRoot os.chdir(webRoot) -# boot up simple HTTP server -httpd = http.server.HTTPServer(('127.0.0.1', PORT), QuietHandler) +# Create the HTTP server instance with the desired IP address +httpd = http.server.HTTPServer((server_ip, PORT), QuietHandler) if SSL: ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) @@ -51,12 +51,9 @@ if SSL: print("SSL certificate file not found. Please generate it using the command provided in the comments.") exit(1) httpd.socket = ctx.wrap_socket(httpd.socket, server_side=True) - -# Create the HTTP server instance with the desired IP address -httpd = http.server.HTTPServer((server_ip, PORT), QuietHandler) - -# Print out the URL using the IP address stored in server_ip -print(f"Serving reports at http://{server_ip}:{PORT} Press ^C to quit.\n\n") + print(f"Serving reports at https://{server_ip}:{PORT} Press ^C to quit.\n\n") +else: + print(f"Serving reports at http://{server_ip}:{PORT} Press ^C to quit.\n\n") if not webServerLogs: print("Server Logs are disabled")