Advertisement
VecH

Untitled

Jan 10th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.51 KB | None | 0 0
  1. #!/system/bin/busybox sh
  2. while : ; do
  3.     PR=$(busybox ping -I wan0 -w 3 -c 3 cdn.rawgit.com 2>/dev/null | busybox awk '/packets received/ {print $4}')
  4.     if [ "x$PR" != "x0" ]; then
  5.         iptables -N yotaban
  6.         iptables -A FORWARD -j yotaban
  7.         /system/xbin/busybox wget -O - http://cdn.rawgit.com/TTLMaster/yota-ban-list/master/list.txt | \
  8.         while read -r i; do
  9.             busybox [ "`echo $i | busybox sed -n '/^#.*$/p'`" ] && continue
  10.             iptables -A yotaban -d $i -j DROP
  11.         done
  12.         break
  13.     else
  14.         /system/bin/sleep 5
  15.     fi
  16. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement