Last active
December 5, 2018 08:13
-
-
Save yusuphwickama/5c3ddf265a3551c7486ac2cd8203f8a6 to your computer and use it in GitHub Desktop.
Used to download links with a specific keyword from a link.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
url="downloads.wickerlabs.com" | |
if [[ $(http "https://$url" | grep -i -c "$1") -eq 0 ]]; then | |
echo "[+] Not found, skipping downloading." | |
else | |
echo "[+] Starting downloading" | |
link="https://$url/$(http https://downloads.wickerlabs.com | sed -n 's/.*href="\([^"]*\).*/\1/p' | grep -i "$1" )" | |
echo "Link: $link" | |
wget --no-parent --continue -nd -r "$link" | |
fi | |
# USAGE: | |
# listener <keyword> | |
# NOTICE | |
# This script uses httpie. To install it run 'sudo apt install httpie' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment