diff --git a/bin/install_tool b/bin/install_tool index 7fd4d6f..cf3d91e 100755 --- a/bin/install_tool +++ b/bin/install_tool @@ -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 diff --git a/dotfiles/gdbinit b/dotfiles/gdbinit index 657e3d0..2c809db 100644 --- a/dotfiles/gdbinit +++ b/dotfiles/gdbinit @@ -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):