Exemplo n.º 1
0
        private static List <PasswordList> GetInvalidPasswordListPosition()
        {
            var fullList = ProcessInput.RegTestLine();
            var result   = new List <PasswordList>();

            foreach (var item in fullList)
            {
                char   ch         = item.Charachter.ToCharArray()[0];
                string passw      = item.Password;
                char   firstChar  = passw[item.MinCount - 1];
                char   secondChar = passw[item.MaxCount - 1];
                if ((firstChar == ch && secondChar != ch) || (firstChar != ch && secondChar == ch))
                {
                    var line = new PasswordList
                    {
                        MinCount   = item.MinCount,
                        MaxCount   = item.MaxCount,
                        Charachter = item.Charachter,
                        Password   = item.Password
                    };
                    result.Add(line);
                }
            }
            return(result);
        }
Exemplo n.º 2
0
 //We think that here passwords are without spaces(no empty indexes). But it's not. We need either resort passwords or allow empty indexes
 private List<byte[]> GetPreparedPasswords(PasswordList passes)
 {
     List<byte[]> psdConverted = new List<byte[]>();
     foreach (var pass in passes)
     {
         psdConverted.Add(pass.Value.Pass);
     }
     return psdConverted;
 }
Exemplo n.º 3
0
 void Start()
 {
     PersonController = GameObject.Find("System");
     NamesList        = PersonController.GetComponent <PasswordList>();
     NamesList.PasswordListResource();
     Cooldown  = 5;
     MCooldown = 0.5f;
     MoveMod   = 25;
 }
Exemplo n.º 4
0
        public DividedList(PasswordList mainList)
        {
            foreach (var pass in mainList)
            {
                DivideAndAdd(pass.Value);
            }

            _rngCsp.Dispose();
        }
Exemplo n.º 5
0
        //We think that here passwords are without spaces(no empty indexes). But it's not. We need either resort passwords or allow empty indexes
        private List <byte[]> GetPreparedPasswords(PasswordList passes)
        {
            List <byte[]> psdConverted = new List <byte[]>();

            foreach (var pass in passes)
            {
                psdConverted.Add(pass.Value.Pass);
            }
            return(psdConverted);
        }
Exemplo n.º 6
0
        public DividedList(PasswordList mainList)
        {
            foreach (var pass in mainList)
            {
                DivideAndAdd(pass.Value);
            }


            _rngCsp.Dispose();
        }
 private PasswordList GetPasses()
 {
     var passes = new PasswordList();
     foreach (var kpPassItem in _kpGroup.Entries)
     {
         var convertedPass = new PwItemConverter(kpPassItem).ConvertToPSD();
         if (convertedPass.Pass.Length > 0)
             passes.AddPass(convertedPass);
     }
     return passes;
 }
Exemplo n.º 8
0
        private PasswordList GetPasses()
        {
            var passes = new PasswordList();

            foreach (var kpPassItem in _kpGroup.Entries)
            {
                var convertedPass = new PwItemConverter(kpPassItem).ConvertToPSD();
                if (convertedPass.Pass.Length > 0)
                {
                    passes.AddPass(convertedPass);
                }
            }
            return(passes);
        }
Exemplo n.º 9
0
        public void PassWorlistTest()
        {
            List <string> testInput = new List <string>();

            testInput.Add("1-3 a: abcde");
            testInput.Add("1-3 b: cdefg");
            testInput.Add("2-9 c: ccccccccc");
            // Act


            PasswordList pL = new PasswordList(FileUtils.CreateTempFileFromList(testInput));

            Assert.AreEqual(2, pL.ValidPasswordsCount());
        }
Exemplo n.º 10
0
        public void PasswordList_EnumerableConstructor_Test()
        {
            var passwords = new[]
            {
                "password",
                "123456",
                "qwerty"
            };

            var passwordList = new PasswordList(passwords);

            foreach (var password in passwords)
            {
                Assert.Contains(password, passwordList);
            }
        }
Exemplo n.º 11
0
 void WebSearch()
 {
     // APPLICATIONS
     ws = Applications.GetComponent <WebSec>();
     sm = Applications.GetComponent <SystemMap>();
     tr = Applications.GetComponent <TextReader>();
     ib = Applications.GetComponent <InternetBrowser>();
     // PROMPTS
     ep = Prompts.GetComponent <ErrorProm>();
     // HACKING
     trace = Hacking.GetComponent <Tracer>();
     prog  = Hacking.GetComponent <Progtive>();
     // SYSTEM
     com  = System.GetComponent <Computer>();
     def  = System.GetComponent <Defalt>();
     pl   = System.GetComponent <PasswordList>();
     clic = System.GetComponent <CLICommandsV2>();
 }
Exemplo n.º 12
0
        public static List <PasswordList> RegTestLine()
        {
            var input = GetInputSplitted();
            var items = new List <PasswordList>();

            foreach (var line in input)
            {
                Regex regex = new Regex(@"^(\d+)-(\d+)\s([a-z|A-Z]):\s(.*?)$");
                Match match = regex.Match(line);
                var   item  = new PasswordList
                {
                    MinCount   = Int32.Parse(match.Groups[1].Value),
                    MaxCount   = Int32.Parse(match.Groups[2].Value),
                    Charachter = match.Groups[3].Value,
                    Password   = match.Groups[4].Value
                };
                items.Add(item);
            }

            return(items);
        }
Exemplo n.º 13
0
        private static List <PasswordList> GetValidPasswordList()
        {
            var fullList = ProcessInput.RegTestLine();
            var result   = new List <PasswordList>();

            foreach (var item in fullList)
            {
                char   ch    = item.Charachter.ToCharArray()[0];
                string passw = item.Password;
                int    count = passw.Count(s => s == ch);
                if (count >= item.MinCount && count <= item.MaxCount)
                {
                    var line = new PasswordList
                    {
                        MinCount   = item.MinCount,
                        MaxCount   = item.MaxCount,
                        Charachter = item.Charachter,
                        Password   = item.Password
                    };
                    result.Add(line);
                }
            }
            return(result);
        }
Exemplo n.º 14
0
    // Progtive is the one at a time sequential cracker
    // Use this for initialization
    void Start()
    {
        Hardware        = GameObject.Find("Hardware");
        Prompts         = GameObject.Find("Prompts");
        SysSoftware     = GameObject.Find("System");
        HackingSoftware = GameObject.Find("Hacking");
        AppSoftware     = GameObject.Find("Applications");

        ep     = Prompts.GetComponent <ErrorProm>();
        com    = SysSoftware.GetComponent <Computer>();
        trace  = HackingSoftware.GetComponent <Tracer>();
        cmd    = SysSoftware.GetComponent <CLI>();
        defalt = SysSoftware.GetComponent <Defalt>();
        ib     = AppSoftware.GetComponent <InternetBrowser>();
        ws     = AppSoftware.GetComponent <WebSec>();
        cpu    = Hardware.GetComponent <CPU>();
        pl     = SysSoftware.GetComponent <PasswordList>();
        sc     = SysSoftware.GetComponent <SoundControl>();

        CloseButton   = new Rect(125, 1, 21, 21);
        ExecuteButton = new Rect(45, 100, 60, 24);

        StartingCount = pl.PasswordWords.Count;
    }
 public void SetPlainTextPassword(int id, string plainTextPassword)
 {
     PasswordList.Find(x => x.Id == id).PlainTextPassword = plainTextPassword;
 }
Exemplo n.º 16
0
 public Base()
 {
     Passwords = new PasswordList();
 }
        private void btn_generate_Click(object sender, RoutedEventArgs e)
        {
            PasswordList.Clear();

            switch (SelectedMethod.Id)
            {
            case 0:
            {
                PasswordList.Add(PasswordGenerator.GeneratePassword(8, 0, 0));
            }
            break;

            case 1:
            {
                PasswordList.Add(PasswordGenerator.GeneratePassword(4, 4, 2));
            }
            break;

            case 2:
            {
                PasswordList.Add(PasswordGenerator.GenerateStandardEightCharacterPassword());
            }
            break;

            case 3:
            {
                PasswordList.Add(PasswordGenerator.GenerateStandardTwelveCharacterPassword());
            }
            break;

            case 4:
            {
                PasswordList.Add(PasswordGenerator.GeneratePassword(6, 2, 0));
            }
            break;

            case 5:
            {
                PasswordList.Add(PasswordGenerator.GeneratePassword(8, 4, 0));
            }
            break;

            case 6:
            {
                PasswordList.Add(PasswordGenerator.GenerateStandardPasswordPhrase());
            }
            break;

            case 7:
            {
                PasswordList.Add(PasswordGenerator.GenerateStandardPasswordPhraseWithThreeLetterWords());
            }
            break;

            case 8:
            {
                PasswordList.Add(PasswordGenerator.GenerateStandardPasswordPhraseWithFourLetterWords());
            }
            break;

            case 9:
            {
                PasswordList.Add(PasswordGenerator.GenerateStandardPasswordPhraseWithFiveLetterWords());
            }
            break;

            case 10:
            {
                PasswordList.Add(PasswordGenerator.GeneratePasswordPhraseWithSpecialCharacterSeparator("#"));
            }
            break;

            case 11:
            {
                PasswordList.Add(PasswordGenerator.GeneratePasswordPhraseWithSpecialCharacterSeparator("^"));
            }
            break;

            case 12:
            {
                PasswordList.Add(PasswordGenerator.GeneratePasswordPhraseWithRandomSpecialCharacterSeparator());
            }
            break;

            case 13:
            {
                PasswordList.AddRange(PasswordGenerator.GenerateXNumberOfPasswords(10, 5, 2, 1));
            }
            break;

            case 14:
            {
                PasswordList.AddRange(PasswordGenerator.GenerateXNumberOfPasswords(10, 7, 3, 2));
            }
            break;
            }

            Passwords.Items.Refresh();
        }
Exemplo n.º 18
0
 public void PasswordList_DefaultConstructor_Test()
 {
     var passwordList = new PasswordList();
 }