Jump to content

Can't use MSFindSymbol


princessXZ

1 post in this topic

Recommended Posts

Posted

Hey

I'm making hook code But my MSFindSymbol doesn't work

I tried to replace substrate.h with CydiaSubstrate/Framewrok one but still get error.
When I try to compile code,

I get this error

Tweak.xm:33:1: error: C++ requires a type specifier for all declarations
MSHookFunction(MSFindSymbol(NULL, "__ZN9GameScene20CalculateShootDamageEP9UserInforhf"), (void*)CalculateShootDamage, (void**)&org_CalculateShootDamage);

And this is my Tweak.xm

#import <CoreFoundation/CoreFoundation.h>
#import <substrate.h>
#import <Foundation/Foundation.h>
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.zorba.prefbundle.plist"

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

int64_t (*org_CalculateShootDamage)(void *self, unsigned char arg1, float arg2);

int64_t CalculateShootDamage(void *self, unsigned char arg1, float arg2){
  if (GetPrefBool(@"HackDamage")) {
    return 300;
  } else {
    return org_CalculateShootDamage(self, arg1, arg2);
  }
}

%hook AppController
// OpenDetected
-(void)applicationDidBecomeActive:(id)argument {
  if (GetPrefBool(@"DetectOpened")) {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"mcohack" message:@"Detected App opened!" delegate:nil cancelButtonTitle:@"Continue" otherButtonTitles:nil];
    [alert show];
    return %orig(argument);
  } else {
    return %orig(argument);
  }
}
// HackDamage
MSHookFunction(MSFindSymbol(NULL, "__ZN9GameScene20CalculateShootDamageEP9UserInforhf"), (void*)CalculateShootDamage, (void**)&org_CalculateShootDamage);
%end

 

And IDA screen

http://zorba.starfree.jp/ida.png

 

I thank this wonderful community!!

ps: I tried to hook with offset, It looks success but when called this function game crash. Is it erong type to use int64_t ? 😢

#import <substrate.h>
#import <Foundation/Foundation.h>
#import <mach-o/dyld.h>


float (*old_CalculateShootDamage)(void *self, unsigned char arg1, float arg2);

static int64_t CalculateShootDamage(void *self, unsigned char arg1, float arg2) {
    return old_CalculateShootDamage(self, arg1, arg2);
}

%ctor {
    MSHookFunction((void*)(_dyld_get_image_vmaddr_slide(0) + 0x1002B53CC),(void*)CalculateShootDamage,(void**)&old_CalculateShootDamage);
}

Next I tried to hack with vm_writedata . I set to origin hex one but game crash when function called..

@import Foundation;
@import UIKit;
#import <substrate.h>
#import "vm_writeData.h"

// To MSHook Offsets, use https://iosgods.com/topic/22718-mshook-offsets/
// To Generate Tweak.xm and Preferences Plist https://iosgods.com/topic/24138-code-inject/

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.zorba.mcomods.plist"

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


// Add your MS/Flex/MSHook Code here. Examples can be found on iOSGods.


%ctor {

	// Code Injection example
    if(GetPrefBool(@"key1")) {
      vm_writeData(0x1002B55F0, 0x15008052); //
    }

}

 

infomations:

IOS13.3.1 / iphone8 / theos latest version

Non unity game (cocos2dx)

Archived

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

  • Our picks

    • Mecha Fortress: Robot War TD v4.0.1 [ +6 Cheats ] Auto Win
      Modded/Hacked App: Mecha Fortress: Idle Titan War By NOXGAMES s.r.o.
      Bundle ID: mech.fortress.tower.defense.hero.war
      App Store Link: https://apps.apple.com/us/app/mecha-fortress-idle-titan-war/id6743624932?uo=4

      🤩 Hack Features

      - Auto Win
      - Unlimited Energy / Play Battle Then Get
      - Premium Pass Active
      - Stage Rewards Unlocked
      - LvL Rewards Claim Unlimited / OFF When Enough / Gems Coins +More
      - DMG
      • 7 replies
    • Mecha Fortress: Robot War TD v4.0.1 [ +6 Jailed ] Auto Win
      Modded/Hacked App: Mecha Fortress: Idle Titan War By NOXGAMES s.r.o.
      Bundle ID: mech.fortress.tower.defense.hero.war
      App Store Link: https://apps.apple.com/us/app/mecha-fortress-idle-titan-war/id6743624932?uo=4

      🤩 Hack Features

      - Auto Win
      - Unlimited Energy / Play Battle Then Get
      - Premium Pass Active
      - Stage Rewards Unlocked
      - LvL Rewards Claim Unlimited / OFF When Enough / Gems Coins +More
      - DMG
      • 12 replies
    • Meow Tower - Nonogram Puzzle v3.4.701 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Meow Tower - Nonogram Puzzle By HyperBeard Inc.
      Bundle ID: com.grapetree.meowtower
      iTunes Store Link: https://apps.apple.com/us/app/meow-tower-nonogram-puzzle/id1579122980?uo=4


      🚀 Hack Features

      - ADS NO
      - Gold CANS
      - Pencil Max 
      - Hints Max
      • 23 replies
    • Meow Tower - Nonogram Puzzle v3.4.701 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Meow Tower - Nonogram Puzzle By HyperBeard Inc.
      Bundle ID: com.grapetree.meowtower
      iTunes Store Link: https://apps.apple.com/us/app/meow-tower-nonogram-puzzle/id1579122980?uo=4
       

      🚀 Hack Features

      - ADS NO
      - Gold CANS
      - Pencil Max 
      - Hints Max 
      • 30 replies
    • Gear Defenders v1.3.6 [ +10 Jailed ] Currency Max
      Modded/Hacked App: Gear Defenders By MOBIBRAIN TECHNOLOGY PTE. LTD.
      Bundle ID: com.iogames.gearworld
      App Store Link: https://apps.apple.com/us/app/gear-defenders/id6740892835?uo=4


      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited ADS Tickets
      - Unlimited Draw
      - Unlimited Battle Coins
      - Base HP
      - Gear Speed / Faster Deploy Trop
      - Unlimited Trop / Easy Win
      - ATK / Linked
      • 49 replies
    • Gear Defenders v1.3.6 [ +10 Cheats ] Currency Max
      Modded/Hacked App: Gear Defenders By MOBIBRAIN TECHNOLOGY PTE. LTD.
      Bundle ID: com.iogames.gearworld
      App Store Link: https://apps.apple.com/us/app/gear-defenders/id6740892835?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited ADS Tickets
      - Unlimited Draw
      - Unlimited Battle Coins
      - Base HP
      - Gear Speed / Faster Deploy Trop
      - Unlimited Trop / Easy Win
      - ATK / Linked
      • 26 replies
    • Cat Crunch - Match 3 Games v2.71 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Cat Crunch - Match 3 Games By Y factory
      Bundle ID: com.yfactorysoft.CatCrunch
      App Store Link: https://apps.apple.com/us/app/cat-crunch-match-3-games/id6471232053?uo=4

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Stars
      - Unlimited Booster.
      • 11 replies
    • Cat Crunch - Match 3 Games v2.71 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Cat Crunch - Match 3 Games By Y factory
      Bundle ID: com.yfactorysoft.CatCrunch
      App Store Link: https://apps.apple.com/us/app/cat-crunch-match-3-games/id6471232053?uo=4

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Stars
      - Unlimited Booster
      • 9 replies
    • Warventure: Stickman Clash v1.0.289 [ +14 Jailed ] Currency Max
      Modded/Hacked App: Warventure: Stickman Clash By Pusilung HK Limited
      Bundle ID: com.thp020.stickman.casual.war.game
      App Store Link: https://apps.apple.com/ph/app/warventure-stickman-clash/id6753664361?uo=4

      🤩 Hack Features

      - ADS No / Rewards Free
      - Speed 2X Active
      - Unlimited Gems
      - Unlimited Ruby / Hero & Pet Up
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Silver Keys
      - Unlimited Golden Keys
      - Unlimited Legendry Keys
      - Premium Pass Active +4
      - ATK / Equip
      - HP / Equip
      - DEF / Equip
      - iGG Speed / Faster Skip Wave

      Note:- Currency & Resources Visual But Works
      • 11 replies
    • Warventure: Stickman Clash v1.0.289 [ +14 Cheats ] Currency Max
      Modded/Hacked App: Warventure: Stickman Clash By Pusilung HK Limited
      Bundle ID: com.thp020.stickman.casual.war.game
      App Store Link: https://apps.apple.com/ph/app/warventure-stickman-clash/id6753664361?uo=4

      🤩 Hack Features

      - ADS No / Rewards Free
      - Speed 2X Active
      - Unlimited Gems
      - Unlimited Ruby / Hero & Pet Up
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Silver Keys
      - Unlimited Golden Keys
      - Unlimited Legendry Keys
      - Premium Pass Active +4
      - ATK / Equip
      - HP / Equip
      - DEF / Equip
      - iGG Speed / Faster Skip Wave

      Note:- Currency & Resources Visual But Works
      • 6 replies
    • Zombie Waves-shooting game v2.1.9 Jailed Cheats +6
      Modded/Hacked App: Zombie Waves-shooting game By FUN FORMULA PTE. LTD.
      Bundle ID: com.ddup.zombiewaves.zw
      App Store Link: https://apps.apple.com/us/app/zombie-waves-shooting-game/id6443760593?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - God Mode
      - Infinite Ammo
      - No Reload
      - Increase Magnet Range
      - High Damage X10
      - High Fire Rate

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/201966-zombie-waves-shooting-game-v212-jailed-cheats-6/
      • 114 replies
    • Goblin Miner: Idle Merger v3.14.0 [ +5 Cheats ] Coins Unlimited
      Modded/Hacked App: Goblin Miner: Idle Merger By ProGamesLab LTD
      Bundle ID: com.goblins.idle.merge.game
      App Store Link: https://apps.apple.com/us/app/goblin-miner-idle-merger/id6751527945?uo=4

      🤩 Hack Features

      - Unlimited Coins / Mine Upgrade
      - Unlimited Goblin Drop / No Limite
      - Goblin LvL Higher / Easy To Skip Time Mine / First Drop Goblin Then Chose Higher LvL
      - Unlimited Magic Dust
      - Ruby Pass
      • 27 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