Created
January 2, 2020 14:21
-
-
Save onewayticket255/e933963fb4d3846eae24d948f1a35502 to your computer and use it in GitHub Desktop.
Hook URLSession SSL Pinning
This file contains 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
%hook URLSessionManager | |
-(void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler { | |
NSLog(@"Enter Into"); | |
NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; | |
completionHandler(NSURLSessionAuthChallengeUseCredential, credential); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment