From 4b3283e00d2d53e3c4ab3988e7f7f03509fea7fd Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sat, 14 Sep 2024 14:45:09 -0500 Subject: [PATCH] Implement `--local` mode --- src/sanescansrv/server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sanescansrv/server.py b/src/sanescansrv/server.py index 15ffe86..1b86778 100644 --- a/src/sanescansrv/server.py +++ b/src/sanescansrv/server.py @@ -998,10 +998,15 @@ def run() -> None: if target == "None": print("No default device in config file.\n") + ip_address: str | None = None + if "--local" in sys.argv[1:]: + ip_address = "127.0.0.1" + serve_scanner( target, secure_bind_port=secure_bind_port, insecure_bind_port=insecure_bind_port, + ip_addr=ip_address, hypercorn=hypercorn, )