This repository has been archived by the owner on Aug 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtuxsn0w.py
62 lines (50 loc) · 2.14 KB
/
tuxsn0w.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#Tuxsn0w, a freshsn0w alternative for *GNU+*Linux by UD-Team. Oh and it should work on the overpriced machines with a fruit on the back.
import sys
import subprocess
try:
from easygui import *
except:
print("ERROR: The \"easygui\" module is not installed, please download it from https://pypi.org/project/easygui/#files .")
sys.exit(0)
def pwnDFU():
subprocess.call(["ipwndfu/ipwndfu", "-p"])
msg = "DFU should be PWNed. If not reconnect you device and try again."
msgbox(msg, title)
def ipswRestore():
msg = "NOTE: THIS FEATURE IS UNTESTED! YOUR iDEVICE MAY NO LONGER BOOT AFTER THE RESTORE! ALL DATA ON YOUR iDEVICE WILL BE LOST!"
msgbox(msg, title)
msg = "Select your IPSW"
ipsw = fileopenbox(msg, title)
print(ipsw)
if ipsw.endswith('.ipsw'):
msg="Beginning restore"
msgbox(msg, title)
#subprocess.call(["idevicerestore", "-e", "-c", ipsw])
msg="Done!"
msgbox(msg, title)
else:
msg="Not an IPSW!!! Going back home..."
msgbox(msg, title)
def demote():
msg = "DANGER! DEMOTING YOUR DEVICE IS IRREVERSIBLE AND MAY RESULT IN UNFORESEEN SIDE EFFECTS! PROCEED WITH CAUTION!"
choices = ["Continue", "Abort"]
choice = buttonbox(msg, title, choices)
if choice == "Continue":
subprocess.call(["ipwndfu/ipwndfu", "--demote"])
msg = "Device demoted!"
msgbox(msg, title)
def main():
while True:
title = "Tuxsn0w - by UD-Team"
msg = "Welcome to Tuxsn0w! Tuxsn0w is a jailbreaking tool using the Checkm8 exploit by UD-Team.\nPlease select your desired use with the buttons below.\n\nPlease also make sure your iDevice is connected to your computer."
choices = ["PWN DFU (uses ipwndfu)", "Restore Custom IPSW", "Demote device (DANGEROUS)", "Exit"]
choice = buttonbox(msg, title, choices)
if choice == "PWN DFU (uses ipwndfu)":
pwnDFU()
if choice == "Restore Custom IPSW":
ipswRestore()
if choice == "Demote device (DANGEROUS)":
demote()
if choice == "Exit":
break
main()