nmap 扫描端口
[rps-include post=6632]
[rps-include post = 6632]
Port specification is important part of the scan. We should set port scope carefully because wrong scope will make our result vulnerable to false and long for time.
端口规格是扫描的重要部分。 我们应该谨慎设置端口范围,因为错误的范围会使我们的结果容易遭受错误和长时间的攻击。
指定端口 (Specify Ports)
As we know tcp and udp protocols have port numbers from 0 to 65535. There are default values for some scans but we can specify the target ports with this parameter.
我们知道tcp和udp协议的端口号从0到65535。某些扫描有默认值,但是我们可以使用此参数指定目标端口。
$ nmap -p 22,80,443 10.0.0.1
-p will specify ports 22, 80, 443 for remote
-p将为远程指定端口22、80、443
$ nmap -p 0-100 10.0.0.1
-p will specify port range between 0 and 100
-p将在0到100之间指定端口范围
排除端口(Exclude Ports)
We can exclude ports too. Specified ports will be excluded.
我们也可以排除端口。 指定的端口将被排除。
$ nmap -p 0-100 --exclude-ports 20-30 10.0.0.1
–exclude-ports will remove ports between 20 and 30
–exclude-ports将删除20到30之间的端口