Skip to content

Instantly share code, notes, and snippets.

@tdtgit
Created May 1, 2018 12:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdtgit/ad37a81e60cf07a61c867019109c85c4 to your computer and use it in GitHub Desktop.
Save tdtgit/ad37a81e60cf07a61c867019109c85c4 to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Written by AC - 2015 <al@terraltech.com> - sys0dm1n.com
#
URL=$1
wget --quiet http://$URL/sitemap.xml --no-cache --output-document - | egrep -o "http(s?)://$URL[^ \"\'()\<>]+" | while read line; do
if [[ $line == *.xml ]]
then
newURL=$line
wget --quiet $newURL --no-cache --output-document - | egrep -o "http(s?)://$URL[^ \"\'()\<>]+" | while read newline; do
curl -s -S -H "accept-encoding: gzip, deflate, br" -A 'Cache Warmer' -sL $newline -o /dev/null 2>&1
# echo $newline
done
else
curl -s -S -H "accept-encoding: gzip, deflate, br" -A 'Cache Warmer' -sL $line -o /dev/null 2>&1
# echo $line
fi
done
echo "Done $URL";
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment