Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Here is a PowerShell script to parse nmap XML output files.

331 views
Skip to first unread message

Jason Fossen

unread,
Jun 12, 2009, 1:56:55 PM6/12/09
to
Hello:

Here's a simple script to parse the XML output files produced by the nmap
port scanner:

https://blogs.sans.org/windows-security/2009/06/11/powershell-script-to-parse-nmap-xml-output/

The output of the script is an array of custom PowerShell objects which can
be piped like any other objects. An example use would be:

dir *.xml | .\parse-nmap.ps1 | where {($_.IPv4 -like
"10.57.*") -and ($_.Ports -match "open:TCP:22")}

And the data can be cleanly exported to CSV for searching or reimport later
of course.

Cheers,
Jason


-----------------------------------------------
Jason Fossen -- Dallas, Tx
http://www.WindowsPowerShellTraining.com
-----------------------------------------------


Marco Shaw [MVP]

unread,
Jun 20, 2009, 4:28:52 PM6/20/09
to
Please consider posting this to poshcode.org.

Marco

"Jason Fossen" <nos...@nospam.com> wrote in message
news:uDaDuc46...@TK2MSFTNGP05.phx.gbl...

Jason Fossen

unread,
Jun 27, 2009, 10:07:31 AM6/27/09
to

> Please consider posting this to poshcode.org.

Posted!

@nospam.com Jason Fossen

unread,
Jul 18, 2009, 2:07:10 PM7/18/09
to
> Posted!
>

Posted again. The master copy has been updated a few times already in fact,
so in general I guess it's best to check the blog for the latest version
(there's even a hacked-up YouTube video now to go with it ;-)
http://www.youtube.com/watch?v=B6wjM2CIMKs

Once the final version of PowerShell 2.0 is released, the script will be
updated again for the new 2.0 stuff...

0 new messages