Post Reply 
User-Agent - changing in JS
Jul. 13, 2015, 02:58 PM
Post: #1
User-Agent - changing in JS
Hello,
I would like to know, if there is a filter for changing the user-agent from JS.
I know, there is a filter to hide it, but not to change it.

In the filter set which I am using there is such a filter, but it's not working anymore.

Here in the last post on the page is explained how the filter worked. (It's in German, but if anyone didn't understand, I'll help.
The filename ProxJSEnd.js is wrong, it is ProxJS-20100626.js

In short words:
For example is in the default.cfg written for spoofing Firefox 2.0 on Windows XP this:
Code:
In = FALSE
Out = FALSE
Key = "User-Agent: (Out) Firefox 2.0 WinXP (Header+JS) [MB]"
URL = "(^$TST(ScfAllow=*js.brDetection*))"
Match = "*"
Replace = "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1$SET(InsHeadStrSC=$GET(InsHeadStrSC)FakeUAFF2WXP,)"

With this filter rule, the variable "InsHeadStrSC" get's the value "FakeUAFF2WXP,"
This data is given to the filter script with the variable "ProxLCO.ConfSC"

And in the ProxJS-20100626.js is something like:
Code:
if (ProxLCO.ConfSC.indexOf("FakeUAFF2WXP") != -1) {
            window.navigator = {
                appCodeName     : "Mozilla",
                appName         : "Netscape",
                appVersion      : "5.0 (Windows; de)",
                platform        : "Win32",
                userAgent       : "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1",
                language        : "de",
                oscpu           : "Windows NT 5.1",
                product         : "Gecko",
                productSub      : "20061204",
                buildID         : "2006120418",
                vendor          : "",
                vendorSub       : "",
                securityPolicy  : "",
                preference      : function() { return false; }
            };

If you download the German Profi-Edition from here, you can check the whole code.

Would be nice, if anyone, could update the filter or if anyone know a working filter to change user-agent in javascript.

Thanks.

PiXEL
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: