
Research
Shai-Hulud Descends to Hades: Miasma Worm Campaign Spreads with New PyPI Wave
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.

Rabbitode is a probject created to provide a simple interface in order to work with the AMQP interface to rabbitmq. RabbitMQ is an events broker that allows us to send a recieve events between producers and consumers via an event queue.
npm install rabbitode -Syarn add rabbitodeIn order for this project to run you must have a working instance of rabbitmq on your machine or server.
I reccomend docker for local development.
docker run -p 5672:5672 -d --rm --name rabbit rabbitmq:3
Direct
// const { exchangeTypes, sendMessage, getDefaultQueueConfig } = require('rabbitode') <--- could also be this then use exchangeTypes.DIRECT
const { DIRECT } = require('rabbitode/lib/exchangeTypes');
const { sendMessage } = require('rabbitode/lib/sendMessage');
const { getDefaultQueueConfig } = require('rabbitode/lib/utils');
await sendMessage({
messageConfig: {
exchangeName: 'direct_test_exchange',
routingKey: `direct_test_queue`,
content: {
message: `this is a test message for direct connection`
}
},
exchangeType: DIRECT, // direct, fanout, exchange are all available types
connectionUrl: 'amqp://localhost',
configs: getDefaultQueueConfig(),
connectionOptions: {},
publishCallback: () => {
// something here
}
});
Fanout
// const { exchangeTypes, sendMessage, getDefaultQueueConfig } = require('rabbitode') <--- could also be this then use exchangeTypes.FANOUT
const { FANOUT } = require('rabbitode/lib/exchangeTypes');
const { sendMessage } = require('rabbitode/lib/sendMessage');
const { getDefaultQueueConfig } = require('rabbitode/lib/utils');
await sendMessage({
messageConfig: {
exchangeName: 'fanout_test_exchange',
routingKey: `fanout_test_queue`,
content: {
message: `this is a test message for direct stuff ${count}`
}
},
exchangeType: FANOUT,
connectionUrl: 'amqp://localhost',
configs: getDefaultQueueConfig(), // replace this with queue configs from amqplib
connectionOptions: {},
publishCallback: () => {}
});
Topic
// const { exchangeTypes, sendMessage, getDefaultQueueConfig } = require('rabbitode') <--- could also be this then use exchangeTypes.TOPIC
const { TOPIC } = require('rabbitode/lib/exchangeTypes');
const { sendMessage } = require('rabbitode/lib/sendMessage');
const { getDefaultQueueConfig } = require('rabbitode/lib/utils');
await sendMessage({
messageConfig: {
exchangeName: 'topic_test_exchange',
routingKey: `topic.key`,
content: {
message: `this is a test message for direct stuff ${count}`
}
},
exchangeType: TOPIC,
connectionUrl: 'amqp://localhost',
configs: {
...getDefaultQueueConfig(),
somethingElse: true,
}, // replace this with queue configs from amqplib
connectionOptions: {},
publishCallback: () => {
// something here
}
});
Direct
const { closeRabbit } = require('rabbitode/lib/connection');
const { startConsumer } = require('rabbitode/lib/consumers');
const { decodeToJson, decodeToString } = require('rabbitode/lib/encoding');
const handleConsume = channel => msg => {
console.log(decodeToString(msg));
console.log(decodeToJson(msg));
channel.ack(msg);
};
const { conn, channel } = startConsumer({
queueConfig: {
exchangeName: 'direct_test_exchange',
exchangeType: 'direct',
queueName: 'direct_test_queue',
consumerCallback: handleConsume,
},
connectionUrl: 'amqp://localhost',
});
await closeRabbit(conn, channel);
Fanout
const { closeRabbit } = require('rabbitode/lib/connection');
const { startConsumer } = require('rabbitode/lib/consumers');
const { decodeToJson, decodeToString } = require('rabbitode/lib/encoding');
const handleConsume = channel => msg => {
console.log(decodeToString(msg));
console.log(decodeToJson(msg));
channel.ack(msg);
};
const { conn, channel } = startConsumer({
queueConfig: {
exchangeName: 'fanout_test_exchange',
exchangeType: 'fanout',
queueName: 'fanout_test_queue',
consumerCallback: handleConsume,
},
connectionUrl: 'amqp://localhost',
});
await closeRabbit(conn, channel);
Topic
const { closeRabbit } = require('rabbitode/lib/connection');
const { startConsumer } = require('rabbitode/lib/consumers');
const { decodeToJson, decodeToString } = require('rabbitode/lib/encoding');
const handleConsume = channel => msg => {
console.log(decodeToString(msg));
console.log(decodeToJson(msg));
console.log(msg.fields.routingKey);
channel.ack(msg);
};
const { conn, channel } = startConsumer({
queueConfig: {
exchangeName: 'topic_test_exchange',
exchangeType: 'topic',
queueName: 'topic_test_queue',
consumerCallback: handleConsume,
},
connectionUrl: 'amqp://localhost',
topics: ['test.*', '*.test'],
});
await closeRabbit(conn, channel);
const Logger = require('rabbitode/lib/logger');
logger.setDebug(false);
const { startConsumer } = require('rabbitode/lib/consumers');
const { decodeToJson } = require('rabbitode/lib/encoding');
const handleConsume = channel => msg => {
console.log(decodeToJson(msg));
channel.ack(msg);
};
const { startConsumer } = require('rabbitode/lib/consumers');
const { decodeToString } = require('rabbitode/lib/encoding');
const handleConsume = channel => msg => {
console.log(decodeToString(msg));
channel.ack(msg);
};
const {
getDefaultQueueConfig,
getDefaultConsumerConfig,
} = require('rabbitode/lib/utils');
const baseconfig = getDefaultQueueConfig();
const consumerConfig = getDefaultConsumerConfig();
const { getOfflineQueue } = require('rabbitode/lib/offline');
const queue = getOfflineQueue();
// once your connection is backup you can loop the queue and send again
queue.forEach(config => {
sendMessage({
messageConfig: config.message,
exchangeType: config.exchangeType, // direct, fanout, exchange are all available types
connectionUrl: 'amqp://localhost',
configs: {},
connectionOptions: {},
publishCallback: () => {},
});
});
Copyright 2021 Evan Burbidge
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A client wrapper to allow the usage of rabbitmq, amqplib with nodejs
We found that rabbitode 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
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.