This file contains hidden or 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
doc = Document.getCurrentDocument() | |
seg = doc.getCurrentSegment() | |
adr = doc.getCurrentAddress() | |
dstStr = Document.ask("Enter destination address:") | |
if dstStr != None: | |
dst = int(dstStr, 16) | |
offset = dst - (adr + 6) | |
after = adr + 6 | |
while seg.getTypeAtAddress(after) == Segment.TYPE_NEXT: | |
after = after + 1 |
This file contains hidden or 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
# This sample script will search for the standard pattern that | |
# identifies a function's prolog, and mark each of them as a procedure | |
doc = Document.getCurrentDocument() | |
# First, we disassemble the whole segment | |
seg = doc.getCurrentSegment() | |
seg.disassembleWholeSegment() | |
addr = seg.getStartingAddress() |
This file contains hidden or 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
451841fcbaa9f7aef11a1a5ab417fd7f40a5 | |
6c | |
0f541ee6bbaff8bfec065c44aa69 | |
6c | |
0b5c1dfaa8bcbdbfb8491571c7 | |
440a5fbcaaefbda9f9150d48f805ad714fc9f7499d4bdc1c951d0dfdbe4cf43c518451a27f999a707eff5a41ebb8f853a65bcec477042da8e18e63e46bcbb6410069979fdde1aa25585c11b303e344 | |
025f5cedfababeaaa846044eab05f3254c9bfe4bc84adc18c44f0ff9b91cf03f5f8852ff7bc1927628ae0f41bcb7a407a25bcbc727047baebb8c3ae8639ae640513e9dcbd9e7ac260a5d43be51e344 | |
535d5cbbaae2edf8fd16541ffd51a07216ccad4d9d1a881d994b5af1ee4cf26f0a8651f92dc99f752cfe0912bcb6a204a402cd952a067ff9ebd833b639cae616003f96cf8ee7ae73025b1fbe56e344 | |
560056bef1eaedaaae410712fb54a324199ffd1ccf4f8b1bc44a59fdb919f56a588951ab2cc19c712afe5c41eae6f303e54ff4 | |
440b5dbdaaebeaa9fb16574caf02f3711dcaaa49924adc18c11d0ff8bc4fa43c5b8455f97d9998702ba40c41eeb8f352f50098c024052aafbc8d37e463cbb645516d99988ae1a8215b5c17b251e344 |
This file contains hidden or 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
# cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/ | |
# grep -H UI_APPEARANCE_SELECTOR ./* | sed 's/ UI_APPEARANCE_SELECTOR;//' | |
./UIActivityIndicatorView.h:@property (readwrite, nonatomic, retain) UIColor *color NS_AVAILABLE_IOS(5_0); | |
./UIBarButtonItem.h:- (void)setBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics NS_AVAILABLE_IOS(5_0); | |
./UIBarButtonItem.h:- (UIImage *)backgroundImageForState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics NS_AVAILABLE_IOS(5_0); | |
./UIBarButtonItem.h:- (void)setBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state style:(UIBarButtonItemStyle)style barMetrics:(UIBarMetrics)barMetrics NS_AVAILABLE_IOS(6_0); | |
./UIBarButtonItem.h:- (UIImage *)backgroundImageForState:(UIControlState)state style:(UIBarButtonItemStyle)style barMetrics:(UIBarMetrics)barMetrics NS_AVAILABLE_IOS(6_0); | |
./UIBarButt |
This file contains hidden or 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
#requires yasm to be at /usr/local/bin | |
from subprocess import call | |
asmFile = "/tmp/tmp.s" | |
binFile = "/tmp/tmp.o" | |
doc = Document.getCurrentDocument() | |
seg = doc.getCurrentSegment() | |
addr = doc.getCurrentAddress() | |
asm = Document.ask("Enter instruction:") |
This file contains hidden or 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
code = 0x90 | |
doc = Document.getCurrentDocument() | |
seg = doc.getCurrentSegment() | |
addr = doc.getCurrentAddress() | |
instr = seg.getInstructionAtAddress(addr) | |
last = addr + instr.getInstructionLength() |
This file contains hidden or 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
#include <stdio.h> | |
#include <dlfcn.h> | |
#include <execinfo.h> | |
typedef void (*cxa_throw_type)(void *, void *, void (*) (void *)); | |
cxa_throw_type orig_cxa_throw = 0; | |
void load_orig_throw_code() | |
{ | |
orig_cxa_throw = (cxa_throw_type) dlsym(RTLD_NEXT, "__cxa_throw"); |
This file contains hidden or 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
@interface Singleton : NSObject | |
+ (instancetype)sharedInstance; | |
@end |
This file contains hidden or 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
[OHHTTPStubs addRequestHandler:^OHHTTPStubsResponse *(NSURLRequest *request, BOOL onlyCheck) { | |
NSData *responseData = [@"[]" dataUsingEncoding:NSUTF8StringEncoding]; | |
return [OHHTTPStubsResponse responseWithData:responseData statusCode:200 responseTime:1 headers:@{}]; | |
}]; | |
__block BOOL done = NO; | |
[[CheckOperation checkOperationForJobWithURLString:@"" username:@"" password:@"" completionBlock:^(NSNumber *buildNumber, kJobStatus status, NSError *error) { | |
STAssertNil(error, @"error should be nill for '[]'"); | |
STAssertNil(buildNumber, @"buildNumber should be nill for '[]'"); | |
STAssertEquals(status, kJobStatusUnknown, @"status should be Unknown for '[]'"); |
This file contains hidden or 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
#!/bin/bash | |
NIBNAME=${@%/} | |
read -d '' EMPTYPLIST <<"EOF" | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
</dict> |