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

cod should attempt to learn flag descriptions #11

Open
zachriggle opened this issue Feb 24, 2020 · 0 comments
Open

cod should attempt to learn flag descriptions #11

zachriggle opened this issue Feb 24, 2020 · 0 comments
Labels
Milestone

Comments

@zachriggle
Copy link

For the basic case of Python argparse-based help menus, it would be useful if cod could also learn the description of the flag (or at least the first line of it).

Compare the following (from the Pwntools repo):

asm --help
usage: pwn asm [-h] [-f {raw,hex,string,elf}] [-o file] [-c context]
               [-v AVOID] [-n] [-z] [-d] [-e ENCODER] [-i INFILE] [-r]
               [line [line ...]]

positional arguments:
  line                  Lines to assemble. If none are supplied, use stdin

optional arguments:
...
  -n, --newline         Encode the shellcode to avoid newlines

Tab completion only shows the flags themselves, and not the helpful descriptive text:

% asm -<tab>
--avoid    --encoder  --infile   --run      -c         -e         -h         -n         -r         -z
--debug    --help     --newline  --zero     -d         -f         -i         -o         -v

The learned autocomplete should show something similar to what is provided with the default Git completion:

$ git --<tab>
 -- option --
--bare                -- treat the repository as a bare repository
--exec-path           -- path to where your core git programs are installed

Such that it might look like this:

$ asm -<tab>
...
-n --newline          -- Encode the shellcode to avoid newlines
@dim-an dim-an added this to the 0.0.1 milestone Apr 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants