mirror of
https://github.com/zardus/ctf-tools
synced 2024-12-12 14:02:33 +00:00
37 lines
616 B
Bash
Executable file
37 lines
616 B
Bash
Executable file
#!/bin/bash -ex
|
|
|
|
git clone --depth 1 https://github.com/pwndbg/pwndbg
|
|
|
|
source ctf-tools-venv-activate
|
|
|
|
pushd pwndbg
|
|
pip install -Ur ./requirements.txt
|
|
|
|
git submodule update --init --recursive
|
|
popd
|
|
|
|
mkdir bin
|
|
cat >> bin/pwndbg <<EOF
|
|
#!/bin/sh
|
|
exec gdb -q -ex init-pwndbg "\$@"
|
|
EOF
|
|
chmod +rx bin/pwndbg
|
|
|
|
cd pwndbg
|
|
# make sure gdbinit exists
|
|
touch ~/.gdbinit
|
|
if ! grep "init-pwndbg" ~/.gdbinit; then
|
|
cat >> ~/.gdbinit <<EOF
|
|
|
|
####
|
|
# added by ctf-tools
|
|
define init-pwndbg
|
|
source $PWD/gdbinit.py
|
|
end
|
|
document init-pwndbg
|
|
Initializes the pwndbg gdb extension (https://github.com/pwndbg/pwndbg)
|
|
end
|
|
####
|
|
|
|
EOF
|
|
fi
|