Jump to content

MSHook Patcher problem


Goggwell

19 posts in this topic

Recommended Posts

Example how I did mshook

 

 

 

#import <CoreFoundation/CoreFoundation.h>
#import <substrate.h>
#import <Foundation/Foundation.h>
#define prefs @"/var/mobile/Library/Preferences/com.kenny808.mcpemods.plist"
inline bool GetPrefBool(NSString *key){
return [[[NSDictionary dictionaryWithContentsOfFile:prefs] valueForKey:key] boolValue];
}



int (*orig__ZN9Inventory3addEP12ItemInstance)(void *self, unsigned int i1);
int __ZN9Inventory3addEP12ItemInstance(void *self, unsigned int i1) {
if(GetPrefBool(@"kadd"))
{
return 64;
}
else
{
return orig__ZN9Inventory3addEP12ItemInstance(self,i1);
}
}

__attribute__((constructor)) void DylibMain() {
MSHookFunction(((void*)MSFindSymbol(NULL,"__ZN9Inventory3addEP12ItemInstance")),(void *)__ZN9Inventory3addEP12ItemInstance,(void**)&orig__ZN9Inventory3addEP12ItemInstance);
}
Link to comment
Share on other sites

Example how I did mshook

 

 

 

#import <CoreFoundation/CoreFoundation.h>
#import <substrate.h>
#import <Foundation/Foundation.h>
#define prefs @"/var/mobile/Library/Preferences/com.kenny808.mcpemods.plist"
inline bool GetPrefBool(NSString *key){
return [[[NSDictionary dictionaryWithContentsOfFile:prefs] valueForKey:key] boolValue];
}



int (*orig__ZN9Inventory3addEP12ItemInstance)(void *self, unsigned int i1);
int __ZN9Inventory3addEP12ItemInstance(void *self, unsigned int i1) {
if(GetPrefBool(@"kadd"))
{
return 64;
}
else
{
return orig__ZN9Inventory3addEP12ItemInstance(self,i1);
}
}

__attribute__((constructor)) void DylibMain() {
MSHookFunction(((void*)MSFindSymbol(NULL,"__ZN9Inventory3addEP12ItemInstance")),(void *)__ZN9Inventory3addEP12ItemInstance,(void**)&orig__ZN9Inventory3addEP12ItemInstance);
}

 

HEY I MISS U <3

Link to comment
Share on other sites


#include <substrate.h>

 

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.goggwell.FruitNinja.plist"

 

inline bool GetPrefBool(NSString *key) {

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

}

 

bool (*old_IsTimedGame)(void *self);

int (*old_WaveSpawnManager_SpawnBomb)(void *self);

int (*old_WaveManager_GetCriticalChance)(void *self);

int (*old_Components_Score_LifeLost)(void *self);

bool (*old_Components_Score_IsNewBest)(void *self);

int (*old_AIManager_Tournament_GetEntryFee)(void *self);

 

 

bool IsTimedGame(void *self) {

if(GetPrefBool(@"kTimed")) {

return FALSE;

} else {

return old_IsTimedGame(self);

}

}

 

int WaveSpawnManager_SpawnBomb(void *self) {

if(GetPrefBool(@"kBomb")) {

return 0;

} else {

return old_WaveSpawnManager_SpawnBomb(self);

}

}

 

int WaveManager_GetCriticalChance(void *self) {

if(GetPrefBool(@"kCrit")) {

return 100;

} else {

return old_WaveManager_GetCriticalChance(self);

}

}

 

int Components_Score_LifeLost(void *self) {

if(GetPrefBool(@"kLost")) {

return 0;

} else {

return old_Components_Score_LifeLost(self);

}

}

 

int Components_Score_IsNewBest(void *self) {

if(GetPrefBool(@"kBest")) {

return TRUE;

} else {

return old_Components_Score_IsNewBest(self);

}

}

 

int AIManager_Tournament_GetEntryFee(void *self) {

if(GetPrefBool(@"kFee")) {

return 0;

} else {

return old_AIManager_Tournament_GetEntryFee(self);

}

}

 

%ctor {

 

MSHookFunction((void*)MSFindSymbol(NULL,"__Z11IsTimedGamev"),(void*)IsTimedGame,(void**)&old_IsTimedGame);

MSHookFunction((void*)MSFindSymbol(NULL,"__ZN11WaveManager9SpawnBombEiP12SPAWNER_INFOi"),(void*)WaveSpawnManager_SpawnBomb,(void**)&old_WaveSpawnManager_SpawnBomb);

MSHookFunction((void*)MSFindSymbol(NULL,"__ZN11WaveManager17GetCriticalChanceEi"),(void*)WaveManager_GetCriticalChance,(void**)&old_WaveManager_GetCriticalChance);

MSHookFunction((void*)MSFindSymbol(NULL,"__ZN10Components5Score8LifeLostE8_Vector3IfEiP6Entity"),(void*)Components_Score_LifeLost,(void**)&old_Components_Score_LifeLost);

MSHookFunction((void*)MSFindSymbol(NULL,"__ZNK10Components5Score9IsNewBestEv"),(void*)Components_Score_IsNewBest,(void**)&old_Components_Score_IsNewBest);

MSHookFunction((void*)MSFindSymbol(NULL,"__ZN9AIManager10Tournament11GetEntryFeeERKN6Mortar11AsciiStringE"),(void*)AIManager_Tournament_GetEntryFee,(void**)&old_AIManager_Tournament_GetEntryFee);

 

}

Link to comment
Share on other sites

#include <substrate.h>

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.goggwell.FruitNinja.plist"

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

bool (*old_IsTimedGame)(void *self);
int (*old_WaveSpawnManager_SpawnBomb)(void *self);
int (*old_WaveManager_GetCriticalChance)(void *self);
int (*old_Components_Score_LifeLost)(void *self);
bool (*old_Components_Score_IsNewBest)(void *self);
int (*old_AIManager_Tournament_GetEntryFee)(void *self);


bool IsTimedGame(void *self) {
    if(GetPrefBool(@"kTimed")) {
        return FALSE;
    } else {
        return old_IsTimedGame(self);
    }
}

int WaveSpawnManager_SpawnBomb(void *self) {
    if(GetPrefBool(@"kBomb")) {
        return 0;
    } else {
        return old_WaveSpawnManager_SpawnBomb(self);
    }
}

int WaveManager_GetCriticalChance(void *self) {
    if(GetPrefBool(@"kCrit")) {
        return 100;
    } else {
        return old_WaveManager_GetCriticalChance(self);
    }
}

int Components_Score_LifeLost(void *self) {
    if(GetPrefBool(@"kLost")) {
        return 0;
    } else {
        return old_Components_Score_LifeLost(self);
    }
}

int Components_Score_IsNewBest(void *self) {
    if(GetPrefBool(@"kBest")) {
        return TRUE;
    } else {
        return old_Components_Score_IsNewBest(self);
    }
}

int AIManager_Tournament_GetEntryFee(void *self) {
    if(GetPrefBool(@"kFee")) {
        return 0;
    } else {
        return old_AIManager_Tournament_GetEntryFee(self);
    }
}

%ctor {

    MSHookFunction((void*)MSFindSymbol(NULL,"__Z11IsTimedGamev"),(void*)IsTimedGame,(void**)&old_IsTimedGame);
    MSHookFunction((void*)MSFindSymbol(NULL,"__ZN11WaveManager9SpawnBombEiP12SPAWNER_INFOi"),(void*)WaveSpawnManager_SpawnBomb,(void**)&old_WaveSpawnManager_SpawnBomb);
    MSHookFunction((void*)MSFindSymbol(NULL,"__ZN11WaveManager17GetCriticalChanceEi"),(void*)WaveManager_GetCriticalChance,(void**)&old_WaveManager_GetCriticalChance);
    MSHookFunction((void*)MSFindSymbol(NULL,"__ZN10Components5Score8LifeLostE8_Vector3IfEiP6Entity"),(void*)Components_Score_LifeLost,(void**)&old_Components_Score_LifeLost);
    MSHookFunction((void*)MSFindSymbol(NULL,"__ZNK10Components5Score9IsNewBestEv"),(void*)Components_Score_IsNewBest,(void**)&old_Components_Score_IsNewBest);
    MSHookFunction((void*)MSFindSymbol(NULL,"__ZN9AIManager10Tournament11GetEntryFeeERKN6Mortar11AsciiStringE"),(void*)AIManager_Tournament_GetEntryFee,(void**)&old_AIManager_Tournament_GetEntryFee);

}

Testing soon :D

Link to comment
Share on other sites

Archived

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

  • Our picks

    • Love Island: The Game v1.5.1 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Love Island: The Game By Fusebox Games
      Bundle ID: com.fuseboxgames.loveisland2
      iTunes Store Link: https://apps.apple.com/us/app/love-island-the-game/id1522699215
       

      Hack Features:
      - Unlimited Gems -> Earn or spend some.
      - Unlimited Tickets -> Earn or spend some.


      Jailbreak required hack(s): https://iosgods.com/topic/169224-love-island-the-game-all-versions-2-cheats-unlimited-currencies/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 130 replies
    • Love Island: The Game v1.5.1 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Love Island: The Game By Fusebox Games
      Bundle ID: com.fuseboxgames.loveisland2
      iTunes Store Link: https://apps.apple.com/us/app/love-island-the-game/id1522699215
       

      Hack Features:
      - Unlimited Gems -> Earn or spend some.
      - Unlimited Tickets -> Earn or spend some.


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 41 replies
    • Grow Shooter : Survivor RPG v1.0.18 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Grow Shooter : Survivor RPG By DongSik Moon
      Bundle ID: com.eastmoon.growshooterlive
      iTunes Store Link: https://apps.apple.com/us/app/grow-shooter-survivor-rpg/id6480362458?uo=4


      Hack Features:
      - Unlimited Coins -> Will not decrease.
      - Unlimited Rubies -> Will not decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Grow Shooter : Survivor RPG v1.0.10 +4 Cheats [ Damage ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 25 replies
    • Grow Shooter : Survivor RPG v1.0.18 +4 Cheats [ Damage ]
      Modded/Hacked App: Grow Shooter : Survivor RPG By DongSik Moon
      Bundle ID: com.eastmoon.growshooterlive
      iTunes Store Link: https://apps.apple.com/us/app/grow-shooter-survivor-rpg/id6480362458?uo=4


      Hack Features:
      - Damage Multiplier
      - Move Speed Multiplier
      - Unlimited Coins -> Will not decrease.
      - Unlimited Rubies -> Will not decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Grow Shooter : Survivor RPG v1.0.10 +2 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 30 replies
    • Supermarket Manager Simulator v1.0.47 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Supermarket Manager Simulator By Digital Melody S.A.
      Bundle ID: com.dmg.supermarket.simulator
      iTunes Store Link: https://apps.apple.com/us/app/supermarket-manager-simulator/id6479982512?uo=4


      Hack Features:
      - Unlimited Cash -> Will increase instead of decrease.
      - Unlimited Energy -> Will increase instead of decrease.
      - No Ads


      Jailbreak required hack(s): [Mod Menu Hack] Supermarket Manager Simulator v1.0.6 +3 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 78 replies
    • Supermarket Manager Simulator v1.0.47 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Supermarket Manager Simulator By Digital Melody S.A.
      Bundle ID: com.dmg.supermarket.simulator
      iTunes Store Link: https://apps.apple.com/us/app/supermarket-manager-simulator/id6479982512?uo=4


      Hack Features:
      - Unlimited Cash -> Will increase instead of decrease.
      - Unlimited Energy -> Will increase instead of decrease.
      -- No Ads


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Supermarket Manager Simulator v1.0.6 +3 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Thanks
        • Like
      • 31 replies
    • Good Pizza, Great Pizza v5.13.0 +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Good Pizza, Great Pizza By TAPBLAZE, LLC
      Bundle ID: com.tapblaze.pizzabusiness
      iTunes Store Link: https://apps.apple.com/us/app/good-pizza-great-pizza/id911121200?uo=4


      Hack Features:
      - Unlimited Cash
      - Unlimited Diamonds


      Jailbreak required hack(s): [Mod Menu Hack] Good Pizza, Great Pizza v5.5.6 +2 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 78 replies
    • Good Pizza, Great Pizza v5.13.0 +2 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Good Pizza, Great Pizza By TAPBLAZE, LLC
      Bundle ID: com.tapblaze.pizzabusiness
      iTunes Store Link: https://apps.apple.com/us/app/good-pizza-great-pizza/id911121200?uo=4


      Hack Features:
      - Unlimited Cash
      - Unlimited Diamonds


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Good Pizza, Great Pizza v5.5.6 +2 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 51 replies
    • Soul Light: Idle RPG War v71 +4 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Soul Light: Idle RPG War By ACTIONFIT Ltd.
      Bundle ID: com.idle.afk.soul.light.rpg
      iTunes Store Link: https://apps.apple.com/us/app/soul-light-idle-rpg-war/id6469476819?uo=4


      Hack Features:
      - God Mode
      - Unlimited Gold -> Will increase instead of decrease.
      - Unlimited Emerald -> Will increase instead of decrease.
      - Unlimited Dungeon Keys


      Jailbreak required hack(s): [Mod Menu Hack] Soul Light: Idle RPG War v1.6.2 +4 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 52 replies
    • Soul Light: Idle RPG War v71 +4 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Soul Light: Idle RPG War By ACTIONFIT Ltd.
      Bundle ID: com.idle.afk.soul.light.rpg
      iTunes Store Link: https://apps.apple.com/us/app/soul-light-idle-rpg-war/id6469476819?uo=4


      Hack Features:
      - God Mode
      - Unlimited Gold -> Will increase instead of decrease.
      - Unlimited Emerald -> Will increase instead of decrease.
      - Unlimited Dungeon Keys


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Soul Light: Idle RPG War v1.6.2 +4 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Like
      • 45 replies
    • College: Perfect Match v1.0.67 +100++ Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: College: Perfect Match By RANGOSIOUS HOLDINGS LIMITED
      Bundle ID: com.amrita.college
      iTunes Store Link: https://apps.apple.com/us/app/college-perfect-match/id6469139716?uo=4


      Hack Features:
      - Debug Menu -> Head over to Settings and toggle the Sound button.


      Jailbreak required hack(s): [Mod Menu Hack] College: Perfect Match v1.0.41 +100++ Cheats [ Debug Menu ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 33 replies
    • College: Perfect Match v1.0.67 +100++ Cheats [ Debug Menu ]
      Modded/Hacked App: College: Perfect Match By RANGOSIOUS HOLDINGS LIMITED
      Bundle ID: com.amrita.college
      iTunes Store Link: https://apps.apple.com/us/app/college-perfect-match/id6469139716?uo=4


      Hack Features:
      - Debug Menu -> Head over to Settings and toggle the Sound button.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] College: Perfect Match v1.0.41 +100++ Jailed Cheats [ Debug Menu ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Haha
        • Thanks
        • Winner
        • Like
      • 16 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