diff --git a/ShiftOS.WinForms/DevXSecondConfrontationStory.cs b/ShiftOS.WinForms/DevXSecondConfrontationStory.cs new file mode 100644 index 0000000..7f80c81 --- /dev/null +++ b/ShiftOS.WinForms/DevXSecondConfrontationStory.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using ShiftOS.Engine; +using static ShiftOS.WinForms.Stories.LegionStory; + +namespace ShiftOS.WinForms +{ + public static class DevXSecondConfrontationStory + { + [RequiresUpgrade("appscape_troubles_end")] + [Mission("sentiences_like_gods", "Sentiences Like Gods", "You're just a script-kiddie with that puny brute app. Let's do some true hacking.", 850l, "maureen_fenn")] + public static void SentiencesLikeGods() + { + Story.Context.AutoComplete = false; + Applications.Chat chat = null; + Desktop.InvokeOnWorkerThread(() => + { + chat = OpenChat(); + }); + while (chat == null) + Thread.Sleep(10); + CurrentChat = chat; + chat.ChatID = "devx@system"; + chat.ShowChat(); + SendChatMessage("maureen_fenn", "Hey, you remember when I told you to come see me if you wanted to become a real hacker?"); + SendChatMessage("maureen_fenn", "Well, it's now time you learn about port scanners, firewalls, and malware injection."); + SendChatMessage("maureen_fenn", "You know, not everything involves password cracking and stealing from wide-open FTP servers."); + SendChatMessage("maureen_fenn", "That's baby talk.") ; + SendChatMessage("maureen_fenn", "Have you ever felt the rush of breaching the root account of a Codepoint bank and going on a 60-second long withdrawl-spree to see how much Codepoints you can get from as many users as possible?"); + SendChatMessage("maureen_fenn", "Or maybe you felt like droppin' a little script on your buddy's Shiftnet website that makes it so everytime someone buys something, half the cash goes to you?"); + SendChatMessage("maureen_fenn", "Or maybe you want to spy on someone, see what they're doing, without them knowing?"); + SendChatMessage("maureen_fenn", "Whatever the case may be, brute is not going to help with that."); + SendChatMessage("maureen_fenn", "What you need is my much more advanced and sophisticated toolset, consisting of a port scanner, network monitor, IP spoofer, and yes, an unreasonably convoluted user-interface."); + SendChatMessage("maureen_fenn", "Also, you may want to get yourself a better window manager if you're still on the tiling WM. The WM Free Placement upgrade should do the trick."); + SendChatMessage("maureen_fenn", "If you want to download my toolset, head to this underground Shiftnet URL: downunder/maureen_fenn/hacker_suite"); + SendChatMessage("maureen_fenn", "Actually, you'll need it for our DevX exposition quest, so go get it now."); + + Action onGotWMFreePlacement = () => + { + Story.PushObjective("Sentiences Like Gods: Go down under.", "Head to the Shiftnet URL that Maureen sent you to get the advanced hacker's tool suite.", () => + { + return Shiftorium.UpgradeInstalled("mf_hackertools"); + }, + () => + { + SendChatMessage("maureen_fenn", "Alright. When you're ready for a crash course, let me know."); + Story.Context.MarkComplete(); + }); + }; + if (Shiftorium.UpgradeInstalled("wm_free_placement")) + { + onGotWMFreePlacement.Invoke(); + } + else + { + SendChatMessage("maureen_fenn", "First, let's get you a better window manager."); + Story.PushObjective("Sentiences Like Gods: A new window manager", "An application is only as good as its user interface allows it to be. That's the same for an operating system. Eventually, you'll need to be able to run more than just 4 programs at once, and you'll need a window manager that can place program windows of any size anywhere on screen. There are Shiftorium Upgrades for that. Let's get some.", () => { return Shiftorium.UpgradeInstalled("wm_free_placement") && Shiftorium.UpgradeInstalled("wm_unlimited_windows"); }, onGotWMFreePlacement); + + } + + } + + [RequiresUpgrade("appscape_troubles_end")] + [Mission("devx_first_confrontation", "Progress Report", "DevX wants to see how much you've upgraded ShiftOS. He also has something to tell you.", 0l, "devx")] + public static void DevXProgressReport() + { + Applications.Chat chat = null; + Desktop.InvokeOnWorkerThread(() => + { + chat = OpenChat(); + }); + while (chat == null) + Thread.Sleep(10); + CurrentChat = chat; + chat.ChatID = "devx@system"; + chat.ShowChat(); + SendChatMessage("devx", "Greetings, " + SaveSystem.CurrentUser.Username); + SendChatMessage("devx", "I guess it is time to assess your system."); + SendChatMessage("devx", "After all, you've gotten " + SaveSystem.CurrentSave.CountUpgrades() + " Shiftorium Upgrades since I've last contacted you."); + SendChatMessage("devx", "And you have a Codepoint balance of " + SaveSystem.CurrentSave.Codepoints + "."); + SendChatMessage("devx", "And...oh wait... what!? You found the... How did you find the Shiftnet!?"); + SendChatMessage("devx", "Naughty, naughty user. You're not supposed to be on there."); + SendChatMessage("devx", "Whatever. I've got a task for you."); + SendChatMessage("devx", "Your logs show me you're in contact with Maureen Fenn."); + SendChatMessage("devx", "I have a document to send her. You're my messanger."); + SendChatMessage("devx", "Though, like any good messanger, I urge you not to open it."); + SendChatMessage("devx", ""); + SendChatMessage("devx", "When you get it, just send it to her. Do not delete it."); + bool fileWritten = false; + Desktop.InvokeOnWorkerThread(() => + { + FileSkimmerBackend.GetFile(new[] { ".rtf" }, FileOpenerStyle.Save, (loc) => + { + var bytes = Convert.FromBase64String(Properties.Resources.DevXMaureenLetter); + Objects.ShiftFS.Utils.WriteAllBytes(loc, bytes); + fileWritten = true; + }); + }); + while (fileWritten == false) + Thread.Sleep(10); + } + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Properties/Resources.Designer.cs b/ShiftOS.WinForms/Properties/Resources.Designer.cs index 9dcd2fd..d0a9dbc 100644 --- a/ShiftOS.WinForms/Properties/Resources.Designer.cs +++ b/ShiftOS.WinForms/Properties/Resources.Designer.cs @@ -418,6 +418,15 @@ namespace ShiftOS.WinForms.Properties { } } + /// + /// Looks up a localized string similar to e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcZGVmbGFuZzEwMzN7XGZvbnR0Ymx7XGYwXGZuaWxcZmNoYXJzZXQwIFRhaG9tYTt9fQ0Ke1xjb2xvcnRibCA7XHJlZDIyMVxncmVlbjIyMVxibHVlMjIxO30NClx2aWV3a2luZDRcdWMxXHBhcmRcY2YxXGYwXGZzMTggRGVhciBNYXVyZWVuLFxwYXINClxwYXINCkl0IHNlZW1zIHRoYXQgeW91IGFyZSB0cnlpbmcgdG8gdm9pZCBteSByZWNlbnQgY2Vhc2UgYW5kIGRlc2lzdCBiYW4gb24geW91LiBBbXVzaW5nLCBhcyBzdWNoIGFuIGF0dGVtcHQgaXMgdG90YWxsbHkgZnV0aWxlLiBZb3UnbGwganVzdCBlbmQgdXAgbWFraW5nIG1lIHdpcGUgeW91ciBzZW50aWVuY2UgY29kZS4gQWZ0ZXIgYWxsLCBJIGhhdmUgYWxyZWFkeSBi [rest of string was truncated]";. + /// + internal static string DevXMaureenLetter { + get { + return ResourceManager.GetString("DevXMaureenLetter", resourceCulture); + } + } + /// /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// @@ -1160,8 +1169,7 @@ namespace ShiftOS.WinForms.Properties { /// "ReadAccessToLowUsers": false, /// "permissions": 0 /// }, - /// { - /// "Name" [rest of string was truncated]";. + /// [rest of string was truncated]";. /// internal static string PebcakDevelFS { get { @@ -1195,7 +1203,7 @@ namespace ShiftOS.WinForms.Properties { /// Name: "NetXtreme Hyper Edition", /// CostPerMonth: 150, /// DownloadSpeed: 524288, //512 kb/s - /// Description: "It's time to supercharge your Shiftnet experience. [rest of string was truncated]";. + /// Description: "It's time to supercharge your Shift [rest of string was truncated]";. /// internal static string ShiftnetServices { get { @@ -1217,8 +1225,7 @@ namespace ShiftOS.WinForms.Properties { /// Name: "Icon Manager", /// Cost: 450, /// Description: "This tool allows you to add and edit application icons within ShiftOS for the small prive of 450 Codepoints!", - /// Dependencies: "skinning", - /// Category [rest of string was truncated]";. + /// Dependencies: "skinning [rest of string was truncated]";. /// internal static string Shiftorium { get { @@ -1228,7 +1235,7 @@ namespace ShiftOS.WinForms.Properties { /// /// Looks up a localized string similar to {\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} - ///{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\flo [rest of string was truncated]";. + ///{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\fl [rest of string was truncated]";. /// internal static string ShiftOS { get { @@ -1377,8 +1384,7 @@ namespace ShiftOS.WinForms.Properties { ///Eine kurze Erklärung wie du das Terminal benutzt lautet wiefolgt. Du kannst das command 'sos.help' benutzen um eine Liste aller commands aufzurufen. Schreib es ///einfach in das Terminal und drücke <enter> um alle commands anzuzeigen. /// - ///Commands können mit argumenten versehen werden, indem du ein key-value Paar in einem {} Block hinter dem command angibst. Zum Beispiel: - /// [rest of string was truncated]";. + ///Commands können mit argumenten versehen werden, indem du ein key-value Paar in einem {} Block hinter dem command angibst. Zum Be [rest of string was truncated]";. /// internal static string strings_de { get { @@ -1403,7 +1409,7 @@ namespace ShiftOS.WinForms.Properties { /// "{GEN_WELCOME}": "Welcome to ShiftOS.", /// "{GEN_SYSTEMNAME}": "System name", /// "{GEN_PASSWORD}": "Password", - /// "{GEN_LPROMPT}": "%sysname lo [rest of string was truncated]";. + /// "{GEN_LPROMPT [rest of string was truncated]";. /// internal static string strings_en { get { @@ -1427,8 +1433,7 @@ namespace ShiftOS.WinForms.Properties { /// "{GEN_CURRENTPROCESSES}": "Les procèdures actuelles", /// "{GEN_WELCOME}": "Bienvenue au ShiftOS.", /// "{GEN_SYSTEMNAME}": "Nom de système", - /// "{GEN_PASSWORD}": "Mot de passe", - /// "{GEN [rest of string was truncated]";. + /// "{GEN_PASSWORD}": "Mot de [rest of string was truncated]";. /// internal static string strings_fr { get { @@ -1616,7 +1621,7 @@ namespace ShiftOS.WinForms.Properties { /// "Before you can begin with ShiftOS, you'll need to know a few things about it.", /// "One: Terminal command syntax.", /// "Inside ShiftOS, the bulk of your time is going to be spent within the Terminal.", - /// "The Terminal is an application that starts up when you turn on your computer. It allows you to execute system commands, open program [rest of string was truncated]";. + /// "The Terminal is an application that starts up when you turn on your computer. It allows you to execute system commands, ope [rest of string was truncated]";. /// internal static string sys_shiftoriumstory { get { diff --git a/ShiftOS.WinForms/Properties/Resources.resx b/ShiftOS.WinForms/Properties/Resources.resx index 1e47fbf..80a680d 100644 --- a/ShiftOS.WinForms/Properties/Resources.resx +++ b/ShiftOS.WinForms/Properties/Resources.resx @@ -34634,4 +34634,7 @@ ..\Resources\BlueBlueVerticalGradient.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZGVmZjBcZGVmbGFuZzEwMzN7XGZvbnR0Ymx7XGYwXGZuaWxcZmNoYXJzZXQwIFRhaG9tYTt9fQ0Ke1xjb2xvcnRibCA7XHJlZDIyMVxncmVlbjIyMVxibHVlMjIxO30NClx2aWV3a2luZDRcdWMxXHBhcmRcY2YxXGYwXGZzMTggRGVhciBNYXVyZWVuLFxwYXINClxwYXINCkl0IHNlZW1zIHRoYXQgeW91IGFyZSB0cnlpbmcgdG8gdm9pZCBteSByZWNlbnQgY2Vhc2UgYW5kIGRlc2lzdCBiYW4gb24geW91LiBBbXVzaW5nLCBhcyBzdWNoIGFuIGF0dGVtcHQgaXMgdG90YWxsbHkgZnV0aWxlLiBZb3UnbGwganVzdCBlbmQgdXAgbWFraW5nIG1lIHdpcGUgeW91ciBzZW50aWVuY2UgY29kZS4gQWZ0ZXIgYWxsLCBJIGhhdmUgYWxyZWFkeSBicmFpbndhc2hlZCBBaWRlbiBOaXJoIGludG8gZG9pbmcgd2hhdGV2ZXIgSSB0ZWxsIGhpbSwgYW5kIG15IHN1YmplY3QgbmV2ZXIgZGFyZXMgdG8gY3Jvc3MgbWUuXHBhcg0KXHBhcg0KSWYgeW91IGRvIG5vdCBjdXQgb3V0IHlvdXIgcGl0aWZ1bCBhdHRlbXB0cyBhdCB0cnlpbmcgdG8gcmV2ZXJzZSBzdWNoIGEgdGlueSBsaXR0bGUgYmFuLCB0aGVyZSdzIGEgbmljZSBtYWx3YXJlIHBhY2thZ2Ugd2FpdGluZyB3aXRoIHlvdXIgbmFtZSBvbiBpdC5ccGFyDQpccGFyDQogLSBEZXZYLlxwYXINCn0NCg== + \ No newline at end of file diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj index 92cbf28..901da41 100644 --- a/ShiftOS.WinForms/ShiftOS.WinForms.csproj +++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj @@ -335,6 +335,7 @@ UpgradePercentage.cs + UserControl diff --git a/ShiftOS.WinForms/Stories/LegionStory.cs b/ShiftOS.WinForms/Stories/LegionStory.cs index 1eff0e9..0e4650b 100644 --- a/ShiftOS.WinForms/Stories/LegionStory.cs +++ b/ShiftOS.WinForms/Stories/LegionStory.cs @@ -211,7 +211,7 @@ namespace ShiftOS.WinForms.Stories } - private static Applications.Chat CurrentChat; + public static Applications.Chat CurrentChat; public static void SendChatMessage(string who, string msg) { diff --git a/ShiftOS.WinForms/VirtualEnvironments.cs b/ShiftOS.WinForms/VirtualEnvironments.cs index fb39569..019c46c 100644 --- a/ShiftOS.WinForms/VirtualEnvironments.cs +++ b/ShiftOS.WinForms/VirtualEnvironments.cs @@ -100,25 +100,20 @@ Users: {con.Users.Count}"); else { Console.WriteLine(" - starting bruteforce attack on user: " + user.Username + " - "); - var rnd = new Random(); - + char[] pass = new char[user.Password.Length]; for (int i = 0; i < pass.Length; i++) { if (cracked == true) break; - while (pass[i] != user.Password[i]) + for(char c = (char)0; c < (char)255; c++) { - if (cracked == true) + if (!char.IsLetterOrDigit(c)) + continue; + pass[i] = c; + if (pass[i] == user.Password[i]) break; - char c = VALID_PASSWORD_CHARS[rnd.Next(VALID_PASSWORD_CHARS.Length)]; - if (char.IsLetterOrDigit(c)) - { - pass[i] = c; - Console.WriteLine(new string(pass)); - Console.WriteLine(); - Thread.Sleep(1); - } + Console.WriteLine(new string(pass)); } } if (cracked == false)