[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2742
  • Last Modified:

NMAP command line

I am getting an error while trying to save the output to an output file using nmap through command line.  The GUI keeps crashing on me so I am trying to the command line to see if it works but I get the following error:

C:\Program Files (x86)\Nmap>nmap -T4 -F -oX myscan.xml
Failed to open XML output file myscan.xml for writing

Does anyone know what the issue might be related to?

3 Solutions
does the myscan.xml file exist in the directory you are running nmap from? If not I would try creating it and ensuring you have the appropriate permissions to the file for writing. You may also specify the direct path to your XML file such as "C:\nmap\Myscan.xml"
Patrick BogersDatacenter platform engineer LindowsCommented:
BigPapa is right, it is complaining the file is not there, your command is good.

Zenmap is even easier, just scan and save scan to XML.
An other issue might be that typically a normal user can't update anything in C:\Program Files (x86) or under it.

I would try:

nmap -T4 -F -oX c:\users\xxxxxx\myscan.xml

Where xxxxx is your userid, or run command prompt as Admin.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now