Skip to content

Instantly share code, notes, and snippets.

@forestbaker
Created October 12, 2015 01:45
Show Gist options
  • Save forestbaker/f3997d0a6695682fc656 to your computer and use it in GitHub Desktop.
Save forestbaker/f3997d0a6695682fc656 to your computer and use it in GitHub Desktop.
port knocker - input target server DNS name followed by space separated ports
# port knocker - input target server DNS name followed by space separated ports
# usage - Knock_Knock bob.test.foo 55000 54000 53000
Knock_Knock() {
local SERVER="$1"
shift
for PORT
nmap -Pn --host_timeout 10 --max-retries 0 -p "$PORT" "$SERVER"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment