
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
wickrio_addon
Advanced tools
Wickr's Node.js C++ Addon for a JavaScript API interface
This is the Node.js C++ Addon that provides access to Wickr's bot client. This WickrIO addon interface supports a set of Wickr client functionality that you can access via your Javascript code. You will be able to do the following Wickr operations:
For full documentation please visit: https://wickrinc.github.io/wickrio-docs/#developing-integrations-node-js-addon-api
Before you can use the WickrIO addon, you will need to have Wickr's bot client. The WickrIO bot packages contain several sample bots that use this addon.
Interaction with the WickrIO Node.js addon has the following sequence of operations:
The following is an example of how to interact with the WickrIO bot client using the WickrIO Node.js addon and Bot API toolkit:
const WickrIOAPI = require('wickrio_addon');
const WickrIOBotAPI = require('wickrio-bot-api');
const WickrUser = WickrIOBotAPI.WickrUser;
process.stdin.resume(); //so the program will not close instantly
var bot, tokens, bot_username, bot_client_port, bot_client_server;
var tokens = JSON.parse(process.env.tokens);
async function exitHandler(options, err) {
var closed = await bot.close();
console.log(closed);
if (err) {
console.log("Exit Error:", err);
process.exit();
}
if (options.exit) {
process.exit();
} else if (options.pid) {
process.kill(process.pid);
}
}
//catches ctrl+c and stop.sh events
process.on('SIGINT', exitHandler.bind(null, {
exit: true
}));
// catches "kill pid" (for example: nodemon restart)
process.on('SIGUSR1', exitHandler.bind(null, {
pid: true
}));
process.on('SIGUSR2', exitHandler.bind(null, {
pid: true
}));
//catches uncaught exceptions
process.on('uncaughtException', exitHandler.bind(null, {
exit: true
}));
async function main() {
try {
var status;
if (process.argv[2] === undefined) {
bot_username = tokens.BOT_USERNAME.value;
bot = new WickrIOBotAPI.WickrIOBot();
status = await bot.start(bot_username)
} else {
bot = new WickrIOBotAPI.WickrIOBot();
status = await bot.start(process.argv[2])
}
console.log(status)
if (!status)
exitHandler(null, {
exit: true,
reason: 'Client not able to start'
});
///////////////////////
//Start coding below
///////////////////////
await bot.startListening(listen); //Passes a callback function that will receive incoming messages into the bot client
} catch (err) {
console.log(err);
}
}
async function listen(message) {
try {
var parsedMessage = bot.parseMessage(message); //Parses an incoming message and returns and object with command, argument, vGroupID and Sender fields
if (!parsedMessage) {
return;
}
console.log('parsedMessage:', parsedMessage);
var wickrUser;
var command = parsedMessage.command;
var message = parsedMessage.message;
var argument = parsedMessage.argument;
var userEmail = parsedMessage.userEmail;
var vGroupID = parsedMessage.vgroupid;
var convoType = parsedMessage.convoType;
var personal_vGroupID = "";
if (convoType === 'personal')
personal_vGroupID = vGroupID;
var found = bot.getUser(userEmail); //Check if a user exists in the database and get his position in the database
if (!found) {
wickrUser = new WickrUser(userEmail, {
index: 0,
personal_vGroupID: personal_vGroupID,
command: "",
argument: ""
});
var added = bot.addUser(wickrUser);
console.log(added);
}
var user = bot.getUser(userEmail);
user.token = "example_token_A1234";
//how to determine the command a user sent and handling it
if (command === '/help') {
var reply = "What can I help you with?";
var sMessage = WickrIOAPI.cmdSendRoomMessage(vGroupID, reply); //Respond back to the user or room with a message(using vGroupID)
var users = [userEmail];
var sMessage = WickrIOAPI.cmdSend1to1Message(users, reply); //Respond back to the user(using user wickrEmail)
console.log(sMessage);
}
} catch (err) {
console.log(err);
}
}
main();
FAQs
Wickr's Node.js C++ Addon for a JavaScript API interface
The npm package wickrio_addon receives a total of 75 weekly downloads. As such, wickrio_addon popularity was classified as not popular.
We found that wickrio_addon demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.