Skip to content

Commit

Permalink
Examples in Help Output (#3978)
Browse files Browse the repository at this point in the history
* Example text in help flag

* misc update

---------

Co-authored-by: sandeep <[email protected]>
  • Loading branch information
kchason and ehsandeep authored Oct 11, 2023
1 parent 74a24ba commit 2248c63
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions v2/cmd/nuclei/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,25 @@ on extensive configurability, massive extensibility and ease of use.`)
flagSet.IntVar(&options.OutputLimit, "limit", 100, "limit the number of output to display"),
)

flagSet.SetCustomHelpText(`EXAMPLES:
Run nuclei on single host:
$ nuclei -target example.com
Run nuclei with specific template directories:
$ nuclei -target example.com -t http/cves/ -t ssl
Run nuclei against a list of hosts:
$ nuclei -list hosts.txt
Run nuclei with a JSON output:
$ nuclei -target example.com -json-export output.json
Run nuclei with sorted Markdown outputs (with environment variables):
$ MARKDOWN_EXPORT_SORT_MODE=template nuclei -target example.com -markdown-export nuclei_report/
Additional documentation is available at: https://docs.nuclei.sh/getting-started/running
`)

_ = flagSet.Parse()

gologger.DefaultLogger.SetTimestamp(options.Timestamp, levels.LevelDebug)
Expand Down

0 comments on commit 2248c63

Please sign in to comment.