apogiatzis / gdb-peda-pwndbg-gef

A script to automatically install Peda+pwndbg+GEF plugins for gdb
391 stars 79 forks source link

Recommendation: for position independent install location #5

Closed 0xebjc closed 3 years ago

0xebjc commented 4 years ago

Description:

Following the install instructions from the git repo directs the user to install to their home directory ~/ It would be better to allow the user to pick the location, for example installing standard applications for all user to access /opt/peda-pwddbg-gef/

Unfortunately the install.sh has hard coded ~/ to locate installed components.

Steps to reproduce

$ cd /opt $ sudo mkdir ./peda-pwndbg-gef $ chown user:user ./peda-pwndbg-gef $ cd ./peda-pwndbg-gef $ git clone https://github.com/soaringk/gdb-peda-pwndbg-gef.git ./ $ ./install.sh

Recommendation

Suggest adding the following to the install.sh:

cd "$(dirname "$0")"

To set the install.sh to current working directory, then change most ~/ to ./ and only reference the ~/ when modifying the .gdbinit file

0xebjc commented 3 years ago

andrewbae fixed this issue and it was merged by apogiatzis, thanks for the fix!

https://github.com/apogiatzis/gdb-peda-pwndbg-gef/pull/6