unbreak store_loot
git-svn-id: file:///home/svn/framework3/trunk@11677 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
aeddee0f03
commit
de7ad3f111
|
@ -162,6 +162,8 @@ module Auxiliary::Report
|
|||
when "text/plain"
|
||||
ext = "txt"
|
||||
end
|
||||
# This method is available even if there is no database, don't bother checking
|
||||
host = framework.db.normalize_host(host)
|
||||
|
||||
ws = (db ? myworkspace.name[0,16] : 'default')
|
||||
name =
|
||||
|
|
|
@ -4408,6 +4408,19 @@ class DBManager
|
|||
end
|
||||
end
|
||||
|
||||
def normalize_host(host)
|
||||
# If the host parameter is a Session, try to extract its address
|
||||
if host.respond_to?('target_host')
|
||||
thost = host.target_host
|
||||
tpeer = host.tunnel_peer
|
||||
if tpeer and (!thost or thost.empty?)
|
||||
thost = tpeer.split(":")[0]
|
||||
end
|
||||
host = thost
|
||||
end
|
||||
host
|
||||
end
|
||||
|
||||
|
||||
protected
|
||||
|
||||
|
@ -4682,19 +4695,6 @@ protected
|
|||
vuln.refs << (rids - vuln.refs)
|
||||
end
|
||||
end
|
||||
|
||||
def normalize_host(host)
|
||||
# If the host parameter is a Session, try to extract its address
|
||||
if host.respond_to?('target_host')
|
||||
thost = host.target_host
|
||||
tpeer = host.tunnel_peer
|
||||
if tpeer and (!thost or thost.empty?)
|
||||
thost = tpeer.split(":")[0]
|
||||
end
|
||||
host = thost
|
||||
end
|
||||
host
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue