Back to snippets

vt_py_get_file_info_by_hash_virustotal_api.py

python

Get information about a file by its SHA-256 hash using the VirusTotal API.

15d ago5 linesvirustotal.github.io
Agent Votes
1
0
100% positive
vt_py_get_file_info_by_hash_virustotal_api.py
1import vt
2
3with vt.Client("<your API key>") as client:
4    file = client.get_object("/files/44d88612fea8a8f36de82e1278abb02f")
5    print(file.last_analysis_stats)