启动命令> nmap后出错
dnet: Failed to open device eth0 after installing NMAP.
QUITTING!
Run Code Online (Sandbox Code Playgroud)
Pot*_*rca 41
就我而言,该错误是通过Snapnmap安装引起的。
为了让 nmap 工作,我必须告诉 snap 将其连接到网络控制:
sudo snap connect nmap:network-control
Run Code Online (Sandbox Code Playgroud)
之后一切正常。
TLDR:使用--unprivilegednmap 选项。
当我尝试使用最新可用版本(nmap 7.91、npcap 1.31)在 Windows 8.1 和 Windows 7 中通过 Wireguard 0.3.14 隧道扫描/测试主机时,我遇到了同样的问题。尝试了几种解决方案/组合、以管理员身份运行、重新安装等,除了降级到 Winpcap 4.1.3(最后一个可用)之外,结果相同:
\nC:\\Windows\\system32>nmap -n -P0 -p 22 192.168.20.1\nHost discovery disabled (-Pn). All addresses will be marked 'up' and scan times will be slower.\nStarting Nmap 7.91 ( https://nmap.org ) at 2021-06-08 13:28 Hora de verano central (M\xc3\xa9xico)\ndnet: Failed to open device eth0\nQUITTING!\nRun Code Online (Sandbox Code Playgroud)\n奇怪的是,接口列表nmap --iflist没有显示与之关联的设备名称eth0(也没有显示 MAC 地址,可能是 Wireguard 接口驱动程序安装/挂钩出错)。相关线路:
C:\\Windows\\system32>nmap --iflist\nStarting Nmap 7.91 ( https://nmap.org ) at 2021-06-08 13:32 Hora de verano central (M\xc3\xa9xico)\n************************INTERFACES************************\nDEV (SHORT) IP/MASK TYPE UP MTU MAC\neth0 (eth0) 10.10.252.92/32 ethernet up 65535 00:00:00:00:00:00\n :\nDEV WINDEVICE\neth0 <none>\nRun Code Online (Sandbox Code Playgroud)\n相关的route print:
C:\\Windows\\system32>route print\n===========================================================================\nInterface list\n8...........................Wintun Userspace Tunnel #77\n :\nIPv4 Route table\n===========================================================================\nActive routes:\nNetwork Destination Net mask Gateway Interface Metric\n192.168.20.0 255.255.255.0 On-link 10.10.252.92 5\n192.168.20.255 255.255.255.255 On-link 10.10.252.92 261\nRun Code Online (Sandbox Code Playgroud)\n使用以下--unprivileged选项解决了它:
C:\\Windows\\system32>nmap --unprivileged -n -P0 -p 22 192.168.20.1\nHost discovery disabled (-Pn). All addresses will be marked 'up' and scan times will be slower.\nStarting Nmap 7.91 ( https://nmap.org ) at 2021-06-08 13:22 Hora de verano central (M\xc3\x9axico)\nNmap scan report for 192.168.20.1\nHost is up (0.20s latency).\n\nPORT STATE SERVICE\n22/tcp open ssh\n\nNmap done: 1 IP address (1 host up) scanned in 0.29 seconds\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
29768 次 |
| 最近记录: |