AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1226310
Accepted
Aidin
Aidin
Asked: 2020-04-12 12:31:30 +0800 CST2020-04-12 12:31:30 +0800 CST 2020-04-12 12:31:30 +0800 CST

如何在nmap中扫描和ip范围

  • 772

我一直在使用Angry IP Scanner,有了它,我可以通过将起始 IP 和结束 IP 放在两个文本框中轻松扫描 IP 范围。现在在nmap中,我想知道如何通过提供两个 IP 来扫描 IP 范围:凝视 IP 和结束 IP。例如,我喜欢这样使用 nmap:

nmap 10.10.10.10 10.10.15.254.254

请注意,我不想在 IP 末尾使用 /24。

networking nmap ip
  • 1 1 个回答
  • 1328 Views

1 个回答

  • Voted
  1. Best Answer
    Terrance
    2020-04-12T14:46:16+08:002020-04-12T14:46:16+08:00

    从man nmap

       CIDR notation is short but not always flexible enough. For example, you
       might want to scan 192.168.0.0/16 but skip any IPs ending with .0 or
       .255 because they may be used as subnet network and broadcast
       addresses. Nmap supports this through octet range addressing. Rather
       than specify a normal IP address, you can specify a comma-separated
       list of numbers or ranges for each octet. For example,
       192.168.0-255.1-254 will skip all addresses in the range that end in .0
       or .255, and 192.168.3-5,7.1 will scan the four addresses 192.168.3.1,
       192.168.4.1, 192.168.5.1, and 192.168.7.1. Either side of a range may
       be omitted; the default values are 0 on the left and 255 on the right.
       Using - by itself is the same as 0-255, but remember to use 0- in the
       first octet so the target specification doesn't look like a
       command-line option. Ranges need not be limited to the final octets:
       the specifier 0-255.0-255.13.37 will perform an Internet-wide scan for
       all IP addresses ending in 13.37. This sort of broad sampling can be
       useful for Internet surveys and research.
    

    所以你需要弄清楚你的开始和结束范围是什么。从我所看到的情况来看,您似乎正在10.10.10.10通过10.10.15.254(您的结束 IP10.10.15.254.254是无效地址),但这涵盖了 6 个整个子网,每个子网以 .1 开头并以 .254 IP 结尾,所以您可能不这样做不想从 .10 开始每个子网,因为您将跳过每个子网的前 9 个 IP。所以,这样做:(我添加了一个 -(s)can 命令并搜索 (n)o-port-scan(以前的 -sP)将扫描 1,524 个 IP 地址的主机)

    nmap -sn 10.10.10-15.1-254
    

    但从你写的来看,这就是我认为你想要的。

    希望有帮助!

    • 1

相关问题

  • 如何设置 VLAN 转发?

  • 如何将主机 Ubuntu 上的 VPN (tun0) 网络适配器映射到 VirtualBox 来宾 Windows?

  • 如何限制下载/上传带宽?

  • 如何通过 Windows 网络共享文件?

  • 面板小程序以文本形式显示当前网络流量?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve