Skip to content

Instantly share code, notes, and snippets.

@danpashin
Created October 22, 2022 07:44
Show Gist options
  • Save danpashin/51a6a3c42128bbe3ad7c3d88c485501a to your computer and use it in GitHub Desktop.
Save danpashin/51a6a3c42128bbe3ad7c3d88c485501a 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