node-virustotal
node-virustotal copied to clipboard
rescanFile promise error / v2 deprecated?
It appears the .rescanFile method is no longer valid and reporting Promise errors.
Testing this in powershell, this now fails (it use to work last week) ...
$u = 'https://www.virustotal.com/vtapi/v2/file/rescan'
$method = 'POST'
$body = @{ resource = $hash; apikey = $VTApiKey}
Invoke-RestMethod -Method $method -Uri $u -Body $body
However, this works ...
$u = 'https://www.virustotal.com/api/v3/files/' + $hash + '/analyse'
$method = 'POST'
$header = @{ "x-apikey" = $VTApiKey }
Invoke-RestMethod -Method $method -Uri $u -Headers $header
It looks like VirusTotal is beginning to deprecate the v2 API calls and everything will need to be swapped to v3.
I'll start working on it as soon as I have time.
Just a status update: There have been a series of updates to deal with the massive V3 API change. There are more coming due to how large the API has grown.
Thanks for the update. I hope you had a Merry Christmas and a Happy New Year.