Permalink
Browse files

VT check

  • Loading branch information...
brian
brian committed Aug 10, 2018
1 parent eb60c6d commit 94768bd3221623363ac28462e5ade56ca4a02ca2
Showing with 15 additions and 2 deletions.
  1. +13 −1 blazescan
  2. +2 −1 blazescand.conf
@@ -352,6 +352,10 @@ filebasic(){
header
}
vtcheck(){
curl -s -X POST 'https://www.virustotal.com/vtapi/v2/file/report' --form apikey="$vtkey" --form resource="$vthash"
}
############################# reporting ################################
objectName=suspectfile$(date +%y%m%d-%H%M).zip
@@ -519,12 +523,20 @@ while getopts ":ahltu:d:w:UARfi:mnN" opt; do
OPFILE=/usr/local/scan/filecheck-$(date +%F-%H%M.log)
filebasic >> $OPFILE
filebasic
echo -e "\n Would you like to view file strings? y/n"
echo -e "\n Would you like to view file strings? [y/n]"
yesno; if [ $decision = 1 ]; then
strings $fileid | less
else
echo -e
fi
echo -e "\n Would you like to check hash against Virustotal? [y/n]"
yesno; if [ $decision =1 ]; then
vtkey=$(grep "#VTapikey=" /usr/local/scan/blazescand.conf| cut -d = -f2)
vthash=$(sha1sum $fileid)
vtcheck
else
echo -e
fi
echo -e "basic file info recorded in $OPFILE"
exit 0;;
@@ -1,7 +1,8 @@
LogFile /usr/local/scan/blazescand.log
#Mailtoaddress=
#VTapikey=
#
LogFileMaxSize 5M
LogTime yes

0 comments on commit 94768bd

Please sign in to comment.