#!/usr/bin/env python3 from __future__ import annotations import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent)) SCRIPT = r""" :put "===PROF===" /ip hotspot profile print where name=hs-otantik or name=hsprof1 :put "===HS===" /ip hotspot print :put "===GSTATIC===" /ip hotspot walled-garden print where dst-host~"gstatic" or dst-host~"generate" or dst-host~"apple" or dst-host~"msft" or dst-host~"captive" :put "===IPV6-ND===" /ipv6 nd print :put "===IPV6-FW===" :do { /ipv6 firewall filter print where comment~"wo-hs" } on-error={ :put "no-v6-fw" } :put "===DHCP-HS===" /ip dhcp-server network print """ 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=60))