예제 #1
0
        private void btnok_Click(object sender, EventArgs e)
        {
            var sys = VirtualEnvironments.Get(txtcsys.Text);

            if (sys != null)
            {
                //user auth
                var user = sys.Users.FirstOrDefault(x => x.Username == txtcuser.Text && x.Password == txtcpass.Text);
                if (user != null)
                {
                    OpenConnection    = sys;
                    CurrentRemoteUser = user;
                    if (Mounts.Count == 3)
                    {
                        Mounts.RemoveAt(2);
                    }
                    Mounts.Add(sys.Filesystem);
                    ChangeDirectory("2:");
                    pnlconnect.Hide();
                    connectToRemoteServerToolStripMenuItem.Text = "Reauthenticate";
                    disconnectToolStripMenuItem.Visible         = true;
                    return;
                }
                Infobox.Show("Access denied.", "Authentication failed for the specified user. Connection aborted.");
                return;
            }
            var t = new System.Threading.Thread(() =>
            {
                System.Threading.Thread.Sleep(5000);
                Infobox.Show("Connection timeout.", "Cannot connect to the specified system name...");
            });

            t.IsBackground = true;
            t.Start();
        }
예제 #2
0
        public static void BreakingTheBonds_Outro()
        {
            Story.Context.AutoComplete = false;
            CharacterName = "hacker101";
            SysName       = "pebcak";

            if (!terminalOpen())
            {
                var term = new Applications.Terminal();
                AppearanceManager.SetupWindow(term);
            }

            WriteLine("Now let's teach you how to hack others' systems.");
            WriteLine("I'll start up a safe virtual environment for you to mess with.");
            VirtualEnvironments.Create("pebcak_devel", new List <Objects.ClientSave>
            {
                new Objects.ClientSave
                {
                    Username    = "******",
                    Password    = GenRandomPassword(),
                    Permissions = Objects.UserPermissions.Root
                },
                new Objects.ClientSave
                {
                    Username    = "******",
                    Password    = "",
                    Permissions = Objects.UserPermissions.Admin,
                }
            }, 6500l, JsonConvert.DeserializeObject <ShiftOS.Objects.ShiftFS.Directory>(Properties.Resources.PebcakDevelFS));
            Thread.Sleep(2000);
            WriteLine("It's all set up now. The system name for this environment is \"pebcak_devel\".");
            WriteLine("This server allows FTP connections through your File Skimmer.");
            WriteLine("Other systems can allow RTS connections (which allows you to control their terminals remotely), SMTP (mail transfer), etc. It depends on the system's role.");

            bool isFsCopyInstalled = Shiftorium.UpgradeInstalled("fs_copy");

            if (isFsCopyInstalled == false)
            {
                WriteLine("Before we can begin, one last thing. You need the FS Copy Shiftorium upgrade.");
                Story.PushObjective("Breaking The Bonds: Preparations", "You need to buy the FS Copy upgrade from the Shiftorium.", () => { return(Shiftorium.UpgradeInstalled("fs_copy")); }, () =>
                {
                    isFsCopyInstalled = true;
                });
            }
            while (isFsCopyInstalled == false)
            {
                Thread.Sleep(10);
            }

            WriteLine("Alright, open your File Skimmer, click \"Start Remote Session\", and connect to the system name \"pebcak_devel\" with user name \"user\" and no password.");

            Story.PushObjective("Breaking The Bonds: A little practice...", "hacker101 has set up a virtual environment for you to connect to. Its system name is \"pebcak_local\", and has an unsecured user account with the name \"user\". Log into that user using your File Skimmer.",
                                () => { return(Applications.FileSkimmer.OpenConnection.SystemName == "pebcak_devel"); },
                                () =>
            {
                WriteLine("Good work. You're in. This user only has Admin privileges, and doesn't have anything useful on it. This is where hacking comes in.");
                WriteLine("See that \"super private personal stuff\" folder? It can only be accessed as a root user. You'll need the root password for pebcak_devel to get in there.");
                WriteLine("I'll send you a password cracking utility that can use open ShiftOS connections to sniff out all the users on the system and allow you to brute-force into an account.");
                Console.WriteLine("New program unlocked: brute");
                SaveSystem.CurrentSave.StoriesExperienced.Add("brute");
                WriteLine("Go ahead and open it! Use it to breach the root user on pebcak_devel.");
                WriteLine("Once you've got the root password, click the Reauthenticate button in File Skimmer and it will ask you to log in as a new user.");
                WriteLine("Use the new credentials to log in.");
                Story.PushObjective("Breaking The Bonds: The Brute", "Use your new \"brute\" application to breach the root account on pebcak_local so you can access the super secret folder and download its contents.", () =>
                {
                    return(Applications.FileSkimmer.CurrentRemoteUser == Applications.FileSkimmer.OpenConnection.Users.FirstOrDefault(x => x.Username == "root"));
                },
                                    () =>
                {
                    WriteLine("Now, open the folder and you can copy files and folders from it to your system.");
                    WriteLine("You've got 60 seconds before ShiftOS's internet daemon terminates this connection.");
                    int counter = 60;
                    while (counter > 0 && Applications.FileSkimmer.OpenConnection.SystemName == "pebcak_devel")
                    {
                        Thread.Sleep(1000);
                        Console.WriteLine("Connection termination in " + counter + " seconds...");
                        if (counter == 30 || counter == 15)
                        {
                            Engine.AudioManager.PlayStream(Properties.Resources._3beepvirus);
                        }
                        if (counter <= 10)
                        {
                            Engine.AudioManager.PlayStream(Properties.Resources.writesound);
                        }
                        counter--;
                    }
                    VirtualEnvironments.Clear();
                    Applications.FileSkimmer.DisconnectRemote();
                    WriteLine("Connections terminated I see.. Alright. Have fun with those dummy documents - you can keep them if you'd like. There's nothing important in them.");
                    WriteLine("That's one thing you can do with brute and other hacking utilities. I'd recommend buying some of brute's Shiftorium upgrades to make it faster and more efficient.");
                    WriteLine("Also, along the way, you're going to find a lot of new tricks. Some of them will require more than just brute to get into.");
                    WriteLine("So be on the lookout on the Shiftnet for other hacking-related tools. You won't find any on Appscape, however...");
                    WriteLine("That darn Aiden Nirh guy can't stand hackers.");
                    WriteLine("Looking at your logs, I see he's contacted you before... Seriously... don't let him find out about brute. He'll report it directly to DevX.");
                    WriteLine("Oh yeah, one more thing... that virus scanner... you may want to scan any files that you transfer from other systems with it.");
                    WriteLine("You never know what sorts of digital filth is hidden within such innocent-looking files.");
                    WriteLine("ALWAYS scan before opening - because if you open a file containing malicious code, it'll get run. It's just how ShiftOS's kernel works.");
                    WriteLine("Oh yeah, one last thing. Things are going to start getting pretty open in the Digital Society..");
                    WriteLine("Multiple people are going to want you to help them out with multiple things.");
                    WriteLine("I've written a little command-line utility that'll help you keep track of these missions and see how far you've gotten.");
                    WriteLine("Use the missions command to list out all the available missions, then use the startmission command to start one.");
                    WriteLine("When you complete a mission, you'll earn Codepoints depending on the mission.");
                    WriteLine("Allow me to demonstrate...");
                    Console.WriteLine("User has disconnected.");



                    Story.Context.MarkComplete();
                    TerminalBackend.PrefixEnabled = true;
                    SaveSystem.SaveGame();
                    TerminalBackend.PrintPrompt();
                });
            });
        }
예제 #3
0
        public static void AppscapeTroubles()
        {
            Applications.Chat chat = null;
            Desktop.InvokeOnWorkerThread(() =>
            {
                chat = OpenChat();
            });
            while (chat == null)
            {
                Thread.Sleep(10);
            }
            chat.ShowChat();
            chat.ChatID = "maureen_fenn@trisys";
            CurrentChat = chat;
            SendChatMessage("maureen_fenn", "Hello there, " + SaveSystem.CurrentUser.Username + ". My name is Maureen.");
            SendChatMessage("maureen_fenn", "I'm the developer of the various Tri apps you may've seen around the Shiftnet.");
            Story.Context.AutoComplete = false;
            SendChatMessage("maureen_fenn", "I have a bit of a problem that may need your assistance..");
            SendChatMessage("maureen_fenn", "I struck a deal with Aiden Nirh to put my software on his site and split the profits in half with me and him.");
            SendChatMessage("maureen_fenn", "But lately, even though many people have been buying my software, I've been getting nothing for it.");
            SendChatMessage("maureen_fenn", "Now I have barely enough Codepoints to keep my development environment online...");
            SendChatMessage("maureen_fenn", "My friend, you know him as hacker101, he's told me that you know how to hack.");
            SendChatMessage("maureen_fenn", "Can you bust into Aiden's server and see if he's gotten any documents or anything indicating why he's not paying me?");
            SendChatMessage("maureen_fenn", "He likes to document a lot of things about what he does and he likes to store those docs on his central Appscape server. Maybe there's something on there about me...");
            SendChatMessage("maureen_fenn", "You can find connection details for his server on Appscape's Contact page.");
            SendChatMessage("maureen_fenn", "The guy has pretty good security though... so be careful.");
            SendChatMessage("maureen_fenn", "When you find the right file, I'd download it to your system and just send it through SimpleSRC.");


            VirtualEnvironments.Create("appscape_main", new List <ClientSave>
            {
                new ClientSave
                {
                    Username    = "******",
                    Password    = GenRandomPassword(),
                    Permissions = UserPermissions.Root,
                },
                new ClientSave
                {
                    Username    = "******",
                    Password    = "",
                    Permissions = UserPermissions.Guest
                }
            }, 15000l, JsonConvert.DeserializeObject <ShiftOS.Objects.ShiftFS.Directory>(Properties.Resources.AppscapeServerFS));

            bool validFileSent = false;

            chat.FileSent += (file) =>
            {
                if (Convert.ToBase64String(file.Data) == Properties.Resources.AppscapeWantedFile)
                {
                    validFileSent = true;
                }
            };

            Story.Context.AutoComplete = false;

            Story.PushObjective("Appscape Troubles: The Secret", "Maureen has asked you to find out why Aiden Nirh, the maintainer of Appscape, isn't paying her half the profits for her TriOffice suite. Time to use your hacking skills... just like before.",
                                () => { return(validFileSent); },
                                () =>
            {
                SendChatMessage("maureen_fenn", "File received.");
                SendChatMessage("maureen_fenn", "Awwww, come on, man! You can't tell me I got banned due to a cease and desist from DevX... That bastard... DevX, I mean.");
                SendChatMessage("maureen_fenn", "Anyways, I'll talk to Aiden about that... if I can... or maybe you can? Either way, here's your Codepoints.");
                Story.Context.MarkComplete();
                Thread.Sleep(5000);
                Desktop.InvokeOnWorkerThread(() =>
                {
                    AppearanceManager.Close(chat);
                });
            });
        }