Last active
November 7, 2017 09:31
-
-
Save neoplacer/1d5538f8fe7bf47ee962a2a5bd2009da to your computer and use it in GitHub Desktop.
#Bash #virustotal.com Uploader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
APIKEY="YOUR KEY" | |
while [[ $# -gt 0 ]] | |
do | |
key="$1" | |
case $key in | |
-key|apikey--) | |
APIKEY="$2" | |
shift # past argument | |
shift # past value | |
;; | |
-f|--file) | |
SCANFILE="$2" | |
shift # past argument | |
shift # past value | |
;; | |
esac | |
done | |
echo "API: ${APIKEY}" | |
echo "File: ${SCANFILE}" | |
curl --request POST \ | |
--url 'https://www.virustotal.com/vtapi/v2/file/scan' \ | |
--progress-bar \ | |
--verbose \ | |
--form "apikey=${APIKEY}" \ | |
--form "file=@${SCANFILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment