Home > Paid Traffic Sources > Mobile

Script Decoder! (4)


10-16-2015 01:41 AM #1 socceralien (Member)
Script Decoder!

Any expert know what does this script does?

<script type="text/javascript">Object.defineProperty(window.navigator , 'userAgent', { get: function(){ return 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20120101 Firefox/33.0'; } });Object.defineProperty(window.navigator, 'vendor', { get: function(){ return 'Mozilla, Inc.'; } });Object.defineProperty(window.navigator, 'platform', { get: function(){ return 'Windows'; } });</script>

Many thanks!


10-16-2015 02:13 AM #2 elevate (AMC Alumnus)

If you have a bunch of javascript running together like that, it can be hard to read. Run it through something like this to make it easier: http://jsbeautifier.org

Then you get this:

Code:
Object.defineProperty(window.navigator, 'userAgent', {
    get: function() {
        return 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20120101 Firefox/33.0';
    }
});
Object.defineProperty(window.navigator, 'vendor', {
    get: function() {
        return 'Mozilla, Inc.';
    }
});
Object.defineProperty(window.navigator, 'platform', {
    get: function() {
        return 'Windows';
    }
});
Looks to me like it's spoofing the ua, browser and os via javascript. Not 100% sure though.


10-16-2015 04:24 PM #3 socceralien (Member)

what you mean it is spoofing the user agent and browser? as in what is the main benefit of using this script?

Thanks


10-20-2015 02:29 AM #4 pandabear (Member)

hiding where the traffic comes from is the main benefit. if you don't know what this does you don't need it.


Home > Paid Traffic Sources > Mobile