metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
Rex::Parser::NmapXMLStreamParser#initialize
Create a new stream parser for NMAP XML output
If given a block, it will be stored in +on_found_host+, otherwise you
need to set it explicitly, e.g.:
parser = NmapXMLStreamParser.new
parser.on_found_host = Proc.new { |host|
# do stuff with the host
}
REXML::Document.parse_stream(File.new(nmap_xml), parser)Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/rex/parser/nmap_xml.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Rex--Parser--NmapXMLStreamParser-initialize-for-pr
# Commit to gitgit add lib/rex/parser/nmap_xml.rbgit commit -m "better docs for Rex::Parser::NmapXMLStreamParser#initialize"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Rex--Parser--NmapXMLStreamParser-initialize-for-pr
hub pull-request
# Celebrate!