Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

src/w/i/winappdbg-1.5/winappdbg/system.py   winappdbg(Download)
        @raise WindowsError: Raises an exception on error.
        """
        with win32.OpenProcessToken(win32.GetCurrentProcess(),
                                win32.TOKEN_ADJUST_PRIVILEGES) as hToken:
            NewState = ( (priv, state) for priv in privileges )

src/w/i/winappdbg-1.5/winappdbg/process.py   winappdbg(Download)
                            hShell = shell.get_handle(
                                            win32.PROCESS_QUERY_INFORMATION)
                            with win32.OpenProcessToken(hShell) as hShellToken:
                                hToken = win32.DuplicateTokenEx(hShellToken)
                        finally: