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;
- /*
- * BeeSoft ECLIPSE EDV
- * Express Disk Variant
- * March 2009 -
- * Disk utility
- * (C) 2009 Bertrand Stone
- * Special thanks to:
- * Nightgunner5 for the password entry system and some new syntax concepts
- *
- *
- * ssaamm for testing of B 2009 EXP, the previous BeeSoft project
- *
- *
- * start namespace
- */
- namespace BeeSoft.ECLIPSE_EDV
- {
- //class
- class Program
- {
- //crash function
- public static void Crash()
- {
- for (; ; )
- {
- Console.Write("Error: ");
- }
- }
- /* printhead - B*/
- public static void PrintHead()
- {
- Console.WriteLine(@" ");
- Console.WriteLine(@" ");
- Console.WriteLine(@" _---------_ ");
- Console.WriteLine(@" _- -_ ");
- Console.WriteLine(@" / ECL EDV \");
- }
- /*printbeesofttitle - B*/
- public static void PrintBeeSoftTitle()
- {
- Console.WriteLine(@" ______ _____ __ _ ");
- Console.WriteLine(@" | ___ \ / ___| / _| | ");
- Console.WriteLine(@" | |_/ / ___ ___\ `--. ___ | |_| |_ ");
- Console.WriteLine(@" | ___ \/ _ \/ _ \`--. \/ _ \| _| __|");
- Console.WriteLine(@" | |_/ / __/ __/\__/ / (_) | | | |_ ");
- Console.WriteLine(@" \____/ \___|\___\____/ \___/|_| \__|");
- }
- //Main - B
- public static void Main(string[] args)
- {
- Console.WriteLine("Starting BeeSoft ECLIPSE EDV...");
- Thread.Sleep(1000);
- Console.WriteLine("Loading Startup FileSet...");
- for (int x = 0; x <= 18; x++)
- {
- Console.Write("_");
- Thread.Sleep(50);
- }
- Console.WriteLine("");
- Thread.Sleep(500);
- Console.WriteLine("Loading system files...");
- for (int x = 0; x <= 50; x++)
- {
- Console.Write("_");
- Thread.Sleep(50);
- }
- Console.WriteLine("");
- Thread.Sleep(500);
- Console.WriteLine("Final startup file load...");
- Thread.Sleep(100);
- for (int x = 0; x <= 40; x++)
- {
- Console.Write("_");
- Thread.Sleep(50);
- }
- Console.WriteLine("");
- Thread.Sleep(2000);
- Console.Clear();
- bool admin; // - judges if the user is an administrator
- Console.BackgroundColor = ConsoleColor.Blue; /* for the screen coming up,
- * but the color system is slow
- * by one frame
- */
- Console.Title = "BeeSoft ECLIPSE EDV";
- Console.WriteLine("\a");
- Thread.Sleep(3000);
- Console.Clear(); //screening
- PrintBeeSoftTitle();
- PrintHead();
- Console.BackgroundColor = ConsoleColor.Black; //reset the console color
- Thread.Sleep(2000);
- Console.Clear(); //more effects
- Console.WriteLine("Loading login system...");
- Thread.Sleep(1000);
- /*Login system - Nightgunner5*/
- 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++;
- }
- }
- /*encrypter - Nightgunner5*/
- 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");
- /*user check - B*/
- if (username == "guest")
- {
- Console.WriteLine("Welcome, guest user!");
- admin = false;
- }
- else if (username == "administrator" && passhash == "R9ejHNjbTEb3hTdmOGAamg==")
- {
- 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 - B*/
- 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;
- }
- /* PROGRAMS - B*/
- 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 if (prs == "crash*")
- {
- Crash();
- }
- else if (prs == "dir*" || prs == "system*")
- {
- Console.WriteLine("FunctionCall " + "\"" + prs + "\" is not available in .pr>.");
- }
- //else if
- else
- {
- Console.WriteLine("FunctionCall " + "\"" + prs + "\" is not a valid 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 if (cps == "crash>>||")
- {
- Crash();
- }
- else if (cps == "dir>>||" || cps == "system>>||")
- {
- Console.WriteLine("FunctionCall " + "\"" + cps + "\" is not available in .cp>.");
- }
- //else if...
- else
- {
- Console.WriteLine("FunctionCall " + "\"" + cps + "\" is not a valid 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 if (cfs == "crash|")
- {
- Crash();
- }
- else if (cfs == "gotoslc|")
- {
- goto ProgramSlc;
- }
- else if (cfs == "system|")
- {
- cfsc:
- string cfscontrol;
- Console.Write("C>>System>>Control>>");
- cfscontrol = Console.ReadLine();
- if (cfscontrol == "beep|")
- {
- Console.WriteLine("\a");
- goto cfsc;
- }
- else if (cfscontrol == "gotocf|")
- {
- goto cf;
- }
- //else if...
- else
- {
- Console.WriteLine("FunctionCall " + "\"" + cfscontrol + "\" is not a valid command");
- Thread.Sleep(1000);
- Console.Clear();
- goto cfsc;
- }
- }
- else if (cfs == "dir|" || cfs == "dir *.*|")
- {
- System.IO.DirectoryInfo dirtxt = new System.IO.DirectoryInfo(@"C:\");
- foreach (System.IO.FileInfo file in dirtxt.GetFiles("*.*"))
- {
- Console.WriteLine("{0}, {1}", file.Name, file.Length);
- }
- Console.ReadLine();
- goto ProgramSlc;
- }
- //else if...
- else
- {
- Console.WriteLine("FunctionCall " + "\"" + cfs + "\" is not a valid command");
- Thread.Sleep(1000);
- Console.Clear();
- goto cf;
- }
- 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: //ends the program
- {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement