Skip to content
Guest Big Announcement

How to gather many functions in one key for a patcher

Featured Replies

Hey i was wondering how to gather these functions in one key for a patcher ? :)

Template:

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.mehdi.hack.plist"

 

inline bool GetPrefBool(NSString *key)

{

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];

}

 

%hook something

 

-(int)method {

if(GetPrefBool(@"kKey")) {

return 9999999;

}

return %orig;

}

 

-(int)gems {

if(GetPrefBool(@"kGems")) {

return 9999999;

}

return %orig;

}

 

-(unsigned int)lives {

if(GetPrefBool(@"kLives")) {

return 9999999;

}

return %orig;

}

 

%end

 

%hook SomethingElse

 

-(BOOL)SomeMethod {

if(GetPrefBool(@"kKEY5")) {

return TRUE;

}

return %orig;

}

 

-(BOOL)SomeMethod2 {

if(GetPrefBool(@"kKEY6")) {

return FALSE;

}

return %orig;

}

 

%end

Solved by CmakLove

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.