ObjC
RunLoop
doorxp 发表于2017-02-23 浏览4106 评论0
RunLoop是一种事件处理循环机制,类似于中断处理,它可以监听一个或多个定时器源(Timer Sources)和输入源(Input
Sources),当没有事件时,它让线程休眠;当有事件发生时,系统唤醒线程,把事件放入RunLoop队列,RunLoop再分发给用户指定的事件处理入口函数。由此可以看出,RunLoop是为了低功耗而设计的,它不会浪费CPU的时间,不会阻止CPU进入低功耗模式,对于对功耗敏感的移动终端来说,在恰当的场合使用它能让你的程序获得更好的性能。RunLoop我们可以通过
ObjC
iOS 原生二维码扫描代码.
doorxp 发表于2017-02-15 浏览4722 评论0
self.captureSession = [[AVCaptureSession alloc] init];
NSError *error;
// Set camera capture device to default and
ObjC
iOS 原生二维码生成代码.
doorxp 发表于2017-02-15 浏览4265 评论0
@implementation UIImage (QR)
+ (UIImage *)qrImageForString:(NSString *)string imageSize:(CGFloat)Imagesize {
CIFilter *filter = [CIFilte
Apple
iOS 获取ip地址
doorxp 发表于2017-02-15 浏览4332 评论0
这写头文件是用于获取ip等系列功能的#include <arpa/inet.h>#include <netdb.h>
#include <net/if.h>
#include <ifaddrs.h>#import <dlfcn.h>
#import <SystemConfiguration/SystemConfiguration.h> 获
THEOS
obfuscated key / key
doorxp 发表于2017-02-09 浏览5438 评论0
struct tKeyMapping
{
const char * obfuscatedKey;
const char * key;
};
static const struct tKeyMapping&n
THEOS
libMobileGestalt.dylib crashed when Hooking MGCopyAnswer for ARM64
doorxp 发表于2017-02-09 浏览6661 评论0
You cannot hook MGCopyAnswer directly because it is too short.When CydiaSubstrate hooks a C function, it sorts of overwrites an assembly version of goto your_function;
at the beginning of the original function. This "goto" in ARM64 is 16
Apple
Bypass SSL certificate validation - including certificate pinning - within iOS Apps
doorxp 发表于2017-02-07 浏览4046 评论0
https://github.com/doorxp/ios-ssl-kill-switch
Apple
三种经典iPhone上网络抓包方法详解
doorxp 发表于2017-02-06 浏览4034 评论0
很多时候需要网络抓包分析,在iPhone上抓包稍有不同,下面介绍三种常用的方式。分析工具以wireshark为例。一、最简单的方式:用PC作为热点,在PC上抓包优点:简单缺点:不能抓真机2g/3g/4g网络数据步骤如下:1、PC接上有线2、PC用wifi方式共享网络,即PC作为一个热点。3、手机设置网络,选择PC那个热点4、在PC上打开wireshark,选择要监控的接口,指定wifi端口,开始捕捉。二、tcpdump命令优点:优点很多,可以做很高级的定制和选择,可以编程控制缺点:两个,一是手机
Apple
How to Decode iPhone Serial Number --- old
doorxp 发表于2017-02-06 浏览6597 评论0
In case you are not aware, the serial
number provides some interesting information about your iPhone,
including the week it was manufactured and the factory id.Folks at OS X Daily
tell us that the serial number on the iPhone tells you the week
THEOS
LockMeNow!
doorxp 发表于2017-02-04 浏览4838 评论0
My iPhone 5 lock button is not working properly, so I wrote this application.Locking the iDeviceSince I want to lock the device, I need to be able to trigger the same functionality iOS does when the lock button is hit.
However, Apple does not play n