目录
前言
Netcat是一款优秀简单的Unix工具,很可靠很容易使用,使用的是tcp和udp协议。在网络安全和渗透测试中是不可少的黑客工具,被称为安全界的瑞士军刀。当然,目前,安装在Linux的各个发行版本上的netcat都出于安全性的考虑,去掉了netcat的一些功能。所以我们可以自己下载二进制安装包,来安装原生的netcat。
安装步骤
1. 下载netcat二进制安装包
[root@myserver ~]# wget https://nchc.dl.sourceforge.net/project/netcat/netcat/0.7.1/netcat-0.7.1.tar.gz
2. 解压netcat压缩包
[root@myserver ~]# tar -zxvf ./netcat-0.7.1.tar.gz
3.进入netcat目录中运行./configure
[root@myserver netcat-0.7.1]# ./configure
4.执行编译和安装
[root@myserver netcat-0.7.1]# make&&make install
5.退出编译
[root@myserver netcat-0.7.1]# make clean
net cat常见命令和说明
Option: intruduce:
-c, --close close connection on EOF from stdin
-e, --exec=PROGRAM program to exec after connect
-g, --gateway=LIST source-routing hop point[s], up to 8
-G, --pointer=NUM source-routing pointer: 4, 8, 12, ...
-h, --help display this help and exit
-i, --interval=SECS delay interval for lines sent, ports scanned
-l, --listen listen mode, for inbound connects
-L, --tunnel=ADDRESS:PORT forward local port to remote address
-n, --dont-resolve numeric-only IP addresses, no DNS
-o, --output=FILE output hexdump traffic to FILE (implies -x)
-p, --local-port=NUM local port number
-r, --randomize randomize local and remote ports
-s, --source=ADDRESS local source address (ip or hostname)
-t, --tcp TCP mode (default)
-T, --telnet answer using TELNET negotiation
-u, --udp UDP mode
-v, --verbose verbose (use twice to be more verbose)
-V, --version output version information and exit
-x, --hexdump hexdump incoming and outgoing traffic
-w, --wait=SECS timeout for connects and final net reads
-z, --zero zero-I/O mode (used for scanning)