File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
spec/lib/msf/core/exploit Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ def auto_targeted_index
38
38
# @return [Msf::Module::Target] the Target that our automatic routine selected
39
39
def select_target
40
40
return nil unless auto_target?
41
- host_record = target_host
41
+ host_record = auto_target_host
42
42
return nil if host_record . nil?
43
43
filtered_targets = filter_by_os ( host_record )
44
44
filtered_targets . first
@@ -48,7 +48,7 @@ def select_target
48
48
#
49
49
# @return [Mdm:Host] the Host record if one exists
50
50
# @return [nil] if no Host record is present, or the DB is not active
51
- def target_host
51
+ def auto_target_host
52
52
return nil unless self . respond_to? ( :rhost )
53
53
return nil unless framework . db . active
54
54
current_workspace = framework . db . find_workspace ( self . workspace )
Original file line number Diff line number Diff line change 69
69
host_obj = FactoryGirl . create ( :mdm_host , address : host_addr )
70
70
windows_exploit . datastore [ 'WORKSPACE' ] = host_obj . workspace . name
71
71
windows_exploit . datastore [ 'RHOST' ] = host_addr
72
- expect ( windows_exploit . target_host ) . to eq host_obj
72
+ expect ( windows_exploit . auto_target_host ) . to eq host_obj
73
73
end
74
74
75
75
it 'should return nil if there is not one' do
76
76
windows_exploit . datastore [ 'RHOST' ] = '192.168.111.115'
77
- expect ( windows_exploit . target_host ) . to be_nil
77
+ expect ( windows_exploit . auto_target_host ) . to be_nil
78
78
end
79
79
end
80
80
You can’t perform that action at this time.
0 commit comments