nmap 查看目标主机_Nmap目标规范

nmap 查看目标主机

nmap 查看目标主机

[rps-include post=6632]

[rps-include post = 6632]

Requirement for scanning is target specification. Nmap provides different methodologies to set targets.

扫描要求是目标规格。 Nmap提供了不同的方法来设置目标。

单一主机地址 (Single Host Address)

This is the simplest and mostly used target specification. We only provide single ip address.

这是最简单且最常用的目标规范。 我们仅提供一个IP地址。

$ nmap 192.168.1.1
  • 192.168.1.1 is the target ip address

    192.168.1.1是目标IP地址

Dns名称(Dns Name)

Nmap can use DNS names as targets. It will resolve DNS addresses into ip addresses. Be sure that DNS is working in the system

Nmap可以将DNS名称用作目标。 它将DNS地址解析为IP地址。 确保DNS在系统中正常工作

$ nmap localhost.com
  • localhost.com is the DNS name of our IP address

    localhost.com是我们IP地址的DNS名称

多个Dns名称(Multiple Dns Names)

We can also provide multiple dns names into nmap to scan like below.

我们还可以在nmap中提供多个dns名称,如下所示进行扫描。

$ nmap google.com microsoft.com

多个主机地址(Multiple Host Address)

As we see that scanning hosts one by one is tedious work. We may specify multiple hosts in very different ways.

如我们所见,逐一扫描主机是一项繁琐的工作。 我们可以以非常不同的方式指定多个主机。

$ nmap 192.168.1.*
  • 192.168.1.* is network address. means possible all values which mean from 0 to 255

    192.168.1。*是网络地址。 *表示可能表示0到255之间的所有值

$ nmap 192.168.*.*
  • As we expect we will scan /16 subnet in other words 192.168.0.0/16 

    正如我们期望的那样,我们将扫描/ 16子网,即192.168.0.0/16

作为网络地址 (As Network Address)

We can provide targets with CIDR masks.

我们可以为目标提供CIDR掩码。

$ nmap 192.168.1.0/24
  • Scan C class 192.168.1.0 network

    扫描C类192.168.1.0网络

$ nmap 192.168.0.0/20
  • Scans between 192.168.0.0192.168.15.255

    192.168.0.0192.168.15.255之间扫描

$ nmap 192.168.0.0-192.168.15.255
  • Scans between 192.168.0.0192.168.15.255

    192.168.0.0192.168.15.255之间扫描

  • – is used to specify range

    用于指定范围

从文件逐行读取(Reading From File Line By Line)

In enterprise environment there is a lot ip hosts. So specifying them by network can not be a good way. There is an option which is reading target hosts/networks from file.

在企业环境中,有很多IP主机。 因此,通过网络指定它们不是一个好方法。 有一个选项可以从文件中读取目标主机/网络。

We create a file named db  and add hosts/networks line by line like below

我们创建一个名为db的文件,并逐行添加主机/网络,如下所示

10.0.0.10 
10.0.0.11
10.0.1.0/24

Now we can use -iL  to scan these hosts

现在我们可以使用-iL扫描这些主机

$ nmap -iL db
  • We provide text file with -iL and the file name is db. As we see we can provide network addresses too. 10.0.1.0/24 is a network address.

    我们为文本文件提供-iL ,文件名为db 。 如我们所见,我们也可以提供网络地址。 10.0.1.0/24是网络地址。

LEARN MORE  How To Configure Cisco Routers and Switches Password?
了解更多信息如何配置思科路由器和交换机密码?

[rps-include post=6632]

[rps-include post = 6632]

翻译自: https://www.poftut.com/nmap-target-specification/

nmap 查看目标主机

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值