Skip to content

Commit

Permalink
Implement --local mode
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCat467 committed Sep 14, 2024
1 parent 74ef0e2 commit 4b3283e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sanescansrv/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down

0 comments on commit 4b3283e

Please sign in to comment.