Skip to main content

No project description provided

Project description

https://i.imgur.com/6nji8Ec.png

VirusTotal API 3 версия

https://img.shields.io/github/license/drobotun/virustotalapi3?style=flat https://travis-ci.org/drobotun/virustotalapi3.svg?branch=master https://img.shields.io/pypi/v/vtapi3 https://img.shields.io/pypi/pyversions/vtapi3

Модуль, реализующий функции API сервиса www.virustotal.com (3 версии), доступных с использованием открытого ключа. Подробное описание API смотри на: https://developers.virustotal.com/v3.0/reference

Реализованы следующие функции API VirusTotal:

Для файлов:

  • POST /files

  • GET /files/upload_url

  • GET /files/{id}

  • POST /files/{id}/analyse

  • GET /files/{id}/comments

  • POST /files/{id}/comments

  • GET /files/{id}/votes

  • POST /files/{id}/votes

  • GET /files/{id}/{relationship}

  • GET /file_behaviours/{sandbox_id}/pcap

Для URL:

  • POST /urls

  • GET /urls/{id}

  • POST /urls/{id}/analyse

  • GET /urls/{id}/comments

  • POST /urls/{id}/comments

  • GET /urls/{id}/votes

  • POST /urls/{id}/votes

  • GET /urls/{id}/network_location

Для доменов:

  • GET /domains/{domain}

  • GET /domains/{domain}/comments

  • POST /domains/{domain}/comments

  • GET /domains/{domain}/{relationship}

  • GET /domains/{domain}/votes

  • POST /domains/{domain}/votes

Для IP-адресов:

  • GET /domains/{domain}

  • GET /domains/{domain}/comments

  • POST /domains/{domain}/comments

  • GET /domains/{domain}/{relationship}

  • GET /domains/{domain}/votes

  • POST /domains/{domain}/votes

Анализ файлов и URL:

  • GET /analyses/{id}

Установка пакета

$ pip install vtapi3

Пример использования

import json
from vtapi3.vtapi3 import VirusTotalAPIFiles, VirusTotalAPIError
   ...
vt_files = VirusTotalAPIFiles('<ключ доступа к API>')
try:
    result = vt_files.upload('<путь к файлу>')
except VirusTotalAPIError as err:
    print(err, err.err_code)
else:
    if vt_files.get_last_http_error() == vt_files.HTTP_OK:
        result = json.loads(result)
        result = json.dumps(result, sort_keys=False, indent=4)
        print(result)
    else:
        print('HTTP Error [' + str(vt_files.get_last_http_error()) +']')
    ...

Ответ сервера

{
  "data": {
    "type": "analysis",
    "id": "NjY0MjRlOTFjMDIyYTkyNWM0NjU2NWQzYWNlMzFmZmI6MTQ3NTA0ODI3Nw=="
  }

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vtapi3-1.0.1.tar.gz (7.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page