Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  bash network interface

Some of us may have seen /dev/tcp/<host>/<port> before, is this a special file system implemented in some BSD kernel? Because there is no /dev/tcp in Linux. Actually, this one is implemented in bash. We no need to rely on wget,nc to do network connection.It's very easy to use this interface:bash-4.2$ cat </dev/tcp/time.nist.gov/1356188 12-09-18 15:34:26 50 0 0 733.5 UTC(NIST) * bash-4.2$ exec 3<>/dev/tcp/www.w3.org/80bash-4.2$ echo -e "GET / HTTP/1.0\n\n" >&3bash-4.2$ cat <&3HTTP/1.1 200 OKDate: Tue, 18 Sep 2012 15:41:08 GMTServer: Apache/2Content-Location: H...

4,083 0       BASH NETWORK INTERFACE /DEV/TCP