Skip to content

Instantly share code, notes, and snippets.

@sixty4k
Created January 31, 2017 17:00
Show Gist options
  • Save sixty4k/5adf91bce6151135d37e3d6aa2f7573f to your computer and use it in GitHub Desktop.
Save sixty4k/5adf91bce6151135d37e3d6aa2f7573f to your computer and use it in GitHub Desktop.
Facebook Free February script
#!/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
@sixty4k
Copy link
Author

sixty4k commented Jan 31, 2017

a rather brute force misuse of https://github.com/StevenBlack/hosts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment