Jump to content

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


13 posts in this topic

Recommended Posts

Updated (edited)

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
Posted (edited)
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
Posted (edited)

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

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

    • Gear Defenders v1.1.3 [ +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
        • Thanks
        • Like
      • 3 replies
    • Gear Defenders v1.1.3 [ +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
        • Winner
        • Like
      • 4 replies
    • Happy Citizens - Mayor Sim v1.4.15 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Happy Citizens - Mayor Sim By MIYA TECH LIMITED
      Bundle ID: com.miyagames.happycitizen.ios
      App Store Link: https://apps.apple.com/ca/app/happy-citizens-mayor-sim/id6745251520?uo=4


      🤩 Hack Features

      - Gems
      - Cash
      - Energy
      - Water
        • Agree
        • Winner
        • Like
      • 15 replies
    • Happy Citizens - Mayor Sim v1.4.15 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Happy Citizens - Mayor Sim By MIYA TECH LIMITED
      Bundle ID: com.miyagames.happycitizen.ios
      App Store Link: https://apps.apple.com/ca/app/happy-citizens-mayor-sim/id6745251520?uo=4

       
      🤩 Hack Features

      - Gems
      - Cash
      - Energy
      - Water
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 24 replies
    • Idle Five - Basketball Manager v1.48.2 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Idle Five - Basketball Manager By Gaminho
      Bundle ID: com.gaminho.idlefivebasketball
      iTunes Store Link: https://apps.apple.com/us/app/idle-five-basketball-manager/id1539155867?uo=4

       

      🤩 Hack Features

      - Currency
      - Resources
      - ViP Active
      - ADS NO
        • Agree
        • Thanks
        • Winner
        • Like
      • 12 replies
    • Idle Five - Basketball Manager v1.48.2 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Idle Five - Basketball Manager By Gaminho
      Bundle ID: com.gaminho.idlefivebasketball
      iTunes Store Link: https://apps.apple.com/us/app/idle-five-basketball-manager/id1539155867?uo=4
       

      🤩 Hack Features

      - Currency
      - Resources
      - ViP Active
      - ADS NO
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 13 replies
    • Domino Dreams™ v1.47.2 [ +10 Cheats ] Auto Win
      Modded/Hacked App: Domino Dreams™ By SuperPlay LTD
      Bundle ID: com.superplaystudios.dominodreams
      iTunes Store Link: https://apps.apple.com/us/app/domino-dreams/id6444043291?uo=4



      🤩 Hack Features

      - Coins Unlimited [ LvL Rewards ]

      - Stars Unlimited [ Win LvL Then Back Show Stars Hacked Disable Cheat Close App Again Open Then Work Stars Don't Use Again ] Linked With Some Task

      - Ticket Free Max [ Linked With Stars ] LvL Cost

      - Undo Max [ Linked With Stars ] 

      - Gold Card Max [ Linked With Stars ] 

      - Chapter Next [ Play LvL Quit & Win ]

      - Avatar Unlocked [ Play LvL Win After Unlocked Don"t Use Again ]

      - Auto Win LvL [ Play LvL Move Anything ] 

      - Bonus Mod LvL [ ON-OFF ] 

      - Spin Free [ Need One Point only Open Play LvL ]
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 33 replies
    • Domino Dreams™ v1.47.2 [ +10 Jailed ] Auto Win
      Modded/Hacked App: Domino Dreams™ By SuperPlay LTD
      Bundle ID: com.superplaystudios.dominodreams
      iTunes Store Link: https://apps.apple.com/us/app/domino-dreams/id6444043291?uo=4


      🤩 Hack Features

      - Coins Unlimited [ LvL Rewards ]
      - Stars Unlimited [ Win LvL Then Back Show Stars Hacked Disable Cheat Close App Again Open Then Work Stars Don't Use Again ] Linked With Some Task
      - Ticket Free Max [ Linked With Stars ] LvL Cost
      - Undo Max [ Linked With Stars ] 
      - Gold Card Max [ Linked With Stars ] 
      - Chapter Next [ Play LvL Quit & Win ]
      - Avatar Unlocked [ Play LvL Win After Unlocked Don"t Use Again ]
      - Auto Win LvL [ Play LvL Move Anything ] 
      - Bonus Mod LvL [ ON-OFF ] 
      - Spin Free [ Need One Point only Open Play LvL ]
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 50 replies
    • Merge Clash Tower Defense V14.0 [ +6 Cheats ] Currency Max
      Modded/Hacked App: Merge Clash: Tower Defense By Block Puzzle Games Inc.
      Bundle ID: merge.clash
      iTunes Store Link: https://apps.apple.com/us/app/merge-clash-tower-defense/id1506854108?uo=4


      Hack Features:
      - Gems Max

      - Gold Max

      - DMG Multi

      - ATK Range Multi

      - Critical Multi

      - ATK Tower CD
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 53 replies
    • Merge Clash Tower Defense V14.0 [ +6 Jailed ] Currency Max
      Modded/Hacked App: Merge Clash: Tower Defense By Block Puzzle Games Inc.
      Bundle ID: merge.clash
      iTunes Store Link: https://apps.apple.com/us/app/merge-clash-tower-defense/id1506854108?uo=4


      Hack Features:

      - Gems Max

      - Gold Max

      - DMG Multi

      - ATK Range Multi

      - Critical Multi

      - ATK Tower CD
        • Informative
        • Haha
        • Winner
        • Like
      • 37 replies
    • Goblin Miner: Idle Merger v3.8.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
        • Haha
        • Winner
        • Like
      • 3 replies
    • Goblin Miner: Idle Merger v3.8.0 [ +5 Jailed ] 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
        • Agree
        • Thanks
        • Like
      • 5 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