
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.
@request/api
Advanced tools
request('url')
request({options})
request('url', function callback (err, res, body) {})
request({options}, function callback (err, res, body) {})
request('url', {options}, function callback (err, res, body) {})
request[HTTP_VERB]('url')
request[HTTP_VERB]({options})
request[HTTP_VERB]('url', function callback (err, res, body) {})
request[HTTP_VERB]({options}, function callback (err, res, body) {})
request[HTTP_VERB]('url', {options}, function callback (err, res, body) {})
var api = require('@request/api')
var client = require('@request/client')
// initialize the API
var request = api({
type: 'basic',
// pass HTTP request function
// that accepts @request/interface options
request: client
})
// GET http://localhost:6767?a=1
request.get('http://localhost:6767', {qs: {a: 1}}, (err, res, body) => {
// request callback
})
var api = require('@request/api')
var client = require('@request/client')
// initialize the API
var request = api({
type: 'chain',
// API methods configuration
config: {
// HTTP methods
method: {
get: ['select'],
// ...
},
// @request/interface option methods
option: {
qs: ['where'],
// ...
},
// custom methods
custom: {
request: ['fetch', 'snatch', 'submit'],
// ...
}
},
// custom methods implementation
define: {
// pass any arguments to your custom methods
request: function (callback) {
if (callback) {
// `this._options` contains the generated options object
this._options.callback = callback
}
// the last method should return @request/interface consumer
return client(this._options)
// or
return this // if you want to chain further
}
}
})
// GET http://localhost:6767?a=1
request
.select('http://localhost:6767')
.where({a: 1})
.fetch((err, res, body) => {
// request callback
})
FAQs
Sugar API for @request/interface consumers
The npm package @request/api receives a total of 47,029 weekly downloads. As such, @request/api popularity was classified as popular.
We found that @request/api demonstrated a not healthy version release cadence and project activity because the last version was released 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.