fix: compatibility with AdGuard Home
- AdGuard doesn't block subdomain in `example.com` syntax, whereas uBO interprets it as equivalent to `||example.com^`. - https://github.com/adguardteam/adguardhome/wiki/Hosts-Blocklists - https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#hosts-files - Closes #19
This commit is contained in:
parent
a0c79c4277
commit
4bbf26a481
13
script.sh
13
script.sh
|
@ -116,11 +116,20 @@ FIFTH_LINE="! License: https://creativecommons.org/publicdomain/zero/1.0/"
|
|||
SIXTH_LINE="! Source: https://urlhaus.abuse.ch/api/"
|
||||
COMMENT_ABP="$FIRST_LINE\n$SECOND_LINE\n$THIRD_LINE\n$FOURTH_LINE\n$FIFTH_LINE\n$SIXTH_LINE"
|
||||
|
||||
cat "malware-domains.txt" "malware-url-top-domains.txt" | \
|
||||
# Compatibility with Adguard Home (#19)
|
||||
cat "malware-domains.txt" | \
|
||||
sed "s/^/||/g" | \
|
||||
sed "s/$/^/g" > "malware-domains-adguard.txt"
|
||||
|
||||
cat "malware-domains-online.txt" | \
|
||||
sed "s/^/||/g" | \
|
||||
sed "s/$/^/g" > "malware-domains-online-adguard.txt"
|
||||
|
||||
cat "malware-domains-adguard.txt" "malware-url-top-domains.txt" | \
|
||||
sort | \
|
||||
sed '1 i\'"$COMMENT_ABP"'' > "../urlhaus-filter.txt"
|
||||
|
||||
cat "malware-domains-online.txt" "malware-url-top-domains-online.txt" | \
|
||||
cat "malware-domains-online-adguard.txt" "malware-url-top-domains-online.txt" | \
|
||||
sort | \
|
||||
sed '1 i\'"$COMMENT_ABP"'' | \
|
||||
sed "1s/Malicious/Online Malicious/" > "../urlhaus-filter-online.txt"
|
||||
|
|
Loading…
Reference in New Issue