Initial Commit

This commit is contained in:
2026-09-15 15:24:03 -04:00
commit 4dc7086e7e
605 changed files with 101380 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
"""Download the offline reference datasets at image build time."""
import pathlib
import urllib.request
SOURCES = {
"manuf": "https://www.wireshark.org/download/automated/data/manuf",
"iana-ports.csv": "https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv",
}
target = pathlib.Path("owuitools/data")
target.mkdir(parents=True, exist_ok=True)
for name, url in SOURCES.items():
path = target / name
try:
request = urllib.request.Request(url, headers={"User-Agent": "owuitools-build/1.0"})
with urllib.request.urlopen(request, timeout=60) as response:
path.write_bytes(response.read())
print(f" fetched {name}: {path.stat().st_size:,} bytes")
except Exception as exc:
print(f" WARNING: could not fetch {name} ({exc}); "
"network_reference will report it unavailable")
path.touch()