Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
vt-py-scanner — Recursively scan folders with VirusTotal API to detect malware. Features hash lookup, CSV export, real-time progress, and rate-limit handling for automated file analysis. | Kitploit
Tools/GitHubGitHub/neorai/vt-py-scanner
Vulnerability AnalysisHash AnalysisForensicsInformation GatheringMalware AnalysisThreat Intelligence
GitHubneorai/vt-py-scanner

vt-py-scanner

Recursively scan folders with VirusTotal API to detect malware. Features hash lookup, CSV export, real-time progress, and rate-limit handling for automated file analysis.

View Repository
569 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

VirusTotal Scanner

Python script to analyze ALL files with the VirusTotal API, scanning folders and subfolders recursively. Optimized for Windows.

Features

  • Scans ALL files in a folder and its subfolders
  • Configuration via .env file - Save your API key and settings
  • Interactive mode - Also works without .env file
  • Optimized for Windows - Correct path handling and UTF-8 encoding
  • Complete logging - Records all events and errors in .log file
  • CSV export - Saves results to CSV file (semicolon-separated)
  • Time estimation - Shows remaining and elapsed time in real-time
  • Respects the 4 files per minute limit of the free API
  • Shows VirusTotal analysis URL for each file
  • Shows results in X/Y format (e.g., 0/70 = 0 positive out of 70 antivirus engines)
  • Robust error handling (locked files, no permissions, etc.)
  • Real-time progress counter with percentage
  • Detailed summary at completion with statistics and total time
  • List of skipped files with reasons
  • Hash lookup before upload - Saves time and bandwidth by checking if file already exists in VirusTotal

Requirements

  • Python 3.6 or higher
  • VirusTotal API key (free)
  • Windows (optimized, but works on other systems)

Installation

  1. Download the files to your computer

  2. Install dependencies:

root@kitploit:~
pip install -r requirements.txt
  1. Get your VirusTotal API key:
    • Go to https://www.virustotal.com/gui/my-apikey
    • Register or log in (it's free)
    • Copy your API key

Usage

Option 1: Using .env file (Recommended)

  1. Copy the .env.example file to .env:

    root@kitploit:~
    cp .env.example .env
    
  2. Edit the .env file and add your configuration:

    root@kitploit:~
    VIRUSTOTAL_API_KEY=your_actual_api_key_here
    SCAN_FOLDER=C:\Users\username\Desktop\my_files
    
  3. Run the script:

    root@kitploit:~
    python virustotal_scanner.py
    

The script will automatically load your configuration from the .env file.

Option 2: Interactive mode (without .env)

If you prefer not to use the .env file, the script will ask for the information:

root@kitploit:~
python virustotal_scanner.py

The script will ask for:

  1. Your VirusTotal API key
  2. The path of the folder you want to scan

Usage example:

root@kitploit:~
Enter your VirusTotal API key: a1b2c3d4e5f6...

Enter the folder path to scan: C:\Users\username\Desktop\my_files

Do you want to continue? (y/n): y

Valid path examples on Windows:

  • C:\Users\username\Documents\my_files
  • C:\Users\username\Desktop\folder
  • . (dot = current folder)
  • You can drag and drop the folder into the terminal

Generated files

After running the script, the following files will be generated automatically:

virustotal_scan.log

Log file with all events:

  • Start and end of scan
  • Each processed file
  • Errors and warnings
  • Final statistics

virustotal_results.csv

CSV file with results (semicolon-separated):

  • Analysis date and time
  • Filename
  • Full path
  • Size in bytes
  • SHA256 hash
  • Positive detections
  • Total antivirus engines
  • Detection percentage
  • Status (CLEAN/DETECTED)
  • VirusTotal URL

The CSV can be opened with Excel, Google Sheets, or any spreadsheet program.

Output example

root@kitploit:~
================================================================================
  VIRUSTOTAL SCANNER - COMPLETE FOLDER SCAN
================================================================================
Folder: C:\Users\username\Desktop\my_files
API limit: 4 files per minute
Maximum file size: 32 MB
================================================================================

Counting files...
Total files found: 15

Starting analysis...

================================================================================
Progress: [1/15]
================================================================================

[*] Analyzing: document.pdf
    Path: C:\Users\username\Desktop\my_files\document.pdf
  Uploading file...
  Waiting for analysis results...
  Analysis in progress... (attempt 1/30)

  >> URL: https://www.virustotal.com/gui/file/abc123...
  >> Detections: 0/70

================================================================================
Progress: [2/15]
================================================================================

[*] Analyzing: program.exe
    Path: C:\Users\username\Desktop\my_files\program.exe
  Uploading file...
  Waiting for analysis results...

  >> URL: https://www.virustotal.com/gui/file/def456...
  >> Detections: 2/70

[!] Rate limit reached: Waiting 15 seconds...

================================================================================
  FINAL SCAN SUMMARY
================================================================================

ANALYZED FILES:
--------------------------------------------------------------------------------

1. [CLEAN] 0/70
   File: C:\Users\username\Desktop\my_files\document.pdf
   URL: https://www.virustotal.com/gui/file/abc123...

2. [DETECTED] 2/70
   File: C:\Users\username\Desktop\my_files\program.exe
   URL: https://www.virustotal.com/gui/file/def456...

================================================================================
SKIPPED FILES:
--------------------------------------------------------------------------------

1. C:\Users\username\Desktop\my_files\large_file.iso
   Reason: File too large (650.50 MB)

2. C:\Users\username\Desktop\my_files\system.dll
   Reason: No read permissions

================================================================================
  STATISTICS
================================================================================
Total files found: 15
Files analyzed: 13
Files skipped: 2
  - Clean files (0 detections): 12
  - Files with detections: 1
================================================================================

Limitations and considerations

Free API limits:

  • 4 files per minute (the script waits automatically)
  • Maximum size: 32 MB per file
  • Larger files will be skipped automatically

Files that are skipped:

  • Files larger than 32 MB
  • Empty files (0 bytes)
  • Files without read permissions
  • Files locked by the system

Important security notes

  • Keep your API key private - Do not share it
  • Files are analyzed publicly - Do not upload confidential files
  • Files are shared with the security community - Once uploaded, they are public
  • VirusTotal is for security analysis - Use it responsibly
  • Do not upload personal or sensitive corporate data

What does the script do?

  1. Finds ALL files in the folder and subfolders
  2. Verifies that each file is valid for analysis
  3. Checks if the file hash already exists in VirusTotal (saves time and bandwidth)
  4. Uploads each file to VirusTotal if not found (respecting the 4 per minute limit)
  5. Waits for analysis results
  6. Shows the URL and detections (e.g., 0/70, 5/70)
  7. Generates a complete summary at the end

Troubleshooting

Error: "Invalid API key"

  • Verify that you copied your API key correctly
  • Get a new one at https://www.virustotal.com/gui/my-apikey

Error: "Access denied to file"

  • Some system files are protected
  • Run as administrator if you need to analyze system files

The script is very slow

  • This is normal: the free API is limited to 4 files per minute
  • If you have 100 files, it will take approximately 25 minutes

Skipped files

  • Check the final summary to see why they were skipped
  • Files >32 MB cannot be analyzed with the free API

License

MIT License - Copyright (c) 2025 neorai

This project is free and open source. You can use, modify, and distribute it freely. See the LICENSE file for details.

Download Tool