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

Rework command line interface #28

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

cgzones
Copy link
Contributor

@cgzones cgzones commented Nov 4, 2022

Use subcommand instead of option arguments. This has the benefit of supporting shell wildcards.

Old usage:

checksec -f /bin/true --no-color
checksec -d /bin --json --pretty
checksec -p bash --maps
checksec --pid 1,42
checksec -P

New usage:

checksec --no-color exe /bin/true
checksec --format json-pretty exe /bin
checksec proc-name --maps bash
checksec proc-id 1 42
checksec proc-all

checksec proc-id $(pidof firefox)
checksec exe /bin/system*
dpkg -L apt | checksec

Alternative to #25

@cgzones cgzones force-pushed the cmdline branch 2 times, most recently from 8036bbf to 52a6a91 Compare November 4, 2022 22:56
@etke
Copy link
Owner

etke commented Mar 13, 2023

Thanks for all the PRs! I appreciate your contributions to the project.

I was planning on migrating to clap derive CLI, just haven't had time to work much on checksec.rs for the past while.

Plan is to separate things like proc-id proc-name, proc-all into their own subcommands of the proc subcommand, I'll do this work and reference your PR for the next version bump.

etke pushed a commit that referenced this pull request Mar 18, 2023
Based on PR #28 by cgzones
Use subcommand instead of option arguments. This has the benefit of
supporting shell wildcards.

Old usage:

    checksec -f /bin/true --no-color
    checksec -d /bin --json --pretty
    checksec -p bash --maps
    checksec --pid 1,42
    checksec -P

New usage:

    checksec --no-color exe /bin/true
    checksec --format json-pretty exe /bin
    checksec proc-name --maps bash
    checksec proc-id 1 42
    checksec proc-all

    checksec proc-id $(pidof firefox)
    checksec exe /bin/system*
    dpkg -L apt | checksec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants