Help us understand the problem. What is going on with this article?

PwntoolsとPython2系のインストールについて

概要

普段はPython3でpwntoolsを使ってsolverを書いているものの、ROPgadget --binary xxx --ropchainで生成されるropchainのコードを実行するためにpython2系でpwntoolsを動かす必要が出た。
しかし、色々ハマってしまったのでメモとして書き残しておく。。。

状況

  1. E: Unable to locate package pipと表示される

単純にpipがない。

以下のコマンドを叩いて解決。

sudo apt install python-pip

  1. pip install pwntoolsを打ってpwntoolsが入っているのにも関わらず、from pwn import *No module named pwnというエラーが出る

python -m pip install pwntoolsで解決。
CTFのチームメンバーが教えてくれた。

なお、No module namde pwnのほうのエラーはpython2版のpwntoolsのDevelopment版を入れてみても解決しなかったので、これが唯一の解決法かもしれない。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした