Here are several different ways to test a TCP port without telnet.
BASH (man page)
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
| #!/bin/sh | |
| # POSIX | |
| # Reset all variables that might be set | |
| file= | |
| verbose=0 # Variables to be evaluated as shell arithmetic should be initialized to a default or validated beforehand. | |
| while :; do | |
| case $1 in | |
| -h|-\?|--help) # Call a "show_help" function to display a synopsis, then exit. |
Here are several different ways to test a TCP port without telnet.
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
| <!-- Add the following lines to theme's html code right before </head> --> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
| <script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script> | |
| <script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script> | |
| <!-- | |
| Usage: just add <div class="gist">[gist URL]</div> | |
| Example: <div class="gist">https://gist.github.com/1395926</div> | |
| --> |
| # usage: redfin-images "http://www.redfin.com/WA/Seattle/123-Home-Row-12345/home/1234567" | |
| function redfin-images() { | |
| wget -O - $1 | grep "full:" | awk -F \" '{print $4}' | xargs wget - | |
| } |