
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@hades-ts/hades
Advanced tools
Typescript bot framework using Inversify.js and Discord.js.
Hades is a dependency-injection oriented framework. Read more about DI here and here.
Install the latest version from Git using NPM:
npm i --save https://github.com/dustinlacewell/hades.git
You can try a simple example bot here:
https://github.com/dustinlacewell/hades-example-bot
The basic bot starts with extending HadesBotService
:
import { HadesBotService, singleton } from "hades";
@singleton(BotService)
export class BotService extends HadesBotService {
async onReady() {
console.log(`Logged in as ${this.client.user.username}.`);
}
}
BotService.onReady()
will be called when the associated Discord.js event is
fired and in this case log a message to the console.
We're using the @singleton()
decorator here to bind BotService
to itself
within the container as a singleton.
In our index.ts
we can configure the container:
import "reflect-metadata";
import { HadesContainer } from "hades";
import { installTextCommands } from "hades/dist/text-commands";
import { BotService } from "./services/BotService";
const container = new HadesContainer();
const bot = container.get(BotService);
bot.login();
In order for dependency injection to work, we need to import
reflect-metadata
. Just a fact of life.
After creating the HadesContainer
we can then request an instance of our
BotService
.
We can finally login to Discord as the bot.
Add your token to config/default.json
:
{
"discordToken": "your bot token here"
}
That's it. The bot should now boot up and connect to any servers you've added it to. Of course it doesn't do anything...yet!
Please visit our documentation for more information:
Looking to contribute? Check out our Contributor Documentation.
FAQs
Typescript framework using Inversify.js and Discord.js
The npm package @hades-ts/hades receives a total of 0 weekly downloads. As such, @hades-ts/hades popularity was classified as not popular.
We found that @hades-ts/hades demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.