Make sure state is initialized

Fixes a stack trace when the xml has osmatch before osclass. Thanks Sean
Carolan for the report!
unstable
James Lee 2012-05-24 10:41:30 -06:00
parent 2a24b14331
commit e88501789c
1 changed files with 1 additions and 0 deletions

View File

@ -118,6 +118,7 @@ module Rex
return unless in_tag("os")
temp_hash = attr_hash(attrs)
if temp_hash["accuracy"].to_i == 100
@state[:os] ||= {}
@state[:os]["osmatch"] = temp_hash["name"]
end
end