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.
oauth-request
Advanced tools
OAuth 1.0a via request
npm i oauth-request --save
var crypto = require('crypto');
var OAuth = require('oauth-request');
var twitter = OAuth({
consumer: {
key: 'xxxxx',
secret: 'xxxxx'
},
signature_method: 'HMAC-SHA1',
hash_function: function(base_string, key) {
return crypto.createHmac('sha1', key).update(base_string).digest('base64');
}
});
twitter.setToken({
key: 'xxxxx',
secret: 'xxxxx'
});
//list user timeline
twitter.get('https://api.twitter.com/1.1/statuses/user_timeline.json', function(err, res, tweets) {
console.log(tweets);
});
//list user timeline limit 5
twitter.get({
url: 'https://api.twitter.com/1.1/statuses/user_timeline.json',
qs: {
count: 5
},
json: true
}, function(err, res, tweets) {
console.log(tweets);
});
check oauth-1.0a options
.get()
.post()
.setToken(oauth_token)
oauth_token
: String
token keytwitter.setToken('xxxxx');
oauth_token
: Object
twitter.setToken({
key: 'xxxxx',
secret: 'xxxxx'
});
.stream
FAQs
OAuth 1.0a via request
The npm package oauth-request receives a total of 41 weekly downloads. As such, oauth-request popularity was classified as not popular.
We found that oauth-request 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.