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

    • Pocket Defense v310 GM Menu [+20 Jailed Cheats]
      Modded/Hacked App: Pocket Defense By RiftSky Games Co.,Limited
      Bundle ID: com.riftsky.fgt.gb.ios
      App Store Link: https://apps.apple.com/us/app/pocket-defense/id6744015186?uo=4



      🤩 Hack Features

      - Unlimited Currency
      - Unlock Privileges Packages (No Ads, Auto-Select Bless etc..)
      - GM Menu (Enable and open in-game setting GM Menu will be appear)
        • Winner
      • 0 replies
    • Pocket Defense v310 GM Menu [+20 Cheats]
      Modded/Hacked App: Pocket Defense By RiftSky Games Co.,Limited
      Bundle ID: com.riftsky.fgt.gb.ios
      App Store Link: https://apps.apple.com/us/app/pocket-defense/id6744015186?uo=4

       

      🤩 Hack Features

      - Unlimited Currency
      - Unlock Privileges Packages (No Ads, Auto-Select Bless etc..)
      - GM Menu (Enable and open in-game setting GM Menu will be appear)
       
        • Winner
      • 4 replies
    • Archero Cheats v7.1.2 +5 [ God Mode & More ]
      Modded/Hacked App: Archero by HABBY PTE. LTD.
      Bundle ID: com.habby.archero
      iTunes Store Link: https://apps.apple.com/us/app/archero/id1453651052?uo=4&at=1010lce4



      Hack Features:
      - Multiply Defense to
      - Multiply Damage to
      - God Mode
      - OHK (Must use with God Mode)
      - Freeze Enemies

      NOTE: If you want to use god mode and ohk turn off multiply damage and defense first. I added multiply damage and defense there to avoid ban


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/100710-archero-v210-enemies-dont-attack-x30-attack/


      Hack Download Link: https://iosgods.com/topic/96783-arm64-archero-cheats-v220-5/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 15,881 replies
    • MARVEL Strike Force: Squad RPG v9.3.0 +1 Cheats
      Modded/Hacked App: MARVEL Strike Force: Squad RPG By Scopely, Inc.
      Bundle ID: com.foxnextgames.m3
      iTunes Store Link: https://apps.apple.com/us/app/marvel-strike-force-squad-rpg/id1292952049?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing / or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - 1 Hit Kill [ Enable before stage ]
      - No Skill Cooldown
      - Auto Win¹
      - Only One Wave¹
      - Always Your Turn¹


      Notes:
      ¹ = Enable after game starts


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file is downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy to Filza.
      STEP 3: If necessary, tap on the downloaded file and then, you will need to press on 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - Zahir


      Cheat Video/Screenshots:

      N/A
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 454 replies
    • Journeys: Romance Stories v3.0.27 +2++ Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: Journeys: Romance Stories By Gameloft
      Bundle ID: com.otherguys.journeys
      App Store Link: https://apps.apple.com/us/app/journeys-romance-stories/id1458014773?uo=4

       
       

      🤩 Hack Features

      - Free Premium Choices
        • Like
      • 6 replies
    • Journeys: Romance Stories v3.0.27 +2++ Cheats [ Debug Menu ]
      Modded/Hacked App: Journeys: Romance Stories By Gameloft
      Bundle ID: com.otherguys.journeys
      App Store Link: https://apps.apple.com/us/app/journeys-romance-stories/id1458014773?uo=4

       


      🤩 Hack Features

      - Free Premium Choices
        • Like
      • 0 replies
    • MY LITTLE PONY: MAGIC PRINCESS v10.4.2 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: MY LITTLE PONY: MAGIC PRINCESS By Gameloft
      Bundle ID: com.gameloft.mylittlepony
      App Store Link: https://apps.apple.com/us/app/my-little-pony-magic-princess/id533173905?uo=4

       


      🤩 Hack Features

      - Freeze Coins
      - Freeze Gems
      - Freeze Hearts
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 344 replies
    • MY LITTLE PONY: MAGIC PRINCESS v10.4.2 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: MY LITTLE PONY: MAGIC PRINCESS By Gameloft
      Bundle ID: com.gameloft.mylittlepony
      App Store Link: https://apps.apple.com/us/app/my-little-pony-magic-princess/id533173905?uo=4

       
       

      🤩 Hack Features

      - Freeze Coins
      - Freeze Gems
      - Freeze Hearts
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 128 replies
    • Spacero: Hero Roguelike RPG v2.4.9 [ +3 Cheats ] ADS NO
      Modded/Hacked App: Space Quest: Alien Invasion By TryAgain Game Studio Korlatolt Felelossegu Tarsasag
      Bundle ID: com.tryagaingamestudio.spacelanders
      App Store Link: https://apps.apple.com/us/app/space-quest-alien-invasion/id1497499124?uo=4


      🤩 Hack Features

      - ADS Free [ Rewards Free ]
      - HP [ Hero Status Check ]
      - ATK [ Hero Status Check ]
        • Winner
        • Like
      • 4 replies
    • Spacero: Hero Roguelike RPG v2.4.9 [ +3 Jailed ] ADS NO
      Modded/Hacked App: Space Quest: Alien Invasion By TryAgain Game Studio Korlatolt Felelossegu Tarsasag
      Bundle ID: com.tryagaingamestudio.spacelanders
      App Store Link: https://apps.apple.com/us/app/space-quest-alien-invasion/id1497499124?uo=4


      🤩 Hack Features

      - ADS Free [ Rewards Free ]
      - HP [ Hero Status Check ]
      - ATK [ Hero Status Check ]
        • Like
      • 7 replies
    • Idle Army: Trading Weapons v1.16.2 [+5 Jailed Cheats]
      Modded/Hacked App: Idle Army: Trading Weapons By UNIMOB VIET NAM COMPANY LIMITED
      Bundle ID: com.unimob.idle.army
      App Store Link: https://apps.apple.com/us/app/idle-army-trading-weapons/id6670773625?uo=4



      🤩 Hack Features

      - Always Enough Resources (Gem, Skip Ads etc.)
      - Max Gold (Enable inside game)
      - 2x Game Speed (Enable inside game)
      - Kill Monster (Enable inside game)
      - Add All Pet

        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 42 replies
    • Idle Army: Trading Weapons v1.16.2 [+5 Cheats]
      Modded/Hacked App: Idle Army: Trading Weapons By UNIMOB VIET NAM COMPANY LIMITED
      Bundle ID: com.unimob.idle.army
      App Store Link: https://apps.apple.com/us/app/idle-army-trading-weapons/id6670773625?uo=4

       

      🤩 Hack Features

      - Always Enough Resources (Gem, Skip Ads etc.)
      - Max Gold (Enable inside game)
      - 2x Game Speed (Enable inside game)
      - Kill Monster (Enable inside game)
      - Add All Pet

        • Agree
        • 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