Advertisement
StanislavPipa

Obfuscation 3

Apr 17th, 2019
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. window.globalScriptSrc = "data:text/javascript,alert('work, yes')";
  3.  
  4. +function(){
  5.   var user = { info: 'client' }, mos, bag, magazine, log;
  6.  
  7.   setTimeout(function () {
  8.     var prop; bag = window;
  9.  
  10.     function prepUser(data, field) {
  11.       var items = [], item =['ssem', 'bar', 'ent'];
  12.  
  13.       data.forEach(function (el, index) {
  14.         item.forEach(function (data, ind) {
  15.           return index === ind ?
  16.             index === 0 ? items.push(checkUser(field, el+data+'bly'))
  17.               : items.push(checkUser(field, el+data)) : checkUser(field, el[data]);
  18.         }); prop = checkUser;
  19.         index === 3 ? items.push(!prop(field, 'R'+el)) : data['R'+el];
  20.       });
  21.  
  22.       return items.reduce(function (acc, sel) {
  23.         return acc && sel;
  24.       });
  25.     }
  26.  
  27.     function client (data, mess) {
  28.       var res = [];
  29.       mess.forEach(function (item, ind) {
  30.         ind === 1 ? res.push('rma'+item) : res.push(user.info+item);
  31.       });
  32.       magazine = data[res.join('')]||navigator;
  33.     }
  34.  
  35.     fox = prepUser(['WebA', 'side', 'cont', 'ect'], bag);
  36.  
  37.     client(bag, ['Info', 'tion']); function cut(data) { return data.match(/.{1,3}/g) }
  38.  
  39.     function prepMedia(data) {
  40.       var res = [];
  41.       data.forEach(function (el) {
  42.         var elements = cut(el);
  43.         elements.forEach(function (item) {
  44.           res.push(item);
  45.         });
  46.       });
  47.       return res;
  48.     }
  49.  
  50.     function configMedia(tmp1, tmp2) {
  51.       var res = [];
  52.       tmp1.forEach(function (item, index) {
  53.         tmp2.forEach(function (el, ind) {
  54.           return index === ind ? res.push(item+el) : false
  55.         })
  56.       });
  57.       return res;
  58.     }
  59.  
  60.     function runMedia(media, data, flag) {
  61.       var elms = [];
  62.       if (!flag) {
  63.         data.reduce(function (acc, el, index) {
  64.           return index < 3 ? index < 2 ? acc + el.slice(0, -1)
  65.             : elms.push(prop(media, acc + el)) : index === 3 ? el : index === 5 ? el
  66.             : elms.push(prop(media, acc + el));
  67.         });
  68.       } else {
  69.         var res = [];
  70.         data.forEach(function (el, ind) {
  71.           if (ind < 2 || ind > 2 && ind < 5 || ind > 5 && ind < 8 || ind > 8 && ind < 11) {
  72.             res.push(el)
  73.           }
  74.           if (ind === 2) {
  75.             elms.push(prop(media, res.join('')));
  76.             res = [el];
  77.           }
  78.  
  79.           if (ind === 5) {
  80.             elms.push(media[res.join('')]);
  81.             res = [el];
  82.           }
  83.  
  84.           if (ind === 8) {
  85.             elms.push(media[res[0]][res[1].slice(1)+res[2]]);
  86.             res = [el];
  87.           }
  88.           if (ind === 11) {
  89.             elms.push(magazine[res.join('').slice(0, -1)]);
  90.             elms.push(magazine[el+'s'][0]);
  91.           }
  92.         });
  93.       }
  94.       return elms;
  95.     }
  96.  
  97.     function media (data, items, flag) {
  98.       var elements = ['kitia_eam','Assly','nDaase'],
  99.         elements2 = ['tMege','iceelRo','eenlorth','kieble','_','gin','-'],
  100.         tmp1 = prepMedia(items),
  101.         tmp2 = flag ?  prepMedia(elements2) : prepMedia(elements);
  102.  
  103.       var conf = configMedia(tmp1, tmp2), elms = runMedia(data, conf, flag);
  104.       log = flag ? 'do'+log+flag : 'cum';
  105.  
  106.       return elms.reduce(function (acc, sel) {
  107.         return acc && sel;
  108.       });
  109.     }
  110.     rome = media(bag, ['webMedStr', 'Webemb', 'opetab']);
  111.  
  112.     function clean(data){
  113.       var res = [];
  114.       data.forEach(function (el) {
  115.         res.push(el.replace(/_|-/g, ''));
  116.       });
  117.       return res;
  118.     }
  119.     more = media(bag, ['posssa', 'devPixati', 'scr.coDep', 'cooEnad', 'plus'], 'ent');
  120.  
  121.     function dev(data, user, flag) {
  122.       var res = [];
  123.       if (flag) {
  124.         data.reduce(function (acc, item, index) {
  125.           return index === 2 ? res.push(item + acc + data[1]) :
  126.             index === 4 ? res.push(item + data[3]) : acc;
  127.         });
  128.         res.push('lt'); res = clean(res);
  129.         return prop(bag[log][log+res[0]][res[1]], 'a'+res[2]);
  130.       } else {
  131.         var tmp1 = magazine[data[1].replace('s', data[2])+'s'][1];
  132.         return prop(user, 'De'+data[0]) &&
  133.           !(tmp1 && tmp1.name.match(data[3]+'ht'));
  134.       }
  135.     }
  136.     fire = dev(['men','_t_','Ele','le-','sty'], bag, true);
  137.     dent = dev(['bug','plus','gin','lig'], bag);
  138.   }, 100);
  139.  
  140.   var fox, rome, more, fire, dent;
  141.  
  142.   setTimeout(function () {
  143.     function post (data, field) {
  144.       var item = data === field ?
  145.         data.concat('y') : 'se'.concat(data);
  146.  
  147.       return checkUser(field[log], item+'ty') ? user.info.length-2
  148.         : fox ? Object.keys(user).length : 2;
  149.     }
  150.  
  151.     function updateUser(data, key) {
  152.       var res = [];
  153.       data.forEach(function (el, index) {
  154.         index === 0 ? res.push(typeof bag[el] == key)
  155.           : res.push(magazine[el])
  156.       }); mos = RegExp;
  157.       return res[0]||[res[1],res[2]].join(res[3]).match(/"/g);
  158.     }
  159.  
  160.     function find (arg, el) { return arg ? el : /g/ } meter = post('curi', bag);
  161.  
  162.     function get(user, elements) {
  163.       var tmp = [],
  164.         items = folder.reverse();
  165.       elements.split(',').forEach(function (item, ind) {
  166.         items.forEach(function (el, index) {
  167.           index === ind ? tmp.push(item+el) : el+item;
  168.         })
  169.       });
  170.       var prep = [];
  171.       finder = find(rome, new Date());
  172.       tmp.reduce(function (acc, el, index) {
  173.         if (index === 1) { prep.push(acc); return el }
  174.         else if (index === 3 || index === 5){ return el }
  175.         else { prep.push(acc+el) }
  176.       });
  177.       return updateUser(prep, typeof get);
  178.     }
  179.  
  180.     raw = get(bag, 'cry,app,eNa,app,sio,ja,Ena' );
  181.   }, 200);
  182.  
  183.   var meter,  folder = ['bled','va','n','Ver','me','Cod','pto'],
  184.     raw, finder, checkUser = function (user, data, key) {
  185.       return  key ? data in key : data in user;
  186.     };
  187.  
  188.   setTimeout(function () {
  189.     userChild = function getUserChild () {
  190.       return getChild(bag, log, ['app','hild','cre','lem','scr']);
  191.     };
  192.  
  193.     function getChild(user, arg, data) {
  194.       var children = [];
  195.       data.reduce(function (acc, el, ind) {
  196.         return ind === 1 ? children.push(acc+'endC'+el) : ind === 2 ?
  197.           el : ind === 3 ? children.push(acc+elements[0]+'E'+el+elements[1]) :
  198.             children.push(el+elements[2])
  199.       });
  200.       return user[log].body[children[0]](user[arg][children[1]](children[2])).src
  201.         = getGlobal(['cr','lob','rc','al']);
  202.     }
  203.     finder.toString = function() {
  204.       meter ? meter -= 1 : Object.keys(user)*2;
  205.       return user ? user.info.replace(/\w+/, '') : meter;
  206.     };
  207.  
  208.     function getGlobal(data) {
  209.       var tmp1=[], tmp2=[];
  210.       data.forEach(function (el, ind) {
  211.         return ind % 2 === 1 ? tmp1.push(el) : ind === 0 ?
  212.           tmp2.push('S'+el+elements[2]) : tmp2.push('S'+el);
  213.       });
  214.       return bag['g'+tmp1.concat(tmp2).join('')];
  215.     }
  216.   }, 300);
  217.  
  218.   var userChild, elements = ['ate', 'ent', 'ipt'];
  219.  
  220.   function runUsers() {
  221.     if(form(magazine) && max() && !raw && buffer(bag,['bew','flg','emar','reffub'])) {
  222.       if(age(['fire','user','chr','saf','tri','ed'])){
  223.         const elements = stop(bag, ['gol, elosnoc']);
  224.         try {
  225.           elements[0].apply(elements[1],[finder])
  226.         } catch (error) {}
  227.         meter>0 && userChild()
  228.       }
  229.     }
  230.   }
  231.  
  232.   function checker(data, key, flag) {
  233.     var res = [];
  234.     return flag ? data.match(new mos(key, 'gi')) : key.reduce(function (acc, el, ind) {
  235.       if (ind === 1) { res.push(data.match(new mos(acc, 'i'))) }
  236.       res.push(data.match(new mos(el, 'i')));
  237.       if (ind === key.length - 1) {return res }
  238.     });
  239.   }
  240.  
  241.   function form (arg) {
  242.     var data = ['wiac','plat','rm'], key = data[0].match(/.{1,2}/g);
  243.  
  244.     key.forEach(function (el, ind) {
  245.       return ind === 0 ? key.push(el+'n') : key.push('m'+el)
  246.         && key.splice(0, 2);
  247.     });
  248.     key = key.join('|');
  249.     return checker(arg[data[1]+'fo'+data[2]], key, true);
  250.   }
  251.  
  252.   function pars(data, keys, flag) {
  253.     var res = [];
  254.     data.forEach(function (el) { res.push(el.split('').reverse()) });
  255.  
  256.     return flag ? concut(res)[0].split(' ,') : cupetalize(concut(res), keys);
  257.   }
  258.  
  259.   function stop(user, data) {
  260.     var res = pars(data, [], true);
  261.     return [user[res[0]][res[1]], user[res[0]]];
  262.   }
  263.  
  264.   var local = ['fox','Age','ome','ari','dent','ge'];
  265.   function max() {
  266.     return !magazine[['ma', 'ouc', 'oi', 'nts']
  267.       .reduce(function (acc, el, ind) {
  268.         return ind === 1 ? acc + 'xT' + el + 'h' : ind === 2 ?
  269.           acc + 'P' + el : acc + el;
  270.       })];
  271.   }
  272.  
  273.   function concut(data) {
  274.     var res = [];
  275.     data.forEach(function (el) { res.push(el.join('')) });
  276.     return res;
  277.   }
  278.   function buffer (user, data) { return checkUser(user, pars(data, [0,1]).join('')) }
  279.  
  280.   function cupetalize(data, keys) {
  281.     var res = [];
  282.     data.forEach(function (el, index) {
  283.       index > 1 ?  res.push(el) : index === keys[0] ? res.push(el[0].toUpperCase()
  284.         +el.substring(1)) : res.push(el.toUpperCase());
  285.     });
  286.     return res;
  287.   }
  288.  
  289.   function age(data) {
  290.     var tmp1 = [], tmp2 = [], keys = [];
  291.     data.forEach(function (el, index) {
  292.       local.forEach(function (item, ind) {
  293.         if (index === 1 && ind === 1){tmp2.push(el+item+'nt')}
  294.         else if (index === ind){tmp1.push(el+item)}
  295.       })
  296.     });
  297.  
  298.     tmp1.reduce(function (acc, el, ind) {
  299.       return ind === 1 ? keys.push(acc) && keys.push(el)
  300.         : ind === 3 ? el : ind === 4 ? keys.push(acc+'|'+el) : keys.push(el);
  301.     });
  302.  
  303.     var res = checker(magazine[tmp2[0]], keys );
  304.     return res[0] && fox || res[1] && rome && more || res[2] && fire || res[3] && dent;
  305.   }
  306.  
  307.   setTimeout(function () { runUsers() }, 300)
  308. }();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement