Search the Community
Showing results for tags 'How to make simple mshook twe'.
Found 1 result
-
I`m not very familiar with mshook since i mostly use code inject but in a few cases it can come handy.What we do here is hooking into a class in objective-c classes and overwrite it with our code.I have released some tweaks for apps (not games) using mshook to unlock paid content, make things free, etc... but you can also hack games with it (very rarely in my opinion or i just didn`t look good enough :P) and make unlimited money for example or even 1 hit kill. Basically anything that is stored in classes instead of binary.[hide] [hide]First we need to dump the classes, i prefer FLEX 3 (i`ll post tutorial later). Find a class we can hook into. (I`ll come up with some random class names, don`t take it as reference)Found one called "PlayerData" Relevant methods i found in PlayerData:-(int) Gold-(long long) Gem-(double) ATK-(float) DEF-(id) HP-(bool) isCooldown-(void) AtkSpeed-(void) WalkSpeed:(int)Alright, lets make our code. Create a project in THEOS. ($THEOS/bin/nic.pl - in case you didnt remember) Start with hooking into the class: PlayerData, open up tweak.xm, delete everything. %hook PlayerData -(int)Gold{ return 133337; } -(long long) Gem{ return 133337; } -(double) ATK{ return 133337; } // as you can see those three returned the same way, return value as integer. -(float) DEF { return 133337.7f; } // floating value need to end .nf -(id) HP { return [NSNumber numberWithInteger:133337]; } //id can be whatever you want. You can return a value, boolean even a string. Very important to call the correct NSClass to hack it correctly. -(bool) isCooldown { return FALSE; } // simple boolean logic, return TRUE or FALSE -(void) AtkSpeed{ //voids without arguments can`t be edited -(void) WalkSpeed:(int)arg1 { arg1 = 133337; } //Voids with arguments can be hacked. You need to name the argument for w/e you want and add a value to it. You can also return id and bool. -(void)isCooldown:(bool)arg2 { arg2 = FALSE; } -(void)HP:(id)arg3 { arg3 = [NSNumber numberWithInteger:133337]; } Thats pretty much it. Compile the tweak and we are done.[/hide] [/hide]Credits:Killerdon(Infinite Hacks)