A complete gdb to lldb command map.
- Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
- p - Print primitive type
| #!/bin/bash | |
| # | |
| # NOTE: You need to `brew install gnu-sed` on Mac | |
| # | |
| # by @codecolorist | |
| # http://github.com/chichou | |
| # | |
| # fix some compilation error of headers generated by class-dump | |
| # | |
| # usage: fixheader.sh DIRECTORY |
| ''' | |
| Break on Objective-C 's method using its address' | |
| ''' | |
| import shlex | |
| import lldb | |
| import re | |
| def breakonmethod(debugger, command, exe_ctx,result, internal_dict): | |
| args=shlex.split(command) | |
| Class=args[0] | |
| Method=args[1] |
| var CryptoJS = require('crypto-js') | |
| var request = require('request-promise') | |
| /* | |
| * npm install crypto-js request-promise request | |
| * node wx_t1t_hack.js | |
| */ | |
| // export function testEncription(msg, fullKey) { | |
| // var fullKey = fullKey.slice(0, 16) |
| #!/usr/bin/env python2 | |
| # lrdcq | |
| # usage python2 unwxapkg.py filename | |
| import sys, os | |
| import struct | |
| class WxapkgFile(object): | |
| nameLen = 0 |
A complete gdb to lldb command map.
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
Assume LLVM Source tree is located at ../LLVM
The -DLLVM_CREATE_XCODE_TOOLCHAIN=on is only useful for macOS users that requires an Xcode Toolchain to use within Xcode.
This enables an extra target called install-xcode-toolchain.
Add -DCMAKE_INSTALL_PREFIX=~/Library/Developer/ installs the Toolchain for the current user.
To install the toolchain globally, replace with -DCMAKE_INSTALL_PREFIX=/Library/Developer/ and invoke sudo ninja install-xcode-toolchain
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DLLVM_APPEND_VC_REV=on -DLLVM_CREATE_XCODE_TOOLCHAIN=on -DCMAKE_INSTALL_PREFIX=~/Library/Developer/ ../LLVM
| UIWebClip *clip = [UIWebClip webClipWithIdentifier:nil]; | |
| //UIWebClip *clip = [UIWebClip webClipWithURL:[webpage.request.mainDocumentURL absoluteString]]; | |
| [clip retain]; | |
| [clip setPageURL:webpage.request.mainDocumentURL]; | |
| [clip setTitle:[webpage stringByEvaluatingJavaScriptFromString:@"document.title"]]; | |
| UIWebDocumentView *docView = nil; | |
| UIScrollView *webpagescroller = [[webpage subviews] objectAtIndex:0]; | |
| for (UIView* aView in [webpagescroller subviews]){ | |
| if ([aView isKindOfClass:[NSClassFromString(@"UIWebBrowserView") class]]){ | |
| docView = (UIWebDocumentView *)aView; |
| #!/usr/bin/env bash | |
| TABLENAME=symbols | |
| SYMBOL_DB_FILE="symbols" | |
| STRING_SYMBOL_FILE="func.list" | |
| HEAD_FILE="$PROJECT_DIR/$PROJECT_NAME/codeObfuscation.h" | |
| export LC_CTYPE=C | |
| #维护数据库方便日后作排重 | |
| createTable() |
| /** | |
| * 返回截取到的图片 | |
| * | |
| * @return UIImage * | |
| */ | |
| - (UIImage *)imageWithScreenshot | |
| { | |
| NSData *imageData = [self dataWithScreenshotInPNGFormat]; | |
| return [UIImage imageWithData:imageData]; | |
| } |
| #define MYBUNDLE_NAME @"hecardpackNFCBundle.bundle" | |
| #define MYBUNDLE_PATH [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent: MYBUNDLE_NAME] | |
| #define MYBUNDLE [NSBundle bundleWithPath: MYBUNDLE_PATH] | |
| + (NSString*)appVersionCode{ | |
| //获取的版本号 | |
| // NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; | |
| //取KNStaticBundle.bundle 的版本号与独立版本的版本号保存一致 | |
| NSDictionary *infoDictionary = [MYBUNDLE infoDictionary]; | |
| NSString *appVersionCode = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; | |
| if (appVersionCode.length > 0) { |