mirror of
https://github.com/hexahigh/nodejs-hash-antivirus.git
synced 2025-12-11 20:05:07 +01:00
Update dbcreator2.js
This commit is contained in:
parent
5e8e4c675b
commit
b271ac0eb5
@ -5,6 +5,9 @@ var crypto = require('crypto');
|
||||
var os = require("os");
|
||||
|
||||
let arraynumber = 1
|
||||
let filetoadd2 = nil
|
||||
|
||||
const filetoadd = prompt("Enter path/name of file/folder to be added: ");
|
||||
|
||||
// Set delay to ms
|
||||
function delay(milliseconds) {
|
||||
@ -20,15 +23,15 @@ fs.readdir(filetoadd, (err, files) => {
|
||||
}
|
||||
|
||||
const fileNamesAndExtensions = files.map((fileName) => {
|
||||
const extension = path.extname(fileName);
|
||||
const name = path.basename(fileName, extension);
|
||||
return { name, extension };
|
||||
const filePath = path.join(directoryPath, fileName);
|
||||
const extension = path.extname(filePath);
|
||||
const name = path.basename(filePath, extension);
|
||||
return { filePath, extension };
|
||||
});
|
||||
|
||||
console.log(fileNamesAndExtensions);
|
||||
});
|
||||
|
||||
const filetoadd = prompt("Enter path/name of file/folder to be added: ");
|
||||
while(true) {
|
||||
const buff = fs.readFileSync(filetoadd2);
|
||||
var outputdata0 = crypto.createHash("md5").update(buff).digest("hex");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user