Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/system/xbin/bash
- # copyleft 2015 by wariat
- # Manual:
- # bash /sdcard/scripts/hosts.sh check
- # su -c "bash /sdcard/scripts/hosts.sh"
- # su -c "bash /sdcard/scripts/hosts.sh block"
- if [ "$1" == "" ]
- then
- echo "
- copyleft 2015 by wariat
- Manual:
- $ hosts.sh check
- # hosts.sh reset
- # hosts.sh block
- "
- exit
- fi
- if [ "$1" == "check" ]
- then
- cat /etc/hosts
- exit
- fi
- if [ "$1" == "reset" ] || [ "$1" == "block" ]
- then
- echo "remount rw"
- mount -o remount,rw /system
- echo '127.0.0.1 localhost' > /etc/hosts
- echo '::1 ip6-localhost' >> /etc/hosts
- fi
- if [ "$1" == "block" ]
- then
- echo "blokuje"
- echo "# Block teh traffic block :D
- 127.0.0.1 www.panoramio.com
- 127.0.0.1 lh1.ggpht.com
- 127.0.0.1 lh2.ggpht.com
- 127.0.0.1 lh3.ggpht.com
- 127.0.0.1 lh4.ggpht.com
- 127.0.0.1 lh5.ggpht.com
- 127.0.0.1 lh6.ggpht.com
- 127.0.0.1 lh7.ggpht.com
- 127.0.0.1 lh8.ggpht.com
- 127.0.0.1 lh9.ggpht.com
- 127.0.0.1 lh3.googleusercontent.com
- " >> /etc/hosts
- fi
- sync
- if [ "$1" == "reset" ] || [ "$1" == "block" ]
- then
- echo "remount ro"
- mount -o remount,ro /system
- fi
- cat /etc/hosts
- sleep 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement