Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
discord-badges
Advanced tools
A package that returns the badges of a Discord User
const badges = require("discord-badges");
badges
.badges(user) // Get the user somehow
.then((response) => {
console.log(response); // log the response
})
.catch((e) => {
console.log(e); // log the error (if any)
});
const Discord = require("discord.js");
const badges = require("discord-badges"); // Requiring our package.
const client = new Discord.Client({
fetchAllMembers: true,
});
client.on("ready", async () => {
console.log(`${client.user.tag} is online!`);
});
client.on("message", async (message) => {
if (message.content === "!mybadges") {
const user = client.users.cache.get(message.author.id); // Define user
badges
.badges(user) // Send user to the package
.then((response) => {
// return the user badges
let result = "";
for (let i = 0; i < response.length; i++) {
result += `**${response[i].name} :** ${response[i].url}\n`;
}
return message.channel.send(result);
})
.catch((e) => {
// if no badges return error
console.log(e);
return message.channel.send("You don't have any Discord Badges.");
});
}
});
client.login("DISCORD_BOT_TOKEN");
FAQs
A package that returns the badges of a Discord User
The npm package discord-badges receives a total of 25 weekly downloads. As such, discord-badges popularity was classified as not popular.
We found that discord-badges 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.