Skip to content

Instantly share code, notes, and snippets.

@Adam0101
Adam0101 / UIAlertViewStyleLoginAndPassword.m
Created November 6, 2011 21:36
UIAlertViewStyleLoginAndPassword
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 1) {
NSLog(@"Username:%@",[[alertView textFieldAtIndex:0] text]);
NSLog(@"Password:%@",[[alertView textFieldAtIndex:1] text]);
}
}
@chuquus
chuquus / README.md
Last active July 10, 2017 11:22
自用shadowsocks
@Blankwonder
Blankwonder / iPhone X
Created September 21, 2018 03:44
Surge Benchmark
AEAD Provider: CommonCrypto (Hadrware acceleration)
Generating random data (100.00MB)
Start benchmark rc4
Encrypt data in 0.215s
Decrypt data in 0.257s
Data integrity check completed
Start benchmark rc4-md5
Encrypt data in 0.176s
Decrypt data in 0.256s
Data integrity check completed
@axiixc
axiixc / AXMutableOrderedDictionary.h
Created April 29, 2011 18:06
A mutable ordered dictionary collection for Objective-C.
@interface AXMutableOrderedDictionary : NSMutableDictionary <NSMutableCopying> {
@private
NSMutableArray * _keys;
NSMutableDictionary * _dict;
}
+ (id)newWithCapacity:(NSUInteger)initialCapacity;
+ (id)newWithOrderedDictionary:(AXMutableOrderedDictionary *)otherDictionary;
+ (id)newWithObjects:(NSArray *)objects forKeys:(NSArray *)keys;
//
// NSObject+BlockObservation.h
// Version 1.0
//
// Andy Matuschak
// andy@andymatuschak.org
// Public domain because I love you. Let me know how you use it.
//
#import <Cocoa/Cocoa.h>
@darkseed
darkseed / Reachability.h
Created August 30, 2011 23:16 — forked from dhoerl/Reachability.h
Reachability (iOS) ARCified
/*
File: Reachability.h
Abstract: Basic demonstration of how to use the SystemConfiguration Reachablity APIs.
Version: 2.2 - ARCified
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
("Apple") in consideration of your agreement to the following terms, and your
use, installation, modification or redistribution of this Apple software
name download_total
AFNetworking 61983241
Fabric 50998892
Crashlytics 49667729
SDWebImage 45471101
Alamofire 42097177
CocoaLumberjack 36071914
Bolts 35294870
FirebaseInstanceID 30277793
FirebaseAnalytics 30254593
@Valthoron
Valthoron / xcode-build-bump.sh
Last active December 9, 2022 10:22 — forked from sekati/xcode-build-bump.sh
Set a timestamp as the build number when an Xcode project is compiled.
# xcode-build-timestamp.sh
# @desc Set a timestamp as the build number when the project is compiled.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Target dependencies"
buildNumber=$(date +%Y%m%d%H%M)
Whenever I try using Frida from the official repo https://build.frida.re I kept getting the following errors after which my device panics and restarts:
default 15:46:47.251624 +0530 kernel AMFI: '/private/var/tmp/frida-D8kjW6.dylib' has no CMS blob?
default 15:46:47.251817 +0530 kernel AMFI: '/private/var/tmp/frida-D8kjW6.dylib': Unrecoverable CT signature issue, bailing out.
Looks like codesigning/entitlements issue. Here are the steps I followed to get Frida Running on a jailbroken iOS 12 device
Downloads Latest version of Frida from https://github.com/frida/frida/releases. In my case it was frida-server-12.4.0-ios-arm64.xz.
xz -d frida-server-12.4.0-ios-arm64.xz
scp frida-server-12.4.0-ios-arm64 root@<ios-device-ip>:/usr/bin/frida-server
@ankurs
ankurs / thread.c
Created September 2, 2009 15:50
A Simple Pthread example
#include<pthread.h>
#include<stdio.h>
// a simple pthread example
// compile with -lpthreads
// create the function to be executed as a thread
void *thread(void *ptr)
{
int type = (int) ptr;
fprintf(stderr,"Thread - %d\n",type);