Use glob instead of entries
Fixes the case where a non-ruby file exists in the login_scanner/ directorybug/bundler_fix
parent
d178b1f788
commit
567435f508
|
@ -23,8 +23,7 @@ module Metasploit
|
||||||
unless @required
|
unless @required
|
||||||
# Make sure we've required all the scanner classes
|
# Make sure we've required all the scanner classes
|
||||||
dir = File.expand_path("../login_scanner/", __FILE__)
|
dir = File.expand_path("../login_scanner/", __FILE__)
|
||||||
Dir.entries(dir).each do |f|
|
Dir.glob(File.join(dir, "*.rb")).each do |f|
|
||||||
f = File.join(dir, f)
|
|
||||||
require f if File.file?(f)
|
require f if File.file?(f)
|
||||||
end
|
end
|
||||||
@required = true
|
@required = true
|
||||||
|
|
Loading…
Reference in New Issue