
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.
A node wrapper library for RoadRunnr delivery service. In-built OAuth. You don't need to worry about getting and maintaining an access token. Just set your keys and you are good to go!
npm install roadrunnr
var runnr = require('roadrunnr');
runnr.setKeys(CLIENT_ID, CLIENT_SECRET);
var orderRequest = new runnr.OrderRequest();
// Add pickup details
orderRequest.pickup.user.name = '';
orderRequest.pickup.user.phone_no = '';
orderRequest.pickup.user.email = '';
orderRequest.pickup.user.type = '';
orderRequest.pickup.user.external_id = '';
orderRequest.pickup.user.full_address.address = '';
orderRequest.pickup.user.full_address.locality.name = ''; // Can be skipped, see below
orderRequest.pickup.user.full_address.sub_locality.name = ''; // Can be skipped, see below
orderRequest.pickup.user.full_address.city.name = '';
orderRequest.pickup.user.full_address.geo.latitude = "plat"; // Optional, string format
orderRequest.pickup.user.full_address.geo.longitude = "plng"; // Optional, string format
// Add drop details
orderRequest.drop.user.name = '';
orderRequest.drop.user.phone_no = '';
orderRequest.drop.user.email = '';
orderRequest.drop.user.type = '';
orderRequest.drop.user.external_id = '';
orderRequest.drop.user.full_address.address = '';
orderRequest.drop.user.full_address.locality.name = ''; // Can be skipped, see below
orderRequest.drop.user.full_address.sub_locality.name = ''; // Can be skipped, see below
orderRequest.drop.user.full_address.city.name = '';
orderRequest.drop.user.full_address.geo.latitude = "dlat"; // Optional, string format
orderRequest.drop.user.full_address.geo.longitude = "dlng"; // Optional, string format
// Order Details
orderRequest.order_details.order_id = '';
orderRequest.order_details.order_value = '0';
orderRequest.order_details.amount_to_be_collected = '0';
orderRequest.order_details.order_type.name = 'CashOnDelivery';
orderRequest.order_details.order_items[0].quantity = 1;
orderRequest.order_details.order_items[0].price = 0;
orderRequest.order_details.order_items[0].item.name = '';
orderRequest.order_details.created_at = "YYYY-MM-DD hh: MM";
orderRequest.callback_url = 'your.domain/url'; // OPTIONAL
runnr.createShipment(orderRequest, function(error, response) {
console.log(response);
});
Roadrunnr allows you to skip the "locality" and "sub_locality" parameters if you provide the accurate lat & long for the addresses. I've added a geocoder which converts the address almost accurate lat long. Instrutions here.
runnr.trackShipment(id, function(error, response) {
if (error) {
console.error(error);
} else {
console.log(response);
}
});
runnr.cancelShipment(id, function(error, response) {
if (error) {
console.error(error);
} else {
console.log(response);
}
});
runnr.checkServiceability(orderRequest, function(error, response) {
if (error) {
console.error(error);
} else {
console.log(response);
}
});
Please run npm install geocoder
before using the following function. You can skip the locality
and sub_locality
fields using this.
IMPORTANT NOTE : This function geocodes the address in orderRquest.pickup.user.full_address.address
and orderRequest.drop.user.full_address.address
. Make sure this the complete address which includes the city name and the pin code.
orderRequest.pickup.user.full_address.locality.name = 'BYPASS_LOCALITY';
orderRequest.pickup.user.full_address.sub_locality.name = ''; // Can be left blank
orderRequest.drop.user.full_address.locality.name = 'BYPASS_LOCALITY';
orderRequest.drop.user.full_address.sub_locality.name = ''; // Can be left blank
runnr.assignLatLong(orderRequest, function(error, newOrderRequest) {
if (error) {
// There was some error geocoding one of the addresses
} else {
runnr.createShipment(newOrderRequest, function(error, response) {
if (error) {
console.error(error);
} else {
console.log(response);
}
});
}
});
To use Roadrunnr's test portal, just change the environment. This module uses the production server by default.
runnr.setEnvironment('test');
To use Roadrunnr's test portal, just change the environment. This module uses the production server by default.
runnr.setOAuthPath('./path/to/OAuth/file.json');
Roadrunnr callbacks are of type application/octet-stream
, and rawBody has been dropped from the request object in newer versions of Express. Here is a simple rawbody parser for roadrunnr callbacks
app.post('/roadRunnr/callback', runnr.rawParser, function(req,res) {
console.log(req.rawBody);
res.send("OK");
});
This wrapper now checks for errors thrown by the Roadrunnr API. Please check for errors in all API calls.
You can raise an issue in this repo or mail me at sidhant@hashexclude.com
FAQs
A Node wrapper for Roadrunnr logistic serrvices
We found that roadrunnr 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 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.