This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
JailbreakBypass.xm
205 lines (165 loc) · 4.12 KB
/
JailbreakBypass.xm
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
//
// JailbreakBypass.xm
// tiktok-god
//
// Created by Tanner Bennett on 2021-10-10
// Copyright © 2021 Tanner Bennett. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
// Thanks Ahmed Bafkir (https://twitter.com/Peaceful_0)
// https://pastecode.io/s/jsc6k17f
NSArray *jailbreakPaths = @[
///Applications
@"/Applications/Cydia.app", @"/Applications/blackra1n.app",
@"/Applications/FakeCarrier.app", @"/Applications/Icy.app",
@"/Applications/IntelliScreen.app", @"/Applications/MxTube.app",
@"/Applications/RockApp.app", @"/Applications/SBSettings.app", @"/Applications/WinterBoard.app",
//.
@"/.cydia_no_stash", @"/.installed_unc0ver", @"/.bootstrapped_electra",
//usr
@"/usr/libexec/cydia/firmware.sh", @"/usr/libexec/ssh-keysign", @"/usr/libexec/sftp-server",
@"/usr/bin/ssh", @"/usr/bin/sshd", @"/usr/sbin/sshd",
//var
@"/var/lib/cydia", @"/var/lib/dpkg/info/mobilesubstrate.md5sums",
@"/var/log/apt", @"/usr/share/jailbreak/injectme.plist", @"/usr/sbin/frida-server",
//Library
@"/Library/MobileSubstrate/CydiaSubstrate.dylib", @"/Library/TweakInject",
@"/Library/MobileSubstrate/MobileSubstrate.dylib", @"Library/MobileSubstrate/MobileSubstrate.dylib",
@"/Library/MobileSubstrate/DynamicLibraries/LiveClock.plist", @"/Library/MobileSubstrate/DynamicLibraries/Veency.plist",
//System
@"/System/Library/LaunchDaemons/com.ikey.bbot.plist", @"/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist", @"/System/Library/CoreServices/SystemVersion.plist",
//private
@"/private/var/mobile/Library/SBSettings/Themes", @"/private/var/lib/cydia",
@"/private/var/tmp/cydia.log", @"/private/var/log/syslog",
@"/private/var/cache/apt/", @"/private/var/lib/apt",
@"/private/var/Users/", @"/private/var/stash",
//usr
@"/usr/lib/libjailbreak.dylib", @"/usr/lib/libz.dylib",
@"/usr/lib/system/introspectionNSZombieEnabled",
@"/usr/lib/dyld",
//jb
@"/jb/amfid_payload.dylib", @"/jb/libjailbreak.dylib",
@"/jb/jailbreakd.plist", @"/jb/offsets.plist",
@"/jb/lzma",
//hmd
@"/hmd_tmp_file",
//etc
@"/etc/ssh/sshd_config", @"/etc/apt/undecimus/undecimus.list",
@"/etc/apt/sources.list.d/sileo.sources", @"/etc/apt/sources.list.d/electra.list",
@"/etc/apt", @"/etc/ssl/certs", @"/etc/ssl/cert.pem",
//bin
@"/bin/sh", @"/bin/bash",
];
#pragma mark - Bypass Securtiy
%hook NSFileManager
-(BOOL)fileExistsAtPath:(id)arg1 {
for (NSString *file in jailbreakPaths) {
if ([arg1 isEqualToString:file]) {
return NO;
}
}
return %orig;
}
-(BOOL)fileExistsAtPath:(id)arg1 isDirectory:(BOOL*)arg2 {
for (NSString *file in jailbreakPaths) {
if ([arg1 isEqualToString:file]) {
return NO;
}
}
return %orig;
}
%end
%hook BDADeviceHelper
+(bool)isJailBroken {
return NO;
}
%end
%hook UIDevice
+(bool)btd_isJailBroken {
return NO;
}
%end
%hook TTInstallUtil
+(bool)isJailBroken {
return NO;
}
%end
%hook AppsFlyerUtils
+(bool)isJailbrokenWithSkipAdvancedJailbreakValidation:(bool)arg2 {
return NO;
}
%end
%hook PIPOIAPStoreManager
-(bool)_pipo_isJailBrokenDeviceWithProductID:(id)arg2 orderID:(id)arg3 {
return NO;
}
%end
%hook IESLiveDeviceInfo
+(bool)isJailBroken {
return NO;
}
%end
%hook PIPOStoreKitHelper
-(bool)isJailBroken {
return NO;
}
%end
%hook BDInstallNetworkUtility
+(bool)isJailBroken {
return NO;
}
%end
%hook TTAdSplashDeviceHelper
+(bool)isJailBroken {
return NO;
}
%end
//#################################
%hook GULAppEnvironmentUtil
+(bool)isFromAppStore {
return YES;
}
+(bool)isAppStoreReceiptSandbox {
return NO;
}
+(bool)isAppExtension {
return YES;
}
%end
%hook FBSDKAppEventsUtility
+(bool)isDebugBuild {
return NO;
}
%end
%hook AWEAPMManager
+(id)signInfo {
return @"AppStore";
}
%end
%hook NSBundle
-(id)pathForResource:(id)arg1 ofType:(id)arg2 {
if ([arg2 isEqualToString:@"mobileprovision"]) {
return nil;
}
return %orig;
}
%end
//real bypass
%hook AWESecurity
- (void)resetCollectMode {
return;
}
%end
%hook MSManagerOV
- (id)setMode {
return (id (^)(id)) ^{
};
}
%end
%hook MSConfigOV
- (id)setMode {
return (id (^)(id)) ^{
};
}
%end