Jump to content

Hooking method(s) with a dot class in Flex to Tweak.xm


13 posts in this topic

Recommended Posts

In some of the apps, when you try to hack a class with a  "." or a dot function.

nKz8Kcz.png

 

Flex to Tweak.xm Tutorial:

https://iosgods.com/topic/904-tutorialvideo-hack-games-with-flex-and-convert-it-to-deb-tweak/

There are more on this kind, check them out!

 

Let's get started!

In Flex, it would work fine, but when you try to convert flex to tweak.xm and make package.

It gives you an error, "error: cannot use dot operator on a type"

*I don't hack this application, it's an example to solve this issue*

 

Using the tutorial, flex to tweak.xm.

I get this,

%hook OkCupid.OKMessage
-(BOOL)read {
return TRUE;
}
%end

It will throw me an error after "make package" command in terminal.

 

A way around the error template:

%hook AnyRandomNameHere
- (id)description {
    return %orig();
}
%end

%ctor {
    %init(AnyRandomNameHere = objc_getClass("ClassNameWithADotHere"));
}

 

Now, I will convert it in this way.

Final Code:

%hook CupidMess
-(BOOL)read {
return TRUE;
}
%end

%ctor {
    %init(CupidMess = objc_getClass("OkCupid.OKMessage"));
};

I saved the file and use "make package" command and it proceed without error!

 

 

Adding 2 or more dot functions Guide

 

 

 

Regular: Throws error


%hook OkCupid.OKMessage
-(BOOL)read {
return TRUE;
}
%end

%hook OkCupid.OKProfileQuestions
-(BOOL)showUnansweredState {
return FALSE;
}
%end

Wrong way:


%hook CupidMess
-(BOOL)read {
return TRUE;
}
%end

%hook CupidQ
-(BOOL)showUnansweredState {
return FALSE;
}
%end

%ctor {
    %init(CupidMess = objc_getClass("OkCupid.OKMessage"));
    %init(CupidQ = objc_getClass("OkCupid.OKProfileQuestions"));
};

Throws "error: re-%init of %group _ungrouped, first initialized at Tweak.xm:xx"

 

A way around the error template:


%hook AnyRandomNameHere
- (id)description {
    return %orig();
}
%end

%hook AnyRandomNameHere2
- (bool)description {
    return %orig();
}
%end

%ctor {
    %init(AnyRandomNameHere = objc_getClass("ClassNameWithADotHere"), AnyRandomNameHere2 = objc_getClass("ClassNameWithADotHere2"));
  	/* Add a comma "," between both function. 
    AnyRandomNameHere = objc_getClass("ClassNameWithADotHere")
    AnyRandomNameHere2 = objc_getClass("ClassNameWithADotHere2")
  	*/
}

 

Final Code:


%hook CupidMess
-(BOOL)read {
return TRUE;
}
%end

%hook CupidQ
-(BOOL)showUnansweredState {
return FALSE;
}
%end


%ctor {
    %init(CupidMess = objc_getClass("OkCupid.OKMessage"), CupidQ = objc_getClass("OkCupid.OKProfileQuestions"));
};

I saved the file and use "make package" command and it proceed without error!

 

 

Credits:

@Amuyea for this tutorial.

@AnotherLurker for this post regard to this issue in Help & Support.

https://iosgods.com/topic/41019-theos-errorswift/?do=findComment&comment=1340552

 

Updated by Amuyea
  • Like 7
  • Winner 2
  • Thanks 2
  • Agree 1
1 minute ago, xiaov said:

i was looking for method to replace the Class Name last night. Thanks @Amuyea

You are welcome :p

Updated by Amuyea

saved my day

P.S.: Do not use tabulator or other white spaces after "%init(", it will interpret it as an illegal classname (using theos git from 30.01.2018). After the first argument you are free to use what you want for pretty printing.

Updated by wallis

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Our picks

    • Zooba: Zoo Battle Royale Game v4.69.2 Jailed Cheats +2
      Modded/Hacked App: Zooba: Zoo Battle Royale Games By Wildlife Studios Limited
      Bundle ID: com.fungames.battleroyale
      iTunes Store Link: https://apps.apple.com/us/app/zooba-zoo-battle-royale-games/id1459402952?uo=4


      Hack Features:
      - Map Hacks
      - Allow Shoot in Water


      Jailbreak required hack(s): https://iosgods.com/topic/131104-arm64-zooba-zoo-battle-royale-game-cheats-all-versions-2/


      iOS Hack Download Link: https://iosgods.com/topic/131134-arm64-zooba-zoo-battle-royale-game-v320-jailed-cheats-2/
      • 1,222 replies
    • [Hack] DRAGON BALL Z DOKKAN BATTLE v5.25.1 +3 Cheats! [iOS 17/18]
      Modded/Hacked App: DRAGON BALL Z DOKKAN BATTLE by BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcogames.BNGI0221
      iTunes Store Link: https://itunes.apple.com/us/app/dragon-ball-z-dokkan-battle/id951627425


      Hack Features:
      - High Damage
      - High Defense
      - High HP

       

      Jailbroken hack: https://iosgods.com/topic/26098-updated-dragon-ball-z-dokkan-battle-v312-3-cheats/
      DRAGON BALL Z DOKKAN BATTLE Discussions Club: https://iosgods.com/clubs/23-dragon-ball-z-dokkan-battle-club/
      • 1,618 replies
    • Legend of Solgard v2.51.0 +3 Cheat [God Mode & Damage]
      Modded/Hacked App: Legend of Solgard By King
      Bundle ID: com.midasplayer.apps.solgard
      iTunes Store Link: https://itunes.apple.com/us/app/legend-of-solgard/id1281263906?mt=8&uo=4&at=1010lce4


      Mod Requirements:
      - Jailbroken or Non-Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly.
      - A Computer Running Windows/Mac/Linux.


      Hack Features:
      - x Player Damage - x1 - 30
      - God Mode / Never Die
      - Auto Kill Enemies

      All features are unlinked and only for player, you!
      • 191 replies
    • DRAGON BALL Z DOKKAN BATTLE v5.25.1 +3 Cheats!
      [Updated] DRAGON BALL Z DOKKAN BATTLE Cheats!
      Modded/Hacked App: DRAGON BALL Z DOKKAN BATTLE By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcogames.BNGI0221
      iTunes Link: https://itunes.apple.com/us/app/dragon-ball-z-dokkan-battle/id951627425


      Hack Features:
      - Unlimited HP - (Put .0 at the back of your value: 1111.0)
      - Unlimited Damage - (Put .0 at the back of your value: 1111.0)
      - Unlimited Defense - (Put .0 at the back of your value: 1111.0)
      - Dice Hack
      - Auto Win Battles
      PUT .0 at the back of all values!

      Dice hack doesn't work for tournaments, not recommended to use during one
      Auto Win HIGH RISK OF BAN when used in tournaments

      ViP Version: https://iosgods.com/topic/48201-dragon-ball-z-dokkan-battle-v311-5-cheats-ips4-celebration/
      Non-Jailbroken Version: https://iosgods.com/forum/78-vip-non-jailbroken-hacks-cheats/
      DRAGON BALL Z DOKKAN BATTLE Discussions Club: https://iosgods.com/clubs/23-dragon-ball-z-dokkan-battle-club/
      • 13,178 replies
    • DRAGON BALL Z DOKKAN BATTLE v5.25.1 +7 Cheats [ iOS 16/17/18 Support ]
      Modded/Hacked App: DRAGON BALL Z DOKKAN BATTLE By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcogames.BNGI0221
      iTunes Link: https://itunes.apple.com/us/app/dragon-ball-z-dokkan-battle/id951627425


      Hack Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - Unlimited HP  -  (Put .0 at the back of your value: 1000.0)<br style="color:#555555">- Unlimited Damage  -  (Put .0 at the back of your value: 1000.0)<br style="color:#555555">- Unlimited Defense  -  (Put .0 at the back of your value: 1000.0)<br style="color:#555555">- Dice Hack -  [ONLY RANGE BETWEEN 1 - 6 or it will crash]  -  (Put .0 at the back of your value: 4.0)
      - Dice Hack 1, 2, 3
      - Dice Hack 4, 5, 6
      - Auto Win Battles

      Non-Jailbroken version of this hack: https://iosgods.com/topic/37875-hack-dragon-ball-z-dokkan-battle-v2120-3-cheats-ios-10/
      Free version of this hack: https://iosgods.com/topic/26098-updated-dragon-ball-z-dokkan-battle-v330-3-cheats/
      DRAGON BALL Z DOKKAN BATTLE Discussions Club: https://iosgods.com/clubs/23-dragon-ball-z-dokkan-battle-club/


      Hack Download Link:
      https://iosgods.com/topic/48201-dragon-ball-z-dokkan-battle-v331-7-cheats-ips4-celebration/

      Credits:
      - @ZahirSher
      - @DiDA
      • 2,394 replies
    • Tap Titans 2 v7.6.2 +3 [ iOS 18 Supported ]
      Modded/Hacked App: Tap Titans 2 By Game Hive Corporation
      Bundle ID: com.gamehivecorp.taptitans2
      iTunes Store Link: https://itunes.apple.com/us/app/tap-titans-2/id1120294802

      Hack Features:
      - Freeze Gold -> Gold Won't Subtract
      - Freeze Mana -> Mana Won't Subtract
      - x10 Gold Drop -> Drop More Gold than Usual
      Only works on x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, SE, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later.


      Jailbroken version of this hack: https://iosgods.com/topic/58609-iosgods-vip-tap-titans-2-v210-6-cheats/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 1,961 replies
    • Modded/Hacked App: Tap Titans 2 by Game Hive Corporation
      Bundle ID: com.gamehivecorp.taptitans2
      iTunes Store Link: https://itunes.apple.com/us/app/tap-titans-2/id1120294802


      Hack Features:
      - Custom Gold ( type your custom amount enable do a few taps collect some gold then disable )
      - Custom DPS  ( type your custom amount wait for NAN then disable )
      - Custom mana ( type your custom amount use skill)

      - ALL FEATURES BELOW REQUIRE NOT ENOUGH MANA AND SKILL UNLOCKED 

      TO USE ENABLE THE HACK SET MANA TO 0 WIT CUSTOM MANA THEN TAP SKILL BUTTON WATCH THE VIDEO TO SEE 

      - Use swipe perk for free 

      - Use doom perk for free 

      - Use make it rain perk free

      - Use clan make it rain perk free

      - Use double damage perk free 

       


      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/
      • 3,556 replies
    • Bullet Force v1.102.7 +10 Cheats [Radar Hack]
      Modded/Hacked App: Bullet Force by Blayze Games, L.L.C.
      Bundle ID: com.blayzegames.iosfps
      iTunes Store Link: https://itunes.apple.com/us/app/bullet-force/id1009134067

      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Cydia Impactor.
      - A Computer Running Windows/Mac/Linux.


      Hack Features:
      - Radar Hack - Shows all enemies on the radar.
      - Instant Reload
      - Anti-Flash - Flashbangs have no effect.
      • 597 replies
    • [FREE] Bullet Force v1.102.6 +10 Cheats [Shoot Through Walls]
      Modded/Hacked App: Bullet Force By Blayze Games, L.L.C.
      Bundle ID: com.blayzegames.iosfps
      iTunes Store Link: https://itunes.apple.com/us/app/bullet-force/id1009134067


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - Unlimited Ammo + Increased Fire Rate - Both are linked. I can't unlink them, sorry.
      - Shoot Through Walls - Doesn't work for all walls.
      - ESP - Shows enemies nametags through walls.
      - Radar Hack - Shows all enemies on the radar.
      - Unlock All Perks
      - Instant Reload
      - Anti-Flash - Flashbangs have no effect.
      - Unlimited Throwables - Will not decrease. Works online, kinda.
      • 3,731 replies
    • DRAGON BALL Z DOKKAN BATTLE Japan (ドラゴンボールZ ドッカンバトル) v5.25.1 +7 Cheats!
      Modded/Hacked App: ドラゴンボールZ ドッカンバトル By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcogames.BNGI0211
      iTunes Link: https://itunes.apple.com/jp/app/ドラゴンボールz-ドッカンバトル/id951627670


      Hack Features
      - Unlimited HP  -  (Put .0 at the back of your value: 1000.0)
      - Unlimited Damage  -  (Put .0 at the back of your value: 1000.0)
      - Unlimited Defense  -  (Put .0 at the back of your value: 1000.0)
      - Dice Hack -  [ONLY RANGE BETWEEN 1 - 6 or it will crash]  -  (Put .0 at the back of your value: 4.0)
      - Dice Hack 1, 2, 3
      - Dice Hack 4, 5, 6
      - Auto Win Battles -> Disable if you get errors.
      PUT .0 at the back of all values!
      • 7,921 replies
    • Modded/Hacked App: Kritika: The White Knights by GAMEVIL Inc.
      Bundle ID: com.gamevil.kritikam.ios.apple.global.normal
      iTunes Store Link: https://apps.apple.com/us/app/kritika-the-white-knights/id865958296

      Hack Features:
      - Infinite Potions (Increase instead of decrease)
      - Infinite Mana
      - No Potion Cooldown
      - Instant EX Gauge Fill
      - God Mode / Never Die
      - No Stage Timer -> Added upon request.

      This hack works on the latest x64 or ARM64 & ARM64e iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, Xr, Xs, Xs Max, 11, 11 Pro, 11 Pro Max, 12, 12 Pro, 12 Pro Max, 12 Mini, 13, 13 Pro, 13 Pro Max, 13 Mini, 14, 14 Plus, 14 Pro, 14 Pro Max, SE, iPod Touch 6G, 7G, iPad Air, Air 2, iPad Pro & iPad Mini 2, 3, 4, 5, 6 and later.
      Jailbroken version of this hack: https://iosgods.com/topic/44092-vip-exclusive-kritika-the-white-knights-v2412-15-cheats/
      • 1,420 replies
    • [Free] Asphalt 8: Airborne Hack v8.1.1 +4 Cheats
      Modded/Hacked App: Asphalt 8: Airborne by Gameloft
      Bundle ID: com.gameloft.asphalt8
      iTunes Store Link: https://apps.apple.com/us/app/asphalt-8-airborne/id610391947


      Hack Features:
      - Unlimited Nitro Use / Nitro Doesn't Decrease
      - No Car Crash / No Wrecks
      - Anti-Ban -> Does not mean you can abuse the hack.
      - No Rank Required to do Mastery Missions

      This hack only works on x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later. This hack is an In-Game Mod Menu (iGMM). In order to activate the Mod Menu, tap on the iOSGods button found inside the app.

      ViP version of this hack with more features: https://iosgods.com/topic/39095-vip-asphalt-8-airborne-v321-13-cheats/
      Non-Jailbroken version of this hack: https://iosgods.com/topic/38140-hack-asphalt-8-airborne-v310-4-cheats-for-jailed-idevices-ios-10/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 8,856 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