_read_dal_or_page parses the sealed DAL answer without decrypting it #25

Closed
opened 2026-11-12 15:14:48 +00:00 by christianmanivong · 0 comments
Owner

Priority: P2 (important and urgent): hosts, ARP table, SSIDs, radios, Wi-Fi clients and port forwards are always empty.

_read_dal_or_page does parse_dal(json.loads(self._fetch_page("cgi-bin/DAL?oid=..."))). A GET of the DAL answers sealed, {"content": ..., "iv": ...}, just like the PUT in _dal_query. The parsers get that envelope, find none of their keys, and return empty data. No exception is raised, so the HTML fallback never runs either.

Seen on a VMG4005-B50A: every DAL GET (lanhosts, WIFI_RADIO, wlan, ...) comes back sealed. _status_page (#23) decrypts it and is the pattern to reuse. Once it is decrypted, the parsers' key guesses (hosts, entries, radios, ...) need checking against real answers too: the gateway puts its data under Object. The tests in tests/test_failed_reads.py feed the parsers unsealed JSON, so they never caught this.

Priority: P2 (important and urgent): hosts, ARP table, SSIDs, radios, Wi-Fi clients and port forwards are always empty. `_read_dal_or_page` does `parse_dal(json.loads(self._fetch_page("cgi-bin/DAL?oid=...")))`. A GET of the DAL answers sealed, `{"content": ..., "iv": ...}`, just like the PUT in `_dal_query`. The parsers get that envelope, find none of their keys, and return empty data. No exception is raised, so the HTML fallback never runs either. Seen on a VMG4005-B50A: every DAL GET (`lanhosts`, `WIFI_RADIO`, `wlan`, ...) comes back sealed. `_status_page` (#23) decrypts it and is the pattern to reuse. Once it is decrypted, the parsers' key guesses (`hosts`, `entries`, `radios`, ...) need checking against real answers too: the gateway puts its data under `Object`. The tests in `tests/test_failed_reads.py` feed the parsers unsealed JSON, so they never caught this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-zyxel#25