1)ping
PING www.a.shifen.com (183.232.231.174) 56(84) bytes of data.
64 bytes from 183.232.231.174 (183.232.231.174): icmp_seq=1 ttl=53 time=23.8 ms
64 bytes from 183.232.231.174 (183.232.231.174): icmp_seq=2 ttl=53 time=19.2 ms
64 bytes from 183.232.231.174 (183.232.231.174): icmp_seq=3 ttl=53 time=23.2 ms
64 bytes from 183.232.231.174 (183.232.231.174): icmp_seq=4 ttl=53 time=19.9 ms
64 bytes from 183.232.231.174 (183.232.231.174): icmp_seq=5 ttl=53 time=19.6 ms
2)traceroute全部被加了防护,路径中的IP地址都变成了*号
raceroute会统计到目标主机的每一跳的网络状态(print the route packets trace to network host),这个命令常常用于判断网络故障,比如本地不通,可使用该命令探测出是哪个路由出问题了。
traceroute to www.baidu.com (183.232.231.172), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * * *
18 * * *
19 * * *
20 * * *
21 * * *
22 * * *
23 * * *
24 * * *
25 * * *
26 * * *
27 * * *
28 * * *
29 * * *
30 * * *
3)netstat -lnpt
查看当前建立的网络连接(深刻理解netstat每一项代表的含义)
(No info could be read for "-p": geteuid()=1000 but you should be root.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
4)lsof
lsof
命令用来查看打开的文件(list open files),由于在Linux中一切皆文件,那socket、pipe等也是文件,因此能够查看网络连接以及网络设备,其中和网络最相关的是-i
选项,它输出符合条件的进程(4、6、协议、:端口、 @ip等)
5)telnet www.baidu.com 22
Trying 183.232.231.172...
Trying 183.232.231.174...
5)
nslookup www.baidu.com
Server: 211.142.211.124
Address: 211.142.211.124#53
Non-authoritative answer:
www.baidu.com canonical name = www.a.shifen.com.
Name: www.a.shifen.com
Address: 183.232.231.174
Name: www.a.shifen.com
Address: 183.232.231.172
6) whois coolshell.cn
Domain Name: coolshell.cn
ROID: 20090825s10001s91994755-cn
Domain Status: ok
Registrant ID: hc401628324-cn
Registrant: 陈皓
Registrant Contact Email: [email protected]
Sponsoring Registrar: 阿里云计算有限公司(万网)
Name Server: f1g1ns1.dnspod.net
Name Server: f1g1ns2.dnspod.net
Registration Time: 2009-08-25 00:40:26
Expiration Time: 2023-08-25 00:40:26
DNSSEC: unsigned
6)route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
127.0.0.0 0.0.0.0 255.0.0.0 U 256 0 0 lo
127.0.0.1 0.0.0.0 255.255.255.255 U 256 0 0 lo
127.255.255.255 0.0.0.0 255.255.255.255 U 256 0 0 lo
224.0.0.0 0.0.0.0 240.0.0.0 U 256 0 0 lo
255.255.255.255 0.0.0.0 255.255.255.255 U 256 0 0 lo
224.0.0.0 0.0.0.0 240.0.0.0 U 256 0 0 wifi0
255.255.255.255 0.0.0.0 255.255.255.255 U 256 0 0 wifi0
0.0.0.0 192.168.100.1 255.255.255.255 U 0 0 0 wifi0
192.168.100.255 0.0.0.0 255.255.255.255 U 0 0 0 wifi0
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 wifi0
192.168.100.19 0.0.0.0 255.255.255.255 U 0 0 0 wifi0
7)curl是强大的URL传输工具,支持FILE, FTP, HTTP, HTTPS, IMAP, LDAP, POP3,RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET以及TFTP等协议。我们使用这个命令最常用的功能就是通过命令行发送HTTP请求以及下载文件,它几乎能够模拟所有浏览器的行为请求,比如模拟refer(从哪个页面跳转过来的)、cookie、agent(使用什么浏览器)等等,同时还能够模拟表单数据。