Skip to content

Commit efeacf8

Browse files
committed
ensure os_flavor can be supplied for no Windows OS
1 parent 9b01f3d commit efeacf8

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
@@ -221,7 +221,9 @@ def report_host(opts)
221221
os_name, os_flavor = split_windows_os_name(opts[:os_name])
222222
opts[:os_name] = os_name if os_name.present?
223223
if opts[:os_flavor].present?
224-
opts[:os_flavor] = os_flavor + opts[:os_flavor]
224+
if os_flavor.present? # only prepend if there is a value that needs it
225+
opts[:os_flavor] = os_flavor + opts[:os_flavor]
226+
end
225227
else
226228
opts[:os_flavor] = os_flavor
227229
end

0 commit comments

Comments
 (0)