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.
enfscompare
Advanced tools
Module that add compare functionality to to node fs module
This module is intended to work as a sub-module of enfs
This module will add a method that allows the comparison of files and folders.
enfscompare
var enfscompare = require("enfscompare");
All the methods follows the node culture.
Compare files in a byte-to-byte form
[options]:
enfscompare.files("/home/name/file.txt", "/home/name/file.txt", function(err, result){
if(result===true){
console.log("File is equal");
}
});
Compare files in a byte-to-byte form
[options]:
enfscompare.dir("/home/name", "/home/another_folder_name", function(err, result){
if(result===true){
console.log("Directories are equal");
}
});
Compare files with an hash NOTE: This method can't correctly tell you that the files are equal, but can tell you if they are different
[options]:
var result = enfscompare.filesHashSync("/home/name/file.txt","/home/name/file.txt");
if(result===true){
console.log("File is equal");
}
Compare files with an hash NOTE: This method can't correctly tell you that the files are equal, but can tell you if they are different
[options]:
var result = enfscompare.filesHashSync("/home/name","/home/another_folder_name");
if(result===true){
console.log("Folders are equal");
}
Run the files in benchmarks folder to check which algorithm is fastest in your machine with different file sizes
Creative Commons Attribution 4.0 International License
Copyright (c) 2016 Joao Parreira joaofrparreira@gmail.com GitHub
This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit CC-BY-4.0.
FAQs
Add folder and file comparison method's to node fs module
The npm package enfscompare receives a total of 0 weekly downloads. As such, enfscompare popularity was classified as not popular.
We found that enfscompare 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.