Module: Nmap2json

Defined in:
lib/nmap2json.rb,
lib/nmap2json/version.rb

Constant Summary collapse

VERSION =
"1.0.2"

Class Method Summary collapse

Class Method Details

.parse_xml(file, save: false) ⇒ Object



6
7
8
9
10
# File 'lib/nmap2json.rb', line 6

def self.parse_xml(file, save: false)
  j = Hash.from_xml(IO.binread(file)).to_json
  IO.binwrite(save, j) if save
  return j
end