From 0216b3c2b4456adbf8eab348e5a36dc4d024f56f Mon Sep 17 00:00:00 2001 From: moony Date: Fri, 7 Aug 2020 19:28:21 +0000 Subject: [PATCH] Upload files to '' --- package.json | 20 ++ sensorData.js | 139 +++++++++++++ server.js | 496 ++++++++++++++++++++++++++++++++++++++++++++++ virtualization.js | 23 +++ 4 files changed, 678 insertions(+) create mode 100644 package.json create mode 100644 sensorData.js create mode 100644 server.js create mode 100644 virtualization.js diff --git a/package.json b/package.json new file mode 100644 index 0000000..db1bba4 --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "akamai", + "version": "1.0.0", + "description": "", + "main": "server.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node server.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/xsploited/akamai.git" + }, + "author": "Moony", + "license": "ISC", + "bugs": { + "url": "https://github.com/xsploited/akamai/issues" + }, + "homepage": "https://github.com/xsploited/akamai#readme" +} diff --git a/sensorData.js b/sensorData.js new file mode 100644 index 0000000..615e802 --- /dev/null +++ b/sensorData.js @@ -0,0 +1,139 @@ +/* + * ByePASS by Moony + * Version 1.0.0 + * This file processes and decrypts the sensor data. +*/ + +const request = require('request'); +var beautify = require('js-beautify').js; + +module.exports = { + grab: (urls, cocaine, hostName, callback) => { + url = new URL(urls); + getUrl = hostName ? `${url.protocol}//${url.hostname}` : urls; + request.get(getUrl, { + headers: { + ACCEPT: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'ACCEPT-ENCODING': 'gzip, deflate, br', + 'ACCEPT-LANGUAGE': 'en-US,en;q=0.9', + 'HOST': url.hostname, + 'SEC-FETCH-MODE': 'navigate', + 'SEC-FETCH-SITE': 'none', + 'SEC-FETCH-USER': '?1', + 'UPGRADE-INSECURE-REQUESTS': 1, + 'USER-AGENT': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + cookie: cocaine + }, + encoding: null, + gzip: true, + jar: request.jar() + }, (err, resp) => { + if (err != null) { + console.log(err); + } else { + let pattern = /var _cf = _cf.*?>`, {runScripts: "dangerously" }) + + let sensordata = dom.window.document.title; + dom.window.close(); + //console.log(sensor_data); + */ + /* if(!scriptCache.find((z) => z.url === req.body.url)) sensor.grabScriptUrl(req.body.url, `_abck=${req.body.cookie}`, (grabbedScript) => { + scriptCache.push({ + url: req.body.url, + location: grabbedScript + }); + getCookie(grabbedScript, req.body.url, req.body.cookie, sensor_data, (cookie) => + { + cookie.forEach((x) => { + res.cookie(x.split('=')[0], x.split('=')[1].split(';')[0]) + }) + res.end("sup bro"); + }); + }); else { + getCookie(scriptCache.find((z) => z.url === req.body.url).location, req.body.url, req.body.cookie, sensor_data, (cookie) => { + cookie.forEach((x) => { + res.cookie(x.split('=')[0], x.split('=')[1].split(';')[0]) + }) + res.end("sup bro"); + }); + }*/ + // res.json({sensor_data: sensordata}) + // }); + // JSDOM.fromFile('akamai.html', {runScripts: "dangerously", resources: "usable"}).then((dom) => { + + // }); + /* var api_public_key = "afSbep8yjnZUjq3aL010jO15Sawj2VZfdYK8uY90uxq" + var cs = "0a46G5m17Vrp4o4c" + var ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36" + var ver = "1.4.5" + var aaaa = get_cf_date(); + + var C = od(cs, api_public_key).slice(0, 16) + var S = Math.floor(get_cf_date() / 36e5); + var E = C + od(S, C) + var start_ts = get_cf_date() + var _abck = req.body.cookie; + var xagg = "12147" // this is from my chrome installation on my pc + var z1 = pi(start_ts / (2016 * 2016)) // 2016 is bmak.y1 + var d3 = get_cf_date() % 1e7 // x2() just returns get_cf_date() + var url = req.body.url.replace(/\\|"/g, "") + var sensor_data = `${E}${ver}-1,2,-94,-100,${ua},uaend,${xagg},20030107,en-US,Gecko,0,0,0,0,${z1},${d3},2048,1112,2048,1152,2048,1010,2050,,cpen:0,i1:0,dm:0,cwen:0,non:1,opc:0,fc:0,sc:0,wrc:1,isc:0,vib:1,bat:1,x11:0,x12:1,8330,${Math.random()},${start_ts / 2},loc:-1,2,-94,-101,do_en,dm_en,t_en-1,2,-94,-105,-1,2,-94,-102,-1,2,-94,-108,-1,2,-94,-110,-1,2,-94,-117,-1,2,-94,-111,-1,2,-94,-109,-1,2,-94,-114,-1,2,-94,-103,-1,2,-94,-112,${url},-1,2,-94,-115,1,1,0,0,0,0,0,6,0,${start_ts},${Math.floor(Math.random() * (42 - 35 + 1) + 35) + 1},16896,0,0,2816,0,0,${get_cf_date() - start_ts},49,0,${_abck},${ab(_abck)},${Math.floor(1e3 * Math.random()).toString()},-5098406,30261693-1,2,-94,-106,9,1-1,2,-94,-119,-1-1,2,-94,-122,0,0,0,0,1,0,0-1,2,-94,-123,-1,2,-94,-124,-1,2,-94,-125,` + sensor_data = `${sensor_data}-1,2,-94,-70,-739578230;dis;,7,8;true;true;true;300;true;24;24;true;false;1-1,2,-94,-80,4911-1,2,-94,-116,${getO9()}-1,2,-94,-118,${ab(sensor_data)}-1,2,-94,-121,;${get_cf_date() - aaaa};${Math.floor(Math.random() * (2 - 10 + 1) + 10) + 1};0` + res.json({sensor_data: sensor_data});*/ + var uriObject = new URL(req.body.url); + var realURL = useHost ? uriObject.protocol + '//' + uriObject.hostname : req.body.url; + if(!scriptCache.find((z) => z.url === realURL)) sensor.grab(realURL, `_abck=${req.body.cookie}`, useHost, (e) => { + if(e.err) return res.json(e); + var owo = scriptCache.push({ + url: realURL, + scripturl: e.url, + script: e.d + }); + + /*virtualization.getSensorData(e.d, {target: req.body.url, cookievalue: req.body.cookie},(h) => { + res.json({sensor_data: h}); + });*/ + let timedOut = false; + getSensorData(e.d, req.body.cookie, (h) => { + if(!timedOut) res.json({sensor_data: h}), timedOut = true; + /* getCookie(e.url, uriObject.hostname, uriObject.origin, `_abck=${req.body.cookie}`, h, (eee) => { + // res.json({cookie: eee}); + eee.forEach((x) => { + res.cookie(x.split('=')[0], x.split('=')[1].split(';')[0]) + }) + res.end("sup bro"); + timedOut = true; + });*/ + }); + setTimeout(() => {if(!timedOut)res.json({err: 'Request timed out'}), timedOut = true;}, 10*1000); + }); else { + let timedOut = false; + var sex = scriptCache.find((z) => z.url === realURL); + getSensorData(sex.script, req.body.cookie, (h) => { + if(!timedOut)res.json({sensor_data: h}), timedOut = true + /* if(!sex.scripturl) sensor.grabScriptUrl(realURL, `_abck=${req.body.cookie}`, (de) => { + sex.scripturl = de; + getCookie(de, req.body.url, `_abck=${req.body.cookie}`, h, (eee) => { + timedOut = true; + return res.status(200), res.send(eee); + }); + }); else */ + /*getCookie(sex.scripturl, uriObject.hostname, uriObject.origin, `_abck=${req.body.cookie}`, h, (eee) => { + timedOut = true; + //return res.status(200), res.send(eee); + eee.forEach((x) => { + res.cookie(x.split('=')[0], x.split('=')[1].split(';')[0]) + }) + res.end("sup bro"); + });*/ + }); + setTimeout(() => {if(!timedOut)res.json({err: 'Request timed out'}), timedOut = true;}, 10*1000); + } +}); + +function getCookie(urls, gay, gay2, cocaine, sensor_data, cb) { + request.post(urls, { + headers: { + 'Accept': '*/*', + 'Host': gay, + 'Referer': gay, + 'Origin': gay2, + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36', + 'Cookie': `_abck=${cocaine};`, + 'Content-Type': 'text/plain' + }, + body: { + sensor_data: sensor_data + }, + jar: request.jar(), + json: true + }, (err, res) => { + if(err) return cb('err' + err); + if(!res.headers['set-cookie']) return cb('nigga wtf no cookie header?!'); + if(res.body.success)return cb(res.headers['set-cookie']); else return cb('nope') + }); +} + +app.listen(80, () => console.log('http memes')) + +const wss = new WebSocket.Server({ port: 42154 }); + +wss.on('connection', function connection(ws) { + ws.on('message', function incoming(message) { + const payload = JSON.parse(message); + switch(payload.t) + { + case 'GOT_SENSOR': + var target = respqeueue.find((e) => e.id === payload.d.id); + if(!target) return; + solveSpeedCache.push(Date.now() - target.timestamp); + target.callback(payload.d.sensor_data); + break; + } + }); + setInterval(() => { + ws.send(JSON.stringify({t: 'PING'})) + }, 30 * 1000); +}); + +var solveSpeedCache = []; +var respqeueue = []; + +function getServers() { + var possible = []; + wss.clients.forEach((e) => { + if(e.readyState === e.OPEN) possible.push(e); + }); + return possible; +} + +function calculateAvg() +{ + let tmp = 0; + solveSpeedCache.forEach((e) => tmp += e); + return Math.floor(tmp / solveSpeedCache.length); +} + +function getSensorData(script, cookie, cb) +{ + let sensorSession = randomSession(); + if(!sensorSession) return cb('error while grabbing sensor data, No servers found!'); + var identifier = uuid(); + respqeueue.push({ + id: identifier, + callback: cb, + timestamp: Date.now() + }); + sensorSession.send(JSON.stringify({ + t: 'GET_SENSOR', + d: { + eval: script, + cookie: cookie, + id: identifier + } + })); +} + +function randomSession() +{ + let tmp = getServers(); + return tmp[Math.floor(Math.random() * tmp.length)]; +} + +const databaseOperations = { + hasActiveSub: (id) => { + let expire = databaseOperations.getMetadataValue(id, 'expire'); + if(expire < 0) return false; + return expire - Date.now() > 0 ? true : false; + }, + isInLimitedList: (id, target) => { + let modules = databaseOperations.getMetadataValue(id, 'modules'); + if(modules.includes(target.toLowerCase())) return true; + return false; + }, + isLimitedAccount: (id) => { + let modules = databaseOperations.getMetadataValue(id, 'modules'); + if(!modules || modules.length === 0) return false; + return true; + }, + register: (username, password) => { + if(databaseOperations.isUsernameTaken(username)) return false; + let token = crypto.createHash('md5').update(`this timestamp is a nigger =>${Date.now()}GODpls buy me a shiba${Math.random() * 2312831}`).digest('hex'); + let hash = bcrypt.hashSync(password, 10); + db.prepare('INSERT INTO users (username, password, token) VALUES (?, ?, ?)').run(username, hash, token); + return token; + }, + isUsernameTaken: (username) => { + let row = db.prepare('SELECT * FROM users WHERE username=?').get(username); + return row ? true : false; + }, + checkToken: (token) => { + return db.prepare('SELECT * FROM users WHERE token=?').get(token); + }, + checkApiToken: (token) => { + return db.prepare('SELECT * FROM users WHERE apiKey=?').get(token); + }, + getFromId: (id) => { + return db.prepare('SELECT * FROM users WHERE id=?').get(id); + }, + checkCredentials: (username, password) => { + let row = db.prepare('SELECT * FROM users WHERE username=?').get(username); + if(!row) return false; + let match = bcrypt.compare(password, row.password); + if(!match) return false; + return row; + }, + setToken: (id) => { + let token = crypto.createHash('md5').update(`this timestamp is a nigger =>${Date.now()}GODpls buy me a shiba${id}`).digest('hex'); + db.prepare('UPDATE users SET token=? WHERE id=?').run(token, id); + return token; + }, + setApiToken: (id) => { + let token = crypto.createHash('md5').update(`this also this is a api key btw GOD sex timestamp is a nigger =>${Date.now()}GODpls buy me a shiba${id}`).digest('hex'); + db.prepare('UPDATE users SET apiKey=? WHERE id=?').run(token, id); + return token; + }, + getMetadataValue: (id, key) => { + let row = db.prepare('SELECT * FROM users WHERE id=?').get(id); + return JSON.parse(row.metadata)[key]; + }, + updateOrSetMetadataValue: (id, key, value) => { + let row = db.prepare('SELECT * FROM users WHERE id=?').get(id); + let deserialized = row ? JSON.parse(row.metadata) : {}; + deserialized[key] = value; + db.prepare('UPDATE users SET metadata=? WHERE id=?').run(JSON.stringify(deserialized), id); + }, + destroyMetadataKey: (id, key) => { + let row = db.prepare("SELECT * FROM users WHERE id=?").get(id); + let deserialized = JSON.parse(row.metadata); + delete deserialized[key]; + db.prepare("UPDATE users SET metaData=? WHERE id=?").run(JSON.stringify(deserialized), id); + } +}; + +setInterval(() => { + require('fs').writeFileSync('./cache.json', JSON.stringify(scriptCache)); +}, 10 * 1000); diff --git a/virtualization.js b/virtualization.js new file mode 100644 index 0000000..8dc3253 --- /dev/null +++ b/virtualization.js @@ -0,0 +1,23 @@ +/* + * Akamai Byepass by Moony + * Version 1.0.0 + * This file uses puppeteer to perform UA testing. +*/ + +const puppeteer = require('puppeteer'); + +module.exports = { + getSensorData: async (exec, opts, cb) => { + const browser = await puppeteer.launch({headless: true, args: ["--no-sandbox", "--disable-setuid-sandbox", + '--proxy-server="direct://"', '--proxy-bypass-list=*']}); + const page = await browser.newPage(); + await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36'); + await page.goto("https://varvy.com/pagespeed/wicked-fast.html"); + await page.setCookie({name: '_abck', value: opts.cookievalue}) + //await page.goto(opts.target); + //await page.goto("https://varvy.com/pagespeed/wicked-fast.html"); + await page.evaluate(exec); + await page.evaluate(`bmak.bpd()`); + return cb(await page.evaluate(`bmak.sensor_data`)) + } +};