From e4a5e466b2427e6f5b6138d6792b16ad9ecaaaff Mon Sep 17 00:00:00 2001 From: VbScrub <53273102+VbScrub@users.noreply.github.com> Date: Thu, 2 Dec 2021 16:56:20 +0000 Subject: [PATCH] Implemented results limit --- Rubeus/lib/Roast.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Rubeus/lib/Roast.cs b/Rubeus/lib/Roast.cs index d4445068..e02563e2 100755 --- a/Rubeus/lib/Roast.cs +++ b/Rubeus/lib/Roast.cs @@ -436,8 +436,15 @@ public static void Kerberoast(string spn = "", List spns = null, string // used to keep track of years that users had passwords last set in SortedDictionary userPWDsetYears = new SortedDictionary(); + int resultCount = 0; foreach (IDictionary user in users) { + resultCount++; + if (resultLimit > 0 && resultCount > resultLimit) + { + Console.WriteLine("[*] More results were found but /resultlimit excludes them"); + break; + } string samAccountName = (string)user["samaccountname"]; string distinguishedName = (string)user["distinguishedname"]; string servicePrincipalName = ((string[])user["serviceprincipalname"])[0];