Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
chatexchange
Advanced tools
A Node.js API for talking to Stack Exchange chat (Largely based on ChatExchange for python)
Using NPM:
$ npm i chatexchange
const Client = require("chatexchange");
const { ChatEventType } = require("chatexchange");
const main = async () => {
const client = new Client("stackoverflow.com");
await client.login("EMAIL", "PASSWORD");
const me = await client.getMe();
const myProfile = await client.getProfile(me);
const { roomCount } = myProfile;
console.log(`Rooms I am in: ${roomCount}`);
const room = client.getRoom(167908);
room.ignore(ChatEventType.FILE_ADDED);
const joined = await client.joinRoom(room);
if(joined) {
room.on("message", async (msg) => {
console.log("Got Message", msg);
const { eventType, targetUserId } = msg;
if (eventType === ChatEventType.USER_MENTIONED && targetUserId === me.id) {
await msg.reply("Hello World!");
}
if(eventType === ChatEventType.USER_LEFT) {
await msg.send("See you around!", room);
}
});
// Leave the room after five minutes
setTimeout(async () => {
await room.sendMessage("Bye everyone!");
await client.leaveRoom(room);
}, 3e5);
// Connect to the room, and listen for new events
await room.watch();
return;
}
await client.logout();
};
main();
Featured projects using ChatExchange:
FAQs
A node.js wrapper for talking to Stack Exchange chat
The npm package chatexchange receives a total of 34 weekly downloads. As such, chatexchange popularity was classified as not popular.
We found that chatexchange demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.