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.
shipmentmentor
Advanced tools
Shipmentmentor platform provides REST API for companies to have industrial level shipment number generation and status update service with ability to provide instant notification about shipment status and location via email, SMS or web hook.
node.js SDK for ShipmentMentor API
npm install shipmentmentor --save
All ShipmentMentor API calls require API key for authorization. To get API key please signup on https://www.shipmentmentor.com. You can get API key from your account settings.
Every response is JSON Envelope with http header code 200 always.
Response Http Header Code:
Response JSON Envelope:
Example of Success Response:
{
"code": 201,
"status": "success",
"message": "operation was successful",
"payload": []
}
Example of Fail Response:
{
"code": 400,
"status": "fail",
"message": "Email already in system",
"payload": []
}
Function: addTracking
Payload:
{
"tid":"the package UPS, USPS or FedEx tracking number",
"title":"Your product name",
"courier": null,
"orderId":"1234",
"customer":"FirstName LastName",
"notify":{
"email":"customer@example.com",
"phone":"+8218001111"
},
"note": null
}
Response Success:
Example:
var shipmentmentor = require( 'shipmentmentor' );
var shm = new shipmentmentor(process.env.SHIPMENTMENTOR_API_TOKEN,"sandbox"); // "production"
var payload = {
"tid":"Your UPS USPS OR FedEx tracking NUmber",
"title":"Your product name",
"courier": null,
"orderId":"12345",
"customer":"FirstName LastName",
"notify":{
"email":"customer@example.com",
"phone":"+8188087449"
},
"note": null
}
shm.addTracking(payload).then((response)=> {
console.log('response:',response);
}).catch(error=>{
console.log('error:',error);
});
Function: sendShipment
Example:
var shipmentmentor = require( 'shipmentmentor' );
var shm = new shipmentmentor(process.env.SHIPMENTMENTOR_API_TOKEN,"sandbox"); // "production"
var parsels=[];
var origin = {
"name": "sender name",
"company": "sender Company",
"address1": "sender address",
"address2":null,
"city": "sender city",
"state": "CA",
"zip": "90403",
"country": "US",
"lat":34.032016,
"long":-118.482805,
"phone": "+18188081111",
"email": "sam@example.com"
}
var destination = {
"name": "receiver name",
"company": null,
"address1": "receiver address",
"address2":null,
"city": "receiver city",
"state": "CA",
"zip": "90401",
"country": "US",
"lat":34.032016,
"long":-118.482805,
"phone": "+18188082222",
"email": "destination@example.com"
};
var parsel1 = {
"id": "SKU45896",
"quantity":1,
"name": "custom package name",
"length": 12,
"width": 8,
"height": 3,
"distanceUnit": "in",
"weight": 1.5,
"weightUnit": "lb",
"metadata":{}
};
parsels.push(parsel1);
var payload = {
"origin": origin,
"destination": destination,
"parcels": parsels,
"expected": "2019-02-15T14:12:16Z",
"message": "Left in front of door",
"orderId": "0113191348",
"status": "InfoReceived",
"courier":"courier person or company name",
"courierEmail": "courier@example.com",
"metadata":{}
}
shm.sendShipment(payload).then((response)=> {
console.log('response:',response);
}).catch(error=>{
console.log('error:',error);
});
Function: updateShipment
Example:
var shipmentmentor = require( 'shipmentmentor' );
var shm = new shipmentmentor(process.env.SHIPMENTMENTOR_API_TOKEN,"sandbox"); // "production"
var payload = {
"tid":"SHM123456789879",
"status":"InTransit",
"location": "2025 Wilshire Blvd, Santa Monica, CA 90403",
"lat":34.032016,
"long":-118.482805,
"time":"2019-01-19T15:04:08-07:00"
}
shm.updateShipment(payload).then((response)=> {
console.log('response:',response);
}).catch(error=>{
console.log('error:',error);
});
FAQs
node.js SDK for ShipmentMentor API
The npm package shipmentmentor receives a total of 3 weekly downloads. As such, shipmentmentor popularity was classified as not popular.
We found that shipmentmentor 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.