Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Security.Cryptography;
- using BeeSoft.ECLIPSE_EDV;
- namespace BeeSoft.ECLIPSE_EDV
- {
- class Program
- {
- public static void PrintHead()
- {
- Console.WriteLine(@" ");
- Console.WriteLine(@" ");
- Console.WriteLine(@" _---------_ ");
- Console.WriteLine(@" _- -_ ");
- Console.WriteLine(@" / ECL EDV \");
- }
- public static void PrintBeeSoftTitle()
- {
- Console.WriteLine(@" ______ _____ __ _ ");
- Console.WriteLine(@" | ___ \ / ___| / _| | ");
- Console.WriteLine(@" | |_/ / ___ ___\ `--. ___ | |_| |_ ");
- Console.WriteLine(@" | ___ \/ _ \/ _ \`--. \/ _ \| _| __|");
- Console.WriteLine(@" | |_/ / __/ __/\__/ / (_) | | | |_ ");
- Console.WriteLine(@" \____/ \___|\___\____/ \___/|_| \__|");
- }
- public static void Main(string[] args)
- {
- bool admin;
- Console.BackgroundColor = ConsoleColor.Blue;
- Console.Title = "BeeSoft ECLIPSE EDV";
- Console.WriteLine("Starting BeeSoft ECLIPSE Express Disk Version...\a");
- Thread.Sleep(3000);
- Console.Clear();
- PrintBeeSoftTitle();
- PrintHead();
- Console.BackgroundColor = ConsoleColor.Black;
- Thread.Sleep(2000);
- Console.Clear();
- Console.WriteLine("Loading login system...");
- Thread.Sleep(1000);
- login:
- Thread.Sleep(1000);
- Console.Clear();
- Console.WriteLine("Login\n---------------");
- Console.Write("Enter username: ");
- string username;
- username = Console.ReadLine();
- Console.Write("Enter password: ");
- string password;
- password = "";
- /*label enterpass: part of non-work code*/
- while (username != "guest")
- {
- ConsoleKeyInfo passchar = Console.ReadKey(true);
- if (passchar.Key == ConsoleKey.Backspace)
- {
- if (password.Length > 0)
- Console.CursorLeft--;
- password = password.Remove(password.Length - 1, 1);
- /*if ((password.Length) <= 0)
- {
- password = "";
- goto enterpass;
- }*/
- //code didn't work - "hold start index > 0"
- }
- else if (passchar.Key == ConsoleKey.Enter)
- {
- break;
- }
- else
- {
- password += passchar.KeyChar.ToString();
- Console.CursorLeft++;
- }
- }
- MD5 hasher = MD5.Create();
- byte[] passwordbytes = Encoding.UTF8.GetBytes(password);
- string passhash = Convert.ToBase64String(hasher.ComputeHash(passwordbytes));
- // At this point, we could take the information above and check to make sure it's the same as the info we have stored.
- Console.WriteLine("\n");
- Console.WriteLine("B 2009 Operating System\n\n");
- if (username == "guest")
- {
- Console.WriteLine("Welcome, guest user!");
- admin = false;
- }
- else if (username == "administrator" && password == "adpass")
- {
- Console.WriteLine("Welcome, " + username + '!' + '\n');
- admin = true;
- }
- else if (username == "bertrand" && password == "7333240421")
- {
- Console.WriteLine("Welcome, " + username + '!' + '\n');
- admin = true;
- }
- else if (username == "Nightgunner5" && passhash == "Pk3OGQyFcrZMG4kYvBCm6A==")
- {
- Console.WriteLine("Welcome, " + username + '!' + '\n');
- admin = true;
- }
- else if (username == "heather" && password == "happyduckhead_idk")
- {
- Console.WriteLine("Welcome, " + username + '!' + '\n');
- admin = true;
- }
- else if (username == "ssaamm" && password == "FREDWARDBEEFBURGER")
- {
- Console.WriteLine("Welcome, " + username + '!' + '\n');
- admin = false;
- }
- else
- {
- Console.WriteLine("ACCESS DENIED");
- goto login;
- }
- desktop:
- Thread.Sleep(1000);
- Console.Clear();
- Console.WriteLine("Loading desktop...");
- Thread.Sleep(1000);
- Console.Clear();
- Console.WriteLine("Desktop\n-----------");
- Console.WriteLine("Options: Shut Down, Programs, or Logout");
- Console.WriteLine("SLC by Cp Input Stream Manager");
- Console.WriteLine("Info on PRCP 2 in .pr>info*, .cp>info>>||, and C>>info|");
- Console.Write("Cp>>");
- string dskinp;
- dskinp = Console.ReadLine();
- if (dskinp == "logout>>||")
- {
- goto login;
- }
- else if (dskinp == "shutdown>>||")
- {
- }
- else if (dskinp == "Programs>>||")
- {
- goto ProgramSlc;
- }
- else
- {
- Console.WriteLine("Error: Invalid command");
- Thread.Sleep(1000);
- Console.Clear();
- goto desktop;
- }
- ProgramSlc:
- Console.Clear();
- Console.WriteLine("Select: .pr>, .cp>, C>>:");
- Console.Write("Select (CFLOW is the default): ");
- string prslcinp;
- prslcinp = Console.ReadLine();
- if (prslcinp == ".pr>")
- {
- Console.Clear();
- goto pr;
- }
- else if (prslcinp == ".cp>")
- {
- Console.Clear();
- goto cp;
- }
- else
- {
- Console.Clear();
- goto cf;
- }
- pr:
- PrintBeeSoftTitle();
- PrintHead();
- Console.Write(".pr>");
- string prs;
- prs = Console.ReadLine();
- if (prs == "info*")
- {
- goto info;
- }
- else if (prs == "exit*")
- {
- goto End;
- }
- else
- {
- Console.WriteLine("Error: Invalid command");
- Thread.Sleep(1000);
- Console.Clear();
- goto pr;
- }
- cp:
- PrintBeeSoftTitle();
- PrintHead();
- Console.Write(".cp>");
- string cps;
- cps = Console.ReadLine();
- if (cps == "info>>||")
- {
- goto info;
- }
- else if (cps == "exit>>||")
- {
- goto End;
- }
- else
- {
- Console.WriteLine("Error: Invalid command");
- Thread.Sleep(1000);
- Console.Clear();
- goto cp;
- }
- cf:
- PrintBeeSoftTitle();
- PrintHead();
- Console.Write("C>>");
- string cfs;
- cfs = Console.ReadLine();
- if (cfs == "info|")
- {
- goto info;
- }
- else if (cfs == "exit|")
- {
- goto End;
- }
- else
- {
- Console.WriteLine("Error: Invalid command");
- Thread.Sleep(1000);
- Console.Clear();
- goto pr;
- }
- info:
- Console.WriteLine("PRCP 2 Info\n--------");
- Console.WriteLine("PRCP 2 includes the updated .pr> and .cp> prompts, as well as CFLOW. PRCP 2 was designed for ECLIPSE, and operates starting from ECLIPSE. .pr> is, as usual, the general form prompt. .cp> is the new version of Cp>>, and C>> is still the general form CFLOW prompt.");
- Console.Read();
- goto desktop;
- End:
- {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement