From 859dfd03c6e9e5af6f1fac29bc9b22d1e0046111 Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Sun, 5 Jul 2020 06:09:03 +0100 Subject: [PATCH] fix: utilise static filter to block url - https://old.reddit.com/r/uBlockOrigin/comments/73q6km/how_to_block_specific_url/ --- script.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script.sh b/script.sh index 3ce9a851..54762962 100644 --- a/script.sh +++ b/script.sh @@ -96,10 +96,14 @@ grep -F -vf "urlhaus-top-domains.txt" > "malware-domains-online.txt" ## Parse malware URLs from popular domains cat "urlhaus.txt" | \ -grep -F -f "urlhaus-top-domains.txt" > "malware-url-top-domains.txt" +grep -F -f "urlhaus-top-domains.txt" | \ +sed "s/^/||/g" | \ +sed "s/$/^\$all/g" > "malware-url-top-domains.txt" cat "urlhaus-online.txt" | \ -grep -F -f "urlhaus-top-domains.txt" > "malware-url-top-domains-online.txt" +grep -F -f "urlhaus-top-domains.txt" | \ +sed "s/^/||/g" | \ +sed "s/$/^\$all/g" > "malware-url-top-domains-online.txt" ## Merge malware domains and URLs