Skip to content

Commit

Permalink
Optimize the amount of headers per request(--headers flag)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh1Yo committed Jul 26, 2021
1 parent 7e52e1e commit 34ed6b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ pub fn get_config() -> (Config, usize) {
Arg::with_name("max")
.short("m")
.long("max")
.help("Change the maximum number of parameters. (default is 128/192/256 for query/headers and 512 for body)")
.help("Change the maximum number of parameters.\n(default is 128/192/256 for query, 64/128/196 for headers and 512 for body)")
.takes_value(true)
)
.arg(
Expand Down Expand Up @@ -271,8 +271,10 @@ pub fn get_config() -> (Config, usize) {
None => {
if args.is_present("as-body") {
512
} else {
} else if !args.is_present("headers-discovery") {
128
} else {
64
}
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ async fn run() {
max,
).await;

//check whether it is possible to use 192 or 256 params in a single request instead of 128 default
if max == 128 {
//check whether it is possible to use 192(128) or 256(196) params in a single request instead of 128 default
if max == 128 || max == 64 {
let response = random_request(&config, &client, reflections_count, max + 64).await;

let (is_code_the_same, new_diffs) = compare(&initial_response, &response);
Expand Down

0 comments on commit 34ed6b8

Please sign in to comment.