Skip to content

Instantly share code, notes, and snippets.

@nickjacob
Created December 2, 2015 15:13
Show Gist options
  • Save nickjacob/b7de20afa292b9cdfaf7 to your computer and use it in GitHub Desktop.
Save nickjacob/b7de20afa292b9cdfaf7 to your computer and use it in GitHub Desktop.
TLVMedia - Fraudulent Creative
var originalCreative="<img src='http://bidder-us-east-6.tlvmedia.com/newbidder/plsil.gif?subid=23ee43BOH1BYRq8QhcUdoTBgB1NGdXNWVaMmdVdWFQZVpJejhzcHJ3ICAgICAgICDZzsNAY%5F1aAQEAAAAAALDRcwEAZQAAAAAAAgABAAAAEgAAAAAAAAAAAAAAAAAAAEoHX1YAAAAAAAAAAAAAAAAAAAAAAAAAAPjYVADv2KRQZW5OWQEA&cost=${dap}&subid2=0bf1aHR0cDovL2FwbHVzLmNvbS9hL2JhbGFuZy1lbGxlbi1kZWdlbmVyZXMtc2hvdy1wZXJmb3JtYW5jZT9saV9zb3VyY2U9TEkmbGlfbWVkaXVtPXRyZW5kaW5nLXdpZGdldD9wYmpzX2RlYnVnPXQ%7E' width='1' height='1'/><div style="overflow:hidden;width:728px;height:90px;margin:0;padding:0;visibility:visible;border:none;display:inline-block;">
<div id="rtbmain411480"><a href="http://bidder.tlvmedia.com/newbidder/click.php?subid=23ee43BOH1BYRq8QhcUdoTBgB1NGdXNWVaMmdVdWFQZVpJejhzcHJ3ICAgICAgICDZzsNAY%5F1aAQEAAAAAALDRcwEAZQAAAAAAAgABAAAAEgAAAAAAAAAAAAAAAAAAAEoHX1YAAAAAAAAAAAAAAAAAAAAAAAAAAPjYVADv2KRQZW5OWQEA&redir=aHR0cDovL3d3dy53aXguY29tL2V0ZWFtaHRtbC8zMDAtbmV3P3V0bV9jYW1wYWlnbj1tYV90bHZtZWRpYSZleHBlcmltZW50X2lkPSRQQVJBTSQ~&subid2=0bf1aHR0cDovL2FwbHVzLmNvbS9hL2JhbGFuZy1lbGxlbi1kZWdlbmVyZXMtc2hvdy1wZXJmb3JtYW5jZT9saV9zb3VyY2U9TEkmbGlfbWVkaXVtPXRyZW5kaW5nLXdpZGdldD9wYmpzX2RlYnVnPXQ%7E" target="_NEW"><img src="http://cdn.adnxs.com/p/9d/cf/60/ac/9dcf60ac1dc3e2d0796e95b411025621.jpg" border="0" height="90" width="728"/></a></div>
</div>
<script type="text/javascript">
(function(){
var rurl = '';
var r = Math.floor((Math.random()*100)+1);
var lim1 = 100-25;
var lim2 = lim1-0;
var lim3 = lim2-0;
var lim4 = lim3-0;
var lim5 = lim4-0;
var lim6 = lim5-0;
var lim7 = lim6-0;
var lim8 = lim7-50;
var lim9 = lim8-0;
var lim10 = lim9-25;
var lim11 = lim10-0;
var lim12 = lim11-0;
var lim13 = lim12 - 0;
var lim14 = lim13 - 0;
var lim15 = lim14 - 0;
var lim16 = lim15 - 0;
if (r>lim1){
rurl = 'http://ib.adnxs.com/tt?id=5951882&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim2) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim3) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim4) {
rurl = 'http://ib.adnxs.com/tt?id=0&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim5) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim6) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim7) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim8) {
rurl = 'http://raw-level-us-east-1.tlvmedia.com/newbidder/tag_server.php?kid=418117&sid=113149&pid=113148&w=728&h=90&d=aplus.com';
} else if (r>lim9) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
}
else if (r>lim10) {
rurl = 'http://ib.adnxs.com/tt?id=5929300&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim11) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim12) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim13) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim14) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim15) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
} else if (r>lim16) {
rurl = 'http://ib.adnxs.com/tt?id=&position=above&size=728x90&referrer=aplus.com';
}
var w = 728;
var h = 90;
var i = 1;
var limit = 200;
var interval = 10000;
var firstTimeout = 30000;
if (i!=limit)
{
if(document.getElementById("rtbmain411480").innerHTML=="")
{
var rand = Math.floor((Math.random()*10000)+1);
document.getElementById("rtbmain411480").innerHTML = '<iframe id="rad411480" src="'+rurl+'&cb='+rand+'" width="728" height="90" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" ></iframe>';
}
setTimeout(function(){
var rand = Math.floor((Math.random()*10000)+1);
document.getElementById("rtbmain411480").innerHTML = '<iframe id="rad411480" src="'+rurl+'&cb='+rand+'" width="728" height="90" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" ></iframe>';
var intFunc = setInterval(function(){
if (i==limit){clearInterval(intFunc);}
i++;
var rand = Math.floor((Math.random()*10000)+1);
var b=document.getElementById("rad411480");
b.contentWindow.location.replace(rurl+"&cb="+rand);
},interval);
},firstTimeout);
}
})();
</script> ";document.write(decodeURIComponent(originalCreative).replace("${dwp}", pp_dsp_win_price).replace("${dap}", pp_dsp_auction_price));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment