File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
modules/exploits/linux/misc Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -287,14 +287,17 @@ def initialize(info = {})
287
287
# to the information hash.
288
288
super ( info )
289
289
290
- self . default_target = info [ 'DefaultTarget' ] || 0
291
-
292
- # Add an auto-target to the exploit if it doesn't have one
293
- if info [ 'Targets' ] && info [ 'Targets' ] . count > 1 && !has_auto_target? ( info [ 'Targets' ] )
294
- # Finally, only add the target if there is a remote host option
295
- if self . respond_to? ( :rhost ) && self . respond_to? ( :auto_targeted_index )
296
- auto = [ "Automatic" , { 'AutoGenerated' => true } . merge ( info [ 'Targets' ] [ self . default_target ] [ 1 ] ) ]
297
- info [ 'Targets' ] . unshift ( auto )
290
+ if info . key? 'DefaultTarget'
291
+ self . default_target = info [ 'DefaultTarget' ]
292
+ else
293
+ self . default_target = 0
294
+ # Add an auto-target to the exploit if it doesn't have one
295
+ if info [ 'Targets' ] && info [ 'Targets' ] . count > 1 && !has_auto_target? ( info [ 'Targets' ] )
296
+ # Finally, only add the target if there is a remote host option
297
+ if self . respond_to? ( :rhost ) && self . respond_to? ( :auto_targeted_index )
298
+ auto = [ "Automatic" , { 'AutoGenerated' => true } . merge ( info [ 'Targets' ] [ self . default_target ] [ 1 ] ) ]
299
+ info [ 'Targets' ] . unshift ( auto )
300
+ end
298
301
end
299
302
end
300
303
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def initialize(info = {})
62
62
] ,
63
63
'Privileged' => true ,
64
64
'DisclosureDate' => 'Apr 09 2017' ,
65
- 'DefaultTarget' => 1
65
+ 'DefaultTarget' => 0
66
66
)
67
67
)
68
68
You can’t perform that action at this time.
0 commit comments