Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #by Lizard, from osxpc.ru team
- #Yota Mobile Access.sh
- #Version: "1.0 full"
- #Value for you edit:
- macttl=64 #macOS (recovery default value)
- iosttl=65 #iOS (for Instant hotspot, Wi-Fi hotspot and USB connection)
- andttl=65 #Android (for Wi-Fi hotspot and USB connection)
- wphttl=129 #Win Phone (for Wi-Fi hotspot)
- #All done.
- #Dosen't change code below this comment.
- sw0=$(sw_vers -productName)
- sw1=$(sw_vers -productVersion)
- sw2=$(sw_vers -buildVersion)
- reset
- echo =========================================================
- echo Yota Mobile Access.sh
- echo =========================================================
- echo
- echo Version : "1.0 full"
- echo Supported : "macOS, iOS, Android, Windows Phone, and custom value."
- echo System : "$sw0 $sw1 $sw2"
- echo
- echo Description : "If your provider blocked Wi-Fi or USB hotspot on device, you can try this soliution."
- echo "This script increase TTL value for your device, and Internet provider doesn't understand that connection is going outside the device."
- echo
- echo =======================================================
- echo
- ttl0=$(sysctl net.inet.ip.ttl | cut -c 18-)
- if [ $ttl0 = '64' ]; then
- echo "Current TTL = 64. This TTL value is default value for macOS."
- fi
- if [ $ttl0 = '65' ]; then
- echo "Current TTL = 65. This TTL value is a good choice for iOS and Android."
- echo "Do you want continue anyway? [y/n]: \c"
- read anyway
- if [ $anyway = 'n' ]; then
- echo
- echo Aborting...
- echo
- sleep 1.5
- echo =========================================================
- echo All done. Have a nice day!
- echo
- echo Always for you, osxpc.ru team.
- echo =========================================================
- echo
- echo "Close this session in 10 seconds..."
- sleep 10
- echo
- exit
- fi
- fi
- if [ $ttl0 = '129' ]; then
- echo "Current TTL = 129. This TTL value is a good choice for Windows Phone."
- echo "Do you want continue anyway? [y/n]: \c"
- read anyway
- if [ $anyway = 'n' ]; then
- echo
- echo Aborting...
- echo
- sleep 1.5
- echo =========================================================
- echo All done. Have a nice day!
- echo
- echo Always for you, osxpc.ru team.
- echo =========================================================
- echo
- echo "Close this session in 10 seconds..."
- sleep 10
- echo
- exit
- fi
- fi
- if [ $ttl0 != '64' ]; then
- if [ $ttl0 != '65' ]; then
- if [ $ttl0 != '129' ]; then
- if [ $ttl0 -lt 64 ]; then
- echo "!!!"
- echo "Current TTL = $ttl0. This TTL value has nothing to do with anything, but it needs to be increased minimal to 64 (and greater)."
- echo "!!!"
- fi
- if [ $ttl0 -gt 64 ]; then
- echo "Current TTL = $ttl0. This TTL value has nothing to do with anything, but it does not require any changes."
- echo "Do you want continue anyway? [y/n]: \c"
- read anyway
- if [ $anyway = 'n' ]; then
- echo
- echo Aborting...
- echo
- sleep 1.5
- echo =========================================================
- echo All done. Have a nice day!
- echo
- echo Always for you, osxpc.ru team.
- echo =========================================================
- echo
- echo "Close this session in 10 seconds..."
- sleep 10
- echo
- exit
- fi
- fi
- fi
- fi
- fi
- echo
- echo =======================================================
- echo
- echo "Supported Platforms:"
- echo
- echo "0 — macOS (recovery default value)"
- echo "1 — iOS (for Instant hotspot, Wi-Fi hotspot and USB connection)"
- echo "2 — Android (for Wi-Fi hotspot and USB connection)"
- echo "3 — Win Phone (for Wi-Fi hotspot)"
- echo "4 — Custom TTL (for technical specialists or test)"
- echo "5 — Abort (just aborted executing this script)"
- echo
- echo "Enter number platform: \c"
- read platform
- if [ $platform = '0' ]; then
- echo Changed platform: macOS
- fi
- if [ $platform = '1' ]; then
- echo Changed platform: iOS
- fi
- if [ $platform = '2' ]; then
- echo Changed platform: Android
- fi
- if [ $platform = '3' ]; then
- echo Changed platform: Windows Phone
- fi
- if [ $platform = '4' ]; then
- echo Changed platform: Custom TTL
- fi
- if [ $platform = '5' ]; then
- echo
- echo Aborting...
- echo
- sleep 1.5
- echo =========================================================
- echo All done. Have a nice day!
- echo Reconnect your device and get Internet!
- echo
- echo Always for you, osxpc.ru team.
- echo =========================================================
- echo
- echo "Close this session in 10 seconds..."
- sleep 10
- echo
- exit
- fi
- echo
- echo =========================================================
- echo
- if [ $platform = '0' ]; then
- echo "Set TTL value for macOS"
- sudo sysctl net.inet.ip.ttl=$macttl | cut -c 30-
- ttl1=$(sysctl net.inet.ip.ttl | cut -c 18-)
- if [ $ttl1 = $macttl ]; then
- echo "Success! Now TTL = $ttl1"
- else
- echo "Error. TTL doesn't changed."
- fi
- fi
- if [ $platform = '1' ]; then
- echo "Set TTL value for iOS"
- sudo sysctl net.inet.ip.ttl=$iosttl | cut -c 30-
- ttl1=$(sysctl net.inet.ip.ttl | cut -c 18-)
- if [ $ttl1 = $iosttl ];
- then
- echo "Success! Now TTL = $ttl1"
- else
- echo "Error. TTL doesn't changed."
- fi
- fi
- if [ $platform = '2' ]; then
- echo "Set TTL value for Android"
- sudo sysctl net.inet.ip.ttl=$andttl | cut -c 30-
- ttl1=$(sysctl net.inet.ip.ttl | cut -c 18-)
- if [ $ttl1 = $andttl ];
- then
- echo "Success! Now TTL = $ttl1"
- else
- echo "Error. TTL doesn't changed."
- fi
- fi
- if [ $platform = '3' ]; then
- echo "Set TTL value for Windows Phone"
- sudo sysctl net.inet.ip.ttl=$wphttl | cut -c 30-
- ttl1=$(sysctl net.inet.ip.ttl | cut -c 18-)
- if [ $ttl1 = $wphttl ];
- then
- echo "Success! Now TTL = $ttl1"
- else
- echo "Error. TTL doesn't changed."
- fi
- fi
- if [ $platform = '4' ]; then
- echo "What TTL value need assigning?"
- echo "Set TTL value = \c"
- read customttl
- sudo sysctl net.inet.ip.ttl=$customttl | cut -c 30-
- ttl1=$(sysctl net.inet.ip.ttl | cut -c 18-)
- if [ $ttl1 = $customttl ];
- then
- echo "Success! Now TTL = $ttl1"
- else
- echo "Error. TTL doesn't changed."
- fi
- fi
- echo
- echo =========================================================
- echo All done. Have a nice day!
- echo Reconnect your device and get Internet!
- echo
- echo Always for you, osxpc.ru team.
- echo =========================================================
- echo
- echo "Close this session in 10 seconds..."
- sleep 10
- echo
- exit
Add Comment
Please, Sign In to add comment