-
-
Save Mabdelwanis/16ce488e0bde3497a39cfa9dc112e337 to your computer and use it in GitHub Desktop.
VK for iOS SSL pinning bypass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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