lib/rex/parser/ip360_xml.rb in librex-0.0.65 vs lib/rex/parser/ip360_xml.rb in librex-0.0.66
- old
+ new
@@ -1,5 +1,6 @@
+# -*- coding: binary -*-
require 'rexml/document'
require 'rex/ui'
module Rex
module Parser
@@ -31,13 +32,13 @@
when "dnsName"
@state = :is_fqdn
when "macAddress"
@state = :is_mac
when "os"
- @host['os'] = attributes['id']
+ @host['os'] = attributes['id']
when "vulnerability"
- @x = Hash.new
+ @x = Hash.new
@x['vulnid'] = attributes['id']
when "port"
@state = :is_port
when "protocol"
@state = :is_proto
@@ -48,10 +49,10 @@
@y['port'] = attributes['port']
@y['proto'] = attributes['protocol']
@host['apps'].push @y
end
end
-
+
def text(str)
case @state
when :is_fqdn
@host['hname'] = str
when :is_ip