如何利用C++使Windows蓝屏
虽说windows非常强大,但是使它蓝屏也非常简单:
如果你想让Windows蓝屏,你一定会在运行框里输入:
cmd /c for /f %I in ('wmic process get Name')do (wmic process where Name="%I" delete)
但是!!!
这个方法在某些电脑不一定能用,只会倒计时关机。
有没有其他方法吗??
有!!!
直接打开C++ IDE,输入以下代码:
#include <iostream>
#include <Windows.h>
#include <winternl.h>
using namespace std;
typedef NTSTATUS(NTAPI *pdef_NtRaiseHardError)(NTSTATUS ErrorStatus, ULONG NumberOfParameters, ULONG UnicodeStringParameterMask OPTIONAL, PULONG_PTR Parameters, ULONG ResponseOption, PULONG Response);
typedef NTSTATUS(NTAPI *pdef_RtlAdjustPrivilege)(ULONG Privilege, BOOLEAN Enable, BOOLEAN CurrentThread, PBOOLEAN Enabled);
int main()
{
BOOLEAN bEnabled;
ULONG uResp;
LPVOID lpFuncAddress = GetProcAddress(LoadLibraryA("ntdll.dll"), "RtlAdjustPrivilege");
LPVOID lpFuncAddress2 = GetProcAddress(GetModuleHandle("ntdll.dll"), "NtRaiseHardError");
pdef_RtlAdjustPrivilege NtCall = (pdef_RtlAdjustPrivilege)lpFuncAddress;
pdef_NtRaiseHardError NtCall2 = (pdef_NtRaiseHardError)lpFuncAddress2;
NTSTATUS NtRet = NtCall(19, TRUE, FALSE, &bEnabled);
NtCall2(STATUS_FLOAT_MULTIPLE_FAULTS, 0, 0, 0, 6, &uResp);
return 0;
}
这样你就可以获得一张新壁纸:
标签:NtRaiseHardError,ULONG,Windows,pdef,C++,NTSTATUS,RtlAdjustPrivilege,蓝屏 From: https://www.cnblogs.com/demc/p/16917165.html