Skip to content
Sam97300Public

About

A CLI based tool for scanning multiple files in parallel using the Virus Total API as the base.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vt-scan

GitHub

Rust CLI that scans every file in a folder against VirusTotal using SHA-256 hashes.

Repository: https://github.com/Sam97300/VT-scan

For each file it:

  1. Computes the SHA-256 hash
  2. Looks up that hash on the VirusTotal API
  3. Prints a table with status, engine detections, and malware names

API requests run concurrently but are rate-limited to 4 requests per minute (VirusTotal free tier).

Build

git clone https://github.com/Sam97300/VT-scan.git
cd VT-scan
cargo build --release

Binary: target/release/vt-scan (or vt-scan.exe on Windows).

Install globally:

cargo install --path . --force

Usage

# API key via environment variable (recommended)
set VT_API_KEY=your_key_here          # Windows cmd
$env:VT_API_KEY="your_key_here"       # PowerShell
export VT_API_KEY=your_key_here       # bash

vt-scan path/to/folder

# Or pass the key on the command line
vt-scan path/to/folder --api-key your_key_here

# Only top-level files (no subdirectories)
vt-scan path/to/folder --no-recursive

# Tune concurrent hashing/tasks (API is still limited to 4/min)
vt-scan path/to/folder --concurrency 4

Example output

┌──────────────┬─────────┬─────────────────┬────────────────────────────┐
│ Filename     │ Status  │ Engines flagged │ Malware names              │
├──────────────┼─────────┼─────────────────┼────────────────────────────┤
│ app.exe      │ clean   │ 0               │ —                          │
│ sample.bin   │ flagged │ 12              │ Trojan.Generic, …          │
│ brand_new.dat│ unknown │ —               │ —                          │
└──────────────┴─────────┴─────────────────┴────────────────────────────┘

Summary: 3 file(s) — 1 clean, 1 flagged, 1 unknown (not in VT), 0 error(s)
Status Meaning
clean Present in VT; no malicious/suspicious detections
flagged One or more engines marked it malicious/suspicious
unknown Hash not found on VirusTotal
error Hash or API failure

Exit code 2 if any file is flagged (useful in scripts).

Security note

Do not commit API keys. Prefer VT_API_KEY. If a key was shared or committed to git, revoke/regenerate it in your VirusTotal account.

Links

About

A CLI based tool for scanning multiple files in parallel using the Virus Total API as the base.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages