command alias pcc process connect connect://127.0.0.1:1234

command regex mload 's/(.+)/expression -lobjc -O -- void *handle = (void *)dlopen("%1", 2); id retVal = handle ? @"Success" : (NSString *)[[NSString alloc] initWithUTF8String:(char *)dlerror()]; retVal/'

command alias rr register read $x0 $x1 $x2 $x3 $x4 $x5 $x6 $x7 $x8 $x9 $x16 $pc $lr $sp

command regex pclass 's/(([0-9]|\$|\@|\[).*)/po [%1 class]/'

command regex pbpaste -h "paste string to iOS device pasteboard" -s "pbpaste string_you_want" 's/(.+)/expression -F Foundation -O -- id obj = objc_msgSend((Class)objc_getClass("UIPasteboard"), @selector(generalPasteboard));id str = objc_msgSend((id)obj, @selector(setString:), @"%1"); str/'

command regex pbcopy -h "get string from iOS device pasteboard" 's/(.*)/expression -F Foundation -O -- id obj = objc_msgSend((Class)objc_getClass("UIPasteboard"), @selector(generalPasteboard));id str = objc_msgSend((id)obj, @selector(string)); str/'

command regex pwindow -h "po key window" 's/(.*)/expression -F Foundation -O -- id obj = [[[UIApplication sharedApplication] keyWindow] recursiveDescription]; obj/'

command regex data 's/(.+)/mem read  `(void *)[$1 bytes]` -c `(long)[$1 length]`/'

settings set target.x86-disassembly-flavor intel

settings set stop-disassembly-count 8

settings set target.max-string-summary-length 30000

setting set target.max-memory-read-size 0xffffffffffffffff

command regex xi 's/(.+)/disassemble -c 0x10 -s %1-0x8*4/'

command alias dfuc disassemble -a %1

command alias wpc register write $pc %1

command alias waddr watchpoint set expression -w read_write -s 1 -- %1

command alias scppexp breakpoint set -E c++

command alias socexp breakpoint set -E objc

pcc
