Repository navigation
docs: document CLI usage in docs/CLI.md (#512) - #526
AartiKandpal wants to merge 3 commits into
Conversation
|
Thanks for the first pull request here. CI needs a maintainer to approve the run before it starts, so it may sit for a bit before anything happens. |
NovaCode37
left a comment
There was a problem hiding this comment.
Thanks, this reads well, and I checked every flag in it against --help: nothing invented. Three are missing, and #512 asks for every flag --help lists:
scan --output/-o: the output file path for--html,--pdf,--graphmland--gexf.watchlist add --interval: hours between re-scans.watchlist add --webhook: where change alerts are posted.
python cli.py scan --help and python cli.py watchlist add --help show the exact wording. Add those and this is ready.
|
Updated docs/CLI.md with the missing flags (-o/--output, --interval, --webhook). Ready for re-review! |
NovaCode37
left a comment
There was a problem hiding this comment.
Thanks, but the update did not reach the branch. The last commit here is still from 8 October, and docs/CLI.md has no -o/--output, --interval or --webhook. Could you check that the commit was pushed?
While you are at it, a few things in the file do not match cli.py:
- Exit codes.
2is not "vulnerabilities above threshold", the CLI has no threshold. It exits2when-mnames an unknown module (argparse also uses2for bad arguments).1is a scan error or Ctrl+C,0is success. scanalso takes--type/-t(auto-detected if omitted), and the short forms-vand-qfor--verboseand--quiet.moduleshas--jsonand-t.watchlist rm,pauseandresumetake the entry id, not the target.listhas--json.addtakes--type/-t,-m,--interval(hours, default 24) and--webhook.- The skipped example. Results are keyed by module name, and the fields are
statusandstatus_reason, so it looks like"shodan": {"status": "skipped", "status_reason": "...", "error": null, ...}. - With
-oand more than one format flag, each file gets its own extension from the base name (-o out --json --htmlwritesout.jsonandout.html). Worth one line.
NovaCode37
left a comment
There was a problem hiding this comment.
The content is right now, thanks. The markdown got lost on the way though, it looks like the text was copied from the rendered page instead of the source:
- The code block under
### Usageis opened and never closed, so on GitHub everything after it renders as one big code block. - The headings (
### Options,### Example,### Exit Codes,## modules,## watchlistand the rest) became plain lines. - The language labels turned into stray
BashandJSONlines instead of```bashand```jsonfences. - The bullets lost their
*and the flags lost their backticks. - In the last example the URL became
[https://example.com/hook](https://example.com/hook)inside a shell command. It should be justhttps://example.com/hook.
The easiest fix is to take the previous version of the file from your branch and edit the new facts into it, then check the "Preview" tab on GitHub before pushing.
|
@NovaCode37 Fixed the markdown formatting: closed code fences, headings, bullets, backticks on flags, and plain webhook URL. Please take another look. |
Fixes #512
Changes Proposed
docs/CLI.md.scan,modules, andwatchlistcommands.