Content Scripts to edit browser fingerprints

noellarkin

Senior Member
Joined
Mar 14, 2021
Messages
1,006
Reaction score
1,492
Trying to write some greasemonkey scripts to replace browser plugins, this one being for fingerprint parameters.

Example, for screen resolution:
Object.defineProperty(Screen.prototype, "width", {get: (() => 1366).bind(null)});
Object.defineProperty(Screen.prototype, "height", {get: (() => 768).bind(null)});

A few doubts:
1. how does this work in pages with iframes? Do I have to enumerate all the frames and then inject the script into all of them?
2. I've heard of something called exportFunction() being used as a substitute for this, but not sure how to go about using it.
3. Is there a more "global" way to run these scripts so they apply to the browser profile as a whole (like about:config changes to useragent etc)
4. I can inject this before every page load but how do I deal with dynamic pages?
 
You cant do things like that, websites can easily detect your tempering with those params.

One thing you could try to use is this - https://github.com/berstend/puppeteer-extra/tree/master/packages/extract-stealth-evasions

It's a way how to extract evasions that a specific stealth package of puppeteer uses to avoid detection.

The maintainers of the project were generous enough and built a way that you can extract everything and use it as an external solution.
 
You cant do things like that, websites can easily detect your tempering with those params.

One thing you could try to use is this - https://github.com/berstend/puppeteer-extra/tree/master/packages/extract-stealth-evasions

It's a way how to extract evasions that a specific stealth package of puppeteer uses to avoid detection.

The maintainers of the project were generous enough and built a way that you can extract everything and use it as an external solution.
Thanks! Will check this out.
 
Back
Top