Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to Virusshare analyzer #80

Merged
merged 4 commits into from
Sep 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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