mac安装pwntools(python3.8)解决多数问题

mac安装pwntools(python3.8)解决多数问题

博客说明

文章所涉及的资料来自互联网整理和个人总结,意在于个人学习和经验汇总,如有什么地方侵权,请联系本人删除,谢谢!

安装pwntools

贴一下官方文档地址

http://docs.pwntools.com/en/stable/install/binutils.html#mac-os-x

采用homebrew 安装

brew install pwntools

一顿等待之后

image-20200504233911277

配置python

进入python目录

/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages

创建mypath.pth

image-20200505000007082

把下面的这段话写上去

/usr/local/Cellar/pwntools/4.0.1_1/libexec/lib/python3.8/site-packages

image-20200505112846865

发现有错误,提示我们安装binutils

安装binutils

export ARCH='amd64'
brew install https://raw.githubusercontent.com/Gallopsled/pwntools-binutils/master/osx/binutils-$ARCH.rb

还是报错,是因为地址的问题,改动了一下

image-20200505113617248

brew install https://raw.githubusercontent.com/Gallopsled/pwntools-binutils/master/macos/binutils-amd64.rb

使用下面的命令发现可以安装

image-20200505114236032

测试

>>> import pwn

>>> pwn.asm("xor eax,eax")

b'1\xc0'

image-20200505114408766

发现已经成功,遇到了好多坑

感谢

万能的网络

以及勤劳的自己

原创文章 345 获赞 866 访问量 6万+

猜你喜欢

转载自blog.csdn.net/qq_45163122/article/details/105930242