def get_privilege_information():
<EOL>return_length = wintypes.DWORD()<EOL>params = [<EOL>get_process_token(),<EOL>TOKEN_INFORMATION_CLASS.TokenPrivileges,<EOL>None,<EOL><NUM_LIT:0>,<EOL>return_length,<EOL>]<EOL>res = GetTokenInformation(*params)<EOL>buffer = ctypes.create_string_buffer(return_length.value)<EOL>params[<NUM_LIT:2>] = buffer<EOL>params[<NUM_LIT:3>] = return_length.value<EOL>res = GetTokenInformation(*params)<EOL>assert res > <NUM_LIT:0>, "<STR_LIT>" % res<EOL>privileges = ctypes.cast(buffer, ctypes.POINTER(TOKEN_PRIVILEGES)).contents<EOL>return privileges<EOL>
Get all privileges associated with the current process.