sanchk for unique ports across services

This commit is contained in:
ed 2024-04-26 22:10:10 +00:00
parent f66e00b2ff
commit d9c584fae3
1 changed files with 9 additions and 0 deletions

View File

@ -215,6 +215,15 @@ class Core(object):
t = "\033[33mWARNING: you have localhost in --proxy, you probably want --ara too\033[0m"
print(t)
taken = {}
for zs in "pt pn tpt tpn".split():
zi = getattr(ar, zs, 0)
if zi in taken:
t = "port %d was specified for both -%s and -%s"
raise Exception(t % (zi, taken[zi], zs))
if zi:
taken[zi] = zs
Util.HEX_WIDTH = ar.hex_w
Itelnet.init(ar)