feat: include IPs in TPL

tested support IPv4/6
This commit is contained in:
MDLeom 2025-03-23 10:13:12 +00:00
parent fd2659431e
commit c07a0e4e11
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 7 additions and 2 deletions

View File

@ -290,9 +290,12 @@ COMMENT=$(printf "$COMMENT_ABP" | sed "s/^!/#/" | sed "1s/URL/Domains/" | awk '{
COMMENT_ONLINE=$(printf "$COMMENT" | sed "1s/Malicious/Online Malicious/" | awk '{printf "%s\\n", $0}' | head -c -2)
cat "malware-domains.txt" | \
# remove IPv6 bracket
sed -r "s/\[|\]//g" | \
sed "1i $COMMENT" > "../public/urlhaus-filter-domains.txt"
cat "malware-domains-online.txt" | \
sed -r "s/\[|\]//g" | \
sed "1i $COMMENT_ONLINE" > "../public/urlhaus-filter-domains-online.txt"
@ -453,12 +456,14 @@ sed -i "1s/Domains Blocklist/URL Splunk Lookup/" "../public/urlhaus-filter-splun
COMMENT_IE="msFilterList\n$COMMENT\n: Expires=1\n#"
COMMENT_ONLINE_IE="msFilterList\n$COMMENT_ONLINE\n: Expires=1\n#"
cat "malware-hosts.txt" | \
cat "malware-domains.txt" | \
sed -r "s/\[|\]//g" | \
sed "s/^/-d /" | \
sed "1i $COMMENT_IE" | \
sed "2s/Domains Blocklist/Hosts Blocklist (IE)/" > "../public/urlhaus-filter.tpl"
cat "malware-hosts-online.txt" | \
cat "malware-domains-online.txt" | \
sed -r "s/\[|\]//g" | \
sed "s/^/-d /" | \
sed "1i $COMMENT_ONLINE_IE" | \
sed "2s/Domains Blocklist/Hosts Blocklist (IE)/" > "../public/urlhaus-filter-online.tpl"