Skip to content

Instantly share code, notes, and snippets.

@gfoss
Last active May 30, 2016 06:27
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 gfoss/4454001 to your computer and use it in GitHub Desktop.
Save gfoss/4454001 to your computer and use it in GitHub Desktop.
NetCat based heartbeat one-liner, great for pentesting to let you know if the service you are testing has crashed.
$ while `nc -nn -vv -z -w3 [ip-address] [port] > /dev/null`; do echo "OK"; sleep 1; done; echo "DOWN"; while (true); do echo "***DOWN***"; sleep 5; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment