Advertisement
Lizard1003

[macOS] Yota Mobile Access Small v1.0

May 23rd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.42 KB | None | 0 0
  1. #!/bin/sh
  2. #by Lizard, from osxpc.ru team
  3. #Yota Mobile Access.sh
  4. #Version: "1.0 small"
  5.  
  6. #Value for you edit:
  7. macttl=64  #macOS     (recovery default value)
  8. iosttl=65  #iOS       (for Instant hotspot, Wi-Fi hotspot and USB connection)
  9. andttl=65  #Android   (for Wi-Fi hotspot and USB connection)
  10. wphttl=129 #Win Phone (for Wi-Fi hotspot)
  11. #That's right. Dosen't change code below this comment.
  12.  
  13. reset
  14. ttl0=$(sysctl net.inet.ip.ttl | cut -c 18-)
  15. echo Yota Mobile Access v.1.0 small
  16. echo
  17. echo "TTL 0 = [$ttl0]"
  18. echo
  19. echo "Supported Platforms:"
  20. echo 0 — macOS
  21. echo 1 — iOS
  22. echo 2 — Android
  23. echo 3 — Win Phone
  24. echo 4 — Custom TTL
  25. echo 5 — Abort
  26. echo
  27. echo "Enter number platform: \c"
  28. read platform
  29. if [ $platform = '0' ]; then
  30.     sudo sysctl net.inet.ip.ttl=$macttl | cut -c 26-
  31. fi
  32. if [ $platform = '1' ]; then
  33.     sudo sysctl net.inet.ip.ttl=$iosttl | cut -c 26-
  34. fi
  35. if [ $platform = '2' ]; then
  36.     sudo sysctl net.inet.ip.ttl=$andttl | cut -c 26-
  37. fi
  38. if [ $platform = '3' ]; then
  39.     sudo sysctl net.inet.ip.ttl=$wphttl | cut -c 26-
  40. fi
  41. if [ $platform = '4' ]; then
  42.     echo "Set TTL value = \c"
  43.     read customttl
  44.     sudo sysctl net.inet.ip.ttl=$customttl | cut -c 26-
  45. fi
  46. if [ $platform = '5' ]; then
  47.     echo Aborting...
  48.     echo "Close this session in 10 seconds..."
  49.     sleep 10
  50.     echo
  51.     exit
  52. fi
  53. ttl1=$(sysctl net.inet.ip.ttl | cut -c 18-)
  54. echo "TTL 1 = $ttl1"
  55. echo "Close this session in 10 seconds..."
  56. sleep 10
  57. echo
  58. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement