Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const fs = require("fs");
  2. global.InstallLocation = undefined;
  3. global.FortniteItems = [];
  4. try {
  5.     let ii = JSON.parse(fs.readFileSync("C:\\ProgramData\\Epic\\UnrealEngineLauncher\\LauncherInstalled.dat"));
  6.     InstallLocation = ii.InstallationList.find(i => i.AppName === "Fortnite").InstallLocation;
  7. } catch (e) { }
  8. if (InstallLocation) {
  9.     let file = fs.createReadStream(InstallLocation + "\\FortniteGame\\Content\\Paks\\pakchunk0-WindowsClient.pak");
  10.     let lb = Buffer.from([]);
  11.     file.on("data", e => {
  12.         let buffer = Buffer.concat([lb, e]);
  13.         lb = buffer.slice(buffer.length - 128);
  14.         let index = 0;
  15.         while (index < buffer.length) {
  16.             if (buffer[index + 0] === 0 && buffer[index + 1] === 65 && buffer[index + 2] === 116 &&
  17.                 buffer[index + 3] === 104 && buffer[index + 4] === 101 && buffer[index + 5] === 110 && buffer[index + 6] === 97) {
  18.                 let lindex = 7;
  19.                 let lstr = "Athena";
  20.                 while (buffer[index + lindex]) {
  21.                     lstr += String.fromCharCode(buffer[index + lindex]);
  22.                     ++lindex
  23.                 }
  24.                 lstr += ":";
  25.                 lindex += 2;
  26.                 if (buffer[index + lindex - 1] === 139 && buffer[index + lindex] === 0) {
  27.                     while (buffer[index + lindex] !== undefined &&
  28.                         !((buffer[index + lindex] >= 65 && buffer[index + lindex] <= 90) ||
  29.                          (buffer[index + lindex] >= 97 && buffer[index + lindex] <= 122))) {
  30.                         lindex += 1;
  31.                     }
  32.                     while (buffer[index + lindex]) {
  33.                         lstr += String.fromCharCode(buffer[index + lindex]).toLowerCase();
  34.                         lindex += 1;
  35.                     }
  36.                     if (buffer[index + lindex] === 0) {
  37.                         if (!lstr.endsWith("_random") && FortniteItems.indexOf(lstr) === -1) {
  38.                             FortniteItems.push(lstr);
  39.                         }
  40.                     }
  41.                 }
  42.             }
  43.             ++index;
  44.         }
  45.     fs.writeFileSync("output.txt",  FortniteItems.join("\n"))
  46.     });
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement