参考链接:https://blog.csdn.net/bitsec/article/details/80995876

使用最简单的安装方法:

sudo pip install pwntools

但安装出现错误:

You must install the Python development headers!
$ apt-get install python-dev

apt-get install python-dev

又出现如下错误:

The following packages have unmet dependencies:
python2.7-dev : Depends: python2.7 (= 2.7.6-8) but 2.7.6-8ubuntu0.2 is to be installed
Depends: libpython2.7-dev (= 2.7.6-8) but it is not going to be installed
Depends: libpython2.7 (= 2.7.6-8) but 2.7.6-8ubuntu0.2 is to be installed
Depends: libexpat1-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

安装python-dev:

apt-get install python-dev

pip install pwntools

又出现下面错误

Found existing installation: pyserial 2.6
Cannot uninstall ‘pyserial’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

使用命令sudo pip install --ignore-installed pwntools

安装成功!!!

有时安装后python使用import pwn或者命令直接checksec报错

第54行原来是from elftools.elf.enums import ENUM_P_TYPE改成from elftools.elf.enums import ENUM_P_TYPE_BASE,ubuntu执行checksec,成功

Categories: pwn

1 Comment

Sushi By 7-11 · March 6, 2019 at 4:05 pm

Thankfulness to my father who told me concerning this webpage,
this blog is actually amazing.

Leave a Reply

Your email address will not be published. Required fields are marked *