swift获取越狱信息
2017-08-15 本文已影响67人
6a948902fef0
NSFileManager *fm = [NSFileManager defaultManager];
NSMutableString *jodoEnrche = [NSMutableString string];
NSArray *enrfile = @[@"/Applications/Cydia.app",
@"/Library/MobileSubstrate/MobileSubstrate.dylib",
@"/bin/bash",
@"/usr/sbin/sshd",
@"/etc/apt",
@"/private/var/lib/apt/"];
for (NSString *path in enrfile) {
if([fm fileExistsAtPath:path])
{
[jodoEnrche appendString:@"1"];
}
else
{
[jodoEnrche appendString:@"0"];
}
}