Beispiel #1
0
        static void Main(string[] args)
        {
            string getcommand;

            Console.WriteLine("Windows Manager by Exptixone startet successfully\n");
            Console.ForegroundColor = ConsoleColor.White;
            commands         commandliste    = new commands();
            twitch           twitchcommand   = new twitch();
            verify1          verify          = new verify1();
            windows_defender windowsdefender = new windows_defender();
            windowsupdate    autoupdate      = new windowsupdate();

            //verify.verify();

            while (true)
            {
                getcommand = Console.ReadLine();
                switch (getcommand)
                {
                case "commands":    //shows commands
                    commandliste.commandlist();
                    break;

                case "twitch":    //opens twitch with user specific channel name
                    twitchcommand.twitchcommand();
                    break;

                case "clear":    //u know...
                    Console.Clear();
                    break;

                case "defender off":    //disables the defender over the registry
                    windowsdefender.defenderoff();

                    break;

                case "defender on":    //deletes the registry key to re-enable the defender
                    windowsdefender.defenderon();
                    break;

                case "autoupdate off":    //adds 2 registry keys to disable AU first one is for notify 2nd on for complete disable
                    autoupdate.off();
                    break;

                case "autoupdate on":    //maybe need rework , but fixed to 90%
                    autoupdate.on();
                    break;


                default:
                    Console.WriteLine("Unknown command");
                    break;
                }
                System.Threading.Thread.Sleep(200);
            }
        }
Beispiel #2
0
        public void verify()
        {
            string opcn = Getstring("");
            string pcn;

            pcn = System.Environment.MachineName.ToString();
            Console.WriteLine(pcn);
            if (opcn.Contains(pcn))
            {
                string un;
                string pw;
                Console.WriteLine("login now...");
                Console.WriteLine("User");
                un = Console.ReadLine();
                Console.WriteLine("Password");
                Console.ForegroundColor = ConsoleColor.Black;
                pw = Console.ReadLine();
                if (un == "admin" && pw == "root")
                {
                    Console.Clear();
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine("successfully logged in");
                    commands runcommand = new commands();
                    runcommand.commandlist();
                    Console.ForegroundColor = ConsoleColor.White;
                }
                else
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("Wrong username or password");
                    Thread.Sleep(2000);
                    Console.ForegroundColor = ConsoleColor.White;
                    Console.Clear();
                    verify();
                }
            }
            else
            {
                Console.WriteLine("your not allowed to use this program");
                Console.ReadKey();
                System.Environment.Exit(0x1338);
            }
        }