mirror of https://github.com/keeweb/keeweb
passing sha to VirusTotal
parent
9f2a09cc97
commit
938f2be487
|
@ -762,6 +762,7 @@ module.exports = function (grunt) {
|
|||
},
|
||||
virustotal: {
|
||||
options: {
|
||||
prefix: `keeweb.v${pkg.version}-${sha}.`,
|
||||
timeout: 10 * 60 * 1000,
|
||||
get apiKey() {
|
||||
return require('./keys/virus-total.json').apiKey;
|
||||
|
|
|
@ -21,13 +21,13 @@ module.exports = function (grunt) {
|
|||
|
||||
const timeStarted = Date.now();
|
||||
|
||||
const { apiKey, timeout = 60 * 1000 } = opt;
|
||||
const { apiKey, prefix, timeout = 60 * 1000 } = opt;
|
||||
const interval = 5000;
|
||||
|
||||
const headers = { 'x-apikey': apiKey };
|
||||
|
||||
const fileData = fs.readFileSync(file);
|
||||
const fileName = path.basename(file);
|
||||
const fileName = (prefix || '') + path.basename(file);
|
||||
|
||||
const form = new FormData();
|
||||
form.append('file', fileData, fileName);
|
||||
|
|
Loading…
Reference in New Issue