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

x
  • 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 172.16.0.0/16 -oX myscan.xml
Failed to open XML output file myscan.xml for writing
QUITTING!

Does anyone know what the issue might be related to?

LN
0
LateNaite
Asked:
LateNaite
3 Solutions
 
BigPapaGottiCommented:
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"
0
 
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.
0
 
giltjrCommented:
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 172.16.0.0/16 -oX c:\users\xxxxxx\myscan.xml

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

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