GitHub File Downloader
- Lightweight single-script downloader
- Minimum dependency, powered by
curl
- Support recursive download
Usage:
./ghdl.sh [-r] <url>
Options:
<url> GitHub URL
-r optional, recursively download all files under each directory
-h | --help display this help message
- Download files in
cwa-app-android
repositorymain
folder:
~$ ./ghdl.sh https://github.com/corona-warn-app/cwa-app-android/tree/main/Corona-Warn-App/src/main
[INFO] Skip directory /corona-warn-app/cwa-app-android/tree/main/Corona-Warn-App/src/main/assets
[INFO] Skip directory /corona-warn-app/cwa-app-android/tree/main/Corona-Warn-App/src/main/java/de/rki/coronawarnapp
[INFO] Skip directory /corona-warn-app/cwa-app-android/tree/main/Corona-Warn-App/src/main/res
[INFO] Downloading https://github.com//corona-warn-app/cwa-app-android/raw/main/Corona-Warn-App/src/main/AndroidManifest.xml
[INFO] Downloading https://github.com//corona-warn-app/cwa-app-android/raw/main/Corona-Warn-App/src/main/ic_launcher-playstore.png
~$ tree main
main
├── AndroidManifest.xml
└── ic_launcher-playstore.png
- Download all files under
Directory Traversal
fromPayloadsAllTheThings
repository
~$ ./ghdl.sh -r https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Directory%20Traversal
[INFO] Downloading https://github.com/swisskyrepo/PayloadsAllTheThings/raw/master/Directory%20Traversal/Intruder/deep_traversal.txt
[INFO] Downloading https://github.com/swisskyrepo/PayloadsAllTheThings/raw/master/Directory%20Traversal/Intruder/directory_traversal.txt
[INFO] Downloading https://github.com/swisskyrepo/PayloadsAllTheThings/raw/master/Directory%20Traversal/Intruder/dotdotpwn.txt
[INFO] Downloading https://github.com/swisskyrepo/PayloadsAllTheThings/raw/master/Directory%20Traversal/Intruder/traversals-8-deep-exotic-encoding.txt
[INFO] Downloading https://github.com/swisskyrepo/PayloadsAllTheThings/raw/master/Directory%20Traversal/README.md
~$ tree Directory%20Traversal
Directory%20Traversal
├── Intruder
│ ├── deep_traversal.txt
│ ├── directory_traversal.txt
│ ├── dotdotpwn.txt
│ └── traversals-8-deep-exotic-encoding.txt
└── README.md
Use case | Option |
---|---|
Download entire GitHub repository | git clone --depth 1 <repo_url> |
Download crazy numerous files in a specific folder | DownGit |
Download some files in a specific folder | ghdl.sh <repo_folder_url> |
Download one single file | Please hit the Raw button |