Skip to content

Instantly share code, notes, and snippets.

@singleghost
Created November 20, 2018 02:54
Show Gist options
  • Save singleghost/27078ec11339156a31faf069dd52a010 to your computer and use it in GitHub Desktop.
Save singleghost/27078ec11339156a31faf069dd52a010 to your computer and use it in GitHub Desktop.
lldb脚本
settings set target.load-cwd-lldbinit true
command script import ~/.lldb/pwn_debug.py
#command script import /usr/local/opt/chisel/libexec/fblldb.py
#command script import /Users/dddong/softwares/WebKit-git/Tools/lldb/lldb_webkit.py
command alias bp breakpoint
command alias bpl breakpoint list
command alias bfl breakpoint set -f %1 -l %2
command alias stack memory read -c %1 -f "x" -s 8 $rsp
command alias bc breakpoint set -a $rip
command alias PC expression -- $r8
command alias bPC breakpoint set -f LowLevelInterpreter64.asm -l 27 -c $r8 == %1
command regex f s/^$/finish/ 's/([0-9]+)/frame select %1/'
# Print v8 handle value.
command regex -h 'Print content of a v8 handle' jhd 's/(.+)/job (*(%1.location_))/'
command regex job 's/(.+)/expression -- *(JSObject *) %1/'
command regex jstr 's/(.+)/expression -- *(JSString *) %1/'
command regex jarr 's/(.+)/expression -- *(JSArray *) %1/'
command regex butterfly 's/(.+)/memory read -f "x" -s 8 "((JSObject *)%1)->m_butterfly.m_value"/'
command regex ab_backing_store 's/(.+)/expression -- ((JSArrayBuffer *) %1)->impl()->data()/'
command regex telescope 's/(.+)/memory read -f "x" -s 8 -c 20 "%1"/'
command alias history command history
command alias pwd platform shell pwd
command alias ls platform shell ls
command alias ll platform shell ls -a -l
command alias vi platform shell vi
command regex ll 's/.*/platform shell ls -a -l/'
command alias mapinfo memory region
command alias pid script lldb.process.id
command alias py script
command alias setargs settings set target.run-args
command alias showargs settings show target.run-args
command alias delete breakpoint delete
command alias disable breakpoint disable
command alias enable breakpoint enable
command regex b1 's/(.+)/breakpoint set -t 1 -r %1/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment