#!/usr/bin/env python3 """Inspect hotspot delay-related settings. Do not print secrets.""" from __future__ import annotations import sys SCRIPT = r""" :put "===ID===" /system identity print :put "===ROS===" :put [/system resource get version] :put "===HSPROF===" /ip hotspot profile print detail :put "===HS===" /ip hotspot print detail :put "===DHCP-NET===" /ip dhcp-server network print detail :put "===DHCP-SRV===" /ip dhcp-server print detail :put "===IPV6-ND===" :do { /ipv6 nd print detail } on-error={ :put "no-ipv6-nd" } :put "===IPV6-ADDR===" :do { /ipv6 address print } on-error={ :put "no-ipv6" } :put "===IPV6-SET===" :do { /ipv6 settings print } on-error={ :put "no-ipv6-set" } :put "===WG===" /ip hotspot walled-garden print :put "===WG-IP===" /ip hotspot walled-garden ip print :put "===CERT===" /certificate print :put "===HS-FILES===" /file print where name~"hotspot" or name~"portal" :put "===HTTP-PROXY===" :do { /ip proxy print } on-error={ :put "no-proxy" } :put "===DNS===" /ip dns print :put "===DNS-STATIC===" /ip dns static print where name~"otantik" or name~"hotspot" or name~"captive" """ if __name__ == "__main__": target = sys.argv[1] if len(sys.argv) > 1 else "hub" if target == "nko": from mk_rb4011_exec import run else: from mk_hub_exec import run print(run(SCRIPT, timeout=90))