Skip to content

Commit

Permalink
Added sorted output
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander authored and Alexander committed Mar 16, 2018
1 parent 10eb98d commit 19bec86
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Tokenvator/Enumeration.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Management;
using System.Runtime.InteropServices;
using System.Text;
Expand Down Expand Up @@ -267,7 +268,14 @@ public static Dictionary<UInt32, String> EnumerateUserProcesses(Boolean findElev
}
}
Console.WriteLine("[*] Discovered {0} processes", users.Count);
return users;

Dictionary<UInt32, String> sorted = new Dictionary<UInt32, String>();
foreach (var user in users.OrderBy(u => u.Value))
{
sorted.Add(user.Key, user.Value);
}

return sorted;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 19bec86

Please sign in to comment.