病毒总数公共/私有/Intel API
virustotal-api的Python项目详细描述
虚拟API
病毒总数公共/私有/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/
安装
$ pip install virustotal-api
使用量
from__future__importprint_functionimportjsonimporthashlibfromvirus_total_apisimportPublicApiasVirusTotalPublicApiAPI_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*"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))
输出:
{"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"}}}}
测试
运行测试:
$ ./tests
文件
你在看。
问题
找到虫子了吗?想要更多功能吗?在文件中找到丢失的东西?告诉我!请不要犹豫,我马上就来。
许可证
麻省理工学院版权所有(c)2014-2017blacktop
发布历史
1.1.9(2018-01-03,也就是CPU下降的那天)
Intel API修复程序
- https://github.com/blacktop/virustotal-api/pull/22(学分:@leadzero)
1.1.6(2017-05-14)
py3修复
- 将e.message更改为str(message)(credit:[@deanf](https://github.com/blacktop/virustotal-api/pull/19))
1.1.5(2017-04-13)
api更改
- 添加了智能通知源和从源中以编程方式删除通知的功能。(学分:@keithjjones)
1.1.4(2017-03-11)
修复了超时功能,删除了不必要的方法
- 修复了publicapi中的timeout参数,并删除了privateapi中不必要的代码(credit:@mrredamber aka legend)
1.1.3(2017-02-03)
请求超时功能
- 向向virustotal api发出请求的方法添加超时参数(credit:@mrredamber aka legend)
1.1.2(2016-04-13)
api更改
- 重新添加从内存和磁盘使用文件的功能。(学分:@tweemeterjop)
1.1.1(2016-03-13)
api更改
- 正在添加文件/url提要专用api终结点。
1.0.9(2016-01-01)
privacyfixes
- 修复扫描文件(上载到VT),不泄漏完整路径。(学分:@rafiot)
1.0.8(2014-12-26)
错误修复
- 修复了私有api的get_url_报告方法(credit:@john lin)
1.0.7(2014-10-17)
错误修复
- 修复了返回PCAP数据的get_network_流量方法(credit:Adrianherrera)
1.0.6(2014-09-22)
错误修复
- 修正了私有api的scan_file方法中的一个小错误(credit:adrianherrera)
1.0.5(2014-05-18)
错误修复
-
LI>固定读数。
1.0.2(2014-05-18)
api更改
- 更改文件夹结构,这样当人们导入时它就不会是哑的:(
1.0.1(2014-04-14)
错误修复
- 正在尝试修复setup.py以部署到pypi。