Use File.open block.

bug/bundler_fix
Stephen Haywood 2016-10-03 10:09:45 -04:00 committed by GitHub
parent bc57537205
commit fac03570d1
1 changed files with 4 additions and 4 deletions

View File

@ -51,11 +51,11 @@ class MetasploitModule < Msf::Auxiliary
return
end
file = File.new(datastore['DIR_LIST'], "r")
file.each_line do |line|
File.open(datastore['DIR_LIST'], "r") do |f|
f.each_line do |line|
check_dir(line.chomp)
end
file.close
end
end