Skip to content

Commit

Permalink
Merge pull request #80 from colinvanniekerk/master
Browse files Browse the repository at this point in the history
Updates to Virusshare analyzer
  • Loading branch information
jeromeleonard authored Sep 4, 2017
2 parents 17f6b18 + 359bdd4 commit 8ffd5ba
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions analyzers/Virusshare/getHashes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# This script downloads all available Virusshare.com hash files using curl and wget. It can be called as: ./getHashes.sh PATH


display_usage() {
echo "getHashes v0.1"
echo " Fetch all Virusshare.com hashes"
echo -e "\n Usage: $0 <path> \n"
}

if [ $# -ne 1 ]; then
display_usage
exit 1
fi

if [ ! -d $1 ]; then
display_usage
echo -e " Error: Directory not found: '$1'\n\n :'(\n\n"
exit 1

fi

cd $1
for u in `curl https://virusshare.com/hashes.4n6|grep hashes/|cut -d\" -f2`
do
echo $u
wget https://virusshare.com/$u
done | tee -a ../$0.log
cd ..
4 changes: 2 additions & 2 deletions analyzers/Virusshare/virusshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def summary(self, raw):
value = "\"Unknown\""

if raw["isonvs"]:
if raw["isonvs"] == "Unknown":
if raw["isonvs"] == "unknown":
value = "\"Not MD5\""
level = "suspicious"
else:
Expand Down Expand Up @@ -67,7 +67,7 @@ def run(self):
# Skipping comments
if line[0] == '#':
continue
if line.strip('\n') == searchhash:
if searchhash.lower() in line:
self.report({'isonvs': True,
'md5': searchhash})
self.report({'isonvs': False,
Expand Down

0 comments on commit 8ffd5ba

Please sign in to comment.