go install github.com/ibnaleem/vtscan@latest
vtscan is a command-line tool for scanning files, URLs, and IPs against VirusTotal's malware detection. It makes it easier for developers, sercurity researchers, and pretty much anyone that uses a terminal a lot to quickly get a verdict of a file, IP, URL, and more. It was developed after I grew tired of trying to find a file via the GUI to upload to VirusTotal. Sometimes its on the desktop, often times its in some obscure path that takes us forever to traverse.
After you've ran the install command above, you should obtain an API key from VirusTotal and specify it in your environmental variables as VT_API_KEY. Please look up how to setup an environmental variable for your OS.
vtscan will automatically calculate a SHA256 hash of your file to search VirusTotal's API. You can specify as many files or hashes as you need, and vtscan will do the rest for you:
$ vtscan file malware.exe cryptominer.bat b2660178b77e43b65d9e991332f0c9d59bd555aee9e8879e39a55e7db8d472d0Here, vtscan will search for the following:
malware.exevia SHA256 hashcryptominer.batvia SHA256 hashb266017...via hash
The hash specified in the argument does not have to be SHA256: it could be either SHA1 or MD5 as well.
$ vtscan ip <ip address 1> <ip address 2> <ip address 3>...$ vtscan domain <domain 1> <domain 2> <domain 3>...These are the following API endpoints that are planned for implementation