UNPKG

totalvirus-api

Version:

Node.js wrapper for VirusTotal API. Scan files, URLs, and fetch malware analysis reports.

16 lines (10 loc) 454 B
const virusScanner = require('totalvirus-scanner')('YOUR_API_KEY'); // Scan a file virusScanner.scanFile('./sample.txt').then(console.log); // Scan a URL virusScanner.scanUrl('https://example.com').then(console.log); // Get Report virusScanner.getReport('scan_id_here').then(console.log); // How to use it in your project const vt = require('totalvirus-scanner')('your_api_key_here'); vt.scanUrl("https://abc.com").then(console.log);