natewatson999 / node-virustotal

VirusTotal API for Node JS
MIT License
47 stars 13 forks source link

reAnalyzeURL not working v3 #17

Open vibetek-ooo opened 4 years ago

vibetek-ooo commented 4 years ago

Tried various variations of the work url and always an error!

const nvt = require('node-virustotal');
const defaultTimedInstance = nvt.makeAPI();
const hashed = nvt.sha256('https://unicash.pro/');

const theSameObject = defaultTimedInstance.reAnalyzeURL(hashed, function(err, res){
  if (err) {
    console.log('Well, crap.');
    console.log(err);
    return;
  }
  console.log(JSON.stringify(res));
  return;
});

{ "error": { "code": "NotFoundError", "message": "Resource not found." } }

natewatson999 commented 4 years ago

I'll take a look.

SjamonDaal commented 3 years ago

Hi, this is caused by a invalid url. the API takes 'analyse' not 'analyze'.

Source: https://developers.virustotal.com/v3.0/reference#urls-analyse

SjamonDaal commented 3 years ago

I've created a pull request to fix this. https://github.com/natewatson999/node-virustotal/pull/18

SjamonDaal commented 3 years ago

Issue is resolved in the git repo but npmjs still needs to be updated. @natewatson999, could you please update this?