Use File.open block.
parent
bc57537205
commit
fac03570d1
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue