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.
campaign-monitor
Advanced tools
This package in under active development.
Please do not use in production.
In the meantime, please use https://www.npmjs.com/package/createsend-node (different author)
var cm = require('campaign-monitor');
var mail = new cm({
log: true,
apikey: 'xxxxx',
clientid: 'xxxxx',
client: 'default' // Or use a client ID
});
mail.lists().all(function(response) {
mail.log("lists.all", "response:", response);
});
mail.lists().create({
"Title": "Website Subscribers",
"UnsubscribePage": "http://www.example.com/unsubscribed.html",
"UnsubscribeSetting": "AllClientLists", // Or OnlyThisList
"ConfirmedOptIn": false,
"ConfirmationSuccessPage": "http://www.example.com/joined.html"
}, function(response) {
mail.log("lists.create", "response:", response);
});
Select the list using mail.list(XXXXXXX)
where XXXXXXX is the list ID.
mail.list(XXXXXXX).get(function(response) {
mail.log("list.get", "response:", response);
});
mail.list(XXXXXXX).stats(function(response) {
mail.log("list.stats", "response:", response);
});
mail.list(XXXXXXX).customFields(function(response) {
mail.log("list.customFields", "response:", response);
});
mail.list(XXXXXXX).createCustomField({
"FieldName": "list_test",
"DataType": "MultiSelectMany",
"Options": ["hello","world"]
},function(data) {
mail.log("list", "createCustomFields", data);
});
mail.list(XXXXXXX).renameCustomField('old name', 'new name', function(data) {
mail.log("list", "renameCustomField", data);
});
mail.list(XXXXXXX).updateCustomFieldOptions('field name', ["option 1", "option 2", ...] ,function(data) {
mail.log("list", "updateCustomFieldOptions", data);
});
mail.list(XXXXXXX).replaceCustomFieldOptions('field name', ["option 1", "option 2", ...] ,function(data) {
mail.log("list", "replaceCustomFieldOptions", data);
});
Select the list using mail.subscribers(XXXXXXX)
where XXXXXXX is the list ID.
mail.subscribers(args.listid)._add({
"EmailAddress": "julien@fleetwit.com",
"Name": "Julien Loutre",
"CustomFields": [{
"Key": "played",
"Value": 254
}],
"Resubscribe": true,
"RestartSubscriptionBasedAutoresponders": false
}, function(email) {
mail.log("subscribers", "add", email);
});
mail.subscribers(args.listid).add({
name: 'Julien Loutre',
email: 'julien@fleetwit.com',
fields: {
hello: 'world'
},
restartAutoresponder: true,
resubscribe: true
}, function(email) {
mail.log("subscribers", "add", email);
});
mail.subscribers(args.listid)._update("current_email@example.com",{
"EmailAddress": "changed_address@example.com",
"Name": "Changed Name",
"CustomFields": [
{
"Key": "website",
"Value": "http://example.com"
},
{
"Key": "interests",
"Value": "magic"
},
{
"Key": "interests",
"Value": "dungeons and dragons"
},
{
"Key": "age",
"Value": "",
"Clear": true
}
],
"Resubscribe": true,
"RestartSubscriptionBasedAutoresponders": true
}, function(email) {
mail.log("subscribers", "add", email);
});
mail.transactional().templates(function(data) {
mail.log("transactional", "templates", data);
});
FAQs
Campaign Monitor API wrapper by FleetWit
We found that campaign-monitor 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.