View FromHeader.cs
using System;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
View pin256.sh
#!/usr/bin/env bash -e
HOST=${1:-cloudflare.com}
FILENAME=${2:-${HOST%%.*}}
# For file naming, see https://support.ssl.com/Knowledgebase/Article/View/19/0/der-vs-crt-vs-cer-vs-pem-certificates-and-how-to-convert-them
# For HTTP Public Key Pinning (HPKP), see https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning
CERTIFICATE_PEM="${FILENAME}_certificate.ascii.crt"
CERTIFICATE_DER="${FILENAME}_certificate.crt"
PUBKEY_PEM="${FILENAME}_pubkey.ascii.key"
View CompatibilitySSLSocketFactory.java
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
View NSProgressHandlers.m
#import <Foundation/Foundation.h>
int main(int argc, char *argv[])
{
@autoreleasepool
{
NSProgress *progress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
progress.cancellationHandler = ^{
NSLog(@"cancel");
};
View Emoji-iOS-10.0-14A5322e.json
{
"People" : [
{
"Symbol" : "πŸ˜€",
"Name" : "GRINNING FACE"
},
{
"Symbol" : "😬",
"Name" : "GRIMACING FACE"
},
View NSURLSessionTaskTransactionMetrics.txt
secureConnectionStart
β”‚
β”‚ secureConnectionEnd
domainLookupStart β”‚ β”‚ responseStart
β”‚ β”‚ β”‚ β”‚
β”‚ connectStart β”‚ β”‚β”‚ connectEnd β”‚
fetchStart β”‚ β”‚ β”‚ β”‚β”‚ β”‚ responseEnd
β”‚ β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€ β”‚ β”‚
β”‚ β”‚ β”‚ TCP β”‚ TLS β”‚ β”‚ β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€
View ClientCertificate.m
#import <Foundation/Foundation.h>
@interface Delegate : NSObject <NSURLConnectionDelegate, NSURLSessionDataDelegate>
@end
@implementation Delegate
#pragma mark - NSURLConnectionDelegate
- (void) connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
View NSJSONSerializationError.m
// http://twitter.com/nicklockwood/status/690540488433274881
// @0xced hmm, you're right. So under what circumstances *does* it populate the error param? Why even have it at all?
// http://twitter.com/0xced/status/690543445404991488
// @nicklockwood Just disassembled again, seems it can errors if a string fails to convert to UTF8. @nst021 Idea how to produce such a string?
// http://twitter.com/mikeash/status/690564095322542081
// mikeash: @0xced @nicklockwood @nst021 Maybe try an NSString containing half of a surrogate pair.
#import <Foundation/Foundation.h>
View MPMoviePlayerViewController.m
@implementation MPMoviePlayerViewController
- (void) _moviePlayerViewController_playbackDidFinishNotification:(NSNotification *)notification
{
if (self.presentingViewController.presentedViewController == self)
{
UIViewController *presentingViewController = self.presentingViewController;
if (self->_internal->_wasDisplayedAnimated)
[presentingViewController dismissMoviePlayerViewControllerAnimated];
else
View UIClassSwapper.m
@implementation UIClassSwapper
- (instancetype) initWithCoder:(UINibDecoder *)decoder
{
NSString *className = [decoder decodeObjectForKey:@"UIClassName"];
NSString *originalClassName = [decoder decodeObjectForKey:@"UIOriginalClassName"];
Class class = NSClassFromString(className);
Class originalClass = NSClassFromString(originalClassName);