Make parsing easier
parent
0cc7be0138
commit
c50e7c73b6
|
@ -133,19 +133,13 @@ class Metasploit3 < Msf::Auxiliary
|
|||
}
|
||||
|
||||
# remove unclosed tags for REXML
|
||||
body = body.gsub('<wbr>', '')
|
||||
body = body.gsub('<br>', '')
|
||||
body.gsub!('<wbr>', '')
|
||||
body.gsub!('<br>', '')
|
||||
doc = REXML::Document.new(body)
|
||||
tds = doc.get_elements("//td")
|
||||
td_counter = 0
|
||||
tds.each do |td|
|
||||
td = td.get_text.to_s.strip
|
||||
infos.each do |k, v|
|
||||
if td == k
|
||||
infos[k] = tds[td_counter+1].get_text.to_s.strip
|
||||
end
|
||||
end
|
||||
td_counter +=1
|
||||
tds.each_index do |idx|
|
||||
td = tds[idx].get_text.to_s.strip
|
||||
infos[td] = tds[idx+1].get_text.to_s.strip if infos.has_key?(td)
|
||||
end
|
||||
|
||||
# print out the goodies
|
||||
|
|
Loading…
Reference in New Issue