Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package name is not reflective of installed package #128

Closed
zachriggle opened this issue Sep 22, 2014 · 1 comment
Closed

Package name is not reflective of installed package #128

zachriggle opened this issue Sep 22, 2014 · 1 comment
Milestone

Comments

@zachriggle
Copy link
Member

Consider I am not a pwntools user, but come across a script.

from pwn import *
# ...

If I attempt to install the pwn package, I get something else*.

$ pip install pwn

I now have something different than the latest released version of pwntools. The correct package on pypi is pwntools.

How do we reconcile these?

@zachriggle
Copy link
Member Author

Solution:

I own several packages on PyPI. I have set them all up with dummy packages that have pwntools as a requirement.

  • ctf
  • exploit
  • pwn
  • pwning
  • hack

Now pip install pwn works to get the latest pwntools:

user@ubuntu:~$ pip install pwn
Downloading/unpacking pwn
  Downloading pwn-1.0.tar.gz
  Running setup.py (path:/tmp/user/pip_build_user/pwn/setup.py) egg_info for package pwn

Downloading/unpacking pwntools (from pwn)
  Downloading pwntools-2.1.3.tar.gz (5.5MB): 5.5MB downloaded
  Running setup.py (path:/tmp/user/pip_build_user/pwntools/setup.py) egg_info for package pwntools

Requirement already satisfied (use --upgrade to upgrade): paramiko in ./.pyenv/versions/2.7.8/lib/python2.7/site-packages (from pwntools->pwn)
Requirement already satisfied (use --upgrade to upgrade): argparse in ./.pyenv/versions/2.7.8/lib/python2.7/site-packages (from pwntools->pwn)
Requirement already satisfied (use --upgrade to upgrade): mako in ./.pyenv/versions/2.7.8/lib/python2.7/site-packages (from pwntools->pwn)
Requirement already satisfied (use --upgrade to upgrade): pyelftools in ./.pyenv/versions/2.7.8/lib/python2.7/site-packages (from pwntools->pwn)
Requirement already satisfied (use --upgrade to upgrade): MarkupSafe>=0.9.2 in ./.pyenv/versions/2.7.8/lib/python2.7/site-packages (from mako->pwntools->pwn)
Installing collected packages: pwn, pwntools
  Running setup.py install for pwn

  Running setup.py install for pwntools
    changing mode of build/scripts-2.7/shellcraft from 664 to 775
    changing mode of build/scripts-2.7/hex from 664 to 775
    changing mode of build/scripts-2.7/constgrep from 664 to 775
    changing mode of build/scripts-2.7/unhex from 664 to 775
    changing mode of build/scripts-2.7/disasm from 664 to 775
    changing mode of build/scripts-2.7/asm from 664 to 775
    changing mode of build/scripts-2.7/cyclic from 664 to 775

    changing mode of /home/user/.pyenv/versions/2.7.8/bin/shellcraft to 775
    changing mode of /home/user/.pyenv/versions/2.7.8/bin/hex to 775
    changing mode of /home/user/.pyenv/versions/2.7.8/bin/constgrep to 775
    changing mode of /home/user/.pyenv/versions/2.7.8/bin/unhex to 775
    changing mode of /home/user/.pyenv/versions/2.7.8/bin/disasm to 775
    changing mode of /home/user/.pyenv/versions/2.7.8/bin/asm to 775
    changing mode of /home/user/.pyenv/versions/2.7.8/bin/cyclic to 775
Successfully installed pwn pwntools
Cleaning up...
user@ubuntu:~$ unset PYTHONPATH
user@ubuntu:~$ python -c 'from pwn  import *; print pwnlib.version.__version__'
2.1.3

@zachriggle zachriggle added this to the 2.2 milestone Dec 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant