Skip to content

Instantly share code, notes, and snippets.

@azet
Created July 23, 2013 20:11
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 azet/6065714 to your computer and use it in GitHub Desktop.
Save azet/6065714 to your computer and use it in GitHub Desktop.
one-line TCP portscanner (bash)
SCHOST=127.0.0.1 ; for p in {1..65535}; do (timeout 4 echo >/dev/tcp/${SCHOST}/$p) > /dev/null 2>&1 && echo $SCHOST:$p open; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment