diff --git a/Rubeus/lib/Harvest.cs b/Rubeus/lib/Harvest.cs index ba2d8377..03582669 100755 --- a/Rubeus/lib/Harvest.cs +++ b/Rubeus/lib/Harvest.cs @@ -88,7 +88,7 @@ public void HarvestTicketGrantingTickets() if (collectionStart.AddSeconds(this.runFor) < DateTime.Now) { Console.WriteLine("[*] Completed running for {0} seconds, exiting\r\n", runFor); - System.Environment.Exit(0); + return; } } diff --git a/Rubeus/lib/Helpers.cs b/Rubeus/lib/Helpers.cs index ee2e0a1f..3427f055 100755 --- a/Rubeus/lib/Helpers.cs +++ b/Rubeus/lib/Helpers.cs @@ -59,7 +59,7 @@ public static byte[] StringToByteArray(string hex) if ((hex.Length % 16) != 0) { Console.WriteLine("\r\n[X] Hash must be 16, 32 or 64 characters in length\r\n"); - System.Environment.Exit(1); + return null; } // yes I know this inefficient @@ -564,4 +564,4 @@ static public List> GetADObjects(SearchResultCollect #endregion } -} \ No newline at end of file +}