[转] OpenBSD netcat demystified

OpenBSD FAQ中文版、PF指南中文版、OpenBSD用户手册...
回复
头像
acheng
锌 Zn
帖子: 581
注册时间: 2011-07-07 21:52

[转] OpenBSD netcat demystified

帖子 acheng » 2018-10-22 17:45

简单解释了OpenBSD上netcat的用法,更重要的是对源代码的解读。

https://github.com/NanXiao/openbsd-netcat-demystified
Owing to its versatile functionalities, netcat earns the reputation as "TCP/IP Swiss army knife". For example, you can create a simple chat app using netcat:

(1) Open a terminal and input following command:

# nc -l 3003
This means a netcat process will listen on 3003 port in this machine (the IP address of current machine is 192.168.35.176).

(2) Connect aforemontioned netcat process in another machine, and send a greeting:

# nc 192.168.35.176 3003
hello
Then in the first machine's terminal, you will see the "hello" text:

# nc -l 3003
hello

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 7 访客