pwntools-tutorial icon indicating copy to clipboard operation
pwntools-tutorial copied to clipboard

Please make it explicit that 32bits are not supported

Open marcin-chwedczuk opened this issue 5 years ago • 3 comments

How I wasted 2h of my life:

I started tutorial by going to the page: https://github.com/Gallopsled/pwntools-tutorial/blob/master/installing.md I had a VM with 32-bit Ubuntu 16 LTS, I used it to solve challenges from OverTheWire (they are mostly 32 bit).

I started with:

pip install --upgrade git+https://github.com/Gallopsled/pwntools.git

and it failed, looks like I need some other libraries, ok no problem:

sudo apt install libffi-dev
sudo apt install libssl-dev

But then pip cannot install cryptography module, it was failing with strange compile time errors.

OK probably old OpenSSL version (and BTW installing Python packages is getting more terrible than compiling C code). I compiled a new version from the sources: https://cloudwafer.com/blog/installing-openssl-on-ubuntu-16-04-18-04/ Yay!

Finally managed to compile the rest:

sudo apt install libsodium-dev # one more cr**p to install

pip install --global-option=build_ext --global-option="-L/usr/local/ssl/lib" --upgrade git+https://github.com/Gallopsled/pwntools.git

And of course one more thing was missing:

pip install python-dateutil

And what I get for all this effort:

$ python -c 'from pwn import *'
[!] Pwntools does not support 32-bit Python.  Use a 64-bit release.

So please, please add a big huge bolded text saying that 32-bits are not supported....

marcin-chwedczuk avatar Jan 09 '21 11:01 marcin-chwedczuk

We tried to put it as bold as we could! It's even got a big red exclamation mark! 🤣

On a serious note, we can probably move the warning into setup.py so that it's shown when attempting to install Pwntools rather than after it's installed (which, in hindsight, seems obvious).

Marked "help wanted" in case any new-to-Pwntools developers want to submit a fix.

zachriggle avatar Jan 12 '21 18:01 zachriggle

I think too that putting it in setup.py is a great idea!

marcin-chwedczuk avatar Jan 12 '21 19:01 marcin-chwedczuk

@marcin-chwedczuk You should submit a Pull Request ;)

zachriggle avatar Jan 12 '21 20:01 zachriggle