brozzler
brozzler copied to clipboard
Stealth code randomizes hardwareConcurrency and deviceMemory on every access
I was surprised to learn how brozzler's stealth JavaScript handles deviceMemory and hardwareConcurrency:
https://github.com/internetarchive/brozzler/blob/a665d49bba2db8a4094d075e1e5c0803198745fc/brozzler/js-templates/stealth.js#L30-L35
Every call to either property returns a random value, so even simply [navigator.hardwareConcurrency, navigator.hardwareConcurrency] will have two different values in the array. Why is this? Why not pick a random number at the start and use that one? (Or even pick a common constant value like 4 or 8 so it's the same across page loads.)