Skip to content

Instantly share code, notes, and snippets.

@Slamdunk
Slamdunk / stevenblackhosts
Last active December 22, 2023 08:15
Debian `hosts` updater for DNS block
#!/bin/sh
set -e
tmp="$(mktemp)"
file="/etc/hosts"
wget --quiet -O "${tmp}" https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling/hosts
if [ ! -s "$file" ]; then