e2guardian/geturlhaus.sh
2023-12-26 13:05:50 -05:00

15 lines
451 B
Bash
Executable file

#!/bin/bash
echo "Fetching URLhaus blocklist"
if ! command -v curl >/dev/null; then
echo 'curl is required for this script to run.'
exit 1
fi
if ! command -v sed >/dev/null; then
echo 'sed is required for this script to run.'
exit 1
fi
mkdir -p urlhaus
curl https://urlhaus.abuse.ch/downloads/text_online/ -o urlhaus/online
sed -i 's/^https:\/\///;s/^http:\/\///' urlhaus/online
sed -i '1s|^|#listcategory: "URLhaus @ abuse.ch"\n|' urlhaus/online