常用网络调试工具
程序员文章站
2022-06-03 22:46:20
...
nmap
功能:主机探测、端口扫描、版本检测、系统检测、支持探测脚本编写
- 检查网段主机存活情况,还能看到各IP端口状态
nmap 192.168.8.1/24 #24表示子网掩码255.255.255.0
#exp:
Host is up (0.0042s latency).
Not shown: 996 closed ports
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
80/tcp open http
3389/tcp open ms-wbt-server
nmap -sn 192.168.8.1/24#不扫描端口状态
- 扫描路由器
sudo nmap --traceroute 192.168.8.1 #路由IP
#exp:
Starting Nmap 7.70 ( https://nmap.org ) at 2019-04-03 10:59 CST
Nmap scan report for 192.168.8.1
Host is up (0.011s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
80/tcp open http
MAC Address: EC:17:2F:A7:CC:CA (Tp-link Technologies)
TRACEROUTE
HOP RTT ADDRESS
1 10.88 ms 192.168.8.1
- 扫描操作系统类型
sudo nmap -O 192.168.8.1
#exp:
Starting Nmap 7.70 ( https://nmap.org ) at 2019-04-03 11:02 CST
Nmap scan report for 192.168.8.1
Host is up (0.0052s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
80/tcp open http
MAC Address: EC:17:2F:A7:CC:CA (Tp-link Technologies)
Device type: general purpose|specialized|WAP
Running: Linux 3.X|4.X, Philips embedded
OS CPE: cpe:/o:linux:linux_kernel:3.14 cpe:/h:philips:hue_bridge_2.0 cpe:/o:linux:linux_kernel:3.18 cpe:/o:linux:linux_kernel:4.1
OS details: Philips Hue Bridge 2.0 (Linux 3.14), OpenWrt Chaos Calmer 15.05 (Linux 3.18) or Designated Driver (Linux 4.1 or 4.4)
Network Distance: 1 hop
OS detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 43.37 seconds
netcat
功能:在两台电脑之间建立链接并返回两个数据流
- 端口扫描:参数z表示零IO模式(连接成功后即刻关闭),v详细输出,n不使用DNS反向查询IP域名
nc -z -v -n 192.168.8.1 1-1000 #扫描1-1000Port;
#exp:
192.168.8.1 22 (ssh) open
192.168.8.1 53 (domain) open
192.168.8.1 80 (http) open
nc -v 192.168.8.22#抓去bannaer(ssh登陆时最先显示的系统版本信息之类的敏感信息)
#exp:
OpenWrt.lan [192.168.8.1] 22 (ssh) open
SSH-2.0-dropbear
ͷ|??
???,[email protected],diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,[email protected],aes256-ctraes128-ctr,aes256-ctrhmac-sha1,hmac-sha2-256hmac-sha1,hmac-sha2-256nonenone?]RD??<?:
- chat server(网络调试助手功能)
nc -l 1567 #1567端口启动一个tcp服务器server
nc 127.0.0.1 1567 #连接该服务器client
- 文件传输
nc -l 1567 > file.txt
nc 127.0.0.1 1567 < file.txt
- 流视频
cat video.avi | nc -l 1567 #server
nc 127.0.0.1 1567 | mplayer -vo x11 -cache 3000 #client
上一篇: 苹果将成为台积电今年最大的5nm客户:为A15等芯片铺路
下一篇: 详解Profile