Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
lucy-dirsum
Advanced tools
Create an md5 digest of all content inside a directory. Uses streams to avoid reading all data in memory.
Create an md5 digest of all content inside a directory.
Part of Lucidity project.
npm install lucy-dirsum --save
Returns an (async) md5 digest of all content inside a directory. The ignore
function can be used to ignore files. It receives a local path to directory and
filename. For example, scanning '/some/directory', the file
'/some/directory/foo/bar.txt' is checked by calling the ignore function with ( 'foo/bar.txt', 'bar.txt' )
. Returning true ignores the file. Default ignore
function is to ignore files starting with a dot ('.').
The hashing algorithm includes file names (and thus detects empty directory and file move) and does not read large files in memory (it uses read streams). Speed is directly proportional to fs.createReadStream (36s for 12G of data on i7 cpu).
const dirsum = require ( 'lucy-dirsum' )
dirsum
( '/some/directory'
, function ( err, digest )
{ if ( err )
{ // ...
}
else
{ console.log ( `Hex digest for '/some/directory' is '${ digest }'.` )
}
}
, function ( path, filename )
{ return /^\./.exec ( filename )
|| /^info\.txt/.exec ( path ) // ignore info.txt at root
}
)
npm test
Please use 'jessy style'.
Add unit tests for any new or changed functionality.
FAQs
Create an md5 digest of all content inside a directory. Uses streams to avoid reading all data in memory.
The npm package lucy-dirsum receives a total of 7 weekly downloads. As such, lucy-dirsum popularity was classified as not popular.
We found that lucy-dirsum 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.