Remove http(s) and urls from the lists

Closes #3
This commit is contained in:
columndeeply
2023-02-24 15:56:38 +01:00
parent 93eb863bc9
commit acb06ffa42
7 changed files with 4723 additions and 9016 deletions

View File

@ -10,7 +10,7 @@ for file in "$@"; do
[ ! -f "$file" ] && echo "$file does not exist" && continue
# Remove comments, stuff pointing to localhost, whitespaces, tabs, etc.
sed -i 's/#.*$//g;/^$/d;/localhost$/d;/::/d;/local$/d;/localdomain$/d;/broadcasthost$/d;/0.0.0.0$/d;/^[[:space:]]*$/d;s/[ \t]*$//g;s/^[ \t]*//g;s/[[:blank:]]/ /g' "$file"
sed -i 's/#.*$//g;/^$/d;/localhost$/d;/::/d;/local$/d;/localdomain$/d;/broadcasthost$/d;/0.0.0.0$/d;/^[[:space:]]*$/d;s/[ \t]*$//g;s/^[ \t]*//g;s/[[:blank:]]/ /g;s/https\?:\/\///g;s/\/.*$//g;s/\?.*$//g' "$file"
# All domains should point to 127.0.0.1
## Add it to all lines not starting with an IP address