private void SendReportEmail(FileMedicalRecord record, string emailAddress)
 {
     try
     {
         var mail = MailServer.generateEmail("MedicalRecord - " + record.Lastname + "_" + record.Firstname,
                                             record.ToEmailString(), "*****@*****.**");
         var userTo = emailAddress;
         if (emailAddress.Contains('@'))
         {
             userTo = emailAddress.Substring(0, emailAddress.IndexOf('@'));
         }
         var computer = Programs.getComputer(os, "jmail");
         if (computer == null)
         {
             return;
         }
         var mailServer = (MailServer)computer.getDaemon(typeof(MailServer));
         if (mailServer == null)
         {
             return;
         }
         mailServer.addMail(mail, userTo);
     }
     catch (Exception ex)
     {
     }
 }
示例#2
0
 public override void Trigger(object os_obj)
 {
     if ((double)this.Delay <= 0.0)
     {
         OS       os       = (OS)os_obj;
         Computer computer = Programs.getComputer(os, this.Target);
         if (computer != null)
         {
             os.netMap.discoverNode(computer);
         }
         else if (OS.DEBUG_COMMANDS)
         {
             os.write("Error revealing node " + this.Target + " : NODE NOT FOUND");
         }
     }
     else
     {
         Computer computer = Programs.getComputer((OS)os_obj, this.DelayHost);
         if (computer == null)
         {
             throw new NullReferenceException("Computer " + (object)computer + " could not be found as DelayHost for Function");
         }
         float delay = this.Delay;
         this.Delay = -1f;
         DelayableActionSystem.FindDelayableActionSystemOnComputer(computer).AddAction((SerializableAction)this, delay);
     }
 }
示例#3
0
        public override void Trigger(object os_obj)
        {
            OS os = (OS)os_obj;

            if ((double)this.Delay <= 0.0)
            {
                if (this.ExeName == "*")
                {
                    this.ExeName = "";
                }
                for (int index = 0; index < os.exes.Count; ++index)
                {
                    if (os.exes[index].name.ToLower().Contains(this.ExeName.ToLower()))
                    {
                        os.exes[index].isExiting = true;
                    }
                }
            }
            else
            {
                Computer computer = Programs.getComputer(os, this.DelayHost);
                if (computer == null)
                {
                    throw new NullReferenceException("Computer " + (object)computer + " could not be found as DelayHost for Function");
                }
                float delay = this.Delay;
                this.Delay = -1f;
                DelayableActionSystem.FindDelayableActionSystemOnComputer(computer).AddAction((SerializableAction)this, delay);
            }
        }
示例#4
0
        public override void Trigger(object os_obj)
        {
            OS os = (OS)os_obj;

            if ((double)this.Delay <= 0.0)
            {
                List <string> stringList = new List <string>((IEnumerable <string>) this.ContentLines.Split(Utils.robustNewlineDelim, StringSplitOptions.None));
                while (stringList.Count < 3)
                {
                    stringList.Add("");
                }
                os.EffectsUpdater.StartScreenBleed(this.TotalDurationSeconds, this.AlertTitle, stringList[0], stringList[1], stringList[2], this.CompleteAction);
            }
            else
            {
                Computer computer = Programs.getComputer(os, this.DelayHost);
                if (computer == null)
                {
                    throw new NullReferenceException("Computer " + (object)computer + " could not be found as DelayHost for Function");
                }
                float delay = this.Delay;
                this.Delay = -1f;
                DelayableActionSystem.FindDelayableActionSystemOnComputer(computer).AddAction((SerializableAction)this, delay);
            }
        }
示例#5
0
        public override void LoadContent()
        {
            base.LoadContent();
            graphPoints     = new List <Vector2>();
            backGraphPoints = new List <Vector2>();
            var num1 = 6f;

            heightRange = (bounds.Height - 4 - 17) / 3 * 2f;
            var num2    = (int)((bounds.Width - 4) / (double)num1);
            var vector2 = new Vector2(2f, bounds.Height - 4 - 17);

            graphPoints.Add(new Vector2(vector2.X, vector2.Y));
            backGraphPoints.Add(new Vector2(vector2.X, vector2.Y));
            for (var index = 1; index < num2 - 1; ++index)
            {
                graphPoints.Add(new Vector2(vector2.X,
                                            vector2.Y - (float)(Utils.random.NextDouble() * 0.2 + 0.3) * heightRange));
                backGraphPoints.Add(new Vector2(vector2.X, vector2.Y - (float)Utils.random.NextDouble() * heightRange));
                vector2.X += num1;
            }
            graphPoints.Add(new Vector2(vector2.X, vector2.Y));
            backGraphPoints.Add(new Vector2(vector2.X, vector2.Y));
            var computer = Programs.getComputer(os, targetIP);

            if (computer == null)
            {
                return;
            }
            computer.hostileActionTaken();
        }
示例#6
0
        public override void Trigger(object os_obj)
        {
            Computer computer = Programs.getComputer((OS)os_obj, this.TargetComp);

            if (computer == null)
            {
                throw new NullReferenceException("Computer " + this.TargetComp + " could not be found for SARemoveMissionFromHubServer Function, removing mission: " + this.MissionFilepath);
            }
            MissionHubServer daemon1 = computer.getDaemon(typeof(MissionHubServer)) as MissionHubServer;

            if (daemon1 != null)
            {
                daemon1.RemoveMissionFromListings(this.MissionFilepath);
            }
            else
            {
                DLCHubServer daemon2 = computer.getDaemon(typeof(DLCHubServer)) as DLCHubServer;
                if (daemon2 != null)
                {
                    daemon2.RemoveMission(this.MissionFilepath);
                }
                else
                {
                    MissionListingServer daemon3 = computer.getDaemon(typeof(MissionListingServer)) as MissionListingServer;
                    if (daemon3 == null)
                    {
                        throw new NullReferenceException("Computer " + this.TargetComp + " does not contain a MissionHubServer, MissionListingServer or DLCHubServer daemon for remove mission function adding mission: " + this.MissionFilepath);
                    }
                    daemon3.removeMission(this.MissionFilepath);
                }
            }
        }
示例#7
0
 private void ResetAccessPassword()
 {
     this.AdminEmailResetHasHappened = true;
     try
     {
         MailServer daemon = (MailServer)Programs.getComputer(this.os, this.adminResetEmailHostID).getDaemon(typeof(MailServer));
         string     userTo = this.adminResetPassEmailAccount;
         if (this.adminResetPassEmailAccount.Contains("@"))
         {
             userTo = this.adminResetPassEmailAccount.Substring(0, this.adminResetPassEmailAccount.IndexOf("@"));
         }
         string str = ((int)Utils.getRandomLetter()).ToString() + (object)Utils.getRandomLetter() + (object)Utils.getRandomNumberChar() + (object)Utils.getRandomLetter() + (object)Utils.getRandomNumberChar();
         this.comp.adminPass = str;
         this.comp.adminIP   = this.comp.ip;
         for (int index = 0; index < this.comp.users.Count; ++index)
         {
             if (this.comp.users[index].name.ToLower() == "admin")
             {
                 UserDetail user = this.comp.users[index];
                 user.pass = str;
                 this.comp.users[index] = user;
             }
         }
         string body = string.Format(Utils.readEntireFile("Content/DLC/Docs/DatabasePasswordResetEmail.txt"), (object)this.name, (object)str);
         daemon.addMail(MailServer.generateEmail(string.Format("{0} Password Reset", (object)this.name), body, "AdminBot"), userTo);
         this.passwordResetMessage = "Password Reset Complete";
     }
     catch (Exception ex)
     {
         this.passwordResetMessage = "CRITICAL RESET ERROR\n" + ex.ToString();
     }
 }
示例#8
0
 private void CompleteExecution()
 {
     this.PhaseTitle    = LocaleTerms.Loc("COMPLETE");
     this.PhaseSubtitle = "---";
     this.State         = DLCIntroExe.IntroState.Exiting;
     this.isExiting     = true;
     this.os.traceCompleteOverrideAction = (Action)null;
     if (!this.os.Flags.HasFlag("KaguyaTrialComplete"))
     {
         this.os.Flags.AddFlag("KaguyaTrialComplete");
         this.os.allFactions.setCurrentFaction("Bibliotheque", this.os);
         this.os.homeNodeID        = "dhs";
         this.os.homeAssetServerID = "dhsDrop";
         MissionFunctions.runCommand(1, "addRankSilent");
         this.os.currentMission = (ActiveMission)null;
         Computer computer = Programs.getComputer(this.os, "dhs");
         (computer.getDaemon(typeof(DLCHubServer)) as DLCHubServer).AddAgent(this.os.defaultUser.name, "dnkA19ds", new Color(222, 153, 24));
         for (int index = 0; index < computer.users.Count; ++index)
         {
             UserDetail user = computer.users[index];
             if (user.name == this.os.defaultUser.name)
             {
                 user.known            = true;
                 computer.users[index] = user;
             }
         }
     }
     this.os.runCommand("connect 69.58.186.114");
     this.os.IsInDLCMode      = true;
     this.os.DisableEmailIcon = false;
     this.isExiting           = true;
 }
示例#9
0
        public override void LoadContent()
        {
            base.LoadContent();
            binary = Computer.generateBinaryString(1024);
            var num1 = 12;

            binaryChars     = (bounds.Width - 4) / num1;
            acceptedBinary1 = new byte[binaryChars];
            acceptedBinary2 = new byte[binaryChars];
            for (var index = 0; index < num1; ++index)
            {
                acceptedBinary1[index] = Utils.random.NextDouble() > 0.5 ? (byte)0 : (byte)1;
                acceptedBinary2[index] = Utils.random.NextDouble() > 0.5 ? (byte)0 : (byte)1;
            }
            unlockOrder = new int[binaryChars];
            for (var index = 0; index < binaryChars; ++index)
            {
                unlockOrder[index] = index;
            }
            var num2 = 300;

            for (var index1 = 0; index1 < num2; ++index1)
            {
                var index2 = Utils.random.Next(0, unlockOrder.Length - 1);
                var index3 = Utils.random.Next(0, unlockOrder.Length - 1);
                var num3   = unlockOrder[index2];
                unlockOrder[index2] = unlockOrder[index3];
                unlockOrder[index3] = num3;
            }
            Programs.getComputer(os, targetIP).hostileActionTaken();
        }
示例#10
0
        public override void LoadContent()
        {
            base.LoadContent();
            this.graphPoints     = new List <Vector2>();
            this.backGraphPoints = new List <Vector2>();
            float num1 = 6f;

            this.heightRange = (float)((this.bounds.Height - 4 - 17) / 3) * 2f;
            int     num2    = (int)((double)(this.bounds.Width - 4) / (double)num1);
            Vector2 vector2 = new Vector2(2f, (float)(this.bounds.Height - 4 - 17));

            this.graphPoints.Add(new Vector2(vector2.X, vector2.Y));
            this.backGraphPoints.Add(new Vector2(vector2.X, vector2.Y));
            for (int index = 1; index < num2 - 1; ++index)
            {
                this.graphPoints.Add(new Vector2(vector2.X, vector2.Y - (float)(Utils.random.NextDouble() * 0.2 + 0.3) * this.heightRange));
                this.backGraphPoints.Add(new Vector2(vector2.X, vector2.Y - (float)Utils.random.NextDouble() * this.heightRange));
                vector2.X += num1;
            }
            this.graphPoints.Add(new Vector2(vector2.X, vector2.Y));
            this.backGraphPoints.Add(new Vector2(vector2.X, vector2.Y));
            Computer computer = Programs.getComputer(this.os, this.targetIP);

            if (computer == null)
            {
                return;
            }
            computer.hostileActionTaken();
        }
示例#11
0
        public override void Trigger(object os_obj)
        {
            OS os = (OS)os_obj;

            if ((double)this.Delay <= 0.0)
            {
                Computer computer = Programs.getComputer(os, this.TargetComp);
                if (computer == null)
                {
                    return;
                }
                if (string.IsNullOrWhiteSpace(this.NewIP) || this.NewIP.StartsWith("#RANDOM"))
                {
                    this.NewIP = NetworkMap.generateRandomIP();
                }
                computer.ip = this.NewIP;
            }
            else
            {
                Computer computer = Programs.getComputer(os, this.DelayHost);
                if (computer == null)
                {
                    throw new NullReferenceException("Computer " + (object)computer + " could not be found as DelayHost for Function");
                }
                float delay = this.Delay;
                this.Delay = -1f;
                DelayableActionSystem.FindDelayableActionSystemOnComputer(computer).AddAction((SerializableAction)this, delay);
            }
        }
示例#12
0
        public override void Trigger(object os_obj)
        {
            OS os = (OS)os_obj;

            if ((double)this.Delay <= 0.0)
            {
                Computer computer     = Programs.getComputer(os, this.TargetComp);
                Folder   folderAtPath = Programs.getFolderAtPath(this.TargetFolderpath, os, computer.files.root, true);
                if (folderAtPath == null)
                {
                    return;
                }
                FileEntry fileEntry = folderAtPath.searchForFile(this.TargetFilename);
                fileEntry.data = fileEntry.data + "\n" + this.DataToAdd;
            }
            else
            {
                Computer computer = Programs.getComputer(os, this.DelayHost);
                if (computer == null)
                {
                    throw new NullReferenceException("Computer " + (object)computer + " could not be found as DelayHost for Function");
                }
                float delay = this.Delay;
                this.Delay = -1f;
                DelayableActionSystem.FindDelayableActionSystemOnComputer(computer).AddAction((SerializableAction)this, delay);
            }
        }
示例#13
0
        public override void Trigger(object os_obj)
        {
            OS       os        = (OS)os_obj;
            Computer computer1 = Programs.getComputer(os, this.TargetComp);

            if (computer1 == null && !OS.DEBUG_COMMANDS)
            {
                return;
            }
            if ((double)this.Delay <= 0.0)
            {
                computer1.crash(this.CrashSource);
            }
            else
            {
                Computer computer2 = Programs.getComputer(os, this.DelayHost);
                if (computer2 == null)
                {
                    throw new NullReferenceException("Computer " + (object)computer2 + " could not be found as DelayHost for Function");
                }
                float delay = this.Delay;
                this.Delay = -1f;
                DelayableActionSystem.FindDelayableActionSystemOnComputer(computer2).AddAction((SerializableAction)this, delay);
            }
        }
示例#14
0
        public override void Trigger(object os_obj)
        {
            OS os = (OS)os_obj;

            if ((double)this.Delay <= 0.0)
            {
                Computer computer = Programs.getComputer(os, this.TargetComp);
                if (computer == null)
                {
                    return;
                }
                do
                {
                    os.netMap.visibleNodes.Remove(os.netMap.nodes.IndexOf(computer));
                }while (os.netMap.visibleNodes.Contains(os.netMap.nodes.IndexOf(computer)));
            }
            else
            {
                Computer computer = Programs.getComputer(os, this.DelayHost);
                if (computer == null)
                {
                    throw new NullReferenceException("Computer " + (object)computer + " could not be found as DelayHost for Function");
                }
                float delay = this.Delay;
                this.Delay = -1f;
                DelayableActionSystem.FindDelayableActionSystemOnComputer(computer).AddAction((SerializableAction)this, delay);
            }
        }
示例#15
0
        public override void Trigger(object os_obj)
        {
            OS os = (OS)os_obj;

            if ((double)this.Delay <= 0.0)
            {
                Computer computer = Programs.getComputer(os, this.TargetComp);
                if (computer == null)
                {
                    return;
                }
                for (int index = 0; index < computer.users.Count; ++index)
                {
                    if (computer.users[index].name == this.Username)
                    {
                        UserDetail user = computer.users[index];
                        user.known            = true;
                        computer.users[index] = user;
                    }
                }
            }
            else
            {
                Computer computer = Programs.getComputer(os, this.DelayHost);
                if (computer == null)
                {
                    throw new NullReferenceException("Computer " + (object)computer + " could not be found as DelayHost for Function");
                }
                float delay = this.Delay;
                this.Delay = -1f;
                DelayableActionSystem.FindDelayableActionSystemOnComputer(computer).AddAction((SerializableAction)this, delay);
            }
        }
示例#16
0
        public override void LoadContent()
        {
            base.LoadContent();
            this.binary = Computer.generateBinaryString(1024);
            int num1 = 12;

            this.binaryChars     = (this.bounds.Width - 4) / num1;
            this.acceptedBinary1 = new byte[this.binaryChars];
            this.acceptedBinary2 = new byte[this.binaryChars];
            for (int index = 0; index < num1; ++index)
            {
                this.acceptedBinary1[index] = Utils.random.NextDouble() > 0.5 ? (byte)0 : (byte)1;
                this.acceptedBinary2[index] = Utils.random.NextDouble() > 0.5 ? (byte)0 : (byte)1;
            }
            this.unlockOrder = new int[this.binaryChars];
            for (int index = 0; index < this.binaryChars; ++index)
            {
                this.unlockOrder[index] = index;
            }
            int num2 = 300;

            for (int index1 = 0; index1 < num2; ++index1)
            {
                int index2 = Utils.random.Next(0, this.unlockOrder.Length - 1);
                int index3 = Utils.random.Next(0, this.unlockOrder.Length - 1);
                int num3   = this.unlockOrder[index2];
                this.unlockOrder[index2] = this.unlockOrder[index3];
                this.unlockOrder[index3] = num3;
            }
            Programs.getComputer(this.os, this.targetIP).hostileActionTaken();
        }
示例#17
0
 public PacificPortExe(Rectangle location, OS operatingSystem, string[] p)
     : base(location, operatingSystem)
 {
     this.needsProxyAccess = true;
     this.name             = "Pacific_Portcrusher";
     this.ramCost          = 190;
     this.IdentifierName   = "PacificPortcrusher";
     Programs.getComputer(this.os, this.targetIP).hostileActionTaken();
 }
示例#18
0
 public override void Update(float t)
 {
     base.Update(t);
     if (!Programs.getComputer(this.os, this.targetIP).adminIP.Equals(this.os.thisComputer.ip) || Programs.getComputer(this.os, this.targetIP).disabled)
     {
         if (this.state != -1)
         {
             this.os.write(">>");
             this.os.write(">> " + string.Format(LocaleTerms.Loc("SHELL ERROR: Administrator account lost on {0}"), (object)this.compThisShellIsRunningOn.ip));
             this.os.write(">>");
         }
         this.Completed();
     }
     if (this.targetRamUse != this.ramCost)
     {
         if (this.targetRamUse < this.ramCost)
         {
             this.ramCost -= (int)((double)t * (double)ShellExe.RAM_CHANGE_PS);
             if (this.ramCost < this.targetRamUse)
             {
                 this.ramCost = this.targetRamUse;
             }
         }
         else
         {
             int num = (int)((double)t * (double)ShellExe.RAM_CHANGE_PS);
             if (this.os.ramAvaliable >= num)
             {
                 this.ramCost += num;
                 if (this.ramCost > this.targetRamUse)
                 {
                     this.ramCost = this.targetRamUse;
                 }
             }
         }
     }
     switch (this.state)
     {
     case 1:
         if (!this.destComp.hasProxy)
         {
             break;
         }
         this.destComp.proxyOverloadTicks -= t;
         if ((double)this.destComp.proxyOverloadTicks <= 0.0)
         {
             this.destComp.proxyOverloadTicks = 0.0f;
             this.destComp.proxyActive        = false;
             this.completedAction(1);
         }
         else
         {
             this.destComp.hostileActionTaken();
         }
         break;
     }
 }
示例#19
0
 public override void LoadContent()
 {
     base.LoadContent();
     this.infoBar = new Rectangle(this.bounds.X, this.bounds.Y, this.bounds.Width, ShellExe.INFOBAR_HEIGHT);
     this.os.shells.Add(this);
     this.os.shellIPs.Add(this.targetIP);
     this.compThisShellIsRunningOn = Programs.getComputer(this.os, this.targetIP);
     this.compThisShellIsRunningOn.log(this.os.thisComputer.ip + "_Opened_#SHELL");
 }
示例#20
0
        private void CompleteAndReturnToMenu()
        {
            this.os.Flags.AddFlag("Victory");
            Programs.disconnect(new string[0], this.os);
            Computer computer = Programs.getComputer(this.os, "porthackHeart");

            this.os.netMap.visibleNodes.Remove(this.os.netMap.nodes.IndexOf(computer));
            computer.disabled = true;
            computer.daemons.Clear();
            computer.ip = NetworkMap.generateRandomIP();
            this.os.terminal.inputLocked = false;
            this.os.ram.inputLocked      = false;
            this.os.netMap.inputLocked   = false;
            this.os.DisableTopBarButtons = false;
            this.os.canRunContent        = true;
            this.IsActive = false;
            ComputerLoader.loadMission("Content/Missions/CreditsMission.xml", false);
            this.os.threadedSaveExecute(false);
            MediaPlayer.IsRepeating = true;
            MusicManager.playSongImmediatley("Music\\Bit(Ending)");
            if (Settings.isPirateBuild)
            {
                this.os.delayer.Post(ActionDelayer.Wait(15.0), (Action)(() =>
                {
                    try
                    {
                        ComputerLoader.loadMission("Content/Missions/CreditsMission_p.xml", false);
                    }
                    catch (Exception ex)
                    {
                    }
                }));
            }
            if (!Settings.sendsDLC1PromoEmailAtEnd)
            {
                return;
            }
            this.os.delayer.Post(ActionDelayer.Wait(30.0), (Action)(() =>
            {
                try
                {
                    string body = Utils.readEntireFile("Content/LocPost/DLCMessage.txt");
                    string subject = "Labyrinths";
                    string sender = "Matt Trobbiani";
                    string email = MailServer.generateEmail(subject, body, sender);
                    MailServer daemon = this.os.netMap.mailServer.getDaemon(typeof(MailServer)) as MailServer;
                    if (daemon == null)
                    {
                        return;
                    }
                    daemon.addMail(email, this.os.defaultUser.name);
                }
                catch (Exception ex)
                {
                }
            }));
        }
示例#21
0
        private void Complete()
        {
            Computer computer = Programs.getComputer(this.os, this.targetIP);

            if (computer != null)
            {
                computer.openPort(104, this.os.thisComputer.ip);
            }
            this.sucsessTimer = 2f;
        }
示例#22
0
        public override bool Check(object os_obj)
        {
            OS       os       = (OS)os_obj;
            Computer computer = Programs.getComputer(os, this.target);

            if (computer == null)
            {
                return(false);
            }
            return(computer.adminIP == os.thisComputer.ip);
        }
示例#23
0
        public override void Completed()
        {
            base.Completed();
            Computer computer = Programs.getComputer(this.os, this.targetIP);

            if (computer == null)
            {
                return;
            }
            computer.openPort(25, this.os.thisComputer.ip);
        }
示例#24
0
        public override void Completed()
        {
            base.Completed();
            var computer = Programs.getComputer(os, targetIP);

            if (computer == null)
            {
                return;
            }
            computer.openPort(1433, os.thisComputer.ip);
        }
示例#25
0
 public override void LoadContent()
 {
     base.LoadContent();
     this.bodyText            = Utils.readEntireFile("Content/EffectFiles/SQLMemoryCorruptionDump.txt").Split(Utils.newlineDelim);
     this.initStringCharDelay = 3f / (float)"Initializing###.#.#.#\nConnecting###.#.#.#.#.#.#.#.#..#.\nInjecting Corrupt Sectors###.#.#.##.#.#.#".Replace("#", "@@").Length;
     this.flashColor          = this.os.lockedColor;
     this.flashColor.A        = (byte)0;
     this.brightDrawColor     = this.os.unlockedColor;
     this.brightDrawColor.A   = (byte)0;
     Programs.getComputer(this.os, this.targetIP).hostileActionTaken();
 }
示例#26
0
        public override void Completed()
        {
            base.Completed();
            Computer computer = Programs.getComputer(this.os, this.targetIP);

            if (computer != null)
            {
                computer.openPort(21, this.os.thisComputer.ip);
            }
            this.isExiting = true;
        }
示例#27
0
        public static void UpdateAlertIcon(object osobj)
        {
            OS     os = (OS)osobj;
            string flagStartingWith1 = os.Flags.GetFlagStartingWith("_changeAlertIconType:");
            string flagStartingWith2 = os.Flags.GetFlagStartingWith("_changeAlertIconTarget:");

            if (flagStartingWith1 == null || flagStartingWith2 == null)
            {
                return;
            }
            string   str = flagStartingWith1.Substring("_changeAlertIconType:".Length);
            string   ip_Or_ID_or_Name = flagStartingWith2.Substring("_changeAlertIconTarget:".Length);
            Computer computer         = Programs.getComputer(os, ip_Or_ID_or_Name);

            switch (str.ToLower())
            {
            case "mail":
                MailServer daemon1 = (MailServer)computer.getDaemon(typeof(MailServer));
                bool       flag    = false;
                for (int index = 0; index < daemon1.comp.users.Count; ++index)
                {
                    if (daemon1.comp.users[index].name == os.defaultUser.name)
                    {
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    throw new FormatException("Mail server " + ip_Or_ID_or_Name + " does not have a user account for the player!\nA mail server must have a player account to be used as the alert icon");
                }
                os.mailicon.UpdateTargetServer(daemon1);
                os.ShowDLCAlertsIcon = false;
                break;

            case "irc":
                IRCDaemon daemon2 = (IRCDaemon)computer.getDaemon(typeof(IRCDaemon));
                os.ShowDLCAlertsIcon = true;
                os.hubServerAlertsIcon.UpdateTarget((object)daemon2, (object)daemon2.comp);
                break;

            case "irchub":
                DLCHubServer daemon3 = (DLCHubServer)computer.getDaemon(typeof(DLCHubServer));
                os.ShowDLCAlertsIcon = true;
                os.hubServerAlertsIcon.UpdateTarget((object)daemon3, (object)daemon3.comp);
                break;

            case "board":
                MessageBoardDaemon daemon4 = (MessageBoardDaemon)computer.getDaemon(typeof(MessageBoardDaemon));
                os.ShowDLCAlertsIcon = true;
                os.hubServerAlertsIcon.UpdateTarget((object)daemon4, (object)daemon4.comp);
                break;
            }
        }
示例#28
0
        public override void Completed()
        {
            base.Completed();
            var computer = Programs.getComputer(os, targetIP);

            if (computer != null)
            {
                computer.openPort(22, os.thisComputer.ip);
                os.write("-- SecureShellCrack Complete --");
            }
        }
示例#29
0
        public override void LoadContent()
        {
            base.LoadContent();
            int num = PortExploits.passwords.Count / 3;

            this.textIndex    = new int[3];
            this.textIndex[0] = 0;
            this.textIndex[1] = num;
            this.textIndex[2] = 2 * num;
            this.target       = Programs.getComputer(this.os, this.targetIP);
            this.os.write("Porthack Initialized -- Running...");
        }
示例#30
0
        public override void Completed()
        {
            base.Completed();
            Computer computer = Programs.getComputer(this.os, this.targetIP);

            if (computer == null)
            {
                return;
            }
            computer.openPort(192, this.os.thisComputer.ip);
            this.os.write("Pacific Portcrusher  >>" + LocaleTerms.Loc("SUCCESS") + "<<");
        }