mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-06 08:35:08 -04:00
The previous implementation derived the guest WiFi device MAC using a custom MD5 hash of the Fritz!Box hardware MAC, producing a locally-administered address with a 02: prefix. This was inconsistent with the project-wide convention of using string_to_fake_mac() from crypto_utils, which produces a fa:ce: prefixed address and is used by all other plugins (nmap_dev_scan, adguard_import, pihole_api_scan, etc.). A naive switch to string_to_fake_mac(host) would have introduced a stability problem: if the user reconfigures FRITZBOX_HOST from an IP address (e.g. 192.168.178.1) to a hostname (e.g. fritz.box), the fake MAC would change and the guest device would re-appear as a new unknown device in NetAlertX. The Fritz!Box hardware MAC is a stable identifier that does not change with the configured host string. Requested by reviewer jokob-sk in PR #1592. Changes: - Remove import hashlib (fritzbox.py:3) — no longer needed - Add import string_to_fake_mac from utils.crypto_utils (fritzbox.py:15) - Replace custom MD5-based MAC derivation in create_guest_wifi_device() with string_to_fake_mac(normalize_mac(fritzbox_mac)) (fritzbox.py:178) The Fritz!Box hardware MAC is fetched via TR-064 as before, but is now passed to the shared project utility instead of a custom hash. - Add host parameter to create_guest_wifi_device(fc, host) (fritzbox.py:169) Used as fallback input to string_to_fake_mac() if the hardware MAC cannot be retrieved. - Update call site in main() to pass host (fritzbox.py:224) The guest WiFi device MAC is now stable across host configuration changes and consistent with the fa:ce: prefix convention used across the project.
Plugins docs have been relocated. Check the new Plugins Overview location.