use a better check for whether rhosts exists
parent
0388c02976
commit
7d32166c70
|
@ -294,7 +294,7 @@ class Exploit < Msf::Module
|
||||||
# Don't add the automatic target unless there's already more than one target to pick from
|
# Don't add the automatic target unless there's already more than one target to pick from
|
||||||
if info['Targets'].count > 1
|
if info['Targets'].count > 1
|
||||||
# Finally, only add the target if there is a remote host option
|
# Finally, only add the target if there is a remote host option
|
||||||
if self.respond_to?(:rhost)
|
if self.options['RHOST']
|
||||||
auto = ["Automatic", { 'AutoGenerated' => true}]
|
auto = ["Automatic", { 'AutoGenerated' => true}]
|
||||||
info['Targets'].unshift(auto)
|
info['Targets'].unshift(auto)
|
||||||
end
|
end
|
||||||
|
@ -302,7 +302,6 @@ class Exploit < Msf::Module
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
self.targets = Rex::Transformer.transform(info['Targets'], Array,
|
self.targets = Rex::Transformer.transform(info['Targets'], Array,
|
||||||
[ Target ], 'Targets')
|
[ Target ], 'Targets')
|
||||||
self.default_target = info['DefaultTarget'] || 0
|
self.default_target = info['DefaultTarget'] || 0
|
||||||
|
@ -702,7 +701,6 @@ class Exploit < Msf::Module
|
||||||
datastore['TARGET'] = 1
|
datastore['TARGET'] = 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
target_idx = target_index
|
target_idx = target_index
|
||||||
|
|
Loading…
Reference in New Issue