Skip to content

Commit b61aaef

Browse files
Fix undercase issue with userlist.dat
Remove the 2nd element of the array at line 102. Add .downcase for line 103. Fix to find filenames on systems that created the userlist.dat on uppercase.
1 parent dcd09f1 commit b61aaef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/post/windows/gather/credentials/mdaemon_cred_collector.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ def check_mdaemons(locations)
9999
vprint_status("Checking for Userlist in MDaemons directory at: #{location}")
100100
begin
101101
session.fs.dir.foreach("#{location}") do |fdir|
102-
['userlist.dat', 'UserList.dat'].each do |datfile|
103-
if fdir == datfile
102+
['userlist.dat'].each do |datfile|
103+
if fdir.downcase == datfile.downcase
104104
filepath = location + '\\' + datfile
105105
print_good("Configuration file found: #{filepath}")
106106
print_good("Found MDaemons on #{sysinfo['Computer']} via session ID: #{session.sid}")
@@ -318,4 +318,4 @@ def get_mdaemon_creds(userlist)
318318
report_imap(imap)
319319

320320
end
321-
end
321+
end

0 commit comments

Comments
 (0)