mirror of
https://github.com/hexahigh/nodejs-hash-antivirus.git
synced 2025-12-11 20:05:07 +01:00
update
This commit is contained in:
parent
7c076caa80
commit
b34c8fecd6
@ -5,7 +5,7 @@ var crypto = require('crypto');
|
|||||||
var os = require("os");
|
var os = require("os");
|
||||||
|
|
||||||
let arraynumber = 1
|
let arraynumber = 1
|
||||||
let filetoadd2 = nil
|
let filetoadd2 = 0
|
||||||
|
|
||||||
const filetoadd = prompt("Enter path/name of file/folder to be added: ");
|
const filetoadd = prompt("Enter path/name of file/folder to be added: ");
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ function delay(milliseconds) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.readdir(filetoadd, (err, files) => {
|
const test1 = fs.readdir(filetoadd, (err, files) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(`Error reading directory: ${err}`);
|
console.error(`Error reading directory: ${err}`);
|
||||||
return;
|
return;
|
||||||
@ -31,28 +31,31 @@ fs.readdir(filetoadd, (err, files) => {
|
|||||||
|
|
||||||
console.log(fileNamesAndExtensions);
|
console.log(fileNamesAndExtensions);
|
||||||
});
|
});
|
||||||
|
console.log(test1)
|
||||||
|
loop1()
|
||||||
|
function loop1() {
|
||||||
|
while (true) {
|
||||||
|
filetoadd2 = fileNamesAndExtensions[arraynumber]
|
||||||
|
let buff = fs.readFileSync(filetoadd2);
|
||||||
|
let outputdata0 = crypto.createHash("md5").update(buff).digest("hex");
|
||||||
|
let outputdata = outputdata0.toString().toUpperCase();
|
||||||
|
|
||||||
while(true) {
|
let text = outputdata;
|
||||||
let filetoadd2 = fileNamesAndExtensions[arraynumber]
|
processInput()
|
||||||
let buff = fs.readFileSync(filetoadd2);
|
|
||||||
let outputdata0 = crypto.createHash("md5").update(buff).digest("hex");
|
|
||||||
let outputdata = outputdata0.toString().toUpperCase();
|
|
||||||
|
|
||||||
let text = outputdata;
|
//const directoryPath = '/path/to/directory'; // Replace with your directory path
|
||||||
processInput()
|
|
||||||
|
|
||||||
//const directoryPath = '/path/to/directory'; // Replace with your directory path
|
function processInput() {
|
||||||
|
fs.open('customdb.txt', 'a', 666, function (e, id) {
|
||||||
function processInput() {
|
fs.write(id, text + os.EOL, null, 'utf8', function () {
|
||||||
fs.open('customdb.txt', 'a', 666, function (e, id) {
|
fs.close(id, function () {
|
||||||
fs.write(id, text + os.EOL, null, 'utf8', function () {
|
arraynumber = arraynumber + 1
|
||||||
fs.close(id, function () {
|
//console.log('Custom database is updated, check the dbcreator.txt file');
|
||||||
arraynumber = arraynumber + 1
|
//console.log('If the file is a virus, please submit the hash here:');
|
||||||
//console.log('Custom database is updated, check the dbcreator.txt file');
|
//console.log('\x1b[32m%s\x1b[0m', "boof.eu.org/other/av-hashes")
|
||||||
//console.log('If the file is a virus, please submit the hash here:');
|
});
|
||||||
//console.log('\x1b[32m%s\x1b[0m', "boof.eu.org/other/av-hashes")
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
node_modules/.package-lock.json
generated
vendored
11
node_modules/.package-lock.json
generated
vendored
@ -12,17 +12,6 @@
|
|||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/crypto": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==",
|
|
||||||
"deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in."
|
|
||||||
},
|
|
||||||
"node_modules/fs": {
|
|
||||||
"version": "0.0.1-security",
|
|
||||||
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
|
|
||||||
"integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
|
|
||||||
},
|
|
||||||
"node_modules/prompt-sync": {
|
"node_modules/prompt-sync": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz",
|
||||||
|
|||||||
23
package-lock.json
generated
23
package-lock.json
generated
@ -9,8 +9,6 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"crypto": "^1.0.1",
|
|
||||||
"fs": "^0.0.1-security",
|
|
||||||
"prompt-sync": "^4.2.0"
|
"prompt-sync": "^4.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -22,17 +20,6 @@
|
|||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/crypto": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==",
|
|
||||||
"deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in."
|
|
||||||
},
|
|
||||||
"node_modules/fs": {
|
|
||||||
"version": "0.0.1-security",
|
|
||||||
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
|
|
||||||
"integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
|
|
||||||
},
|
|
||||||
"node_modules/prompt-sync": {
|
"node_modules/prompt-sync": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz",
|
||||||
@ -59,16 +46,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
|
||||||
"integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g=="
|
"integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g=="
|
||||||
},
|
},
|
||||||
"crypto": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig=="
|
|
||||||
},
|
|
||||||
"fs": {
|
|
||||||
"version": "0.0.1-security",
|
|
||||||
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
|
|
||||||
"integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
|
|
||||||
},
|
|
||||||
"prompt-sync": {
|
"prompt-sync": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user