MacOSX(MacOS10.11)安装pwntools失败的最新解决
方案
气瓶 现场处置方案 .pdf气瓶 现场处置方案 .doc见习基地管理方案.doc关于群访事件的化解方案建筑工地扬尘治理专项方案下载
pwntools是一个CTF框架和漏洞利用开发库,用Python开发,由rapid设计,旨在让使用者简单快速的编写exploit。网上针对MacOS的安装教程大多都是基于pip安装的方式,无果,官方Github也没有相关的安装指南,文档于2016年就未再给出新的解决方案。AppleStore在2017年在Homebrew提供了对pwntools的软件包的支持,给出了如下的解决方案。PressCommand+SpaceandtypeTerminalandpressenter/returnkey.RuninTerminalapp:ruby-e"$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"/dev/nullandpressenter/returnkey.Ifthescreenpromptsyoutoenterapassword,pleaseenteryourMac'suserpasswordtocontinue.Whenyoutypethepassword,itwon'tbedisplayedonscreen,butthesystemwouldacceptit.SojusttypeyourpasswordandpressENTER/RETURNkey.Thenwaitforthecommandtofinish.Run:brewinstallpwntoolsDone!Youcannowusepwntools.针对上述解决方案,我尝试着进行了安装,未果,原因可能是因为MacOS版本太低的问题,也通过Python的pip安装,brew安装的方式去尝试,都是失败,自己尝试编译源代码还是失败,最后查了一下资料,原来是缺少Capstone,最终的解决方案在stackoverflow上找到了。Capstone是一个轻量级的多平台多架构支持的反汇编框架。支持包括ARM,ARM64,MIPS和x86/x64平台。最终的解决方案如下:capstone==3.0.5stilltriestobuildforbothi386andx86_64,thisisalreadyfixedonmasterandwillbereleasedwiththenextversion.LookingattheMakefile,therearetwopossibilities:TurnoffMACOS_UNIVERSAL:$MACOS_UNIVERSAL=nopipinstallcapstoneInstallthedevelopmentversionfromcurrentmasterbranch,withLIBARCHSalreadyadaptedforMojave:$pipinstall"git+https://github.com/aquynh/capstone.git#egg=capstone&subdirectory=bindings/python"Makesureyouusequotesinthelastcommandorescapetheampersand(&),otherwisebashwillcutthecommandandruninbackgroundinstead.Oncecapstoneisinstalled,youwillhavetodealwithunicorninthesamemannerandfinallyshouldbeabletoinstallpwntools.Ididn'ttestitanymore,buttheone-linerfortheinstallationwillbe$MACOS_UNIVERSAL=nopipinstallpwntools参考文献InstallingpwntoolsonmacOSCapstone_MakefileApple_Store_pwntools -全文完-