Normal Output
Requests that normal output be directed to the given filename. As discussed above, this differs slightly from interactive output.
Nmapr.scan :cmd do
output :file, "output.log"
end
XML Output
Requests that XML output be directed to the given filename. Nmap includes a document type definition (DTD) which allows XML parsers to validate Nmap XML output.
Nmapr.scan :cmd do
output :xml, "output.xml"
end
ScRipT KIdd|3 oUTpuT
Script kiddie output is like interactive output, except that it is post-processed to better suit the l33t HaXXorZ who previously looked down on Nmap due to its consistent capitalization and spelling. Humor impaired people should note that this option is making fun of the script kiddies before flaming me for supposedly "helping them".
Nmapr.scan :cmd do
output :leet
end
Grepable
This output format is covered last because it is deprecated. The XML output format is far more powerful, and is nearly as convenient for experienced users.
Nmapr.scan :cmd do
output :grepable
end
Output All Formats To Basename
As a convenience, you may specify-oAbasenameto store scan results in normal, XML, and grepable formats at once. They are stored inbasename.nmap,basename.xml, andbasename.gnmap, respectively.
Nmapr.scan :cmd do
output :all, "output_base_name"
end