Skip to content

Instantly share code, notes, and snippets.

@h4sh5
Created August 14, 2021 17:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save h4sh5/7458bbab09c52a92a47c2bfbb6859d4d to your computer and use it in GitHub Desktop.
Save h4sh5/7458bbab09c52a92a47c2bfbb6859d4d to your computer and use it in GitHub Desktop.
upload file to vt
apikey="xxx"
echo "$(tput setaf 7)Uploading $1 to VirusTotal$(tput sgr0)"
vt_hash=$(curl -X POST 'https://www.virustotal.com/vtapi/v2/file/scan' --form apikey=$apikey --form file=@"$(realpath $1)" | grep -o '"[0-9|a-f]{64}"' | head -1 | sed 's/"//g')
echo done: $(sha256sum $1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment