Jump to content

How to hook a boolean with an argument?


Go to solution Solved by Rook,

35 posts in this topic

Recommended Posts

Posted

 

- (BOOL)canLikeWithTime:(double)fp8 {   
     return true(9999);
}

 

Instead fp8 you can write what you want. This is just the way I do it (and Apple). The first function variable which is BOOL here always comes first. Put the arguments in brackets.

Posted (edited)

Wait it should be return true;9999;* castilx made a mistake didnt he?

It tells me expected a ";" after true and when i put it another error appears with the 9999 they tell me to put "~~~~" :weed:

Updated by mehdiphone
Posted

Try this:

-(BOOL)canLikeWithTime:(double)fp8 {
%orig(true, 9999);
}
%end
Posted

#import <UIKit/UIKit.h>

%hook LikeTaskDB

 

-(BOOL)canLikeWithTime:(double)fp8 {

%orig(true, 9999);

}

%end

 

%hook AppDelegate

-(void)applicationDidBecomeActive:(id)argument {

UIAlertView *alert = [[uIAlertView alloc] initWithTitle:@"Swag hack" message:@"Hacked by mehdi visit more at ios gods.com" delegate:nil cancelButtonTitle:@"Thanx" otherButtonTitles:nil];

[alert show];

[alert release];

}

%end

  • Solution
Posted

#import <UIKit/UIKit.h>

%hook LikeTaskDB

 

-(BOOL)canLikeWithTime:(double)fp8 {

%orig(true, 9999);

}

%end

 

%hook AppDelegate

-(void)applicationDidBecomeActive:(id)argument {

UIAlertView *alert = [[uIAlertView alloc] initWithTitle:@"Swag hack" message:@"Hacked by mehdi visit more at ios gods.com" delegate:nil cancelButtonTitle:@"Thanx" otherButtonTitles:nil];

[alert show];

[alert release];

}

%end

#import <UIKit/UIKit.h>

%hook LikeTaskDB
- (BOOL)canLikeWithTime:(double)fp8 {   
     return TRUE;
     fp8 = 9999;
}
%end

%hook AppDelegate
-(void)applicationDidBecomeActive:(id)argument {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Swag hack" message:@"Hacked by mehdi visit more at iosgods.com" delegate:nil cancelButtonTitle:@"Thanx" otherButtonTitles:nil];
[alert show];
[alert release];
}
%end 

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