예제 #1
0
        /// <summary>
        /// Generates the wordlist.
        /// </summary>
        /// <returns><c>true</c>, if wordlist was generated, <c>false</c> otherwise.</returns>
        /// <param name="cmd">Cmd.</param>
        private bool GenerateWordlist(CLI cmd)
        {
            CombinationPattern obj2 = new CombinationPattern();

            if (cmd.Crunch)
            {
                obj2.GenerateIncrementing(Parameter.CharsetSelecting, Parameter.NumberLine, cmd.SaveFile, cmd.Zip, false, 1, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (cmd.Combination)
            {
                obj2.GenerateIncrementing(Parameter.CharsetSelecting, Parameter.NumberLine, cmd.SaveFile, cmd.Zip, cmd.Repeat, 2, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (cmd.Random | cmd.Wifi)
            {
                Randomizer obj = new Randomizer();
                obj.GenerateRandomString(Parameter.CharsetSelecting, Parameter.NumberLine, cmd.SaveFile, Parameter.NumberOfAllCombination, cmd.Zip, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (cmd.Variation)
            {
                VariationnPattern obj = new VariationnPattern();
                obj.GenerateVariationString(Parameter.CharsetSelecting, Parameter.NumberOfAllCombination, Parameter.NumberLine, cmd.SaveFile, cmd.Zip, cmd.Repeat, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (cmd.Permutation)
            {
                PermutationPattern obj = new PermutationPattern();
                obj.GeneratePermutationString(Parameter.CharsetSelecting, Parameter.NumberOfAllCombination, Parameter.NumberLine, Parameter.NumberOfChar, cmd.SaveFile, cmd.Zip, cmd.Repeat, 5, PathBackUpFiles, extension);
            }

            return(false);
        }
예제 #2
0
        /// <summary>
        /// Generate Wordlist under choice user
        /// </summary>
        /// <param name="typesAtGenerate"></param>
        /// <returns>Return false for down loop</returns>

        private bool GenerateWordlist(int typesAtGenerate)
        {
            CombinationPattern obj2 = new CombinationPattern();

            if (typesAtGenerate == 1)
            {
                obj2.GenerateIncrementing(Parameter.CharsetSelecting, Parameter.NumberLine, saveFile, Zip, false, typesAtGenerate, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (typesAtGenerate == 2)
            {
                obj2.GenerateIncrementing(Parameter.CharsetSelecting, Parameter.NumberLine, saveFile, Zip, Repeat, typesAtGenerate, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (typesAtGenerate == 3)
            {
                Randomizer obj = new Randomizer();
                obj.GenerateRandomString(Parameter.CharsetSelecting, Parameter.NumberLine, saveFile, Parameter.NumberOfAllCombination, Zip, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (typesAtGenerate == 4)
            {
                VariationnPattern obj = new VariationnPattern();
                obj.GenerateVariationString(Parameter.CharsetSelecting, Parameter.NumberOfAllCombination, Parameter.NumberLine, saveFile, Zip, Repeat, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (typesAtGenerate == 5)
            {
                PermutationPattern obj = new PermutationPattern();
                obj.GeneratePermutationString(Parameter.CharsetSelecting, Parameter.NumberOfAllCombination, Parameter.NumberLine, Parameter.NumberOfChar, saveFile, Zip, Repeat, typesAtGenerate, PathBackUpFiles, extension);
            }

            return(false);
        }
        internal BigInteger CalculOfAllCombinaison(bool _repeat, int typesAtGenerate, int numberOfChar, List<string> charsetSelecting)
        {

            BigInteger numberOfAllCombination = new BigInteger();

            try
            {
                
                if (typesAtGenerate == 1 | typesAtGenerate == 2)
                {
                    CombinationPattern obj = new CombinationPattern();
                    numberOfAllCombination = obj.CaclulCombination(_repeat,charsetSelecting,numberOfChar).Count;
                }
                else if (typesAtGenerate == 3 | typesAtGenerate == 6)
                {
                    numberOfAllCombination = (BigInteger)Math.Pow((double)numberOfChar, (double)charsetSelecting.Count);
                }
                else if (typesAtGenerate == 4)
                {
                    VariationnPattern obj = new VariationnPattern();
                    numberOfAllCombination = obj.CalculVariation(_repeat , charsetSelecting, numberOfChar).Count;
                }
                else if (typesAtGenerate == 5)
                {
                    PermutationPattern obj = new PermutationPattern();
                    numberOfAllCombination = PermutationPattern.CaclulPermut(_repeat,charsetSelecting,numberOfChar);
                }

                if (0 > numberOfAllCombination)
                {
                    numberOfAllCombination = -1 * numberOfAllCombination;
                }

            }
            catch (Exception)
            {
                numberOfAllCombination = 9999999999999999999;
            }

            return numberOfAllCombination;
        }
예제 #4
0
        internal BigInteger CalculOfAllCombinaison(bool _repeat, int typesAtGenerate, int numberOfChar, List <string> charsetSelecting)
        {
            BigInteger numberOfAllCombination = new BigInteger();

            try
            {
                if (typesAtGenerate == 1 | typesAtGenerate == 2)
                {
                    CombinationPattern obj = new CombinationPattern();
                    numberOfAllCombination = obj.CaclulCombination(_repeat, charsetSelecting, numberOfChar).Count;
                }
                else if (typesAtGenerate == 3 | typesAtGenerate == 6)
                {
                    numberOfAllCombination = (BigInteger)Math.Pow((double)numberOfChar, (double)charsetSelecting.Count);
                }
                else if (typesAtGenerate == 4)
                {
                    VariationnPattern obj = new VariationnPattern();
                    numberOfAllCombination = obj.CalculVariation(_repeat, charsetSelecting, numberOfChar).Count;
                }
                else if (typesAtGenerate == 5)
                {
                    numberOfAllCombination = PermutationPattern.CaclulPermut(_repeat, charsetSelecting, numberOfChar);
                }

                if (0 > numberOfAllCombination)
                {
                    numberOfAllCombination = -1 * numberOfAllCombination;
                }
            }
            catch (Exception)
            {
                numberOfAllCombination = 9999999999999999999;
            }

            return(numberOfAllCombination);
        }
예제 #5
0
        private bool GenerateWordlist(CLI cmd)
        {
            CombinationPattern obj2 = new CombinationPattern();

            if (cmd.Crunch)
            {
                obj2.GenerateIncrementing(Parameter.CharsetSelecting, Parameter.NumberLine, cmd.SaveFile, cmd.Zip, false, 1, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (cmd.Combination)
            {
                obj2.GenerateIncrementing(Parameter.CharsetSelecting, Parameter.NumberLine, cmd.SaveFile, cmd.Zip, cmd.Repeat, 2, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (cmd.Random | cmd.Wifi)
            {
                Randomizer obj = new Randomizer();
                obj.GenerateRandomString(Parameter.CharsetSelecting, Parameter.NumberLine, cmd.SaveFile, Parameter.NumberOfAllCombination,  cmd.Zip, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (cmd.Variation)
            {
                VariationnPattern obj = new VariationnPattern();
                obj.GenerateVariationString(Parameter.CharsetSelecting,Parameter.NumberOfAllCombination, Parameter.NumberLine, cmd.SaveFile, cmd.Zip, cmd.Repeat, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (cmd.Permutation)
            {
                PermutationPattern obj = new PermutationPattern();
                obj.GeneratePermutationString(Parameter.CharsetSelecting, Parameter.NumberOfAllCombination,Parameter.NumberLine, Parameter.NumberOfChar,  cmd.SaveFile, cmd.Zip, cmd.Repeat, 5,  PathBackUpFiles, extension);
            }

            return false;
        }
예제 #6
0
        /// <summary>
        /// Generate Wordlist under choice user
        /// </summary>
        /// <param name="typesAtGenerate"></param>
        /// <returns>Return false for down loop</returns>

        private bool GenerateWordlist(int typesAtGenerate)
        {
            CombinationPattern obj2 = new CombinationPattern();

            if (typesAtGenerate == 1 )
            {               
                obj2.GenerateIncrementing(Parameter.CharsetSelecting, Parameter.NumberLine, saveFile, Zip, false, typesAtGenerate, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (typesAtGenerate == 2)
            {
                
                obj2.GenerateIncrementing(Parameter.CharsetSelecting, Parameter.NumberLine, saveFile, Zip, Repeat, typesAtGenerate, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (typesAtGenerate == 3)
            {
                Randomizer obj = new Randomizer();
                obj.GenerateRandomString(Parameter.CharsetSelecting, Parameter.NumberLine, saveFile, Parameter.NumberOfAllCombination, Zip, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (typesAtGenerate == 4 )
            {
                VariationnPattern obj = new VariationnPattern();
                obj.GenerateVariationString(Parameter.CharsetSelecting, Parameter.NumberOfAllCombination,Parameter.NumberLine, saveFile, Zip, Repeat, Parameter.NumberOfChar, PathBackUpFiles, extension);
            }
            else if (typesAtGenerate == 5)
            {
                PermutationPattern obj = new PermutationPattern();
                obj.GeneratePermutationString(Parameter.CharsetSelecting, Parameter.NumberOfAllCombination,Parameter.NumberLine, Parameter.NumberOfChar, saveFile, Zip, Repeat, typesAtGenerate,  PathBackUpFiles, extension);
            }

            return false;
        }