Advertisement
tanmyid

Auto Ping & Airplane Mod

Mar 21st, 2024
381
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.80 KB | None | 0 0
  1. #!/bin/bash
  2. # script alternatif buat xl vidio yang gampang dc (butuh ip baru), ini hanya untuk user BFR/CFM
  3. timeout_count=0
  4. while true
  5. do
  6.     response=$(curl -s -o /dev/null -w "%{http_code}" -m 5 https://www.google.com)
  7.     if [ $? -eq 0 ]; then
  8.         timeout_count=0
  9.         echo -e "\e[32mKoneksi Aktif : [$response]\e[0m"
  10.     else
  11.         ((timeout_count++))
  12.         echo -e "\e[33mKoneksi Timeout : [$response]\e[0m"
  13.     fi
  14.     if [ $timeout_count -eq 3 ]; then
  15.         su -c 'settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true'
  16.         sleep 7
  17.         su -c 'settings put global airplane_mode_on 0; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false'
  18.         sleep 5
  19.         timeout_count=0
  20.     fi
  21.     sleep 3
  22. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement