Skip to content

Drop the dead PnP-name scrapers - #538

Merged
mgth merged 1 commit into
masterfrom
drop-pnp-scraping
Aug 3, 2026
Merged

Drop the dead PnP-name scrapers#538
mgth merged 1 commit into
masterfrom
drop-pnp-scraping

Conversation

@mgth

@mgth mgth commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Found while writing the privacy policy for #536.

Html.cs carried three scrapers that looked a monitor's PnP code up on driverlookup.com, driveragent.com and driversdownloader.com, plus the HttpWebRequest plumbing behind them — a user agent spoofed as MSIE 5.01, a cookie container, commented-out __VIEWSTATE handling. An old attempt at enriching monitor names that has not worked in years.

Nothing called any of it. The single live caller, WindowsLayoutFactory.SetPnpDeviceName, uses CleanupPnpName — a local string tidy-up that never touches the network. This deletes the scrapers and keeps the cleanup.

Why remove it rather than leave it inert

A grep of the tree for outbound URLs turned these up while I was establishing what PRIVACY.md could truthfully claim. Answering "the app contacts GitHub and televisions on your local network" required a call-graph argument to explain away three hardcoded scraping URLs.

With this gone, that claim is verifiable by grep — which is what a SignPath Foundation reviewer will actually do. Code aimed at scraping third-party sites also reads badly in a signing application, whatever the call graph says.

The rename

HtmlHelper.CleanupPnpNamePnpName.Cleanup, with the file renamed to match. Nothing here parses HTML any more; keeping the old name would just move the misunderstanding somewhere else. One call site updated.

The remaining function is unchanged, byte for byte — this PR removes code and renames, it does not alter behaviour.

Verification

LittleBigMouse.DisplayLayout and LittleBigMouse.Platform.Windows both build with 0 errors (warnings are pre-existing). grep -riE "driverlookup|driveragent|driversdownloader|HtmlHelper" over the tree now returns only the comment in PnpName.cs that records why they are gone.

🤖 Generated with Claude Code

Html.cs carried three scrapers that looked a monitor's PnP code up on
driverlookup.com, driveragent.com and driversdownloader.com, plus the
HttpWebRequest plumbing behind them — spoofed user agent, cookie container,
commented-out __VIEWSTATE handling. An old attempt at enriching monitor names
that has not worked in years.

Nothing called any of it. The single live caller
(WindowsLayoutFactory.SetPnpDeviceName) uses CleanupPnpName, a local string
tidy-up that never touches the network, so this deletes the scrapers and keeps
the cleanup.

Worth removing rather than leaving inert: a grep of the tree for outbound URLs
turned these up while writing the privacy policy, and code aimed at scraping
third-party sites reads badly in an application that otherwise only contacts
GitHub and televisions on the local network — whatever the call graph says.

The remaining function is renamed with its file, HtmlHelper.CleanupPnpName ->
PnpName.Cleanup: nothing here parses HTML any more.
@mgth
mgth merged commit 6ad8961 into master Aug 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant