Reputation: 31
I am invoking nmap
with the following command:
nmap -oX i.xml -p 1-1023 -r -T4 -d -d
Doing this sends output to i.xml
successfully. However, text is still printed on the command line in additional being redirected to i.xml
. I would like the command to run silently on the command line, but to still write all of its output to my i.xml
file. I tried using the -v0
argument, but using it results in neither my XML file nor the command line seeing any output.
How can I tell nmap to send its output only to my XML file?
Upvotes: 3
Views: 5980
Reputation: 360
First, you didn't specified any target on your command line. Not sure what you intend to do Second, -oX i.xml will output to i.xml AND stdout To have results only on xml file (and not on stdout), add an extra -v0 parameter
Upvotes: 2
Reputation: 5332
Have you tried redirecting stdout to the null device?
nmap -oX i.xml -p 1-1023 -r -T4 -d -d >/dev/null
On Windows, use NUL
instead of /dev/null
Upvotes: 7