Advertisement
Guest User

Untitled

a guest
May 6th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading;
  6. using System.Security.Cryptography;
  7. using BeeSoft.ECLIPSE_EDV;
  8.  
  9. namespace BeeSoft.ECLIPSE_EDV
  10. {
  11. class Program
  12. {
  13. public static void PrintHead()
  14. {
  15. Console.WriteLine(@" ");
  16. Console.WriteLine(@" ");
  17. Console.WriteLine(@" _---------_ ");
  18. Console.WriteLine(@" _- -_ ");
  19. Console.WriteLine(@" / ECL EDV \");
  20. }
  21. public static void PrintBeeSoftTitle()
  22. {
  23. Console.WriteLine(@" ______ _____ __ _ ");
  24. Console.WriteLine(@" | ___ \ / ___| / _| | ");
  25. Console.WriteLine(@" | |_/ / ___ ___\ `--. ___ | |_| |_ ");
  26. Console.WriteLine(@" | ___ \/ _ \/ _ \`--. \/ _ \| _| __|");
  27. Console.WriteLine(@" | |_/ / __/ __/\__/ / (_) | | | |_ ");
  28. Console.WriteLine(@" \____/ \___|\___\____/ \___/|_| \__|");
  29. }
  30. public static void Main(string[] args)
  31. {
  32. bool admin;
  33. Console.BackgroundColor = ConsoleColor.Blue;
  34. Console.Title = "BeeSoft ECLIPSE EDV";
  35. Console.WriteLine("Starting BeeSoft ECLIPSE Express Disk Version...\a");
  36. Thread.Sleep(3000);
  37. Console.Clear();
  38. PrintBeeSoftTitle();
  39. PrintHead();
  40. Console.BackgroundColor = ConsoleColor.Black;
  41. Thread.Sleep(2000);
  42. Console.Clear();
  43. Console.WriteLine("Loading login system...");
  44. Thread.Sleep(1000);
  45. login:
  46. Thread.Sleep(1000);
  47. Console.Clear();
  48. Console.WriteLine("Login\n---------------");
  49. Console.Write("Enter username: ");
  50. string username;
  51. username = Console.ReadLine();
  52. Console.Write("Enter password: ");
  53. string password;
  54. password = "";
  55. /*label enterpass: part of non-work code*/
  56. while (username != "guest")
  57. {
  58. ConsoleKeyInfo passchar = Console.ReadKey(true);
  59. if (passchar.Key == ConsoleKey.Backspace)
  60. {
  61. if (password.Length > 0)
  62. Console.CursorLeft--;
  63. password = password.Remove(password.Length - 1, 1);
  64. /*if ((password.Length) <= 0)
  65. {
  66. password = "";
  67. goto enterpass;
  68. }*/
  69. //code didn't work - "hold start index > 0"
  70. }
  71. else if (passchar.Key == ConsoleKey.Enter)
  72. {
  73. break;
  74. }
  75. else
  76. {
  77. password += passchar.KeyChar.ToString();
  78. Console.CursorLeft++;
  79. }
  80. }
  81. MD5 hasher = MD5.Create();
  82. byte[] passwordbytes = Encoding.UTF8.GetBytes(password);
  83. string passhash = Convert.ToBase64String(hasher.ComputeHash(passwordbytes));
  84. // At this point, we could take the information above and check to make sure it's the same as the info we have stored.
  85. Console.WriteLine("\n");
  86. Console.WriteLine("B 2009 Operating System\n\n");
  87. if (username == "guest")
  88. {
  89. Console.WriteLine("Welcome, guest user!");
  90. admin = false;
  91. }
  92. else if (username == "administrator" && password == "adpass")
  93. {
  94. Console.WriteLine("Welcome, " + username + '!' + '\n');
  95. admin = true;
  96. }
  97. else if (username == "bertrand" && password == "7333240421")
  98. {
  99. Console.WriteLine("Welcome, " + username + '!' + '\n');
  100. admin = true;
  101. }
  102. else if (username == "Nightgunner5" && passhash == "Pk3OGQyFcrZMG4kYvBCm6A==")
  103. {
  104. Console.WriteLine("Welcome, " + username + '!' + '\n');
  105. admin = true;
  106. }
  107. else if (username == "heather" && password == "happyduckhead_idk")
  108. {
  109. Console.WriteLine("Welcome, " + username + '!' + '\n');
  110. admin = true;
  111. }
  112. else if (username == "ssaamm" && password == "FREDWARDBEEFBURGER")
  113. {
  114. Console.WriteLine("Welcome, " + username + '!' + '\n');
  115. admin = false;
  116. }
  117. else
  118. {
  119. Console.WriteLine("ACCESS DENIED");
  120. goto login;
  121. }
  122. desktop:
  123. Thread.Sleep(1000);
  124. Console.Clear();
  125. Console.WriteLine("Loading desktop...");
  126. Thread.Sleep(1000);
  127. Console.Clear();
  128. Console.WriteLine("Desktop\n-----------");
  129. Console.WriteLine("Options: Shut Down, Programs, or Logout");
  130. Console.WriteLine("SLC by Cp Input Stream Manager");
  131. Console.WriteLine("Info on PRCP 2 in .pr>info*, .cp>info>>||, and C>>info|");
  132. Console.Write("Cp>>");
  133. string dskinp;
  134. dskinp = Console.ReadLine();
  135. if (dskinp == "logout>>||")
  136. {
  137. goto login;
  138. }
  139. else if (dskinp == "shutdown>>||")
  140. {
  141.  
  142. }
  143. else if (dskinp == "Programs>>||")
  144. {
  145. goto ProgramSlc;
  146. }
  147. else
  148. {
  149. Console.WriteLine("Error: Invalid command");
  150. Thread.Sleep(1000);
  151. Console.Clear();
  152. goto desktop;
  153. }
  154. ProgramSlc:
  155. Console.Clear();
  156. Console.WriteLine("Select: .pr>, .cp>, C>>:");
  157. Console.Write("Select (CFLOW is the default): ");
  158. string prslcinp;
  159. prslcinp = Console.ReadLine();
  160. if (prslcinp == ".pr>")
  161. {
  162. Console.Clear();
  163. goto pr;
  164. }
  165. else if (prslcinp == ".cp>")
  166. {
  167. Console.Clear();
  168. goto cp;
  169. }
  170. else
  171. {
  172. Console.Clear();
  173. goto cf;
  174. }
  175. pr:
  176. PrintBeeSoftTitle();
  177. PrintHead();
  178. Console.Write(".pr>");
  179. string prs;
  180. prs = Console.ReadLine();
  181. if (prs == "info*")
  182. {
  183. goto info;
  184. }
  185. else if (prs == "exit*")
  186. {
  187. goto End;
  188. }
  189. else
  190. {
  191. Console.WriteLine("Error: Invalid command");
  192. Thread.Sleep(1000);
  193. Console.Clear();
  194. goto pr;
  195. }
  196. cp:
  197. PrintBeeSoftTitle();
  198. PrintHead();
  199. Console.Write(".cp>");
  200. string cps;
  201. cps = Console.ReadLine();
  202. if (cps == "info>>||")
  203. {
  204. goto info;
  205. }
  206. else if (cps == "exit>>||")
  207. {
  208. goto End;
  209. }
  210. else
  211. {
  212. Console.WriteLine("Error: Invalid command");
  213. Thread.Sleep(1000);
  214. Console.Clear();
  215. goto cp;
  216. }
  217. cf:
  218. PrintBeeSoftTitle();
  219. PrintHead();
  220. Console.Write("C>>");
  221. string cfs;
  222. cfs = Console.ReadLine();
  223. if (cfs == "info|")
  224. {
  225. goto info;
  226. }
  227. else if (cfs == "exit|")
  228. {
  229. goto End;
  230. }
  231. else
  232. {
  233. Console.WriteLine("Error: Invalid command");
  234. Thread.Sleep(1000);
  235. Console.Clear();
  236. goto pr;
  237. }
  238. info:
  239. Console.WriteLine("PRCP 2 Info\n--------");
  240. 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.");
  241. Console.Read();
  242. goto desktop;
  243. End:
  244. {
  245. }
  246. }
  247. }
  248. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement