Mac OSX(Mac OS10.11) 安装 pwntools 失败的最新解决方案

简介: Mac OSX(Mac OS10.11) 安装 pwntools 失败的最新解决方案

pwntools是一个 CTF 框架和漏洞利用开发库,用 Python 开发,由 rapid 设计,旨在让使用者简单快速的编写 exploit。

网上针对 Mac OS 的安装教程大多都是基于 pip 安装的方式,无果,官方 Github 也没有相关的安装指南,文档于2016年就未再给出新的解决方案。Apple Store 在 2017 年在 Homebrew 提供了对 pwntools 的软件包的支持,给出了如下的解决方案。

  1. Press Command+Space and type Terminal and press enter/return key.
  2. Run in Terminal app:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
    and press enter/return key.
    If the screen prompts you to enter a password, please enter your Mac's user password to continue. When you type the password, it won't be displayed on screen, but the system would accept it. So just type your password and press ENTER/RETURN key. Then wait for the command to finish.
  3. Run:
    brew install pwntools

Done! You can now use pwntools.

针对上述解决方案,我尝试着进行了安装,未果,原因可能是因为 Mac OS 版本太低的问题,也通过 Python 的pip 安装,brew 安装的方式去尝试,都是失败,自己尝试编译源代码还是失败,最后查了一下资料,原来是缺少 Capstone,最终的解决方案在 stackoverflow 上找到了。

Capstone 是一个轻量级的多平台多架构支持的反汇编框架。支持包括 ARM,ARM64,MIPS 和 x86/x64 平台。

最终的解决方案如下:

capstone==3.0.5 still tries to build for both i386 and x86_64, this is already fixed on master and will be released with the next version. Looking at the Makefile, there are two possibilities:

  1. Turn off MACOS_UNIVERSAL
$ MACOS_UNIVERSAL=no pip install capstone
  1. Install the development version from current master branch, with LIBARCHS already adapted for Mojave:
$ pip install "git+https://github.com/aquynh/capstone.git#egg=capstone&subdirectory=bindings/python"

Make sure you use quotes in the last command or escape the ampersand (&), otherwise bash will cut the command and run in background instead.

Once capstone is installed, you will have to deal with unicorn in the same manner and finally should be able to install pwntools. I didn't test it anymore, but the one-liner for the installation will be

$ MACOS_UNIVERSAL=no pip install pwntools
目录
相关文章
|
7月前
|
前端开发 安全 测试技术
Postman Mac 版安装终极指南:从下载到流畅运行,一步到位
Postman 是 API 开发与测试的高效工具,支持各类 HTTP 请求调试与团队协作。本文详解 Mac 版下载、安装步骤,助你快速上手。同时推荐一体化 API 协作平台 Apifox,集文档、调试、测试于一体,提升开发效率与团队协同能力。
|
8月前
|
Ubuntu 物联网 Linux
从零安装一个Linux操作系统几种方法,以Ubuntu18.04为例
一切就绪后,我们就可以安装操作系统了。当系统通过优盘引导起来之后,我们就可以看到跟虚拟机中一样的安装向导了。之后,大家按照虚拟机中的顺序安装即可。 好了,今天主要介绍了Ubuntu Server版操作系统的安装过程,关于如何使用该操作系统,及操作系统更深层的原理,还请关注本号及相关圈子。
|
7月前
|
安全 Linux iOS开发
Tenable Nessus 10.10 (macOS, Linux, Windows) - 漏洞评估解决方案
Tenable Nessus 10.10 (macOS, Linux, Windows) - 漏洞评估解决方案
428 0
Tenable Nessus 10.10 (macOS, Linux, Windows) - 漏洞评估解决方案
|
8月前
|
安全 Linux iOS开发
Tenable Nessus 10.9.3 (macOS, Linux, Windows) - 漏洞评估解决方案
Tenable Nessus 10.9.3 (macOS, Linux, Windows) - 漏洞评估解决方案
673 0
Tenable Nessus 10.9.3 (macOS, Linux, Windows) - 漏洞评估解决方案
|
Linux 数据库 iOS开发
CrossOver 25.1.0 for macOS & Linux - 领先的 Wine 解决方案
CrossOver 25.1.0 for macOS & Linux - 领先的 Wine 解决方案
634 0
|
11月前
|
安全 Linux 数据安全/隐私保护
安装RHEL9.x操作系统
本教程详细介绍了在Windows系统上使用VMware Workstation 17.5 Pro安装RHEL 9.x的完整流程。首先准备所需设备和软件,包括Windows计算机、RHEL 9 ISO映像文件、VMware软件及相关下载链接。接着,通过创建虚拟机、配置硬件参数完成VMware的基本设置。随后进入RHEL 9.x安装环节,涵盖语言选择、软件配置、网络和主机名设置、时区调整、磁盘分区规划(如/boot、/、swap、/boot/efi等分区)以及用户和密码的创建。最后,启动安装程序并监控进度,直至系统重启进入图形化登录界面。整个过程配有详细步骤说明和截图,便于用户操作和理解。
安装RHEL9.x操作系统
|
8月前
|
Web App开发 Ubuntu Oracle
Ubuntu安装与使用详解:掌握开源操作系统的钥匙
遵循这些步骤和指南,你将能够顺利地开始使用Ubuntu,并充分利用其强大的功能和友好的界面。
|
8月前
|
安全 Ubuntu Linux
如何安装Linux操作系统?
此时,您可以选择重新启动计算机,然后从硬盘上的Linux系统启动。以上是一个大致的安装过程。请注意,不同的Linux发行版可能会在细节上有所差异,因此在进行安装之前,请确保您阅读并理解了相应发行版的安装指南或文档。
|
8月前
|
Ubuntu Unix Linux
玩机强化技能,动手安装Ubuntu Linux操作系统
(13)Ubuntu重启过程中,你将在关机画面中看到提示文字“Please remove the installation medium, then press ENTER:”,按下“Enter”键即可重启电脑。
|
10月前
|
虚拟化 iOS开发 MacOS
macOS 26 Blank OVF - macOS Tahoe 虚拟化解决方案
macOS 26 Blank OVF - macOS Tahoe 虚拟化解决方案
372 4

热门文章

最新文章

推荐镜像

更多