Skip to content

Instantly share code, notes, and snippets.

@MegaManSec
Created May 26, 2023 23:56
Show Gist options
  • Save MegaManSec/34f7131b51cae1259ba24f86a6fa6fc9 to your computer and use it in GitHub Desktop.
Save MegaManSec/34f7131b51cae1259ba24f86a6fa6fc9 to your computer and use it in GitHub Desktop.
update-blocked-hosts.sh
#!/bin/bash
curl 'https://someonewhocares.org/hosts/zero/hosts' 'https://winhelp2002.mvps.org/hosts.txt' 'https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts' --silent -k | grep --color=never '^0.0.0.0 ' | awk '{print $1" "$2}' | tr -d '\r' | sort | uniq > /usr/local/etc/blocked-hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment