8??????Linux netcat???????
???????????? ???????[ 2013/5/27 10:06:45 ] ????????
????Netcat ????? nc ?? Linux ?μ?????????????????繤?????????????? TCP/IP ????????????????????? TCP/UDP ??????
?????????????????Щ??????? netcat ???
????1?????????-???????????? Netcat
????netcat ??????????????????????????????
$ nc -l 2389
???????????????????????????? 2389 ????
$ nc localhost 2389
??????????????????Щ?????????????????????????
$ nc localhost 2389
HI?? oschina
??????????????????????????????????
$ nc -l 2389
HI?? oschina
????2????? Netcat ?????????
????netcat ???????????????????????????????????????? testfile ?????
$ cat testfile
hello oschina
???????????????????????????? test
???????????????????????????÷????????
$ nc -l 2389 > test
????????????п?????
cat testfile | nc localhost 2389
?????????????????????????? test ??????????????????? testfile ??????????
$ cat test
hello oschina
????3??Netcat ?????????
??????????????????????????????????????????? -w ????????????????г??????ò????????????????????????????????????????????????????
????????????
nc -l 2389
??????????
$ nc -w 10 localhost 2389
????????????? 10 ????ж??
???????????????????????? -w ?? -l ????????? -w ?????????????????Ч????
????4??Netcat ??? IPv6
????netcat ?? -4 ?? -6 ??????????? IP ????????????? IPv4 ?? IPv6??
?????????????
$ nc -4 -l 2389
??????????
$ nc -4 localhost 2389
????????????????? netstat ??????????????????
$ netstat | grep 2389
tcp 0 0 localhost:2389 localhost:50851 ESTABLISHED
tcp 0 0 localhost:50851 localhost:2389 ESTABLISHED
?????????????????IPv6 ???????
?????????????
$ nc -6 -l 2389
??????????
$ nc -6 localhost 2389
??????????? netstat ????
$ netstat | grep 2389
tcp6 0 0 localhost:2389 localhost:33234 ESTABLISHED
tcp6 0 0 localhost:33234 localhost:2389 ESTABLISHED
???????? tcp6 ????????? IPv6 ??????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11