Skip to content

Instantly share code, notes, and snippets.

@neoplacer
Last active November 7, 2017 09:31
Show Gist options
  • Save neoplacer/1d5538f8fe7bf47ee962a2a5bd2009da to your computer and use it in GitHub Desktop.
Save neoplacer/1d5538f8fe7bf47ee962a2a5bd2009da to your computer and use it in GitHub Desktop.
#Bash #virustotal.com Uploader
#!/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