diff --git a/TheSprayer/ActiveDirectoryService.cs b/TheSprayer/ActiveDirectoryService.cs index 7184900..37d8647 100644 --- a/TheSprayer/ActiveDirectoryService.cs +++ b/TheSprayer/ActiveDirectoryService.cs @@ -228,7 +228,7 @@ public void SprayPasswords(IEnumerable passwords, IEnumerable us //Filter users down to the list passed in (if any) if (usersToSpray != null) { - users = users.Where(u => usersToSpray.Contains(u.SamAccountName)).ToList(); + users = users.Where(u => usersToSpray.Any(u2 => u2.ToLower() == u.SamAccountName.ToLower())).ToList(); if (!users.Any()) { Console.WriteLine("No users, exiting!"); @@ -360,8 +360,6 @@ public bool TryValidateCredentials(string username, string password) { return false; } - - } private LdapConnection CreateLdapConnection() diff --git a/TheSprayer/Program.cs b/TheSprayer/Program.cs index 0319d7d..270c295 100644 --- a/TheSprayer/Program.cs +++ b/TheSprayer/Program.cs @@ -11,7 +11,7 @@ public class Program public static void Main(string[] args) { Parser.Default.ParseArguments(args).WithParsed(o => - { + { IEnumerable passwords, users; int remainingAttempts;