@@ -263,14 +263,14 @@ func ParseOptions() *Options {
263
263
)
264
264
265
265
createGroup (flagSet , "output" , "Output" ,
266
- flagSet .StringVarP (& options .Output , "output" , "o" , "" , "File to write output" ),
267
- flagSet .BoolVarP (& options .StoreResponse , "store-response" , "sr" , false , "Store HTTP responses " ),
268
- flagSet .StringVarP (& options .StoreResponseDir , "store-response-dir" , "srd" , "output" , "Custom directory to store HTTP responses " ),
269
- flagSet .BoolVar (& options .JSONOutput , "json " , false , "Output in JSONL(ines) format" ),
270
- flagSet .BoolVarP (& options .responseInStdout , "include-response " , "irr" , false , "Include HTTP request/response in JSON output (-json only) " ),
271
- flagSet .BoolVar (& options .chainInStdout , "include-chain " , false , "Include redirect HTTP Chain in JSON output (-json only)" ),
272
- flagSet .BoolVar (& options .StoreChain , "store -chain" , false , "Include HTTP redirect chain in responses (-sr only)" ),
273
- flagSet .BoolVar (& options .CSVOutput , "csv " , false , "Output in CSV format " ),
266
+ flagSet .StringVarP (& options .Output , "output" , "o" , "" , "file to write output results " ),
267
+ flagSet .BoolVarP (& options .StoreResponse , "store-response" , "sr" , false , "store http response to output directory " ),
268
+ flagSet .StringVarP (& options .StoreResponseDir , "store-response-dir" , "srd" , "output" , "store http response to custom directory " ),
269
+ flagSet .BoolVar (& options .CSVOutput , "csv " , false , "store output in CSV format" ),
270
+ flagSet .BoolVar (& options .JSONOutput , "json " , false , "store output in JSONL(ines) format " ),
271
+ flagSet .BoolVarP (& options .responseInStdout , "include-response " , "irr" , false , "include http request/response in JSON output (-json only)" ),
272
+ flagSet .BoolVar (& options .chainInStdout , "include -chain" , false , "include redirect http chain in JSON output (-json only)" ),
273
+ flagSet .BoolVar (& options .StoreChain , "store-chain " , false , "include http redirect chain in responses (-sr only) " ),
274
274
)
275
275
276
276
createGroup (flagSet , "configs" , "Configurations" ,
@@ -391,7 +391,11 @@ func (options *Options) validateOptions() {
391
391
options .Resolvers = resolvers
392
392
if len (options .Resolvers ) > 0 {
393
393
gologger .Debug ().Msgf ("Using resolvers: %s\n " , strings .Join (options .Resolvers , "," ))
394
+ }
394
395
396
+ if options .StoreResponseDir != "" && ! options .StoreResponse {
397
+ gologger .Debug ().Msgf ("Store response directory specified, enabling \" sr\" flag automatically\n " )
398
+ options .StoreResponse = true
395
399
}
396
400
}
397
401
0 commit comments