Created
August 24, 2021 15:23
-
-
Save ander94lakx/583f7411753d66ba2f0a22130c4a2c48 to your computer and use it in GitHub Desktop.
Given a file, looks for similar files in NSRL (NIST) using ssdeep datasets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
absdir=$(realpath "$1") | |
echo $absdir | |
mkdir NSRL_Corp | |
cd NSRL_Corp | |
rm *.zip | |
rm *.ssd | |
curl https://s3.amazonaws.com/docs.nsrl.nist.gov/morealgs/ssdeep_2.10/NSRL_corp.0[0-1][0-9].0.zip -o "NSRL_corp.0#1#2.0.zip" | |
curl https://s3.amazonaws.com/docs.nsrl.nist.gov/morealgs/ssdeep_2.10/NSRL_corp.0[0-1][0-9].5.zip -o "NSRL_corp.0#1#2.5.zip" | |
curl https://s3.amazonaws.com/docs.nsrl.nist.gov/morealgs/ssdeep_2.10/NSRL_corp.020.0.zip -o "NSRL_corp.020.0.zip" | |
curl https://s3.amazonaws.com/docs.nsrl.nist.gov/morealgs/ssdeep_2.10/NSRL_corp.020.5.zip -o "NSRL_corp.020.5.zip" | |
unzip \*.zip | |
rm *.zip | |
rm RESULTS.txt | |
find . -name "*.ssd" -exec ssdeep -a -m {} "$absdir" \; >> RESULTS.txt | |
rm -f *.ssd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment