diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-26 22:33:53 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-03-26 22:33:53 +0100 |
| commit | c1d65afac94fd43f79f4f6189fb273866219ceaa (patch) | |
| tree | 7edb3cdfa661ae67134faba90573cc393c401a4d /Information gathering 2/Resources/crawl.bash | |
| parent | cf5cc6e1db519ef7bd1d786656027a64c208d8b9 (diff) | |
| download | darkly-c1d65afac94fd43f79f4f6189fb273866219ceaa.tar.gz darkly-c1d65afac94fd43f79f4f6189fb273866219ceaa.zip | |
Add information gathering via hidden directory crawling solution
Diffstat (limited to 'Information gathering 2/Resources/crawl.bash')
| -rwxr-xr-x | Information gathering 2/Resources/crawl.bash | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Information gathering 2/Resources/crawl.bash b/Information gathering 2/Resources/crawl.bash new file mode 100755 index 0000000..13f729c --- /dev/null +++ b/Information gathering 2/Resources/crawl.bash @@ -0,0 +1,20 @@ +#!/usr/bin/bash + +get_next_step() { + url="$1" + curl --follow --silent "$url" | grep '^<a href=' | grep --only-matching '"[^"]*"' | tr --delete \" +} + +urls=(http://10.0.2.15/.hidden/) +while ((${#urls[@]} > 0)); do + current="${urls[0]}" + urls=("${urls[@]:1}") + + if [[ "${current[i]: -1}" == / ]]; then + mapfile -t next_steps < <(get_next_step "$current") + urls+=("${next_steps[@]/#/$current}") + else + echo -en "$current\t" + curl --silent "$current" + fi +done |
