Exemple #1
0
        public void SolveDeterministicFull()
        {
            this.pruneEachNode     = true;
            this.pruneRootNode     = true;
            this.scrambleWordOrder = false;

            this.DetermineNextSubstitution = this.DetermineNextSubstitutionDeterministic;

            this.ReenableWords();
            this.Solve();

            // Set progress
            this.currentProgress++;
            double state = ((double)this.currentProgress) / this.maxProgressIt;

            this.PluginProgressCallback(state, 200.0);
        }
Exemple #2
0
        public void SolveRandomized()
        {
            this.pruneEachNode     = false;
            this.pruneRootNode     = false;
            this.scrambleWordOrder = true;

            this.DetermineNextSubstitution = this.DetermineNextSubstituationRandomly;

            for (int i = 0; i < DictionaryAttacker.maxRandomIterations; i++)
            {
                if (this.stopFlag == true)
                {
                    break;
                }

                this.Solve();

                // Set progress
                this.currentProgress++;
                double state = (((double)this.currentProgress) / this.maxProgressIt) * 100;
                this.PluginProgressCallback(state, 200.0);
            }
        }
Exemple #3
0
        public void SolveDeterministicWithDisabledWords()
        {
            this.pruneEachNode     = true;
            this.pruneRootNode     = true;
            this.scrambleWordOrder = false;

            this.DetermineNextSubstitution = this.DetermineNextSubstitutionDeterministic;
            // Max 3 disabled words
            // Disable all combinations of 1 word
            if (this.words.Count >= 2 && this.words.Count < 200)
            {
                for (int i = 0; i < this.words.Count; i++)
                {
                    if (this.stopFlag == true)
                    {
                        break;
                    }

                    this.ReenableWords();
                    this.words[i].Enabled = false;
                    this.Solve();

                    // Set progress
                    this.currentProgress++;
                    double state = (((double)this.currentProgress) / this.maxProgressIt) * 100;
                    this.PluginProgressCallback(state, 200.0);
                }
            }
            // Disable all combinations of 2 words
            if (this.words.Count >= 3 && this.words.Count < 70)
            {
                for (int i = 0; i < this.words.Count; i++)
                {
                    if (this.stopFlag == true)
                    {
                        break;
                    }

                    for (int j = i + 1; j < this.words.Count; j++)
                    {
                        if (this.stopFlag == true)
                        {
                            break;
                        }

                        this.ReenableWords();
                        this.words[i].Enabled = false;
                        this.words[j].Enabled = false;
                        this.Solve();

                        // Set progress
                        this.currentProgress++;
                        double state = (((double)this.currentProgress) / this.maxProgressIt) * 100;
                        this.PluginProgressCallback(state, 200.0);
                    }
                }
            }
            // Disable all combinations of 3 words
            if (this.words.Count >= 4 && this.words.Count < 30)
            {
                for (int i = 0; i < this.words.Count; i++)
                {
                    if (this.stopFlag == true)
                    {
                        break;
                    }

                    for (int j = i + 1; j < this.words.Count; j++)
                    {
                        if (this.stopFlag == true)
                        {
                            break;
                        }

                        for (int x = j + 1; x < this.words.Count; x++)
                        {
                            if (this.stopFlag == true)
                            {
                                break;
                            }

                            this.ReenableWords();
                            this.words[i].Enabled = false;
                            this.words[j].Enabled = false;
                            this.words[x].Enabled = false;
                            this.Solve();

                            // Set progress
                            this.currentProgress++;
                            double state = (((double)this.currentProgress) / this.maxProgressIt) * 100;
                            this.PluginProgressCallback(state, 200.0);
                        }
                    }
                }
            }
        }