Advertisement
MNMaster

Untitled

May 14th, 2024
625
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const axios = require("axios");
  2. const crypto = require("crypto");
  3. const cheerio = require("cheerio");
  4. const NodeCache = require("node-cache");
  5.  
  6. const api = axios.create({
  7.   headers: {
  8.     Referer: "https://linkvertise.com/",
  9.     "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
  10.     "Accept-Language": "en-US,en;q=0.9",
  11.     "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
  12.     "Accept-Encoding": "gzip, deflate, br",
  13.     "Connection": "keep-alive",
  14.     "Cache-Control": "no-cache",
  15.     "Pragma": "no-cache",
  16.   },
  17.   maxRedirects: 0,  // Disable automatic redirects
  18.   validateStatus: function (status) {
  19.     return status >= 200 && status < 303;  // Reject only if the status code is greater than or equal to 303
  20.   },
  21.   timeout: 10000,  // Set a timeout of 10 seconds
  22. });
  23. const cache = new NodeCache({ stdTTL: 600 });
  24.  
  25. const md5 = (data) => crypto.createHash("md5").update(data).digest("hex");
  26.  
  27. const bypass = async (hwid) => {
  28.   const hashedHwid = md5(hwid);
  29.  
  30.   const startUrl = `https://keysystem.fluxteam.net/android/checkpoint/start.php?HWID=${hwid}`;
  31.   const check1Url = "https://fluxteam.net/android/checkpoint/check1.php";
  32.   const mainUrl = `https://fluxteam.net/android/checkpoint/main.php`;
  33.  
  34.   try {
  35.     await api.post(startUrl);
  36.     await api.get(check1Url);
  37.     const response = await api.get(mainUrl);
  38.     const $ = cheerio.load(response.data);
  39.     const extractedKey = $("body > main > code").text().trim();
  40.  
  41.     if (extractedKey === hashedHwid) {
  42.       return `Success:\nKey: ${hashedHwid}`;
  43.     } else {
  44.       return `Error: Nuh Uhh`;
  45.     }
  46.   } catch (error) {
  47.     const cachedError = cache.get(error.config.url);
  48.     if (cachedError) {
  49.       return cachedError;
  50.     }
  51.     let message;
  52.  
  53.     if (error.response) {
  54.       message = `Request error: ${error.response.status} - ${error.response.statusText}`;
  55.     } else if (error.request) {
  56.       message = `No response received - ${error.request}`;
  57.     } else {
  58.       message = `Error: ${error.message}`;
  59.     }
  60.     cache.set(error.config.url, message);
  61.     return message;
  62.   }
  63. };
  64. module.exports = bypass;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement