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 May 14, 2023
1 parent c4f56c4 commit 28cf1a5
Show file tree
Hide file tree
Showing 4 changed files with 299 additions and 240 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}
either = "1.8.1"
Expand Down
Loading

0 comments on commit 28cf1a5

Please sign in to comment.