Service info shouldn't be blanked if it exists.

Check service.info at the end of reporting a service instead of the
beginning. This will preserve an existing service info in the event
we're re-reporting a service.

[See #6701]
unstable
Tod Beardsley 2012-04-19 09:47:41 -05:00
parent ce3d98bc88
commit 8edf3fc8bd
2 changed files with 2 additions and 4 deletions

0
data/meterpreter/meterpreter.jar Normal file → Executable file
View File

View File

@ -491,7 +491,6 @@ class DBManager
hmac = opts.delete(:mac)
host = nil
wspace = opts.delete(:workspace) || workspace
opts[:info] = '' unless opts[:info]
hopts = {:workspace => wspace, :host => addr}
hopts[:name] = hname if hname
hopts[:mac] = hmac if hmac
@ -535,9 +534,8 @@ class DBManager
dlog("Unknown attribute for Service: #{k}")
end
}
if (service.state == nil)
service.state = ServiceState::Open
end
service.state = ServiceState::Open if service.state.nil?
service.info = "" if service.info.nil?
if (service and service.changed?)
msf_import_timestamps(opts,service)
service.save!