# Path: dbginterface.py
# def LocalKernelDebugger(quiet=True):
#     """| Check that all conditions to Local Kernel Debugging are met
#        | and return a LKD (subclass of :class:`LocalKernelDebuggerBase`
#     """
#     if not windows.utils.check_debug():
#         raise LocalKernelDebuggerError("Cannot perform LocalKernelDebugging on kernel not in DEBUG mode")
#     if not windows.utils.check_is_elevated():
#         raise LocalKernelDebuggerError("Cannot perform LocalKernelDebugging from non-Admin process")
#     windows.utils.enable_privilege(SE_DEBUG_NAME, True)
#     if windows.system.bitness == 64:
#         if windows.current_process.is_wow_64:
#             raise LocalKernelDebuggerError("Cannot perform LocalKernelDebugging from SysWow64 process (please launch from 64bits python)")
#         return LocalKernelDebugger64(quiet)
#     return LocalKernelDebugger32(quiet)


import sys
import time
import ctypes
import os
import windows
import windows.native_exec.simple_x86 as x86
import windows.native_exec.simple_x64 as x64
            import pdb;pdb.set_trace()
from dbginterface import LocalKernelDebugger
"""A demonstration of LKD that display all files opened by hooking nt!NtCreateFile"""

if os.getcwd().endswith("example"):
    sys.path.append(os.path.realpath(".."))
else:
    sys.path.append(os.path.realpath("."))




# Path: dbginterface.py
# def LocalKernelDebugger(quiet=True):
#     """| Check that all conditions to Local Kernel Debugging are met
#        | and return a LKD (subclass of :class:`LocalKernelDebuggerBase`
#     """
#     if not windows.utils.check_debug():
#         raise LocalKernelDebuggerError("Cannot perform LocalKernelDebugging on kernel not in DEBUG mode")
#     if not windows.utils.check_is_elevated():
#         raise LocalKernelDebuggerError("Cannot perform LocalKernelDebugging from non-Admin process")
#     windows.utils.enable_privilege(SE_DEBUG_NAME, True)
#     if windows.system.bitness == 64:
#         if windows.current_process.is_wow_64:
#             raise LocalKernelDebuggerError("Cannot perform LocalKernelDebugging from SysWow64 process (please launch from 64bits python)")
#         return LocalKernelDebugger64(quiet)
#     return LocalKernelDebugger32(quiet)


# Path: example/hook_ntcreatefile.py
import sys
import time
import ctypes
import os
import windows
import windows.native_exec.simple_x86 as x86
import windows.native_exec.simple_x64 as x64
            import pdb;pdb.set_trace()
from dbginterface import LocalKernelDebugger

"""A demonstration of LKD that display all files opened by hooking nt!NtCreateFile"""

if os.getcwd().endswith("example"):
    sys.path.append(os.path.realpath(".."))
else:
    sys.path.append(os.path.realpath("."))




kdbg = LocalKernelDebugger()