Skip to content

Commit

Permalink
Update README to explain the behavior of the recursive scans
Browse files Browse the repository at this point in the history
  • Loading branch information
cestef committed Apr 17, 2024
1 parent 97f6f48 commit c3bc9a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ By default `rwalk` will use a recursive-like scan. You can change the depth of t
```bash
rwalk https://example.com wordlist.txt -d 3
```

The recursive mode only scans urls [identified as directories](src/runner/filters.rs#L290). If you are not happy with the default behavior, you can use the `--force-recursion` (`--fr`) flag to force the recursion on all found urls.
<!-- omit in toc -->
#### Classic scan

Expand Down Expand Up @@ -436,8 +438,11 @@ Please take these results with a grain of salt.
## Contributing

*Contributions are welcome! I am always looking for new ideas and improvements.*

If you want to contribute to rwalk, please read the [CONTRIBUTING.md](CONTRIBUTING.md) file.


## License

Licensed under the [MIT License](LICENSE).
7 changes: 6 additions & 1 deletion src/runner/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,12 @@ pub fn is_directory(response: &reqwest::Response) -> bool {
return false;
}
}
} else if response.status().is_success() || matches!(response.status(), StatusCode::FORBIDDEN) {
} else if response.status().is_success()
|| matches!(
response.status(),
StatusCode::FORBIDDEN | StatusCode::UNAUTHORIZED // 403, 401 ; a little bit of a hack but it works most of the time
)
{
// status code is 2xx or 403, need to check if it ends in /

if response.url().as_str().ends_with('/') {
Expand Down

0 comments on commit c3bc9a9

Please sign in to comment.