Update installation instructions

This commit is contained in:
Zach Riggle 2016-05-11 19:36:26 -07:00
parent d13b9e85ce
commit cdbff116d6
5 changed files with 35 additions and 47 deletions

8
.gitmodules vendored Normal file
View File

@ -0,0 +1,8 @@
[submodule "capstone"]
path = capstone
url = https://github.com/aquynh/capstone
branch = next
[submodule "unicorn"]
path = unicorn
url = https://github.com/unicorn-engine/unicorn
branch = master

View File

@ -18,53 +18,8 @@ Best supported on Ubuntu 14.04 with default `gdb` or `gdb-multiarch` (e.g. with
```sh
git clone https://github.com/zachriggle/pwndbg
echo "source $PWD/pwndbg/gdbinit.py" >> ~/.gdbinit
```
### Prerequisites
#### Python Development Headers
These will be needed to build other Python modules below.
```sh
sudo apt-get install python-dev python3-dev python-pip python3-pip
```
#### Capstone 4.0
Currently this is only available via a source build. Be sure to install to the *system* Python; GDB will completely ignore your virtualenv / pyenv.
```sh
git clone https://github.com/aquynh/capstone
cd capstone
git checkout -t origin/next
sudo ./make.sh install
cd bindings/python
sudo python2 setup.py install # Ubuntu 12.04, GDB uses Python2
sudo python3 setup.py install # Ubuntu 14.04+, GDB uses Python3
```
#### Unicorn Engine
Currently this is only available via a source build. Be sure to install to the *system* Python; GDB will completely ignore your virtualenv / pyenv.
```sh
sudo apt-get install libglib2.0-dev
git clone https://github.com/unicorn-engine/unicorn
cd unicorn
sudo ./make.sh install
cd bindings/python
sudo python2 setup.py install # Ubuntu 12.04, GDB uses Python2
sudo python3 setup.py install # Ubuntu 14.04+, GDB uses Python3
```
#### Python
There are some other Python requirements which are easier to install.
```sh
pip install -Ur requirements.txt
cd pwndbg
./setup.sh
```
## Features

1
capstone Submodule

@ -0,0 +1 @@
Subproject commit 4d36deb1b6e19824644cbb50e62fc311b5569400

23
setup.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash -ex
sudo apt-get update
sudo apt-get install python-dev python3-dev python-pip python3-pip libglib2.0-dev
# Update all submodules
git submodule update --init --recursive
# Install Python dependencies
sudo pip install -Ur requirements.txt
PYTHON=$(gdb -batch -q --nx -ex 'pi import sys; print(sys.executable)')
for directory in capstone unicorn; do
pushd $directory
sudo ./make.sh install
cd bindings/python
sudo ${PYTHON} setup.py install
popd
done
if ! grep pwndbg ~/.gdbinit &>/dev/null; then
echo "source $PWD/pwndbg/gdbinit.py" >> ~/.gdbinit
fi

1
unicorn Submodule

@ -0,0 +1 @@
Subproject commit 4b3bbe4759fe0f4764aefef6a8354897076504f0