Skip to content

Instantly share code, notes, and snippets.

@heavypackets
Last active October 10, 2018 05:43
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 heavypackets/0299ad488d2a96c9cb6c7569bc1abe33 to your computer and use it in GitHub Desktop.
Save heavypackets/0299ad488d2a96c9cb6c7569bc1abe33 to your computer and use it in GitHub Desktop.
#!/bin/bash
# PLEASE DON'T DO THIS
set -x
for addr in $(nmap -n -sL 192.168.1.0/24 | grep "Nmap scan report" | awk '{print $NF}')
do
curl -G --connect-timeout 1 http://${addr}/metrics > ${addr}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment