File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -294,15 +294,14 @@ def initialize(info = {})
294
294
# Don't add the automatic target unless there's already more than one target to pick from
295
295
if info [ 'Targets' ] . count > 1
296
296
# Finally, only add the target if there is a remote host option
297
- if self . respond_to? ( :rhost )
297
+ if self . respond_to? ( :rhost ) && self . respond_to? ( :auto_targeted_index )
298
298
auto = [ "Automatic" , { 'AutoGenerated' => true } ]
299
299
info [ 'Targets' ] . unshift ( auto )
300
300
end
301
301
end
302
302
end
303
303
end
304
304
305
-
306
305
self . targets = Rex ::Transformer . transform ( info [ 'Targets' ] , Array ,
307
306
[ Target ] , 'Targets' )
308
307
self . default_target = info [ 'DefaultTarget' ] || 0
@@ -702,7 +701,6 @@ def target
702
701
datastore [ 'TARGET' ] = 1
703
702
end
704
703
end
705
-
706
704
end
707
705
708
706
target_idx = target_index
You can’t perform that action at this time.
0 commit comments