Skip to content

Commit

Permalink
Merge pull request #1 from ktneely/getHashes-patch-1
Browse files Browse the repository at this point in the history
check for existing hashfile downloads
  • Loading branch information
ktneely authored May 4, 2018
2 parents b48ede8 + 2d3ff6d commit 7044976
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions analyzers/Virusshare/getHashes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ if [ ! -d $1 ]; then
fi

cd $1
for u in `curl https://virusshare.com/hashes.4n6 | grep -E "hashes\/VirusShare_[0-9]{5}\.md5" | cut -d\" -f2`
for u in `curl https://virusshare.com/hashes.4n6 | grep -E "VirusShare_[0-9]{5}\.md5" | c\
ut -d\" -f2 | cut -d\/ -f2`
do
echo $u
wget https://virusshare.com/$u
if [ -e $1/$u ]; then
echo "File already downloaded"
else
wget https://virusshare.com/hashes/$u
sleep 3
fi

done | tee -a ../$0.log
cd ..

0 comments on commit 7044976

Please sign in to comment.