fixed urls

This commit is contained in:
TKE
2020-04-14 17:28:41 +02:00
parent 8a13352786
commit 45c990b107

View File

@@ -3,6 +3,10 @@
# copyright: (c) 2014 by Josh "blacktop" Maine. # copyright: (c) 2014 by Josh "blacktop" Maine.
# license: MIT # license: MIT
baseurl="https://s3.amazonaws.com/rds.nsrl.nist.gov/RDS/current/"
rds_file="rds_modernm.zip"
version_file="version.txt"
set -x set -x
ERROR_RATE=0.01 ERROR_RATE=0.01
@@ -11,12 +15,8 @@ if [ -f /nsrl/*.zip ]; then
echo "File '.zip' Exists." echo "File '.zip' Exists."
else else
echo "[INFO] Downloading NSRL Reduced Sets..." echo "[INFO] Downloading NSRL Reduced Sets..."
NSRL_URL="http://www.nsrl.nist.gov/" wget -P /nsrl/ "${baseurl}${rds_file}" 2>/dev/null
MIN_SET=$(wget -O - ${NSRL_URL}Downloads.htm 2> /dev/null | \ wget -O /nsrl/version "${baseurl}${version_file}" 2>/dev/null
grep -m 1 "Minimal set" | \
grep -o '<a href=['"'"'"][^"'"'"']*['"'"'"]' | \
sed -e 's/^<a href=["'"'"']//' -e 's/["'"'"']$//')
wget -P /nsrl/ $NSRL_URL$MIN_SET 2> /dev/null
fi fi
echo "[INFO] Unzip NSRL Database zip to /nsrl/ ..." echo "[INFO] Unzip NSRL Database zip to /nsrl/ ..."