Beispiel #1
0
    public void CrackFirewall()
    {
        TerminalCore.PauseTerminal(0.3f);
        NetworkDevice   device = TerminalNetwork.GetCurrentDevice();
        NetworkFirewall wall   = device.networkNode.FireWall;

        NetworkFirewall.FirewallLevel level = wall.GetNextClosedFirewall();
        if (!IsCracked(level.CurrentGuess))
        {
            int    r     = GetRandomLetter(level.CurrentGuess);
            char[] guess = new char[level.CurrentGuess.Length];

            for (int i = 0; i < level.CurrentGuess.Length; i++)
            {
                if (i == r)
                {
                    guess[i] = level.Password[i];
                }
                else
                {
                    guess[i] = level.CurrentGuess[i];
                }
            }

            level.CurrentGuess = new string(guess);
        }

        consoleLine.ConsoleLine = "\t- Guess: " + TerminalColourScheme.FormatText(level.CurrentGuess, TerminalStyle.INFO);
        consoleLine             = null;
    }
Beispiel #2
0
    public void AnalyzeCommand(string[] args)
    {
        NetworkDevice   device = TerminalNetwork.GetCurrentDevice();
        NetworkFirewall wall   = device.networkNode.FireWall;

        if (wall == null)
        {
            TerminalCore.AddMessage("\t- " + TerminalColourScheme.FormatText("No Firewall Detected.", TerminalStyle.TEXT));
            return;
        }

        NetworkFirewall.FirewallLevel level = wall.GetNextClosedFirewall();

        consoleLine = TerminalCore.AddCachedMessage("\t- Guess: " + level.CurrentGuess);
    }