|
|
|
|
@ -8,16 +8,23 @@ git submodule update --init --recursive
|
|
|
|
|
# Install Python dependencies
|
|
|
|
|
sudo pip install -Ur requirements.txt
|
|
|
|
|
|
|
|
|
|
# Find the path to the Python interpreter used by GDB.
|
|
|
|
|
PYTHON=$(gdb -batch -q --nx -ex 'pi import sys; print(sys.executable)')
|
|
|
|
|
|
|
|
|
|
# Find the path to the Python2 interpreter needed by the Unicorn install process.
|
|
|
|
|
export UNICORN_QEMU_FLAGS="--python=$(which python2)"
|
|
|
|
|
|
|
|
|
|
# Install both Unicorn and Capstone
|
|
|
|
|
for directory in capstone unicorn; do
|
|
|
|
|
pushd $directory
|
|
|
|
|
git clean -xdf
|
|
|
|
|
sudo ./make.sh install
|
|
|
|
|
cd bindings/python
|
|
|
|
|
sudo ${PYTHON} setup.py install
|
|
|
|
|
popd
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Load Pwndbg into GDB on every launch.
|
|
|
|
|
if ! grep pwndbg ~/.gdbinit &>/dev/null; then
|
|
|
|
|
echo "source $PWD/pwndbg/gdbinit.py" >> ~/.gdbinit
|
|
|
|
|
fi
|
|
|
|
|
|