Coder Social home page Coder Social logo

deelmind / virustotal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 4ppsec/virustotal-api-v2

0.0 1.0 0.0 25 KB

Python scripts to interact with the virustotal.com Public API

License: GNU Lesser General Public License v3.0

Python 100.00%

virustotal's Introduction

virustotal Logo VirusTotal Public API

Python scripts to interact with the virustotal.com Public API

Dependencies

python requests module (pip install requests) - essential only when uploading files for scan

How to use

Get api key

Register to get your api key from virustotal

Update key in file

Take your key from here and add it to virustotal.py

self.api_key = '<-- YOUR API KEY HERE -->'

Alternatively, use (see usage):

vt.setkey('___KEY___')

Import

from virustotal import vt
vt = vt()

Update api key

vt.setkey('___KEY___')

API calls

  • Retrieving file scan reports (file/hash)
vt.getfile('path/to/filename.ext')
vt.getfile('ee0fc30726c6dc1ef9ed15809c58d2bb438456ab')
  • Retrieving URL/IP/Domain scan reports
vt.geturl('https://github.com/nu11p0inter/')
vt.getip('98.76.54.32')
vt.getdomain('github.com')
  • Sending and scanning files
vt.scanfile('path/to/file.ext')
  • Sending and scanning URLs
vt.scanurl('http://github.com/nu11p0inter.com')
  • Rescanning already submitted files (file/hash)
vt.rescan('file.ext')
vt.rescan('ee0fc30726c6dc1ef9ed15809c58d2bb438456ab')
  • Comment on existing report
hash = open(file, 'rb').read()
msg = "#Malware @https://github.com/nu11p0inter/virustotal/"
vt.comment(hash, msg)

Feature - Output format

For geturl/ getfile - you can get your repsonse as a JSON, HTML or Print simpley change the vt.out() to the desired output format and call the api normally. Exmaple:

vt.out('html')
vt.getfile('file.ext')

vt.out('print')
vt.geturl('http://github.com/nu11p0inter/')

vt.out('json')
...

Author

Tal Melamed 
<[email protected]>
https://github.com/nu11p0inter/

License

By using the scan API, you consent to virustotal Terms of Service and allow VirusTotal to share this file with the security community. See virustotal Privacy Policy for details.

virustotal's People

Contributors

4ppsec avatar

Watchers

 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.