65 lines
2.1 KiB
Bash
65 lines
2.1 KiB
Bash
## replaced by src/build.js
|
|
|
|
#!/bin/sh
|
|
|
|
if ! (set -o pipefail 2>/dev/null); then
|
|
# dash does not support pipefail
|
|
set -efx
|
|
else
|
|
set -efx -o pipefail
|
|
fi
|
|
|
|
# bash does not expand alias by default for non-interactive script
|
|
if [ -n "$BASH_VERSION" ]; then
|
|
shopt -s expand_aliases
|
|
fi
|
|
|
|
alias cp="cp -f"
|
|
alias curl="curl -L"
|
|
alias mkdir="mkdir -p"
|
|
|
|
if command -v unzip &> /dev/null
|
|
then
|
|
alias unzip="unzip -jo"
|
|
elif command -v busybox &> /dev/null
|
|
then
|
|
alias unzip="busybox unzip -jo"
|
|
elif command -v bsdunzip &> /dev/null
|
|
then
|
|
alias unzip="bsdunzip -jo"
|
|
else
|
|
echo "unzip not found"
|
|
exit 1
|
|
fi
|
|
|
|
mkdir "tmp/"
|
|
cd "tmp/"
|
|
|
|
curl "https://gitlab.com/malware-filter/urlhaus-filter/-/jobs/artifacts/main/download?job=pages" -o "urlhaus-filter.zip"
|
|
curl "https://gitlab.com/malware-filter/phishing-filter/-/jobs/artifacts/main/download?job=pages" -o "phishing-filter.zip"
|
|
curl "https://gitlab.com/malware-filter/pup-filter/-/jobs/artifacts/main/download?job=pages" -o "pup-filter.zip"
|
|
curl "https://gitlab.com/malware-filter/tracking-filter/-/jobs/artifacts/main/download?job=pages" -o "tracking-filter.zip"
|
|
curl "https://gitlab.com/malware-filter/vn-badsite-filter/-/jobs/artifacts/main/download?job=pages" -o "vn-badsite-filter.zip"
|
|
curl "https://gitlab.com/malware-filter/botnet-filter/-/jobs/artifacts/main/download?job=pages" -o "botnet-filter.zip"
|
|
|
|
for zipfile in $(find . -name "*.zip" -type f)
|
|
do
|
|
unzip "$zipfile"
|
|
done
|
|
|
|
curl "https://abp.oisd.nl/basic/" -o "oisd_abp_light.txt"
|
|
curl "https://abp.oisd.nl/" -o "oisd_abp.txt"
|
|
curl "https://dbl.oisd.nl/basic/" -o "oisd_dbl_light.txt"
|
|
curl "https://dbl.oisd.nl/" -o "oisd_dbl.txt"
|
|
curl "https://dblw.oisd.nl/basic/" -o "oisd_dblw_light.txt"
|
|
curl "https://dblw.oisd.nl/" -o "oisd_dblw.txt"
|
|
curl "https://hosts.oisd.nl/basic/" -o "oisd_hosts_light.txt"
|
|
curl "https://hosts.oisd.nl/" -o "oisd_hosts.txt"
|
|
curl "https://dnsmasq.oisd.nl/basic/" -o "oisd_dnsmasq_light.txt"
|
|
curl "https://dnsmasq.oisd.nl/" -o "oisd_dnsmasq.txt"
|
|
curl "https://rpz.oisd.nl/basic/" -o "oisd_rpz_light.txt"
|
|
curl "https://rpz.oisd.nl/" -o "oisd_rpz.txt"
|
|
|
|
mkdir "../public/"
|
|
find . ! -name "*.zip" -type f | xargs cp -t "../public/"
|