This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from win32file import CreateFile, GENERIC_WRITE, OPEN_EXISTING, CloseHandle | |
| from win32con import WRITE_DAC, GENERIC_ALL | |
| from win32api import GetLastError, FormatMessage | |
| from win32security import GetSecurityInfo, SE_KERNEL_OBJECT, DACL_SECURITY_INFORMATION, GRANT_ACCESS, NO_INHERITANCE, \ | |
| TRUSTEE_IS_GROUP, TRUSTEE_IS_NAME, SetSecurityInfo | |
| def handle_error(msg: str): | |
| last_error = GetLastError() | |
| err = FormatMessage(last_error)[:-2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.github.vtomy; | |
| import javax.annotation.Nonnull; | |
| import java.util.*; | |
| import java.util.concurrent.*; | |
| import java.util.concurrent.atomic.AtomicBoolean; | |
| import java.util.concurrent.atomic.AtomicReference; | |
| /** |