
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
follow-redirect-url
Advanced tools
A simple command-line utility that lets you follow redirects to see where http URLs end up. Useful for shortened URLs.
A simple command-line utility that lets you follow redirects to see where http URLs end up. Useful for shortened URLs.
Follows up to 20 redirects Default.
Also added User-Agent header to requests, some web address won't redirect without browsers information eg: https://fb.me
npm install -g follow-redirect-url
npm install -save follow-redirect-url
follow https://bit.ly/2X7gCIT
The first argument is a url
string.
'use strict';
const followRedirect = require('follow-redirect-url');
followRedirect.startFollowing('https://bit.ly/2X7gCIT').then(urls => {
console.log(urls);
}).catch(error => {
console.log(error)
})
https://bit.ly/2X7gCIT -> 301
http://github.com/sthnaqvi/follow-redirect-url -> 301
https://github.com/sthnaqvi/follow-redirect-url -> 200
[ { url: 'https://bit.ly/2X7gCIT',
redirect: true,
status: 301,
redirectUrl: 'http://github.com/sthnaqvi/follow-redirect-url' },
{ url: 'http://github.com/sthnaqvi/follow-redirect-url',
redirect: true,
status: 301,
redirectUrl: 'https://github.com/sthnaqvi/follow-redirect-url' },
{ url: 'https://github.com/sthnaqvi/follow-redirect-url',
redirect: false,
status: 200 } ]
The second argument is an options
object. Options are optional.
max_redirect_length
- maximum redirection limit. Default: 20
request_timeout
- request timeout in milliseconds. Default: 10000
ignoreSslErrors
- ignore SSL certificate errors when following redirects. Default: false
const followRedirect = require('follow-redirect-url');
const options = {
max_redirect_length: 5,
request_timeout: 5000,
ignoreSsslErrors: true
};
followRedirect.startFollowing('https://bit.ly/2X7gCIT', options).then(urls => {
console.log(urls);
}).catch(error => {
console.log(error)
})
FAQs
A simple command-line utility that lets you follow redirects to see where http URLs end up. Useful for shortened URLs.
The npm package follow-redirect-url receives a total of 378 weekly downloads. As such, follow-redirect-url popularity was classified as not popular.
We found that follow-redirect-url 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.