Code Monkey home page Code Monkey logo

virustotal-scanner's Introduction

VirusTotal Command-Line Scanner

A command-line utility to scan files through the VirusTotal API v3

Setting Up

Dependencies

The script uses the requests module. You can download the module by running the following command:

pip install requests

API Key

The script uses the VirusTotal API. In order to use the API you must sign up to VirusTotal Community. Once you have a valid VirusTotal Community account you will find your personal API key in your personal settings section. This key is all you need to use the VirusTotal API

Once you have the API key you will need to put it in the --api_key command line parameter,

NOTE: Do not share your API Key with anyone. Learn more about securing an API key here.

Usage

usage: virustotal.py [-h] file

Scanning a file

You scan a file by providing the file path to it.

virustotal.py --api_key <YOUR_API_KEY> --file /path/to/file

Batch scanning with saving the results to a csv-file

virustotal.py --api_key <YOUR_API_KEY> --folder /folder/to/scan/recursively --output_format csv --output_path /path/to/output.csv

Batch scanning with saving the results to a json-file

virustotal.py --api_key <YOUR_API_KEY> --folder /folder/to/scan/recursively --output_format json --output_path /path/to/output.json

How does the script work

The script uses VirusTotal API to scan files.

The script makes a GET request with the SHA 256 hash of the file. If no information about the file is returned or a 404 response code is sent back, then the script will upload the file to VirusTotal and wait for the analysis report. Once the analysis report is available, the script will again make a GET request against the SHA 256 of the same file and display the output.

virustotal-scanner's People

Contributors

millionhz avatar vrozhnikov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.