diff --git a/README.md b/README.md index 9d436f3..f28e0c4 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Installers for the following tools are included: | binary | [hongfuzz](https://github.com/google/honggfuzz) | A general-purpose, easy-to-use fuzzer with interesting analysis options. | | binary | [libheap](https://github.com/cloudburst/libheap) | gdb python library for examining the glibc heap (ptmalloc) | | binary | [miasm](https://github.com/cea-sec/miasm) | Reverse engineering framework in Python. | +| binary | [one_gadget](https://github.com/david942j/one_gadget) | Magic gadget search for libc. | | binary | [panda](https://github.com/moyix/panda) | Platform for Architecture-Neutral Dynamic Analysis. | | binary | [pathgrind](https://github.com/codelion/pathgrind) | Path-based, symbolically-assisted fuzzer. | | binary | [peda](https://github.com/longld/peda) | Enhanced environment for gdb. | diff --git a/one_gadget/install b/one_gadget/install new file mode 100755 index 0000000..095072c --- /dev/null +++ b/one_gadget/install @@ -0,0 +1,27 @@ +#!/bin/bash -ex + +gem install --user-install one_gadget + +GEM_BIN_PATH=$(gem environment | grep "USER INSTALL" | awk -F ': ' '{ print $2 }')/bin + +MAGIC="# ctf-tools: gem install" +for f in ~/.bashrc ~/.zshrc; do + if [[ -e "$f" ]]; then + if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then + cat >> "$f" << EOF +$MAGIC +export PATH=\$PATH:$GEM_BIN_PATH +EOF + fi + fi +done + +f=~/.config/fish/config.fish +if [[ -e "$f" ]]; then + if ! grep "$MAGIC" "$f" >/dev/null 2>&1; then + cat >> "$f" << EOF +$MAGIC +set -x PATH \$PATH $GEM_BIN_PATH +EOF + fi +fi