Created
January 31, 2017 17:00
-
-
Save sixty4k/5adf91bce6151135d37e3d6aa2f7573f to your computer and use it in GitHub Desktop.
Facebook Free February script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
case "$1" in | |
off) | |
sudo bash -c 'curl https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn-social/hosts | grep facebook.com >> /etc/hosts' | |
;; | |
on) | |
cat /etc/hosts | grep -v facebook.com > hosts.tmp | |
sudo mv hosts.tmp /etc/hosts | |
;; | |
*) | |
echo $"Usage: $0 {on|off}" | |
echo $"off will disable all facebook access from your computer" | |
echo $"on will enable facebook again" | |
exit 1 | |
esac | |
sudo dscacheutil -flushcache | |
sudo killall -HUP mDNSResponder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a rather brute force misuse of https://github.com/StevenBlack/hosts