Skip to content

Commit 094fa81

Browse files
Update lib/msf/core/module/failure.rb
Per @smcintyre-r7's suggestion, which is a damned good one. Co-authored-by: Spencer McIntyre <[email protected]>
1 parent 1dc1a24 commit 094fa81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/module/failure.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def report_failure
5959
# Only include RHOST if it's a single valid host, not a multi-value string or file path
6060
rhost = self.datastore['RHOST'].to_s
6161
# Check if RHOST is not a file path and doesn't contain spaces (multiple hosts)
62-
unless rhost.start_with?('file:') || rhost.include?(' ')
62+
if Rex::Socket.is_ip_addr?(rhost)
6363
info[:host] = rhost
6464
end
6565
end

0 commit comments

Comments
 (0)