Skip to content

Commit 25996a1

Browse files
Fixed file read block.
1 parent 708eb0e commit 25996a1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modules/auxiliary/scanner/mysql/mysql_writable_dirs.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ def run_host(ip)
5151
return
5252
end
5353

54-
File.open(datastore['DIR_LIST'], "r") do |f|
55-
f.each_line do |line|
56-
check_dir(line.chomp)
57-
end
54+
File.read(datastore['DIR_LIST']).each_line do |dir|
55+
check_dir(dir.chomp)
5856
end
5957

6058
end

0 commit comments

Comments
 (0)