From 61e7b65bc1bab253d1878f521493ce55f418020e Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 10 Oct 2023 00:33:02 +0000 Subject: [PATCH] option to always require admin to auth --- r0c/__main__.py | 1 + r0c/ivt100.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/r0c/__main__.py b/r0c/__main__.py index 5f29c48..7404226 100644 --- a/r0c/__main__.py +++ b/r0c/__main__.py @@ -46,6 +46,7 @@ def optgen(ap, pwd): ac.add_argument("-tpt", metavar="PORT", type=int, default=0, help="TLS telnet port, e.g. 2424 (disable with 0)") ac.add_argument("-tpn", metavar="PORT", type=int, default=0, help="TLS netcat port, e.g. 1515 (disable with 0)") ac.add_argument("-pw", metavar="PWD", type=u, default=pwd, help="admin password") + ac.add_argument("--ara", action="store_true", help="admin-access requires auth (even for localhost)") ac.add_argument("--nsalt", metavar="TXT", type=u, default="lammo/", help="salt for generated nicknames based on IP") ac = ap.add_argument_group("logging") diff --git a/r0c/ivt100.py b/r0c/ivt100.py index ef1d9e1..6aa129c 100644 --- a/r0c/ivt100.py +++ b/r0c/ivt100.py @@ -481,7 +481,7 @@ class VT100_Client(object): with self.world.mutex: self.default_config() self.user.client = self - self.user.admin = self.adr[0] == "127.0.0.1" # TODO + self.user.admin = self.adr[0] == "127.0.0.1" and not self.ar.ara try: (