File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed
Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ nc
2+ ===
3+
4+ 命令用于设置路由器。
5+
6+ ## 补充说明
7+
8+ ** nc命令** 用于设置路由器。执行本指令可设置路由器的相关参数。
9+
10+ ### 语法
11+
12+ ```
13+ nc [-hlnruz][-g<网关...>][-G<指向器数目>][-i<延迟秒数>][-o<输出文件>][-p<通信端口>]
14+ [-s<来源位址>][-v...][-w<超时秒数>][主机名称][通信端口...]
15+ ```
16+
17+ ### 选项
18+
19+ ```
20+ -g<网关> 设置路由器跃程通信网关,最丢哦可设置8个。
21+ -G<指向器数目> 设置来源路由指向器,其数值为4的倍数。
22+ -h 在线帮助。
23+ -i<延迟秒数> 设置时间间隔,以便传送信息及扫描通信端口。
24+ -l 使用监听模式,管控传入的资料。
25+ -n 直接使用IP地址,而不通过域名服务器。
26+ -o<输出文件> 指定文件名称,把往来传输的数据以16进制字码倾倒成该文件保存。
27+ -p<通信端口> 设置本地主机使用的通信端口。
28+ -r 乱数指定本地与远端主机的通信端口。
29+ -s<来源位址> 设置本地主机送出数据包的IP地址。
30+ -u 使用UDP传输协议。
31+ -v 显示指令执行过程。
32+ -w<超时秒数> 设置等待连线的时间。
33+ -z 使用0输入/输出模式,只在扫描通信端口时使用。
34+ ```
35+
36+ ### 实例
37+
38+ TCP端口扫描
39+
40+ ```
41+ [root@localhost ~]# nc -v -z -w2 192.168.0.3 1-100
42+ 192.168.0.3: inverse host lookup failed: Unknown host
43+ (UNKNOWN) [192.168.0.3] 80 (http) open
44+ (UNKNOWN) [192.168.0.3] 23 (telnet) open
45+ (UNKNOWN) [192.168.0.3] 22 (ssh) open
46+ ```
47+
48+ 扫描192.168.0.3 的端口 范围是 1-100
49+ 扫描UDP端口
50+
51+ ```
52+ [root@localhost ~]# nc -u -z -w2 192.168.0.1 1-1000 # 扫描192.168.0.3 的端口 范围是 1-1000
53+ ```
54+
55+ 扫描指定端口
56+
57+ ```
58+ [root@localhost ~]# nc -nvv 192.168.0.1 80 # 扫描 80端口
59+ (UNKNOWN) [192.168.0.1] 80 (?) open
60+ y //用户输入
61+ ```
62+
63+ <!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->
You can’t perform that action at this time.
0 commit comments