C:\> .\nc.exe -lp 2012
$ nc 192.168.1.110 2012
nc -ul 7777
nc -u server_name 7777
{ echo -n "HTTP/1.0 200 OK\r\n\r\n"; cat hello.txt; } | nc -l 8080
$ { echo -n "HTTP/1.0 200 OK\r\n\r\n"; cat hello.txt; } | nc -l 8080
GET / HTTP/1.1
Host: 192.168.1.105:8080
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Maxthon/3.0 Chrome/22.0.1229.79 Safari/537.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
DNT: 1
Accept-Encoding: gzip,deflate
Accept-Language: zh-CN
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
nc -l 7777 -w 10
[beyes@beyes ~]$ nc -v -n -z -w 1 192.168.1.2 75-85
nc: connect to 192.168.1.2 port 75 (tcp) failed: Connection refused
nc: connect to 192.168.1.2 port 76 (tcp) failed: Connection refused
nc: connect to 192.168.1.2 port 77 (tcp) failed: Connection refused
nc: connect to 192.168.1.2 port 78 (tcp) failed: Connection refused
nc: connect to 192.168.1.2 port 79 (tcp) failed: Connection refused
Connection to 192.168.1.2 80 port [tcp/*] succeeded!
nc: connect to 192.168.1.2 port 81 (tcp) failed: Connection refused
nc: connect to 192.168.1.2 port 82 (tcp) failed: Connection refused
nc: connect to 192.168.1.2 port 83 (tcp) failed: Connection refused
nc: connect to 192.168.1.2 port 84 (tcp) failed: Connection refused
nc: connect to 192.168.1.2 port 85 (tcp) failed: Connection refused
nc -l 8899 | nc www.twitter.com 80
# mkfifo tunnel
# ls -l tunnel
prw-r--r-- 1 root root 0 Oct 30 11:35 tunnel
# nc -l 8899 0<tunnel |nc www.twitter.com 80 1>tunnel
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |