Skip to content

Commit 5a1c7ca

Browse files
committed
Land rapid7#8135, Report hosts always add ip to hostname if hostname is blank
2 parents d10b3da + 60bc279 commit 5a1c7ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/msf/core/db_manager/host.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ def report_host(opts)
177177
end
178178

179179
# Truncate the name field at the maximum field length
180-
if opts[:name]
180+
if opts[:name].blank?
181+
opts[:name] = addr
182+
else
181183
opts[:name] = opts[:name][0,255]
182184
end
183185

0 commit comments

Comments
 (0)