antonioCoco / RunasCs

RunasCs - Csharp and open version of windows builtin runas.exe
GNU General Public License v3.0
1.01k stars 131 forks source link

EnableAllPrivileges can be optimized #11

Open antonioCoco opened 11 months ago

antonioCoco commented 11 months ago

The current implementation of EnableAllPrivileges() enable a list of hardcoded privileges by their names.

The code should be refactored to dynamically retrieves the privileges from the token leveraging the function GetTokenPrivileges() and enables only the disabled ones.