Skip to content

Commit eb52e06

Browse files
Add documentation
1 parent 64285f4 commit eb52e06

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

cmd/fuzz/help.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ Only show responses which contain the pattern "The secret is: " in the response:
8989
--show-pattern 'The secret is: ' \
9090
https://example.com/FUZZ
9191
92-
Load a request from the file 'template.txt', setting the 'User-Agent' header
93-
and replacing the string FUZZ from the file:
92+
Load a request from the file 'template.txt' (note that the HTTP version
93+
specified in the template file is currently ignored), setting the 'User-Agent'
94+
header and replacing the string FUZZ from the file:
9495
9596
monsoon fuzz --range 1-500 \
9697
--template-file template.txt \

cmd/fuzz/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ func AddCommand(c *cobra.Command) {
240240
fs.StringSliceVarP(&opts.Range, "range", "r", nil, "set range `from-to`")
241241
fs.StringVar(&opts.RangeFormat, "range-format", "%d", "set `format` for range (when used with --range)")
242242
fs.StringVarP(&opts.Filename, "file", "f", "", "read values from `filename`")
243-
fs.StringArrayVar(&opts.Replace, "replace", []string{}, "add replace var `name:type:options` (valid types: 'file','range', and 'value', e.g. 'FUZZ:range:1-100'), mutually exclusive with --range and --file")
243+
fs.StringArrayVar(&opts.Replace, "replace", []string{}, "add replace var `name:type:options` (valid types: 'file','range', "+
244+
"and 'value', e.g. 'FUZZ:range:1-100'), mutually exclusive with --range and --file")
244245

245246
fs.StringVar(&opts.Logfile, "logfile", "", "write copy of printed messages to `filename`.log")
246247
fs.StringVar(&opts.Logdir, "logdir", os.Getenv("MONSOON_LOG_DIR"), "automatically log all output to files in `dir`")
@@ -265,7 +266,8 @@ func AddCommand(c *cobra.Command) {
265266
fs.StringArrayVar(&opts.ShowPattern, "show-pattern", nil, "show only responses containing `regex` in response header or body (can be specified multiple times)")
266267

267268
fs.StringArrayVar(&opts.Extract, "extract", nil, "extract `regex` from response header or body (can be specified multiple times)")
268-
fs.StringArrayVar(&opts.ExtractPipe, "extract-pipe", nil, "pipe response body to `cmd` to extract data (can be specified multiple times)")
269+
fs.StringArrayVar(&opts.ExtractPipe, "extract-pipe", nil, "pipe response body to `cmd` to extract data (can be specified multiple times, "+
270+
"the current fuzz values are passed as environment variables $MONSOON_VALUE or $MONSOON_VALUE1-$MONSOON_VALUEN)")
269271
fs.IntVar(&opts.MaxBodySize, "max-body-size", 5, "read at most `n` MiB from a returned response body (used for extracting data from the body)")
270272
fs.BoolVar(&opts.DisableDecompression, "disable-decompression", false, "disable automatic decompression of the response body")
271273

cmd/show/help.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ Construct a request from scratch with a custom header, using the string
2323
--value hunter2 \
2424
https://www.example.com
2525
26-
Load a request from the file 'request.txt', replacing the 'Accept' header:
26+
Load a request from the file 'request.txt' (note that the HTTP version
27+
specified in the template file is currently ignored), replacing the
28+
'Accept' header:
2729
2830
monsoon show --template-file 'request.txt' \
2931
--header 'Accept: */*' \

request/help.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func AddFlags(r *Request, fs *pflag.FlagSet) {
2424
fs.StringVarP(&r.Body, "data", "d", "", "transmit `data` in the HTTP request body")
2525
fs.StringVarP(&r.UserPass, "user", "u", "", "use `user:password` for HTTP basic auth")
2626

27-
fs.StringVar(&r.TemplateFile, "template-file", "", "read HTTP request from `file`")
27+
fs.StringVar(&r.TemplateFile, "template-file", "", "read HTTP request from `file` (the HTTP version specified in the file is ignored)")
2828

2929
// configure request
3030
fs.BoolVar(&r.ForceChunkedEncoding, "force-chunked-encoding", false, `do not set the Content-Length HTTP header and use chunked encoding`)

0 commit comments

Comments
 (0)