1. cd /proc/$$/fd -> 进入当前process的fd目录
2. exec 8<> /dev/tcp/www.baidu.com/80 -> 创建socket
[mengbao@minitana fd]$ ls -l
total 0
lrwx------ 1 mengbao mengbao 64 Mar 7 20:21 0 -> /dev/pts/1
lrwx------ 1 mengbao mengbao 64 Mar 7 20:21 1 -> /dev/pts/1
lr-x------ 1 mengbao mengbao 64 Mar 7 20:21 19 -> anon_inode:inotify
lrwx------ 1 mengbao mengbao 64 Mar 7 20:21 2 -> /dev/pts/1
lrwx------ 1 mengbao mengbao 64 Mar 7 20:21 255 -> /dev/pts/1
lrwx------ 1 mengbao mengbao 64 Mar 7 20:27 8 -> 'socket:[58102]'
3. echo -e "GET / HTTP/1.0\n" 1>& 8; -> 发送数据
4. cat 0 读取数据
5.exec 8 关闭socket
标签:Mar,20,socket,exec,64,Linux,------,mengbao,21
来源: https://www.cnblogs.com/wuyuntana/p/14496360.html