01-30-2017, 06:16 PM
Quick piece of code I wrote today to allow for checking your files for files detected by AV.
Uses:
1. Checking if someone uploaded some of your secret malware to VirusTotal.
2. Scanning a directory of files to see if they have been flagged somewhere (useful for legal file hosting services and the likes).
3. ...
It simply hashes the files, and uses the VirusTotal API to check if those hashes are on VT. If they are, it returns the detection. If not, it just does nothing (unless debug mode is enabled).
I noticed that the public API rate limits you to 4 requests per second, so currently it sleeps for 15 seconds between requests. In future, if there is demand, I can add a feature that allows for importing a list of valid API keys and shuffling through them to evade rate limits.
I can also write a variant, if needed, for actually uploading files to check if that is in demand.
Link:
Uses:
1. Checking if someone uploaded some of your secret malware to VirusTotal.
2. Scanning a directory of files to see if they have been flagged somewhere (useful for legal file hosting services and the likes).
3. ...
It simply hashes the files, and uses the VirusTotal API to check if those hashes are on VT. If they are, it returns the detection. If not, it just does nothing (unless debug mode is enabled).
I noticed that the public API rate limits you to 4 requests per second, so currently it sleeps for 15 seconds between requests. In future, if there is demand, I can add a feature that allows for importing a list of valid API keys and shuffling through them to evade rate limits.
I can also write a variant, if needed, for actually uploading files to check if that is in demand.
Link:
[To see links please register here]