LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Firefox user platform masquerading (https://www.linuxquestions.org/questions/linux-software-2/firefox-user-platform-masquerading-705016/)

vikhr 02-16-2009 06:11 AM

Firefox user platform masquerading
 
system configuration: Ubuntu 8.10 GNU/Linux Firefox 3.0.6 i386

I wanna masquerade my os details from browser scripts and http header.
I did manage to override browser defaults by:

editing about:config
general.useragent.override="//The user agent string"
similarly vendor and extra.firefox values were edited..

but how to masquerade values like appName,platform which can be retrieved
by navigator.platform and navigator.appName etc

I tried putting in values user_pref("general.useragent.platform","Win32")
or pref("general.useragent.platform","Win32")
in ~/mozilla/firefox/<random>/pref.js
and /usr/lib/firefox-3.0.6/default/preferences/ubuntu-useragent.js
and /usr/lib/firefox-3.0.6/default/preferences/firefox.js

etc..but hard luck

Help Please

vikhr 02-16-2009 06:48 AM

At last I got it.. sorry guys for wasting your time..
I edited .mozilla/firefox/<random>/prefs.js
and inserted the following entries:
<b><i>
user_pref("general.appname.override", "xxxxxxxxxxx");
user_pref("general.appversion.override", "xxxxxxxx");
user_pref("general.platform.override", "xxxxx");
</b></i>
and it worked..on url location like "javascript:navigator.platform"
but I used Firefox "Error Console" to check the entries ..and it always gave the "original"
stuff..so i guess Error Console might be using system calls to get the data..
rather than browser's javascript sandbox..

sop..thanks anyway..


All times are GMT -5. The time now is 12:21 PM.