File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed
lib/msf/core/modules/loader Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,7 @@ class Msf::Modules::Loader::Directory < Msf::Modules::Loader::Base
11
11
# @return [true] if path is a directory
12
12
# @return [false] otherwise
13
13
def loadable? ( path )
14
- if File . directory? ( path )
15
- true
16
- else
17
- false
18
- end
14
+ File . directory? ( path )
19
15
end
20
16
21
17
protected
@@ -35,8 +31,7 @@ def each_module_reference_name(path, opts={})
35
31
full_entry_path = ::File . join ( path , entry )
36
32
type = entry . singularize
37
33
38
- unless ::File . directory? ( full_entry_path ) and
39
- module_manager . type_enabled? type
34
+ unless ::File . directory? ( full_entry_path ) && module_manager . type_enabled? ( type )
40
35
next
41
36
end
42
37
Original file line number Diff line number Diff line change @@ -11,11 +11,7 @@ class Msf::Modules::Loader::Executable < Msf::Modules::Loader::Base
11
11
# @return [true] if path is a directory
12
12
# @return [false] otherwise
13
13
def loadable? ( path )
14
- if File . directory? ( path )
15
- true
16
- else
17
- false
18
- end
14
+ File . directory? ( path )
19
15
end
20
16
21
17
protected
@@ -35,8 +31,7 @@ def each_module_reference_name(path, opts={})
35
31
full_entry_path = ::File . join ( path , entry )
36
32
type = entry . singularize
37
33
38
- unless ::File . directory? ( full_entry_path ) and
39
- module_manager . type_enabled? type
34
+ unless ::File . directory? ( full_entry_path ) && module_manager . type_enabled? ( type )
40
35
next
41
36
end
42
37
You can’t perform that action at this time.
0 commit comments