Fix an error in the OpenVas and Burp Issue importers where the vuln and host info would import into the default workspace instead of the current workspace

bug/bundler_fix
Brian Patterson 2016-04-04 17:35:31 -05:00
parent d3eaae3e17
commit 2a7e3fb600
No known key found for this signature in database
GPG Key ID: 79C4E4506D8A9C42
2 changed files with 6 additions and 2 deletions

View File

@ -99,7 +99,7 @@ module Rex
return unless @state[:port] return unless @state[:port]
return unless @state[:proto] return unless @state[:proto]
return unless @state[:service_name] return unless @state[:service_name]
service_info = {} service_info = {:workspace => @args[:wspace]}
service_info[:host] = @state[:host] service_info[:host] = @state[:host]
service_info[:port] = @state[:port] service_info[:port] = @state[:port]
service_info[:proto] = @state[:proto] service_info[:proto] = @state[:proto]
@ -112,7 +112,7 @@ module Rex
return unless @state[:vuln_name] return unless @state[:vuln_name]
return unless @state[:issue_detail] return unless @state[:issue_detail]
return unless @state[:refs] return unless @state[:refs]
vuln_info = {} vuln_info = {:workspace => @args[:wspace]}
vuln_info[:service_id] = @state[:service_object].id vuln_info[:service_id] = @state[:service_object].id
vuln_info[:host] = @state[:host] vuln_info[:host] = @state[:host]
vuln_info[:name] = @state[:vuln_name] vuln_info[:name] = @state[:vuln_name]

View File

@ -132,6 +132,7 @@ module Parser
vuln_info[:info] = @state[:vuln_desc] vuln_info[:info] = @state[:vuln_desc]
vuln_info[:port] = @state[:port] vuln_info[:port] = @state[:port]
vuln_info[:proto] = @state[:proto] vuln_info[:proto] = @state[:proto]
vuln_info[:workspace] = @args[:wspace]
db_report(:vuln, vuln_info) db_report(:vuln, vuln_info)
end end
@ -145,6 +146,7 @@ module Parser
vuln_info[:info] = @state[:vuln_desc] vuln_info[:info] = @state[:vuln_desc]
vuln_info[:port] = @state[:port] vuln_info[:port] = @state[:port]
vuln_info[:proto] = @state[:proto] vuln_info[:proto] = @state[:proto]
vuln_info[:workspace] = @args[:wspace]
db_report(:vuln, vuln_info) db_report(:vuln, vuln_info)
end end
@ -157,11 +159,13 @@ module Parser
service_info[:name] = @state[:name] service_info[:name] = @state[:name]
service_info[:port] = @state[:port] service_info[:port] = @state[:port]
service_info[:proto] = @state[:proto] service_info[:proto] = @state[:proto]
service_info[:workspace] = @args[:wspace]
db_report(:service, service_info) db_report(:service, service_info)
host_info = {} host_info = {}
host_info[:host] = @state[:host] host_info[:host] = @state[:host]
host_info[:workspace] = @args[:wspace]
db_report(:host, host_info) db_report(:host, host_info)
end end