Skip to content

Instantly share code, notes, and snippets.

@elico
Created July 11, 2022 11:25
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 elico/8790bdc835d8e9ecbc57e72fc31effc0 to your computer and use it in GitHub Desktop.
Save elico/8790bdc835d8e9ecbc57e72fc31effc0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
HOST="127.0.0.1"
PORT="3128"
PUBLIC_MENUS=$(curl -s "http://${HOST}:${PORT}/squid-internal-mgr/menu"|egrep "public$" |awk '{print $1}')
for i in ${PUBLIC_MENUS};
do
echo "MENU: ${i}"
echo "### START"
curl -s "http://${HOST}:${PORT}/squid-internal-mgr/${i}"
echo
echo "### END"
echo
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment