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

Refactor command-line tools to use a single "pwn" entry point. #701

Merged
merged 1 commit into from
Aug 31, 2016

Conversation

zachriggle
Copy link
Member

Adds an install-time option to disable legacy commands, and only use 'pwn':

$ pip install --install-option='--only-use-pwn-command'

Documentation is updated to show 'pwn' entry point and sub-commands.

Fixes #404
Fixes #660

@TethysSvensson
Copy link
Contributor

Are you sure we want the default to be to install the aliases?

@zachriggle
Copy link
Member Author

I didn't want to break backward compatibility and surprise people when
their commands are gone. This should give us backward compatibility and
give distro maintainers the option to exclude the backward compat stuff.
On Fri, Aug 26, 2016 at 1:08 PM Mathias Svensson notifications@github.com
wrote:

Are you sure we want the default to be to install the aliases?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#701 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAG0GF_FtTDVKaAFX89WuPIXryYpwNhFks5qj0e-gaJpZM4JsmSr
.

@TethysSvensson
Copy link
Contributor

SGTM.

Adds an install-time option to disable legacy commands, and only use 'pwn':

  $ pip install --install-option='--only-use-pwn-command'

Documentation is updated to show 'pwn' entry point and sub-commands.

Fixes Gallopsled#404
Fixes Gallopsled#660
@zachriggle zachriggle merged commit 3c0697b into Gallopsled:dev Aug 31, 2016
@zachriggle zachriggle deleted the pwn-command branch August 31, 2016 00:37
@zachriggle zachriggle modified the milestone: 3.2.0 Sep 1, 2016
Kyle-Kyle pushed a commit to Kyle-Kyle/pwntools that referenced this pull request Apr 25, 2021
…allopsled#701)

* command: support alternatives including sub command wrapper like pwn

Additionally speed up the checksec logic by removing the --version
check. Simply try to shell out and use the first working option variant
as we can't easily detect the different available alternatives in a
bulletproof way.

This implementation allows to use the sub command wrapper 'pwn' to call
checksec in case pwntools has been installed using --only-use-pwn-command

To unconditionally unify the usage, the functions cmd attribute stores
the base command to execute in form of a list that can be used to
concatenate an array of options against it and pass the final list to
call_cmd

* checksec: allow a third option variant by only passing the file target

Lets try a third available version of checksec as the lowest order
variant in our cascade that works by only passing the target file
without additional specifier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants