Skip to content

Instantly share code, notes, and snippets.

@Mabdelwanis
Forked from danpashin/main.x
Created November 30, 2023 22:19
Show Gist options
  • Select an option

  • Save Mabdelwanis/16ce488e0bde3497a39cfa9dc112e337 to your computer and use it in GitHub Desktop.

Select an option

Save Mabdelwanis/16ce488e0bde3497a39cfa9dc112e337 to your computer and use it in GitHub Desktop.
VK for iOS SSL pinning bypass
#import <Foundation/Foundation.h>
#import <Security/Security.h>
typedef NS_ENUM(NSInteger, TSKTrustDecision) {
TSKTrustDecisionShouldAllowConnection,
TSKTrustDecisionShouldBlockConnection,
TSKTrustDecisionDomainNotPinned,
};
%hook TSKPinningValidator
- (TSKTrustDecision)evaluateTrust:(SecTrustRef)certificate forHostname:(NSString *)hostname {
return TSKTrustDecisionDomainNotPinned;
}
%end
%hook Cronet
+ (void)setEnablePublicKeyPinningBypassForLocalTrustAnchors:(BOOL)enable {
%orig(YES);
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment