start.sh 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. function select_option {
  2. # little helpers for terminal print control and key input
  3. ESC=$( printf "\033")
  4. cursor_blink_on() { printf "$ESC[?25h"; }
  5. cursor_blink_off() { printf "$ESC[?25l"; }
  6. cursor_to() { printf "$ESC[$1;${2:-1}H"; }
  7. print_option() { printf " $1 "; }
  8. print_selected() { printf " $ESC[7m $1 $ESC[27m"; }
  9. get_cursor_row() { IFS=';' read -sdR -p $'\E[6n' ROW COL; echo ${ROW#*[}; }
  10. key_input() { read -s -n3 key 2>/dev/null >&2
  11. if [[ $key = $ESC[A ]]; then echo up; fi
  12. if [[ $key = $ESC[B ]]; then echo down; fi
  13. if [[ $key = "" ]]; then echo enter; fi; }
  14. # initially print empty new lines (scroll down if at bottom of screen)
  15. for opt; do printf "\n"; done
  16. # determine current screen position for overwriting the options
  17. local lastrow=`get_cursor_row`
  18. local startrow=$(($lastrow - $#))
  19. # ensure cursor and input echoing back on upon a ctrl+c during read -s
  20. trap "cursor_blink_on; stty echo; printf '\n'; exit" 2
  21. cursor_blink_off
  22. local selected=0
  23. while true; do
  24. # print options by overwriting the last lines
  25. local idx=0
  26. for opt; do
  27. cursor_to $(($startrow + $idx))
  28. if [ $idx -eq $selected ]; then
  29. print_selected "$opt"
  30. else
  31. print_option "$opt"
  32. fi
  33. ((idx++))
  34. done
  35. # user key control
  36. case `key_input` in
  37. enter) break;;
  38. up) ((selected--));
  39. if [ $selected -lt 0 ]; then selected=$(($# - 1)); fi;;
  40. down) ((selected++));
  41. if [ $selected -ge $# ]; then selected=0; fi;;
  42. esac
  43. done
  44. # cursor position back to normal
  45. cursor_to $lastrow
  46. printf "\n"
  47. cursor_blink_on
  48. return $selected
  49. }
  50. echo "
  51. ____ __ __
  52. /\ _ \ / __ \ /\ \
  53. \ \ \L\ \ __ __/\_\L\ \ ____ _ __\ \ \___
  54. \ \ _ <'/\ \/\ \/_/_\_<_ /',__\/\ __\ \ _ \
  55. \ \ \L\ \ \ \_\ \/\ \L\ /\__, \ \ \/ \ \ \ \ \
  56. \ \____/\ \____/\ \____\/\____/\ \_\ \ \_\ \_\
  57. Welcome to Bu3srh CloudPass v1.0"
  58. echo "We are not responsible for any damage done to your device"
  59. echo "WE CANT GUARANTEE UNLOCK, ON SOME DEVICES IT WILL WORK ON SOME NOT!!!!!"
  60. echo "Features: Bypass Activation lock, Remove old icloud account, root shell to Idevice, Jailbreak the device"
  61. echo "Select one option using up/down keys and enter to confirm:"
  62. echo
  63. options=( "Icloud bypass IOS 12.3-13.2.3! NO SIM CARD (AUTOMATIC ONE)" "newPHP ICLOUD BYPASS WITH SIM " "Removes old icloud account conected to the device (JAILBREAK REQUIRED)" "Jailbreak the device" "Exit")
  64. select_option "${options[@]}"
  65. choice=$?
  66. echo "Choosen = $choice"
  67. echo "Launching selected option..."
  68. if [ $choice = "0" ]; then
  69. clear
  70. chmod +x ./source/ibypass.sh
  71. ./source/ibypass.sh
  72. elif [ $choice = "1" ]; then
  73. clear
  74. chmod +x ./source/php.sh
  75. ./source/php.sh
  76. elif [ $choice = "2" ]; then
  77. clear
  78. chmod +x ./source/rm_oldicloud.sh
  79. ./source/rm_oldicloud.sh
  80. elif [ $choice = "3" ]; then
  81. clear
  82. chmod +x ./source/jailbreak.sh
  83. ./source/jailbreak.sh
  84. else
  85. echo "Exiting..."
  86. clear
  87. echo "Bye!"
  88. exit
  89. fi