Jump to content

Hack doesn't work when it's enabled, but does when it's disabled.


Go to solution Solved by cz1993,

8 posts in this topic

Recommended Posts

Posted

Hi,

I'm making a hack but I got into a weird problem.

I made a patcher using a template from here, hacking the game using the 'new mshook way by shmoo'.

 

Whenever I turn the hack ON in settings, the hack aint working. (int)

Whenever I turn it OFF, it works perfectly fine. (int)

 

BUT when i turn a boolean function, 'isCheater'  ON, it does work. 

 

I've checked my tweak.xm, but it's fine.

 

I'm confused as f**k xD

 

Anyone got a solution?

Posted

Can you post your Tweak.xm here?

Posted
2 minutes ago, DiDA said:

Can you post your Tweak.xm here?

Yes sorry..

 

#import <UIKit/UIKit.h>
#import <substrate.h>
#import <Foundation/Foundation.h>

//tweak.xm by Chrizk0//
//template by DiDA//

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.Ted2.KimK.plist"
 
inline bool GetPrefBool(NSString *key) {
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

//make up any function relevant to your symbols.//

int (*orig_Cash)(void *self);

//*static included before any function to obfuscate while decreasing size in compilation.*//

static int Cash(void *self) {
    if(GetPrefBool(@"key1"))
    {
        return 987654321;
    }
    else
    {
        return orig_Cash(self);
    }
}

static bool Cheat(void *self) {
    if(GetPrefBool(@"key2"))
    {
        return FALSE;
    }
    else
    {
        return orig_Cheat(self);
    }
}




//define your symbols with mshookfunction.//


__attribute__((constructor)) void DylibMain(){

 
MSHookFunction(MSFindSymbol(NULL, "__Z16Player_AwardCashP7SPlayeri"),(void*)Cash, (void**)&orig_Cash);

MSHookFunction(MSFindSymbol(NULL, "__Z22SceneManager_IsCheaterP13SSceneManager"),(void*)Cheat, (void**)&orig_Cheat);
}
%end 

 

Posted
MSHookFunction(MSFindSymbol(NULL, "__Z16Player_AwardCashP7SPlayeri"),(void**)&orig_Cash, (void*)Cash);

MSHookFunction(MSFindSymbol(NULL, "__Z22SceneManager_IsCheaterP13SSceneManager"),(void**)&orig_Cheat, (void*)Cheat);

 

maybe works

Posted
7 minutes ago, cz1993 said:

MSHookFunction(MSFindSymbol(NULL, "__Z16Player_AwardCashP7SPlayeri"),(void**)&orig_Cash, (void*)Cash);

MSHookFunction(MSFindSymbol(NULL, "__Z22SceneManager_IsCheaterP13SSceneManager"),(void**)&orig_Cheat, (void*)Cheat);

 

maybe works

Got a bucn of errors lol.

 

/var/mobile/kimk/theos/include/substrate.h:310:20: note: candidate function
      [with Type_ = void] not viable: no known conversion from 'void **' to
      'const char *' for 2nd argument
static inline void MSHookFunction(MSImageRef image, const char *name, Ty...
                   ^
/var/mobile/kimk/theos/include/substrate.h:284:20: note: candidate template
      ignored: deduced conflicting types for parameter 'Type_'
      ('void' vs. 'void *')
static inline void MSHookFunction(Type_ *symbol, Type_ *replace, Type_ *...
                   ^
/var/mobile/kimk/theos/include/substrate.h:303:20: note: candidate template
      ignored: could not match 'type-parameter-0-0 *' against 'void'
static inline void MSHookFunction(const char *name, Type_ *replace, Type...
                   ^
/var/mobile/kimk/theos/include/substrate.h:293:20: note: candidate function
      template not viable: requires 2 arguments, but 3 were provided
static inline void MSHookFunction(Type_ *symbol, Type_ *replace) {

 

  • Solution
Posted

lol..  do that..

 

static int Cash(void *self) {
    if(GetPrefBool(@"key1"))
    {
        return orig_Cash(self);
    }
    else
    {
        return 987654321;
    }
}

static bool Cheat(void *self) {
    if(GetPrefBool(@"key2"))
    {
        return orig_Cheat(self);
    }
    else
    {
        return FALSE;
    }
}
Posted
18 minutes ago, cz1993 said:

lol..  do that..

 


static int Cash(void *self) {
    if(GetPrefBool(@"key1"))
    {
        return orig_Cash(self);
    }
    else
    {
        return 987654321;
    }
}

static bool Cheat(void *self) {
    if(GetPrefBool(@"key2"))
    {
        return orig_Cheat(self);
    }
    else
    {
        return FALSE;
    }
}

hero <3 works, I love you!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Gravewalker: Roguelike RPG v1.3 [ +2 Cheats ] Currency Max
      Modded/Hacked App: Gravewalker: Roguelike RPG By Space Node Co., Ltd.
      Bundle ID: com.ckmin.gravewalker
      App Store Link: https://apps.apple.com/us/app/gravewalker-roguelike-rpg/id6789180274?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      Note:- Breakable Cheat / When Use Then Game Crash But Works / Disable After
      • 0 replies
    • Gravewalker: Roguelike RPG v1.3 [ +2 Jailed ] Currency Max
      Modded/Hacked App: Gravewalker: Roguelike RPG By Space Node Co., Ltd.
      Bundle ID: com.ckmin.gravewalker
      App Store Link: https://apps.apple.com/us/app/gravewalker-roguelike-rpg/id6789180274?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      Note:- Breakable Cheat / When Use Then Game Crash But Works / Disable After
      • 1 reply
    • Doom Convoy v1.0 [ +7 Jailed ] Currency Max
      Modded/Hacked App: Doom Convoy By FUBU GAMES OYUN YAZILIM VE BILGI TEKNOLOJILERI TICARET LIMITED SIRKETI
      Bundle ID: com.fubugames.doomdefender
      App Store Link: https://apps.apple.com/us/app/doom-convoy/id6759977040?uo=4

      🤩 Hack Features

      - Coins Max
      - Mini Gun / Ammo Freeze
      - Mini Gun / Ammo Max Use
      - Rocket / Ammo Freeze
      - Rocket / Ammo Max Use
      - Flame Gun / Ammo Freeze
      - Flame Gun / Ammo Max Use
      • 1 reply
    • Doom Convoy v1.0 [ +7 Cheats ] Currency Max
      Modded/Hacked App: Doom Convoy By FUBU GAMES OYUN YAZILIM VE BILGI TEKNOLOJILERI TICARET LIMITED SIRKETI
      Bundle ID: com.fubugames.doomdefender
      App Store Link: https://apps.apple.com/us/app/doom-convoy/id6759977040?uo=4

      🤩 Hack Features

      - Coins Max
      - Mini Gun / Ammo Freeze
      - Mini Gun / Ammo Max Use
      - Rocket / Ammo Freeze
      - Rocket / Ammo Max Use
      - Flame Gun / Ammo Freeze
      - Flame Gun / Ammo Max Use
      • 1 reply
    • Animal Hunt: PvP Clash v1.0 [ +1 Jailed ] Enough Currency
      Modded/Hacked App: Animal Hunt: PvP Clash By Creative Distrix
      Bundle ID: com.cd.sniper.hunting.shooter
      App Store Link: https://apps.apple.com/us/app/animal-hunt-pvp-clash/id6761612123?uo=4

      🤩 Hack Features

      - Enough Currency
        • Winner
        • Like
      • 2 replies
    • Animal Hunt: PvP Clash v1.0 [ +1 Cheats ] Enough Currency
      Modded/Hacked App: Animal Hunt: PvP Clash By Creative Distrix
      Bundle ID: com.cd.sniper.hunting.shooter
      App Store Link: https://apps.apple.com/us/app/animal-hunt-pvp-clash/id6761612123?uo=4

      🤩 Hack Features

      - Enough Currency
        • Winner
        • Like
      • 1 reply
    • Animal Hunting Sniper PvP Game v3.6 [ +1 APK MOD ] Enough Currency
      Mod APK Game Name: Animal Hunting Sniper PvP Game
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.cd.sniper.shooter.animal.hunting&hl=en

      🤩 Hack Features

      - Enough Currency
      • 0 replies
    • Too Many Zombies v1.1.11 [ +2 APK MOD ] ATK Max
      Mod APK Game Name: Too Many Zombies
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.boomcat.zombiedefense.aos.global

      🤩 Hack Features

      - Immortal
      - ATK Max
        • Winner
      • 1 reply
    • Dream Master v1.0.5 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Dream Master! By 远翔 张
      Bundle ID: com.dream.master
      App Store Link: https://apps.apple.com/us/app/dream-master/id6749934992?uo=4

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Spin
      - Build Cost
      - Star Enough
      • 2 replies
    • Dream Master v1.0.5 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Dream Master! By 远翔 张
      Bundle ID: com.dream.master
      App Store Link: https://apps.apple.com/us/app/dream-master/id6749934992?uo=4

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Spin
      - Build Cost
      - Star Enough
        • Like
      • 0 replies
    • Window Meow v1.0.7161 [ +24 APK MOD ] Currency Max
      Mod APK Game Name: Window Meow
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.skywalkgames.wildcat&hl=en

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Yarn
      - Unlimited Sunlight
      - Unlimited Food +11
      - Unlimited Water +5
      - Unlimited Warm Milk
      - Unlimited Music
      - Unlimited Rabbit Fur
      - Unlimited Fur Glove
      - Unlimited Tri Brush
      - Unlimited Stripe Ball
      - Unlimited Mouse Wand
      - Coins Freeze
      - Yarn Freeze
      - Sunlight Freeze
      - Food Freeze +11
      - Water Freeze +5
      - Warm Milk Freeze
      - Music Freeze
      - Rabbit Fur Freeze
      - Fur Glove Freeze
      - Tri Brush Freeze
      - Stripe Ball Freeze
      - Mouse Wand Freeze
      • 1 reply
    • Tower Defense PvP Tower Royale v1.8.16 [ +2 Jailed ] Max Elixir
      Modded/Hacked App: Tower Defense PvP:Tower Royale By Lightweight Inc
      Bundle ID: kr.lightweight.randomtower
      App Store Link: https://apps.apple.com/us/app/tower-defense-pvp-tower-royale/id1579639395?uo=4

      🤩 Hack Features

      - Max Elixir
      - Merge All Dice
        • Agree
        • Haha
        • Winner
        • Like
      • 4 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines