问题描述
在我的新 Ubuntu 安装中,使用 nmap 7.91,当尝试使用 oN ~/somefile
进行扫描时,我总是收到错误 Failed to open normal output file /home/user/somefile for writing QUITTING!
我尝试使用 sudo
,预先创建文件,使用绝对路径,使用 chmod
显式地使文件可写,尝试使用 xml 和脚本小子格式。没有任何效果。
操作系统是 Ubuntu 20.04,nmap 是使用 snap 安装的。 确切的命令是
sudo nmap -sn -oN /home/user/somefile [some IP range here]
解决方法
我今天遇到了这个问题,这似乎是 7.91 版本的行为(或错误)发生了变化。为了解决这个问题,我通过 snap 删除了 7.91 版本,然后使用以下命令安装了以前的版本 (7.80):sudo apt install nmap。这为我解决了问题。