21 lines
584 B
Bash
Executable File
21 lines
584 B
Bash
Executable File
#!/bin/bash
|
|
# Usage ./blocklist_update | sort | uniq | sed $'s/[^[:print:]\t]//g'
|
|
|
|
set -euo pipefail
|
|
|
|
list=(
|
|
https://raw.githubusercontent.com/AdAway/adaway.github.io/master/hosts.txt
|
|
https://hblock.molinero.dev/hosts_domains.txt
|
|
)
|
|
|
|
while IFS= read -r url; do
|
|
list+=("$url")
|
|
done < <(curl -fsSL https://v.firebog.net/hosts/lists.php?type=tick)
|
|
|
|
for i in "${list[@]}"; do
|
|
curl -fsSL "$i" | grep -v '#' | sed '/^$/d' | sed 's/127\.0\.0\.1\|0\.0\.0\.0//g' | sed '/^[^a-zA-Z0-9\ ]/d' | sed 's/[^a-zA-Z0-9\.\-]//g' | awk '{ print $NF }' || true
|
|
done
|
|
|
|
echo "msn.com"
|
|
echo "www.msn.com"
|