v1ral_ITS

Legacy IOS Part5 End of script

Jun 10th, 2026
33
0
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 8.18 KB | None | 0 0
  1.     set_tool_paths
  2.  
  3.     if [[ $no_internet_check != 1 ]]; then
  4.         log "Checking Internet connection..."
  5.         local try=("google.com" "www.apple.com" "208.67.222.222")
  6.         local check
  7.         local timeout="-w3"
  8.         [[ $platform == "macos" ]] && timeout="-t3"
  9.         for i in "${try[@]}"; do
  10.             ping -c1 $timeout $i | sed -n '1,2p'
  11.             check=${PIPESTATUS[0]}
  12.             if [[ $check == 0 ]]; then
  13.                 break
  14.             fi
  15.         done
  16.         if [[ $check != 0 ]]; then
  17.             error "Please check your Internet connection before proceeding."
  18.         fi
  19.     fi
  20.  
  21.     local checks=(curl git xxd)
  22.     local check_fail
  23.     for check in "${checks[@]}"; do
  24.         if [[ $debug_mode == 1 ]]; then
  25.             log "Checking for $check in PATH"
  26.         fi
  27.         if [[ ! $(command -v $check) ]]; then
  28.             warn "$check not found in PATH"
  29.             check_fail=1
  30.         fi
  31.     done
  32.     if [[ -z $unzip2 || -z $zip2 ]]; then
  33.         warn "unzip/zip not found in PATH"
  34.         check_fail=1
  35.     fi
  36.  
  37.     if [[ -s ../resources/firstrun ]]; then
  38.         mv ../resources/firstrun ../saved/
  39.     fi
  40.     if [[ ! -s ../saved/firstrun || $(cat ../saved/firstrun) != "$platform_ver" || $check_fail == 1 ]]; then
  41.         install_depends
  42.     fi
  43.  
  44.     version_check
  45.  
  46.     device_get_info
  47.     mkdir -p ../saved/baseband ../saved/$device_type ../saved/shsh
  48.  
  49.     mode=
  50.     if [[ -n $main_argmode ]]; then
  51.         mode="$main_argmode"
  52.     else
  53.         menu_main
  54.     fi
  55.  
  56.     case $mode in
  57.         "custom-ipsw" )
  58.             ipsw_preference_set
  59.             restore_deviceprepare
  60.             ipsw_prepare
  61.             log "Done creating custom IPSW"
  62.         ;;
  63.         "downgrade" )
  64.             ipsw_preference_set
  65.             restore_deviceprepare
  66.             ipsw_prepare
  67.             restore_prepare
  68.         ;;
  69.         "baseband" )
  70.             device_dump baseband
  71.             log "Baseband dumping is done"
  72.             print "* To stitch baseband to IPSW, run Legacy iOS Kit with --disable-bbupdate flag:"
  73.             print "    > ./restore.sh --disable-bbupdate"
  74.         ;;
  75.         "actrec" )
  76.             device_dump activation
  77.             log "Activation records dumping is done"
  78.             print "* The output tar file contains the plist file(s) dumped. Activation record plist is all you need for activation"
  79.             print "* Note: Using the activation records only works on iOS 9.2.1 or lower. It will not work on iOS 9.3+"
  80.             if (( device_proc < 7 )); then
  81.                 print "* To stitch activation to IPSW, run Legacy iOS Kit with --activation-records flag:"
  82.                 print "    > ./restore.sh --activation-records"
  83.             fi
  84.         ;;
  85.         "restore-update" ) restore_latest update;;
  86.         "kdfu"         ) device_enter_mode kDFU;;
  87.         "ramdisknvram" ) device_ramdisk clearnvram;;
  88.         "pwned-ibss"   ) device_enter_mode pwnDFU;;
  89.         "enterrecovery") device_enter_mode Recovery;;
  90.         "exitrecovery" )
  91.             log "Attempting to exit Recovery mode."
  92.             $irecovery -n
  93.             if [[ $device_proc != 1 && $device_type != "iPod2,1" ]] && (( device_proc < 7 )); then
  94.                 print "* Note: For tethered downgrades, you need to boot your device using the Just Boot option. Exiting recovery mode will not work."
  95.             fi
  96.             if [[ $device_canpowder == 1 ]]; then
  97.                 print "* Note 2: If your device is stuck in recovery mode, it may have been restored with powdersn0w before."
  98.                 print "    - If so, try to clear the device's NVRAM: go to Useful Utilities -> Clear NVRAM"
  99.             fi
  100.         ;;
  101.         "customipsw"   ) restore_customipsw;;
  102.         "getversion"   ) device_enter_ramdisk getversion;;
  103.         "shutdown"     ) device_pair; $idevicediagnostics shutdown;;
  104.         "restart"      ) device_pair; $idevicediagnostics restart;;
  105.         "remove4"      ) device_ramdisk setnvram $rec;;
  106.         "device_dfuhelper" )
  107.             if [[ $device_proc == 1 ]]; then
  108.                 device_dfuhelper norec WTFreal
  109.             else
  110.                 device_dfuhelper
  111.             fi
  112.         ;;
  113.         "device"* | "shsh"* ) $mode;;
  114.         * ) :;;
  115.     esac
  116. }
  117.  
  118. for i in "$@"; do
  119.     case $i in
  120.         # general options
  121.         "--debug"           ) set -x; debug_mode=1; menu_old=1;;
  122.         "--disable-usbmuxd" ) device_disable_usbmuxd=1;;
  123.         "--enable-sudoloop" ) device_disable_sudoloop=;;
  124.         "--help"            ) display_help; exit;;
  125.         "--no-color"        ) no_color=1;;
  126.         "--no-finder"       ) no_finder=1;;
  127.         "--old-menu"        ) menu_old=1;;
  128.         "--use-usbmuxd2"    ) use_usbmuxd2=1;;
  129.  
  130.         # options for 32-bit devices
  131.         "--activation-records") device_actrec=1;;
  132.         "--build-id="*      ) device_rd_build="${i#*=}";;
  133.         "--bootargs="*      ) device_bootargs="${i#*=}";;
  134.         "--dead-bb"         ) device_deadbb=1; device_disable_bbupdate=1;;
  135.         "--disable-actrec"  ) device_disable_actrec=1;;
  136.         "--disable-bbupdate") device_disable_bbupdate=1;;
  137.         "--ipsw-hacktivate" ) ipsw_hacktivate=1;;
  138.         "--ipsw-verbose"    ) ipsw_verbose=1;;
  139.         "--jailbreak"       ) ipsw_jailbreak=1;;
  140.         "--gasgauge-patch" | "--multipatch") ipsw_gasgauge_patch=1;;
  141.         "--memory"          ) ipsw_memory=1;;
  142.         "--pwned-recovery"  ) device_pwnrec=1;;
  143.         "--ra1n-timeout="*  ) device_ra1n_timeout="${i#*=}";;
  144.         "--skip-first"      ) ipsw_skip_first=1;;
  145.         "--skip-ibss"       ) device_skip_ibss=1;;
  146.  
  147.         # options for 64-bit devices
  148.         "--skip-blob"       ) restore_useskipblob=1;;
  149.         "--use-dev"         ) restore_usedev=1;;
  150.         "--use-pwndfu"      ) restore_usepwndfu64=1;;
  151.  
  152.         # device_argmode setters
  153.         "--entry-device"    ) device_argmode="entry";;
  154.         "--no-device"       ) device_argmode="none";;
  155.  
  156.         # entry parameters
  157.         "--device="*        ) device_type="${i#*=}";;
  158.         "--ecid="*          ) device_ecid="${i#*=}";;
  159.  
  160.         # main_argmode setters
  161.         "--dfuhelper"       ) main_argmode="device_dfuhelper";;
  162.         "--exit-recovery"   ) main_argmode="exitrecovery";;
  163.         "--just-boot"       ) main_argmode="device_justboot";;
  164.         "--kdfu"            ) main_argmode="kdfu";;
  165.         "--pwn"             ) main_argmode="pwned-ibss";;
  166.         "--sshrd"           ) main_argmode="device_enter_ramdisk";;
  167.         "--sshrd-menu"      ) device_argmode="entry"; main_argmode="device_enter_ramdisk_menu";;
  168.  
  169.         # please dont use these, unless you know what youre doing
  170.         "--no-internet-check") no_internet_check=1;;
  171.         "--no-version-check" ) no_version_check=1;;
  172.         "--run-as-root"      ) run_as_root=1;;
  173.     esac
  174. done
  175.  
  176. if [[ $no_color != 1 ]]; then
  177.     TERM=xterm-256color # fix colors for msys2 terminal
  178.     color_R=$(tput setaf 9)
  179.     color_G=$(tput setaf 10)
  180.     color_B=$(tput setaf 12)
  181.     color_Y=$(tput setaf 208)
  182.     color_N=$(tput sgr0)
  183. fi
  184.  
  185. if [[ $main_argmode == "device_justboot" && -z $device_rd_build ]]; then
  186.     print "* Just Boot usage: --just-boot --build-id=<id>"
  187.     print "* Optional: --device=<type> --bootargs=\"<bootargs>\""
  188.     print "* Example usage: ./restore.sh --just-boot --build-id=12H321"
  189.     error "Just Boot (--just-boot) requires specifying build ID (--build-id=<id>)"
  190. elif [[ $main_argmode == "device_justboot" && $device_type == "iPod4,1" && $device_rd_build == "11D257" ]]; then
  191.     main_argmode="device_justboot_touch4ios7"
  192. fi
  193.  
  194. trap "clean" EXIT
  195. trap "exit 1" INT TERM
  196.  
  197. othertmp=$(ls "$(dirname "$0")" | grep -c tmp)
  198. if [[ $othertmp != 0 ]]; then
  199.     noclean=1
  200.     log "Detected existing tmp folder(s)."
  201.     print "* There might be other Legacy iOS Kit instance(s) running, or residual tmp folder(s) not deleted."
  202.     print "* Running multiple instances is not fully supported and can cause unexpected behavior."
  203.     print "* It is recommended to only use a single instance and/or delete all existing \"tmp\" folders in your Legacy iOS Kit folder before continuing."
  204.     select_yesno "Select Y to remove all tmp folders, N to run as is" 1
  205.     if [[ $? == 1 ]]; then
  206.         noclean=
  207.         rm -r "$(dirname "$0")/tmp"*
  208.         clean
  209.     fi
  210. else
  211.     clean
  212. fi
  213. othertmp=$(ls "$(dirname "$0")" | grep -c tmp)
  214.  
  215. mkdir -p "$(dirname "$0")/tmp$$"
  216. pushd "$(dirname "$0")/tmp$$" >/dev/null
  217. mkdir -p ../saved
  218.  
  219. main
  220.  
  221. popd >/dev/null
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • Adzakga
    20 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment