Skip to content

yousefvand/virustotal-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

virustotal-api

https://nodei.co/npm/virustotal-api.png?downloads=true&downloadRank=true&stars=true

Virustotal API v2.0 wrapper class

Install

npm i virustotal-api

Example

const fs = require("fs");
const VirusTotalApi = require("virustotal-api");
const virusTotal = new VirusTotalApi("<YOUR API KEY>");

fs.readFile(__filename, (err, data) => {
  if (err) {
    console.log(`Cannot read file. ${err}`);
  } else {
    virusTotal
      .fileScan(data, "file.js")
      .then(response => {
        let resource = response.resource;
        // sometimes later try:
        virusTotal.fileReport(resource).then(result => {
          console.log(result);
        });
      })
      .catch(err => console.log(`Scan failed. ${err}`));
  }
});

For more info please refer to documentation

See full change log here.

Version 1.1.7

  • Dependency update to fix security vulnerabilities.

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •