最終更新:2014-10-06 (月) 16:29:47 (3490d)
Linux/dev/tcp
Bash
- When executing a command on a /dev/tcp/$host/$port pseudo-device file, Bash opens a TCP connection to the associated socket.
- BashはTCPの通信を/dev/tcp/host/portというファイルへの入出力に見せかけることができる。
例
cat < /dev/tcp/time.nist.gov/13
exec 3<> /dev/tcp/$1/80 echo -e "GET $2 HTTP/1.0\n\n" >&3 cat <&3
- http://qiita.com/k_ui/items/a01fdcfa8ac6729e7870