一 nc
sudo apt install netcat-openbsd
$nc -vz baidu.com 80
Connection to baidu.com (39.156.66.10) 80 port [tcp/http] succeeded!
$nc -h
nc [-46CDdFhklNnrStUuvZz] [-I length] [-i interval] [-M ttl]
[-m minttl] [-O length] [-P proxy_username] [-p source_port]
[-q seconds] [-s sourceaddr] [-T keyword] [-V rtable] [-W recvlimit]
[-w timeout] [-X proxy_protocol] [-x proxy_address[:port]]
[destination] [port]
-v verbose
-z Zero-I/O mode
或sudo apt install ncat
$ ncat -vz baidu.com 80
Ncat: Version 7.80 ( https://nmap.org/ncat )
Ncat: Connected to 110.242.68.66:80.
Ncat: 0 bytes sent, 0 bytes received in 0.27 seconds.
二 telnet
sudo apt install telnet
$telnet 192.168.2.61 22
Trying 192.168.2.61...
Connected to 192.168.2.61.
Escape character is '^]'.
SSH-2.0-OpenSSH_9.5
轉(zhuǎn)義符為 ‘^]’.
ctrl + ] 之后quit 或 q
$telnet baidu.com 80
Trying 39.156.66.10...
Connected to baidu.com.
Escape character is '^]'.
^]
telnet> q
Connection closed.
$telnet baidu.com 443
Trying 110.242.68.66...
Connected to baidu.com.
Escape character is '^]'.
^]
telnet> q
Connection closed.
三 nmap
$ nmap baidu.com -p 443
Starting Nmap 7.80 ( https://nmap.org ) at 2024-01-17 08:06 CST
Nmap scan report for baidu.com (110.242.68.66)
Host is up (0.023s latency).
Other addresses for baidu.com (not scanned): 39.156.66.10
PORT STATE SERVICE
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 0.21 seconds
掃描TCP開放端口
$nmap -sT baidu.com
PORT STATE SERVICE
80/tcp open http
443/tcp open https
掃描UDP開放端口 需root權(quán)限文章來源:http://www.zghlxwxcb.cn/news/detail-800870.html
$nmap -sU baidu.com
nmap 掃描整個網(wǎng)段文章來源地址http://www.zghlxwxcb.cn/news/detail-800870.html
nmap -sn 192.168.1.0/24
Starting Nmap 7.80 ( https://nmap.org ) at 2024-01-17 08:07 CST
Nmap scan report for 192.168.1.1
Host is up (0.0022s latency).
Nmap scan report for 192.168.1.2
Host is up (0.0046s latency).
Nmap scan report for 192.168.1.5
Host is up (0.0032s latency).
Nmap done: 256 IP addresses (3 hosts up) scanned in 6.96 seconds
到了這里,關(guān)于如何掃描網(wǎng)址ip的特定端口或掃描全部網(wǎng)段的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!