Can Navigator.UserAgent Be Spoofed?

Just trying out

By
Anonymous 1 Seen 448 times
Tags

Run this test now.

Results


Tested on
Chrome - 50 - Mac OS X
Spoofable?
null

Tested on
Firefox - 43 - Windows
Spoofable?
null

Tested on
Unknown Browser - Unknown Version - Unknown OS
Spoofable?
null

Tested on
Googlebot - 2.1 - undefined
Spoofable?
{"value":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Safari/537.36","writable":true,"enumerable":true,"configurable":true}

Tested on
IE - 11 - Windows
Spoofable?
null

Tested on
Mobile Safari - Unknown Version - iOS
Spoofable?
{"enumerable":true,"configurable":false}

Tested on
Chromium - 50 - Ubuntu
Spoofable?
null

Tested on
Edge - 17.17134 - Windows 10
Spoofable?
null

Tested on
Chrome Mobile - 41 - Android
Spoofable?
{"value":"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)","writable":true,"enumerable":true,"configurable":true}

User Script (ENUM_FUNCTION)

					
function test(data){
	// We need to separate properties and access one by one.
try{

    var a = navigator.userAgent;
    var b = JSON.stringify(Object.getOwnPropertyDescriptor(navigator, 'userAgent'));
    addResult(b);
}

catch(err){
	addResult(data.before + '.'+ data.before ,  'Probably Not');
}
}

					
				

Enum Data (ENUM_FUNCTION)

					
var data = [1];