We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4035dd7 + d564f5d commit ed435caCopy full SHA for ed435ca
lib/msf/core/exploit.rb
@@ -293,8 +293,11 @@ def initialize(info = {})
293
unless has_auto_target?(info['Targets'])
294
# Don't add the automatic target unless there's already more than one target to pick from
295
if info['Targets'].count > 1
296
- auto = ["Automatic", { 'AutoGenerated' => true}]
297
- info['Targets'].unshift(auto)
+ # Finally, only add the target if there is a remote host option
+ if self.respond_to?(:rhost)
298
+ auto = ["Automatic", { 'AutoGenerated' => true}]
299
+ info['Targets'].unshift(auto)
300
+ end
301
end
302
303
0 commit comments