Jump to content

So I was doing my regular computing, browsing etc, and suddenly a windows popup appeared asking me if I wanted to download a file named "OAD_Comscore_NoID2.js" and I thought "hey why not, I can handle it" (meanwhile in my head Shia LaBeouf is screaming "Do it") sort of hoping it's something exciting. I was a little confused that it just popped up with no program warning but wasn't sure if virus or nar.. So I opened my favoured script editor (NP++ of course) to view the code, but that hasn't seemed to give me much more information than a website (which leads pretty much nowhere even trying to access the different levels of / in the web address). I'm not much of a programmer myself so I can only ready what my eyes can show me. I haven't ran it yet because I don't know what to expect and I have Googled around a bit but the information was very old, flimsy and loose. Any ideas on what it is trying to do? I could just delete it but where's the fun in that ;3 all things happen for a reason.
 
PS: Sorry if this is in the wrong section, I'm not much of a forum user and this just seemed to be an acceptable place.
 

 /*Version 2.0.5Created: 2014-11-05http://ds.serving-sys.com/BurstingRes/CustomScripts/OAD_Comscore_NoID2.js?adid=[%tp_adid%]&scriptURL=[ENCODED COMSCORE SCRIPT URL]parameters: scriptURL is the script url that you want appended to the parent of ebBannerDiv as a sibling. */(function() {    var ebScriptFileName = "OAD_Comscore_NoID2.js";    if (!(typeof (ebLastQueryUsedArray) != 'undefined' && ebLastQueryUsedArray)) {        ebLastQueryUsedArray = new Array();        }    var ebScriptQuery = function(scriptPath) {        this.scriptPath = scriptPath;        };    ebScriptQuery.prototype = {        get: function() {            var lastQuery = '';            var srcRegex = new RegExp(this.scriptPath.replace('.', '\\.') + '(\\?.*)?$', 'i');            var scripts = document.getElementsByTagName("script");            var i;            for (i = 0; i < scripts.length; i++) {                var script = scripts[i];                var scriptUsed = false;                if (script.src && script.src.match(srcRegex)) {                    var query = script.src.match(/\?([^#]*)(#.*)?/);                    for (var j = ebLastQueryUsedArray.length - 1; j > -1; j--) {                        if (query[1] == ebLastQueryUsedArray[j]) {                            scriptUsed = true;                            break;                                                }                    }                    if (scriptUsed == false) {                        lastQuery = !query ? '' : query[1];                                        }                }            }            ebLastQueryUsedArray[ebLastQueryUsedArray.length] = lastQuery;            return lastQuery;                },        parse: function() {            var result = {};            var query = this.get();            var components = query.split('&');            var i;            for (i = 0; i < components.length; i++) {                var pair = components[i].split('=');                var name = pair[0],                 value = pair[1];                                if (!result[name]) {                    result[name] = [];                                }                // decode                if (!value) {                    value = 'true';                                }                 else {                    try {                        value = decodeURIComponent(value);                                        }                     catch (e) {                        value = unescape(value);                                        }                }                // MacIE way                var values = result[name];                values[values.length] = value;                        }            return result;                },        flatten: function() {            var queries = this.parse();            var name;            for (name in queries) {                queries[name] = queries[name][0];                        }            return queries;                },        toString: function() {            return 'ebScriptQuery [path=' + this.scriptPath + ']';                }    };    //verify by Ad ID or Flight ID    try {        var gEbQueries_ComScore = new ebScriptQuery(ebScriptFileName).flatten();                var foundViaEBG = false;        if (window.EBG) {            // EBG is available, see if we find the desired ad in EBG.ads, if not, try old client            try {                var comAdid = gEbQueries_ComScore.adid || -1;                var comPlid = gEbQueries_ComScore.flightid || -1;                for (var adIndex in EBG.ads) {                    if (EBG.ads.hasOwnProperty(adIndex)) {                        var ad = EBG.ads[adIndex],                         cfg = ad._adConfig;                        if ((comAdid == cfg.adId) || (comPlid == cfg.placementId)) {                            //found the target ad                            mmSetupComScore(ad, "ebDiv" + cfg.rnd, gEbQueries_ComScore.scriptURL);                            foundViaEBG = true;                            break;                                                }                    }                }            }             catch (e) {            }                }        if (!foundViaEBG) {            // do existing/old client stuff            if (typeof (gEbEyes) != "undefined") {                if (gEbQueries_ComScore.adid) {                    for (var i = gEbEyes.length - 1; i > -1; i--) {                        if (gEbEyes[i].adData.nAdID == gEbQueries_ComScore.adid) {                            mmSetupComScore(gEbEyes[i], "ebFloatingAd_" + gEbEyes[i].adData.nIndex + "_" + gEbEyes[i].adData.strRand, gEbQueries_ComScore.scriptURL);                            break;                                                }                    }                }                if (gEbQueries_ComScore.flightid) {                    for (var i = gEbEyes.length - 1; i > -1; i--) {                        if (gEbEyes[i].adData.nFlightID == gEbQueries_ComScore.flightid) {                            mmSetupComScore(gEbEyes[i], "ebFloatingAd_" + gEbEyes[i].adData.nIndex + "_" + gEbEyes[i].adData.strRand, gEbQueries_ComScore.scriptURL);                            break;                                                }                    }                }            }            if (typeof (gEbBanners) != "undefined") {                if (gEbQueries_ComScore.adid) {                    for (var i = gEbBanners.length - 1; i > -1; i--) {                        if (gEbBanners[i].adData.nAdID == gEbQueries_ComScore.adid) {                            mmSetupComScore(gEbBanners[i], "ebBannerDiv_" + gEbBanners[i].adData.nIndex + "_" + gEbBanners[i].adData.strRand, gEbQueries_ComScore.scriptURL);                            break;                                                }                    }                }                if (gEbQueries_ComScore.flightid) {                    for (var i = gEbBanners.length - 1; i > -1; i--) {                        if (gEbBanners[i].adData.nFlightID == gEbQueries_ComScore.flightid) {                            mmSetupComScore(gEbBanners[i], "ebBannerDiv_" + gEbBanners[i].adData.nIndex + "_" + gEbBanners[i].adData.strRand, gEbQueries_ComScore.scriptURL);                            break;                                                }                    }                }            }            if (typeof (gEbStdBanners) != "undefined") {                if (gEbQueries_ComScore.adid) {                    for (var i = gEbStdBanners.length - 1; i > -1; i--) {                        if (gEbStdBanners[i].nAdID == gEbQueries_ComScore.adid) {                            if (gEbStdBanners[i].strImgID != '') {                                var id = gEbStdBanners[i].strImgID;                                                        }                             else {                                var id = gEbStdBanners[i].strFlashObjID;                                                        }                            mmSetupComScore(gEbStdBanners[i], id, gEbQueries_ComScore.scriptURL);                            break;                                                }                    }                }            }            if (ebO.adConfig.adId == gEbQueries_ComScore.adid) {                mmSetupComScore(ebO, ebO.phid, gEbQueries_ComScore.scriptURL);                        }        }    }     catch (e) {    }    function mmSetupComScore(obj, id, url) {        obj.ebComscoreDummy = setInterval(function() {            mmSetupComScore2(obj, id, url)        },         500);        }    function mmSetupComScore2(obj, id, scriptURL) {        var thisId = id;        var thisURL = scriptURL;        var doc,         div = null;        if (window.EBG) {            // do new client stuff            try {                doc = EBG.adaptor.getDisplayWin().document;                var divTemp = EBG.adaptor.getDisplayWin().document.getElementById(id);								if(divTemp.tagName.toLowerCase() == "object"){					div = divTemp;				}				else if(divTemp.tagName.toLowerCase() == "embed"){					div = divTemp;				}                else if (divTemp && divTemp.childNodes.length > 0) {                    //check the placement holder div actually has it's asset present                    for (var i = 0; i < divTemp.childNodes.length; i++) {                        var node = divTemp.childNodes[i];                        var tagName = node.tagName && node.tagName.toLowerCase();                        if (tagName) {                            if (tagName == "img") {                                div = divTemp;                                //we have a banner asset present now                                break;                                                        }                             else if (tagName == "div") {                                var id = node.id || "";                                var polite = !!obj._gotRich;                                if (id.indexOf("Default") > -1) {                                    var defaultSet = id;                                }                                if (!polite || id.indexOf("Rich") > -1) {                                    div = divTemp;                                    //we have a banner asset present now                                    break;                                                                }                            }                        }                    }                }            }             catch (e) {            }		}		        if (!div && !window.EBG) {            //if didn't find it using EBG, then try old client stuff            if (typeof (gEbDisplayPage) != 'undefined' && gEbDisplayPage && typeof (gEbDisplayPage.TI) != 'undefined' && gEbDisplayPage.TI) {                doc = gEbDisplayPage.TI.getDoc();                        }             else                doc = document;            div = doc.getElementById(id);			try {				if (obj.displayUnit.ad.strRichFlash && obj.displayUnit.ad.strRichFlash!=''){					defaultSet = id.replace('ebBannerDiv_', 'ebBannerFlash_');					defaultDiv = doc.getElementById(defaultSet);					if (defaultDiv != null) {                        return;                    }									}			} catch(e){}			            if ((typeof (div) == 'undefined' || !div) && id.indexOf('ebBannerDiv_') > -1) {                div = doc.getElementById(id.replace('ebBannerDiv_', 'ebBannerImage_'))            }        }		        if (typeof (div) != 'undefined' && div) {                        if (defaultSet && typeof (defaultSet) != 'undefined') {                if (id.indexOf("Rich") > -1) {                    var defaultDiv = doc.getElementById(defaultSet);                    if (defaultDiv != null) {                        return;                    }                }            }            clearInterval(obj.ebComscoreDummy);            var node = div.parentNode;            var appendElem = document.createElement("script");            appendElem.setAttribute("type", "text/javascript");            appendElem.setAttribute("src", scriptURL);            node.appendChild(appendElem);                }    }})();
Link to post
Share on other sites

It's a JavaScript file that's supposed to serve ads on a website. That it randomly downloaded is probably a coding error, as it's supposed to be executed and not downloaded.

 

Could also be an error as a result of using AdBlock.

My rigs:

Spoiler

NEW Ryzinator build:

CPU: AMD - Ryzen 9 3950X 8-Core Processor

Motherboard: Asus - PRIME X370-PRO ATX AM4

RAM: Corsair - Vengeance LPX 32GB (2 x 16GB) DDR4-2666 @ DDR4-3066

Storage: (3x) Samsung - 850 EVO-Series 500GB 2.5", Samsung - 960 EVO 250GB M.2-2280

PSU: Seasonic Prime TX-750

OS: Microsoft - Windows 10 Pro 64-bit

Additional fan: Noctua - NF-A14 PWM 82.5 CFM 140mm Fan

Case: Fractal Design - Define R5 (Black) ATX Mid Tower Case

GPU: ASUS Radeon RX 580 Dual OC 4GB

Display: MSI 27L Optix MAG272QP @ 165Hz

 

OLD Build (SOLD):

CPU: AMD FX-6100 Motherboard: ASRock 960GM/U3S3 FX (VRM overheating, don't buy) RAM: 8GB Kingston ValueRAM GPU: Onboard ATI Radeon 3000 Graphics Case: Corsair Obsidian 500D Storage: Hitachi HDS721010CLA332 1TB, 119GB SAMSUNG MMCRE28G5MXP-0VBH1 (SSD), 465GB Western Digital WDC WD5000AZRX-00L4HB0 (SATA)  PSU: Be quiet! - Straight Power 10 400 Watt Cooling: Cooler Master Hyper 212 EVO OS: Windows 10 Pro x64 

 

Retro gaming build:

CPU: Intel Pentium 3 Coppermine @ 800MHz Motherboard: Asus P2B i440BX BIOS 1012 FSB: 133 MHz RAM: 1x 128MB Hynix PC133 SDR SDRAM GPU: ATi Radeon 9200 256MB AGP Case: Full Tower case (unbranded) Storage: CompactFlash card to IDE converter (16GB card) Sound Card: Aztech 2320 ISA Cooling: Stock heatsink fan OS: Windows 98 Second Edition

Link to post
Share on other sites

It's a JavaScript file that's supposed to serve ads on a website. That it randomly downloaded is probably a coding error, as it's supposed to be executed and not downloaded.

 

Could also be an error as a result of using AdBlock.

 

Interesting, thanks for the quick reply. Out of curiosity, is it just to provide ads or is it a script which would cause ads in unwanted places?

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×