
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.
Replace relative URLs in a string with absolute URLs. This library is extremely small and lightweight, and requires no external dependencies.
The primary motivation of this library is to be concise and performant, when
searching for this functionality, the common solution is to use actual DOM
manipulation for finding and replacing URLs, using jQuery
, cheerio
, and/or jsdom
.
npm install absolutify
var absolutify = require('absolutify')
var html = '<html><a href="/sorensen">Home</a></html>'
var site = 'https://github.com'
var parsed = absolutify(html, site)
// '<html><a href="https://github.com/sorensen">Home</a></html>'
var byFunction = absolutify(html, function(url, attrName) {
// url === '/sorensen'
// attr === 'href'
return site + url
})
This library searches a given HTML string for the following attribute values that
start with either /
or any form of ../
pathing.
Attribute |
---|
href |
src |
codebase |
cite |
background |
action |
profile |
formaction |
icon |
manifest |
archive |
FAQs
Relative to Absolute URL Replacer
The npm package absolutify receives a total of 1,067 weekly downloads. As such, absolutify popularity was classified as popular.
We found that absolutify 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.