Skip to content

Commit

Permalink
Rework command line interface
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cgzones committed Nov 4, 2022
1 parent ad27bb9 commit 8036bbf
Show file tree
Hide file tree
Showing 4 changed files with 295 additions and 207 deletions.
51 changes: 51 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ opt-level = 'z' # Optimize for size
panic = 'abort' # Abort on panic

[dependencies]
clap = {version = "4.0.14", features = ["cargo"]}
atty = "0.2.14"
clap = {version = "4.0.14", features = ["cargo", "derive"]}
colored = {version = "2.0.0", optional = true}
colored_json = {version = "3.0.1", optional = true}
goblin = "0.5.4"
Expand Down
Loading

0 comments on commit 8036bbf

Please sign in to comment.