| 1 |
Metadata-Version: 1.1 |
| 2 |
Name: virustotal-api |
| 3 |
Version: 1.1.11 |
| 4 |
Summary: Virus Total Public/Private/Intel API |
| 5 |
Home-page: https://github.com/blacktop/virustotal-api |
| 6 |
Author: blacktop |
| 7 |
Author-email: [email protected] |
| 8 |
License: MIT |
| 9 |
Description: .. image:: https://raw.githubusercontent.com/blacktop/virustotal-api/master/doc/logo.png |
| 10 |
|
| 11 |
virustotal-api |
| 12 |
============== |
| 13 |
|
| 14 |
.. image:: https://travis-ci.org/blacktop/virustotal-api.svg?branch=master |
| 15 |
:target: https://travis-ci.org/blacktop/virustotal-api |
| 16 |
|
| 17 |
.. image:: http://img.shields.io/:license-mit-blue.svg |
| 18 |
:target: http://doge.mit-license.org |
| 19 |
|
| 20 |
.. image:: https://img.shields.io/pypi/v/virustotal-api.svg |
| 21 |
:target: https://pypi.python.org/pypi/virustotal-api/ |
| 22 |
|
| 23 |
.. image:: https://img.shields.io/pypi/pyversions/virustotal-api.svg |
| 24 |
:target: https://pypi.python.org/pypi/virustotal-api/ |
| 25 |
|
| 26 |
|
| 27 |
Virus Total Public/Private/Intel API |
| 28 |
|
| 29 |
- https://www.virustotal.com/en/documentation/public-api/ |
| 30 |
- https://www.virustotal.com/en/documentation/private-api/ |
| 31 |
- https://www.virustotal.com/intelligence/help/automation/ |
| 32 |
|
| 33 |
Installation |
| 34 |
------------ |
| 35 |
|
| 36 |
.. code-block:: bash |
| 37 |
|
| 38 |
$ pip install virustotal-api |
| 39 |
|
| 40 |
|
| 41 |
Usage |
| 42 |
----- |
| 43 |
.. code-block:: python |
| 44 |
|
| 45 |
from __future__ import print_function |
| 46 |
import json |
| 47 |
import hashlib |
| 48 |
from virus_total_apis import PublicApi as VirusTotalPublicApi |
| 49 |
|
| 50 |
API_KEY = 'Sign-Up for API Key at virustotal.com' |
| 51 |
|
| 52 |
EICAR = "X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*".encode('utf-8') |
| 53 |
EICAR_MD5 = hashlib.md5(EICAR).hexdigest() |
| 54 |
|
| 55 |
vt = VirusTotalPublicApi(API_KEY) |
| 56 |
|
| 57 |
response = vt.get_file_report(EICAR_MD5) |
| 58 |
print(json.dumps(response, sort_keys=False, indent=4)) |
| 59 |
|
| 60 |
|
| 61 |
Output: |
| 62 |
------- |
| 63 |
.. code-block:: json |
| 64 |
|
| 65 |
{ |
| 66 |
"response_code": 200, |
| 67 |
"results": { |
| 68 |
"scan_id": "275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f-1397510237", |
| 69 |
"sha1": "3395856ce81f2b7382dee72602f798b642f14140", |
| 70 |
"resource": "44d88612fea8a8f36de82e1278abb02f", |
| 71 |
"response_code": 1, |
| 72 |
"scan_date": "2014-04-14 21:17:17", |
| 73 |
"permalink": "https://www.virustotal.com/file/275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f/analysis/1397510237/", |
| 74 |
"verbose_msg": "Scan finished, scan information embedded in this object", |
| 75 |
"sha256": "275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f", |
| 76 |
"positives": 49, |
| 77 |
"total": 51, |
| 78 |
"md5": "44d88612fea8a8f36de82e1278abb02f", |
| 79 |
"scans": { |
| 80 |
"Bkav": { |
| 81 |
"detected": true, |
| 82 |
"version": "1.3.0.4959", |
| 83 |
"result": "DOS.EiracA.Trojan", |
| 84 |
"update": "20140412" |
| 85 |
}, |
| 86 |
"MicroWorld-eScan": { |
| 87 |
"detected": true, |
| 88 |
"version": "12.0.250.0", |
| 89 |
"result": "EICAR-Test-File", |
| 90 |
"update": "20140414" |
| 91 |
}, |
| 92 |
"nProtect": { |
| 93 |
"detected": true, |
| 94 |
"version": "2014-04-14.02", |
| 95 |
"result": "EICAR-Test-File", |
| 96 |
"update": "20140414" |
| 97 |
}, |
| 98 |
...<snip>... |
| 99 |
"AVG": { |
| 100 |
"detected": true, |
| 101 |
"version": "13.0.0.3169", |
| 102 |
"result": "EICAR_Test", |
| 103 |
"update": "20140414" |
| 104 |
}, |
| 105 |
"Panda": { |
| 106 |
"detected": true, |
| 107 |
"version": "10.0.3.5", |
| 108 |
"result": "EICAR-AV-TEST-FILE", |
| 109 |
"update": "20140414" |
| 110 |
}, |
| 111 |
"Qihoo-360": { |
| 112 |
"detected": true, |
| 113 |
"version": "1.0.0.1015", |
| 114 |
"result": "Trojan.Generic", |
| 115 |
"update": "20140414" |
| 116 |
} |
| 117 |
} |
| 118 |
} |
| 119 |
} |
| 120 |
|
| 121 |
Testing |
| 122 |
------- |
| 123 |
|
| 124 |
To run the tests: |
| 125 |
|
| 126 |
.. code-block:: bash |
| 127 |
|
| 128 |
$ ./tests |
| 129 |
|
| 130 |
|
| 131 |
Documentation |
| 132 |
------------- |
| 133 |
|
| 134 |
You're looking at it. |
| 135 |
|
| 136 |
Issues |
| 137 |
------ |
| 138 |
|
| 139 |
Find a bug? Want more features? Find something missing in the documentation? Let me know! Please don't hesitate to `file an issue <https://github.com/blacktop/virustotal-api/issues/new>`_ and I'll get right on it. |
| 140 |
|
| 141 |
Contributing |
| 142 |
------------ |
| 143 |
|
| 144 |
`See all contributors on GitHub <https://github.com/blacktop/virustotal-api/graphs/contributors>`_. |
| 145 |
|
| 146 |
Please update the `HISTORY.rst <https://github.com/blacktop/virustotal-api/blob/master/HISTORY.rst>`_, and submit a `Pull Request on GitHub <https://help.github.com/articles/using-pull-requests/>`_. |
| 147 |
|
| 148 |
License |
| 149 |
------- |
| 150 |
|
| 151 |
MIT Copyright (c) 2014-2019 **blacktop** |
| 152 |
|
| 153 |
|
| 154 |
.. :changelog: |
| 155 |
|
| 156 |
Release History |
| 157 |
--------------- |
| 158 |
|
| 159 |
1.1.11 (2019-09-22) |
| 160 |
------------------- |
| 161 |
|
| 162 |
**Allow for hash list input in get_file_report** |
| 163 |
|
| 164 |
- https://github.com/blacktop/virustotal-api/pull/28 (credit: @CDuPlooy) |
| 165 |
|
| 166 |
1.1.10 (2018-03-12) |
| 167 |
------------------- |
| 168 |
|
| 169 |
**Intel API Fix** |
| 170 |
|
| 171 |
- https://github.com/blacktop/virustotal-api/pull/23 (credit: @leadZERO) |
| 172 |
|
| 173 |
1.1.9 (2018-01-03 aka the day the CPUs fell) |
| 174 |
-------------------------------------------- |
| 175 |
|
| 176 |
**Intel API Fix** |
| 177 |
|
| 178 |
- https://github.com/blacktop/virustotal-api/pull/22 (credit: @leadZERO) |
| 179 |
|
| 180 |
1.1.7 (2017-05-28) |
| 181 |
------------------ |
| 182 |
|
| 183 |
**Intel API Fix** |
| 184 |
|
| 185 |
- https://github.com/blacktop/virustotal-api/pull/18 (credit: @doug-the-guy) |
| 186 |
|
| 187 |
1.1.6 (2017-05-14) |
| 188 |
------------------ |
| 189 |
|
| 190 |
**Py3 Fix** |
| 191 |
|
| 192 |
- Change `e.message` to `str(message)` (credit: [@DeanF](https://github.com/blacktop/virustotal-api/pull/19)) |
| 193 |
|
| 194 |
1.1.5 (2017-04-13) |
| 195 |
------------------ |
| 196 |
|
| 197 |
**API Changes** |
| 198 |
|
| 199 |
- Added Intelligence notifications feed and ability to programmatically delete notifications from the feed. (credit: @keithjjones) |
| 200 |
|
| 201 |
1.1.4 (2017-03-11) |
| 202 |
------------------ |
| 203 |
|
| 204 |
**Fixed timeout functionality, removed unnecessary methods** |
| 205 |
|
| 206 |
- Fixed the timeout parameter in the PublicApi and removes unnecessary code in the PrivateApi (credit: @mrredamber aka LEGEND) |
| 207 |
|
| 208 |
1.1.3 (2017-02-03) |
| 209 |
------------------ |
| 210 |
|
| 211 |
**Request Timeout Functionality** |
| 212 |
|
| 213 |
- Adds a timeout parameter to methods that make requests to the VirusTotal API (credit: @mrredamber aka LEGEND) |
| 214 |
|
| 215 |
1.1.2 (2016-04-13) |
| 216 |
------------------ |
| 217 |
|
| 218 |
**API Changes** |
| 219 |
|
| 220 |
- Re-adding the ability to use files from memory as well as from disk. (credit: @tweemeterjop) |
| 221 |
|
| 222 |
1.1.1 (2016-03-13) |
| 223 |
------------------ |
| 224 |
|
| 225 |
**API Changes** |
| 226 |
|
| 227 |
- Adding file/url feed private API endpoint. |
| 228 |
|
| 229 |
1.0.9 (2016-01-01) |
| 230 |
------------------ |
| 231 |
|
| 232 |
**Privacyfixes** |
| 233 |
|
| 234 |
- Fix scan_file (upload to VT), do not leak full path. (credit: @Rafiot) |
| 235 |
|
| 236 |
1.0.8 (2014-12-26) |
| 237 |
------------------ |
| 238 |
|
| 239 |
**Bugfixes** |
| 240 |
|
| 241 |
- Fixed get_url_report method for the Private API (credit: @John-Lin) |
| 242 |
|
| 243 |
1.0.7 (2014-10-17) |
| 244 |
------------------ |
| 245 |
|
| 246 |
**Bugfixes** |
| 247 |
|
| 248 |
- Fixed get_network_traffic method to return the pcap data (credit: adrianherrera) |
| 249 |
|
| 250 |
1.0.6 (2014-09-22) |
| 251 |
------------------ |
| 252 |
|
| 253 |
**Bugfixes** |
| 254 |
|
| 255 |
- Fixed a small typo in the private API's scan_file method (credit: adrianherrera) |
| 256 |
|
| 257 |
1.0.5 (2014-05-18) |
| 258 |
------------------ |
| 259 |
|
| 260 |
**Bugfixes** |
| 261 |
|
| 262 |
- Fixing README.rst for better PYPI presentation. |
| 263 |
|
| 264 |
1.0.2 (2014-05-18) |
| 265 |
------------------ |
| 266 |
|
| 267 |
**API Changes** |
| 268 |
|
| 269 |
- Changing folder structure so when people import it it is not dumb :( |
| 270 |
|
| 271 |
1.0.1 (2014-04-14) |
| 272 |
------------------ |
| 273 |
|
| 274 |
**Bugfixes** |
| 275 |
|
| 276 |
- Trying to fix setup.py for deploying to PYPI. |
| 277 |
|
| 278 |
Platform: UNKNOWN |
| 279 |
Classifier: Development Status :: 5 - Production/Stable |
| 280 |
Classifier: Intended Audience :: Developers |
| 281 |
Classifier: Natural Language :: English |
| 282 |
Classifier: License :: OSI Approved :: MIT License |
| 283 |
Classifier: Programming Language :: Python :: 2.7 |
| 284 |
Classifier: Programming Language :: Python :: 3.6 |