-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.py
137 lines (112 loc) · 3.96 KB
/
web.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
from flask import Flask, request, jsonify
import subprocess
import os
import time
app = Flask(__name__)
# Shared secret password
SHARED_SECRET = "S4KUR4R41N"
# Function to check authorization
def check_authorization(request):
auth_header = request.headers.get("Authorization")
if auth_header == SHARED_SECRET:
return True
return False
# Actual code starts here
def jailbreak_checkra1n():
try:
subprocess.call(['sudo', 'checkra1n'])
return {"message": "Running checkra1n - please be patient!"}
except Exception as e:
return {"error": str(e)}
@app.route('/checkra1n', methods=['GET'])
def jailbreak1():
if not check_authorization(request):
return jsonify({"error": "Unauthorized"}), 401
return jsonify(jailbreak_checkra1n())
def jailbreak_palera1n():
try:
subprocess.call(['sudo', 'palera1n'])
return {"message": "Running palera1n - please be patient!"}
except Exception as e:
return {"error": str(e)}
@app.route('/palera1n', methods=['GET'])
def jailbreak2():
if not check_authorization(request):
return jsonify({"error": "Unauthorized"}), 401
return jsonify(jailbreak_palera1n())
def bypass_function1():
try:
subprocess.call(['sudo', './bypass-1.sh'])
return {"message": "Running bypass - please be patient!"}
except Exception as e:
return {"error": str(e)}
def jailbreak_checkm8():
try:
subprocess.call(['sudo', 'python3', 'checkm8.py'])
return {"message": "Running checkm8 - please be patient!"}
except Exception as e:
return {"error": str(e)}
@app.route('/checkm8', methods=['GET'])
def jailbreak3():
if not check_authorization(request):
return jsonify({"error": "Unauthorized"}), 401
return jsonify(jailbreak_checkm8())
def bypass_function1():
try:
subprocess.call(['sudo', './bypass-1.sh'])
return {"message": "Running bypass - please be patient!"}
except Exception as e:
return {"error": str(e)}
@app.route('/bypass1', methods=['GET'])
def bypass1():
if not check_authorization(request):
return jsonify({"error": "Unauthorized"}), 401
return jsonify(bypass_function1())
def bypass_function2():
try:
subprocess.call(['sudo', './bypass-2.sh'])
return {"message": "Running bypass - please be patient!"}
except Exception as e:
return {"error": str(e)}
@app.route('/bypass2', methods=['GET'])
def bypass2():
if not check_authorization(request):
return jsonify({"error": "Unauthorized"}), 401
return jsonify(bypass_function1())
def sandcastle_linux():
try:
subprocess.call(['sudo', './sandcastle-linux.sh'])
return {"message": "Running Project Sandcastle (Linux) - please be patient!"}
except Exception as e:
return {"error": str(e)}
@app.route('/linux', methods=['GET'])
def linux():
if not check_authorization(request):
return jsonify({"error": "Unauthorized"}), 401
return jsonify(sandcastle_linux())
def sandcastle_android():
try:
subprocess.call(['sudo', './sandcastle-android.sh'])
return {"message": "Running Project Sandcastle (Android) - please be patient!"}
except Exception as e:
return {"error": str(e)}
@app.route('/android', methods=['GET'])
def android():
if not check_authorization(request):
return jsonify({"error": "Unauthorized"}), 401
return jsonify(sandcastle_android())
# Home
@app.route('/', methods=['GET'])
def home():
return """
sakurara1n:
1. /checkra1n - Jailbreak your device (A7-A11).
2. /palera1n - Jailbreak your device (A8-A11 - iOS 15.0 / bridgeOS 5.0)
3. /checkm8 - Jailbreak your legacy iOS device (pre-A7 devices)
4. /bypass1 - Bypass your un-jailbroken device!
5. /bypass2 - Bypass your jailbroken device!
6. /android - Run Project Sandcastle (Android)
7. /linux - Run Project Sandcastle (Linux)
"""
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000)