Isona / dirble

Fast directory scanning and scraping tool
GNU General Public License v3.0
614 stars 87 forks source link

Hide-lenghts min value 0 #47

Closed danilabs closed 4 years ago

danilabs commented 4 years ago

Hi!

This is a small patch that allows zero value in the argument hide-lenght In some cases it is necessary to hide the value 0, in ordern to avoid filling the json file with garbage.

+ https://www.example.com/test/index.php (CODE:0|SIZE:0)
Curl error after requesting https://www.example.com/test/index.php : [28] Timeout was reached

Replace min value 1 by 0. https://github.com/nccgroup/dirble/blob/b6c46aab7e18889bc984e5bfa8a60415a85cdf8d/src/arg_parse.rs#L553

Thanks!

Isona commented 4 years ago

Hi, thanks for the issue. The current build already allows exclusion of length 0. I'm planning on removing those "CODE:0|SIZE:0" errors soon because proper, more detailed Curl errors are printed instead now. The code that you linked is actually a part of the argument parsing which ensures that the "hide-lengths" argument always gets at least one parameter.