Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


NMAP - Help is hugely appreciated!

  • Please log in to reply
1 reply to this topic

#1 vikas891


  • Members
  • 2 posts
  • Local time:02:09 AM

Posted 21 May 2018 - 07:13 AM

I have scrounged the internet but I couldn’t get this to work, hence checking up with you..


Upon scanning a network for only 1 vulnerability, let’s say the WannaCry one, the most advisable output is XML and it gives us a neat summary. I have attached the XML for reference. https://files.fm/u/nsc549x2 


Now all the results are in a single XML page which is not exactly customer-friendly. What I would like to do here is only extract this part into CSV –


Host Script Output

Script Name


smb-vuln-ms17-010 VULNERABLE CVE-2017-0143


Maybe I could have two columns – Script Name and Output and it should give me a neat report of machines I need to look at.

I have tested many python and perl scripts on Github but none came close to what I want to achiece here. I understand that from a Linux box,  I could grep my way through to what I want, but I wish to have an external document in which I’d like to use NMAP for Windows for the sake of ease.

Any ideas/suggestions are welcome. 

BC AdBot (Login to Remove)


#2 Didier Stevens

Didier Stevens

  • BC Advisor
  • 2,717 posts
  • Gender:Male
  • Local time:10:39 PM

Posted 21 May 2018 - 01:56 PM

If you want CSV, use option -oG, that's grepable output e.g. CSV.


If you want XML too, that possible, you can include -oX for XML, or -oA for the 3 major formats.

Didier Stevens

SANS ISC Senior Handler
Microsoft MVP 2011-2016 Consumer Security, Windows Insider MVP 2016-2019


If you send me messages, per Bleeping Computer's Forum policy, I will not engage in a conversation, but try to answer your question in the relevant forum post. If you don't want this, don't send me messages.


Stevens' law: "As an online security discussion grows longer, the probability of a reference to BadUSB approaches 1.0"

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users