Skip to content

Instantly share code, notes, and snippets.

@yusuphwickama
Last active December 5, 2018 08:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yusuphwickama/5c3ddf265a3551c7486ac2cd8203f8a6 to your computer and use it in GitHub Desktop.
Save yusuphwickama/5c3ddf265a3551c7486ac2cd8203f8a6 to your computer and use it in GitHub Desktop.
Used to download links with a specific keyword from a link.
#!/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