Skip to content

Commit 7ff7c70

Browse files
committed
setting host_name to address if host_name is blank.
1 parent 69769b1 commit 7ff7c70

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/msf/core/db_manager/host.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,14 @@ def report_host(opts)
175175
if opts[:info]
176176
opts[:info] = opts[:info][0,65535]
177177
end
178-
178+
179179
# Truncate the name field at the maximum field length
180180
if opts[:name]
181181
opts[:name] = opts[:name][0,255]
182+
else
183+
opts[:name] = addr
182184
end
183-
185+
184186
if opts[:os_name]
185187
os_name, os_flavor = split_windows_os_name(opts[:os_name])
186188
opts[:os_name] = os_name if os_name.present?

0 commit comments

Comments
 (0)