Skip to content

Commit 222af8c

Browse files
committed
Fix NoMethodError when check_dir fails to enum the permission
See the following for more info: http://dev.metasploit.com/redmine/issues/7452
1 parent 72f0a56 commit 222af8c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/post/windows/gather/enum_dirperms.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def enum_subdirs(dpath, maxdepth, token)
100100
realpath = dpath + '\\' + d
101101
if session.fs.file.stat(realpath).directory?
102102
perm = check_dir(realpath, token)
103+
next if perm.nil?
103104
if !filter or perm.include? filter
104105
print_status(perm + "\t" + realpath)
105106
end

0 commit comments

Comments
 (0)