Update ViewController.mm

Update a jailbreak detection.
This commit is contained in:
mgaver 2013-04-23 16:31:57 +09:00
parent 60f9906bf2
commit 71b8a30c65

View File

@ -34,6 +34,7 @@ extern ScreenManager *screenManager;
InputState input_state;
extern std::string ram_temp_file;
extern bool isJailed;
ViewController* sharedViewController;
@ -70,6 +71,21 @@ ViewController* sharedViewController;
ram_temp_file = [[NSTemporaryDirectory() stringByAppendingPathComponent:@"ram_tmp.file"] fileSystemRepresentation];
NativeInit(0, NULL, [self.documentsPath UTF8String], [self.bundlePath UTF8String], NULL);
isJailed = true;
NSArray *jailPath = [NSArray arrayWithObjects:
@"/Applications/Cydia.app",
@"/private/var/lib/apt" ,
@"/private/var/stash" ,
@"/usr/sbin/sshd" ,
@"/usr/bin/sshd" , nil];
for(NSString *string in jailPath)
{
if ([[NSFileManager defaultManager] fileExistsAtPath:string])
isJailed = false;
}
}
return self;
}