Add support for gef.

This commit is contained in:
David Tomaschik
2019-09-02 21:30:11 -07:00
parent 5353336b9d
commit ac2b8650b8
2 changed files with 14 additions and 1 deletions

View File

@@ -237,6 +237,16 @@ case ${TOOL} in
# capstone package is broken
cp ${PY_PACKAGES}/usr/lib/*/dist-packages/capstone/libcapstone.so ${PY_PACKAGES}/capstone
;;
gef)
if ! which gdb > /dev/null 2>&1 ; then
echo 'No gdb available!' >/dev/stderr
exit 1
fi
mkdir -p ${DESTDIR}
download \
https://github.com/hugsy/gef/raw/master/gef.py \
${DESTDIR}/gef.py
;;
*)
echo "Unknown tool: ${TOOL}" >/dev/stderr
echo "Options:" >/dev/stderr

View File

@@ -26,9 +26,12 @@ end
python
import sys
import os.path
gef = os.path.expanduser('~/tools/gef/gef.py')
pwndbg = os.path.expanduser('~/tools/pwndbg/gdbinit.py')
peda = os.path.expanduser('~/.peda/peda.py')
if os.path.isfile(pwndbg):
if os.path.isfile(gef):
gdb.execute('source {}'.format(gef))
elif os.path.isfile(pwndbg):
sys.path.insert(0, os.path.expanduser('~/tools/pwndbg/vendor'))
gdb.execute('source {}'.format(pwndbg))
elif os.path.isfile(peda):