Skip to content
Guest Big Announcement

Help me build a patcher

Featured Replies

Hi can some one help what I am doin wrong I trying to make a patcher the patcher work but the hack it turn off in the settings but the hack is to active. here the code can some one help me please thanks.

#import <substrate.h>
#import <Foundation/Foundation.h>
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.ha.Radyo.plist"

inline bool GetPrefBool(NSString *key) {
    return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

void (*old_loadBanner)(void *self);
bool (*old_hidesAdBanners)(void *self);
bool (*old_setHidesAdBanners)(void *self);

static void loadBanner(void *self) {
    if(GetPrefBool(@"key1")) {     
    } else {
        return old_loadBanner(self);
    }
}

static bool hidesAdBanners(void *self) {
    if(GetPrefBool(@"key1")) {
        return TRUE ;
    } else {
        return old_hidesAdBanners(self);
    }
}

static bool setHidesAdBanners(void *self) {
    if(GetPrefBool(@"key1")) {
        return TRUE ;
    } else {
        return old_setHidesAdBanners(self);
    }
}

__attribute__((constructor)) void DylibMain() {
    MSHookFunction(MSFindSymbol(NULL, "__"),(void*)loadBanner, (void**)&old_loadBanner);
    MSHookFunction(MSFindSymbol(NULL, "__"),(void*)hidesAdBanners, (void**)&old_hidesAdBanners);
    MSHookFunction(MSFindSymbol(NULL, "__"),(void*)setHidesAdBanners, (void**)&old_setHidesAdBanners);
}

// Automatic Popup Code

void setup() {
    UIAlertController *igcredits = [UIAlertController alertControllerWithTitle:@"Made for iOSGods.com" message:@"Radyo Cheats by org for iOSGods.com!\n\nVisit the hack's official topic on iOSGods for more information and updates!" preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *iosgods = [UIAlertAction actionWithTitle:@"Visit iOSGods.com!" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action){
    [[UIApplication sharedApplication] openURL: [NSURL URLWithString: @"https://iosgods.com/forum/13-free-jailbroken-cydia-cheats/"]];
    }];
    UIAlertAction *clubs = [UIAlertAction actionWithTitle:@"Visit the Clubs!" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action){
    [[UIApplication sharedApplication] openURL: [NSURL URLWithString: @"https://iosgods.com/clubs/"]];
    }];
    UIAlertAction *thankyou = [UIAlertAction actionWithTitle:@"Thank you!" style:UIAlertActionStyleCancel handler:nil];
    [igcredits addAction:iosgods];
    [igcredits addAction:clubs];
    [igcredits addAction:thankyou];
    [[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:igcredits animated:true completion:nil];
}

void unsubscribeToLaunchEvent(void);
static void didFinishLaunching(CFNotificationCenterRef center, void *observer,
                              CFStringRef name, const void *object, CFDictionaryRef info) {
    setup();
    unsubscribeToLaunchEvent();
}

const char *authObserver = "authObserver";

void subscribeToLaunchEvent() {
    CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), authObserver, &didFinishLaunching,
                                    (CFStringRef)UIApplicationDidFinishLaunchingNotification,
                                    NULL, CFNotificationSuspensionBehaviorDrop);
}

void unsubscribeToLaunchEvent() {
    CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), authObserver,
                                       (CFStringRef)UIApplicationDidFinishLaunchingNotification, NULL);
}

__attribute__((constructor)) static void initialize() {
    subscribeToLaunchEvent();
}

 

Updated by jamiesharon

  • Author

look like no one don't like to help out here what the point having help and support @DiDA

😟😟

Updated by jamiesharon

  • Author
15 minutes ago, Joey said:

This is not a support topic. You literally put some code here & dont tell us where you need support, with what part?

read the message before the code some think is wrong. the patcher works with the patcher is turn off

Updated by jamiesharon

  • Author
10 minutes ago, Joey said:

You should work on your english, because I don’t understand you.

How rude if you don’t understand then you are not English 

1 minute ago, jamiesharon said:

How rude if you don’t understand then you are not English 

Your text above the code literally says nothing. I can’t help you if you properly explain the issue.

  • Author
5 minutes ago, Joey said:

Your text above the code literally says nothing. I can’t help you if you properly explain the issue.

Say nothing it say I asking for help because some think it wrong with my patcher read again

On 2/2/2019 at 4:49 PM, jamiesharon said:

 

Hi can some one help what I am doin wrong I trying to make a patcher the patcher work but the hack it turn off in the settings but the hack is to active. here the code can some one help me please thanks

 

Do you understand this yourself?

  • Author
13 minutes ago, Joey said:

Do you understand this yourself?

Yes I understand it...it say the patcher works but the patcher is not active that means the patcher is turn off it not on it is off in the settings cheat menu so the patcher hack is turn off but the patcher is active and working that why I am asking for help some think is wrong with the hooks code 

GetPrefBool

Archived

This topic is now archived and is closed to further replies.

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.