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