由于新版pwntools默认对接的是py3,但是大多数师傅还是习惯用py2来编写exp。而且py2和py3有着较大差异、脚本不能互通,且主流写法仍然是py2的语法。本教程不适用于ubuntu18,快速安装会导致libc2.27更新,添加double free检测,导致堆环境偏差过大,该版本建议找已经搭好了的师傅索要一份。
在ubuntu内搜索software & update
,在源中找到other
选项,找到国内源,挑一个自己喜欢的。
之后执行。
sudo apt-get update
sudo apt update
sudo apt-get install lib32z1 lib32ncurses5 git
sudo apt-get install -y libffi-dev libssl-dev
sudo apt install python #新版本ubuntu可能不会集成py2,而且不能通过python-dev来获取
pip2不在apt库内,只能手动安装。
get-2.7.pip
curl http://www.ericdshen.com/2.7get-pip.py >2.7get-pip.py
sudo python 2.7get-pip.py
python -m pip install -U setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple/
python -m pip install cryptography==2.4.2 -i https://pypi.tuna.tsinghua.edu.cn/simple/
python -m pip install pwntools -i https://pypi.tuna.tsinghua.edu.cn/simple/
git clone https://github.com/longld/peda.git ~/peda
echo "source ~/peda/peda.py" >> ~/.gdbinit
至此一个简单的pwn环境就搭好了,如有其它需求可自行添加。
全部评论 (共 1 条评论)