方法1:
┌──(root?mykali)-[~]
└─# lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 1831 root 4u IPv6 29823 0t0 TCP *:http (LISTEN)
apache2 1834 www-data 4u IPv6 29823 0t0 TCP *:http (LISTEN)
apache2 1835 www-data 4u IPv6 29823 0t0 TCP *:http (LISTEN)
apache2 1836 www-data 4u IPv6 29823 0t0 TCP *:http (LISTEN)
apache2 1837 www-data 4u IPv6 29823 0t0 TCP *:http (LISTEN)
apache2 1838 www-data 4u IPv6 29823 0t0 TCP *:http (LISTEN)
方法2:
┌──(root?kali)-[~]
└─# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp6 0 0 :::80 :::* LISTEN(监听) 80834/apache2
方法3:
┌──(root?kali)-[~]
└─# ss -an | grep ":80"
nl UNCONN 0 0 15:807 *
nl UNCONN 0 0 15:807 *
tcp LISTEN 0 511 *:80 *:*
方法4:
┌──(root?kali)-[~]
└─# nmap -p80 127.0.0.1
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-05-28 16:19 CST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000068s latency).
PORT STATE SERVICE
80/tcp open http
Nmap是一款强大的网络扫描工具
方法5:
┌──(root?kali)-[~]
└─# telnet 127.0.0.1 80
开放
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
没有开放
telnet: Unable to connect to remote host: Connection refused
方法6:
┌──(root?kali)-[~]
└─# nc -nv 127.0.0.1 80
(UNKNOWN) [127.0.0.1] 80 (http) open
^C
nc tcp/ip连接的一把瑞士军刀
方法7:使用客户端程序连接访问
curl 是一个基于文本的浏览器(常用于网站测试)