mirror of
https://github.com/zardus/ctf-tools
synced 2024-11-10 08:24:12 +00:00
Added pwndbg gdb plugin. Adapted peda install to allow switching.
gdb now doesn't automatically load peda or pwndbg, instead provide init-X function and provide wrapper scripts
This commit is contained in:
parent
84da02786c
commit
b84c8f9b06
2 changed files with 54 additions and 1 deletions
26
peda/install
26
peda/install
|
@ -1,5 +1,29 @@
|
|||
#!/bin/bash
|
||||
set -eu -o pipefail
|
||||
|
||||
git clone --depth 1 https://github.com/longld/peda.git
|
||||
|
||||
mkdir bin
|
||||
cat > bin/gdb-peda <<EOF
|
||||
#!/bin/sh
|
||||
exec gdb -q -ex init-peda $@
|
||||
EOF
|
||||
chmod +rx bin/gdb-peda
|
||||
|
||||
cd peda
|
||||
echo "source $PWD/peda.py" >> ~/.gdbinit
|
||||
#echo "source $PWD/peda.py" >> ~/.gdbinit
|
||||
if ! grep "init-peda" ~/.gdbinit; then
|
||||
cat >> ~/.gdbinit <<EOF
|
||||
|
||||
####
|
||||
# added by ctf-tools
|
||||
define init-peda
|
||||
source $PWD/peda.py
|
||||
end
|
||||
document init-peda
|
||||
Initializes the PEDA (Python Exploit Development Assistant for GDB) framework
|
||||
end
|
||||
####
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
|
29
pwndbg/install
Normal file
29
pwndbg/install
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
set -eu -o pipefail
|
||||
|
||||
git clone --depth 1 git clone https://github.com/zachriggle/pwndbg
|
||||
|
||||
mkdir bin
|
||||
cat >> bin/pwndbg <<EOF
|
||||
#!/bin/sh
|
||||
exec gdb -q -ex init-pwndbg $@
|
||||
EOF
|
||||
chmod +rx bin/pwndbg
|
||||
|
||||
cd pwndbg
|
||||
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/zachriggle/pwndbg)
|
||||
end
|
||||
####
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
Loading…
Reference in a new issue