VirusTotal / vt-py

The official Python 3 client library for VirusTotal
https://virustotal.github.io/vt-py/
Apache License 2.0
531 stars 121 forks source link

Does vt-py provide an API used for triggering reanalyzing files #179

Closed Rroscha closed 7 months ago

Rroscha commented 7 months ago

Hi, does vt-py provide an API used for triggering reanalyzing files.

Thank you!

mgmacias95 commented 7 months ago

Yes! You can use an script like this:

import vt
import asyncio

async def main():
  with vt.Client('<API KEY>') as c:
    analysis = await c.post_async('/files/<file hash>/analyse')
    result = await self._wait_for_analysis_completion(analysis)
  print(result)

asyncio.run(main())
Rroscha commented 7 months ago

Yes! You can use an script like this:

import vt
import asyncio

async def main():
  with vt.Client('<API KEY>') as c:
    analysis = await c.post_async('/files/<file hash>/analyse')
    result = await self._wait_for_analysis_completion(analysis)
  print(result)

asyncio.run(main())

Thank you very much!