Skip to content

fix: return bare Google URL in referer instead of search query#179

Merged
D4Vinci merged 2 commits intoD4Vinci:devfrom
Bortlesboat:fix/google-referrer-spoof
Mar 8, 2026
Merged

fix: return bare Google URL in referer instead of search query#179
D4Vinci merged 2 commits intoD4Vinci:devfrom
Bortlesboat:fix/google-referrer-spoof

Conversation

@Bortlesboat
Copy link
Contributor

Summary

Real browsers send https://www.google.com/ as the Referer header when clicking Google search results — not the full search URL with query parameters. The previous https://www.google.com/search?q=<domain> format is a detectable fingerprinting signal that the referer is spoofed.

  • Changed generate_convincing_referer() to return https://www.google.com/
  • Updated docstring and doctest to reflect new behavior
  • Updated test assertion

Fixes #172 (Issue 1 only — Sec-Fetch-Site is a Forbidden Request Header and cannot be spoofed from userland)

Real browsers send `https://www.google.com/` as the Referer header
when clicking search results, not the full search URL with query
parameters. The previous format was a fingerprinting signal that
the referer was spoofed.

Closes D4Vinci#172
Copy link
Owner

@D4Vinci D4Vinci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix. I have tried it manually in my browser, and the referer is as you said. I don't know when this was changed, but I will need to remove this function and update the rest of the docs pages as well.

Anyway, thanks again for raising this!

@D4Vinci D4Vinci merged commit aa6f96e into D4Vinci:dev Mar 8, 2026
5 checks passed
@D4Vinci D4Vinci mentioned this pull request Mar 8, 2026
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.

2 participants