Jump to content

What am I doing wrong?


Go to solution Solved by mitosis,

6 posts in this topic

Recommended Posts

Posted (edited)

App: Betternet VPN

//Begin BetternetUser
%hook BetternetUser
-(void) setIsPremium:(bool) {
  %orig(TRUE);
}
-(bool) isPremium {
  return TRUE;
}
-(bool) allowedPremium {
  return TRUE;
}
%end
//Begin CRFLabelUpdater
%hook CRFLabelUpdater
+(void) setPremiumStage:(int) {
  %orig(1);
}
%end
Attempted making an MSHook - tested in flex (working) I have no idea why this isn't working and honestly just need some help.
Updated by Mocha
Posted

*10 hour bump.

The code with the void methods aren't right :p You're supposed to set the argument to true then call %orig() with it.

 

Like so:

 

%hook BetterNetuser

- (void)setIsPremium:(BOOL)arg1 {
arg1 = true;
%orig(arg1);
}

and

 

%hook CRFLabelUpdater
+ (void)setPremiumStage:(int)arg1 {
arg1 = 1;
%orig(arg1);
}

arg1 could be any name it doesn't matter.

Posted (edited)

The code with the void methods aren't right :p You're supposed to set the argument to true then call %orig() with it.

 

Like so:

 

%hook BetterNetuser

- (void)setIsPremium:(BOOL)arg1 {
arg1 = true;
%orig(arg1);
}
and

 

%hook CRFLabelUpdater
+ (void)setPremiumStage:(int)arg1 {
arg1 = 1;
%orig(arg1);
}
arg1 could be any name it doesn't matter.

 

//Begin BetternetUser
%hook BetternetUser
- (void)setIsPremium:(BOOL)arg1 {
arg1 = true;
%orig(arg1);
}
- (bool)isPremium {
return true;
}
- (bool)allowedPremium {
return true;
}
%end
//Begin CRFLabelUpdater
%hook CRFLabelUpdater
+ (void)setPremiumStage:(int)arg1 {
arg1 = 1;
%orig(arg1);
}
%end
Still can't get it to work D:
Updated by Mocha
  • Solution
Posted (edited)
//Begin BetternetUser
%hook BetternetUser
- (void)setIsPremium:(BOOL)arg1 {
arg1 = true;
%orig(arg1);
}
- (bool)isPremium {
return true;
}
- (bool)allowedPremium {
return true;
}
%end
//Begin CRFLabelUpdater
%hook CRFLabelUpdater
+ (void)setPremiumStage:(int)arg1 {
arg1 = 1;
%orig(arg1);
}
%end
Still can't get it to work D:

 

//Begin BetternetUser
%hook BetternetUser
- (void)setIsPremium:(BOOL)arg1 {
arg1 = true;
%orig(arg1);
}
- (bool)isPremium {
return true;
}
- (bool)allowedPremium {
return true;
}
%end
//Begin CRFLabelUpdater
%hook CRFLabelUpdater
+ (void)setPremiumStage:(int)arg2 {
arg2 = 1;
%orig(arg2);
}
%end

I am not sure about this, but try it out

Updated by mitosis

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