Exemple #1
0
        public static void Main(string[] args)
        {
            FileHandler.LoadDictionary();
            Console.WriteLine("Dictionary Loaded");
            FileHandler.LoadPasswords("passwords.txt");
            Console.WriteLine("Passwords Loaded");

            var pass = FileHandler.Passwords;
            var dict = FileHandler.Dictionaries;

//            Console.WriteLine(dict[6].Count);

//            int workerThreads;
//            int completionPortThreads;
//            ThreadPool.GetMaxThreads(out workerThreads, out completionPortThreads);
//            Console.WriteLine(workerThreads);

            List <ThreadStart> threads = new List <ThreadStart>();

            for (int i = 0; i < dict.Count; i++)
            {
                threads.Add(new ThreadStart(() => CrackingHandler.RunCracking(pass, dict[i])));
                new Thread(threads[i]).Start();
                Console.WriteLine($"Thread: {i}, has been started");
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            DictionaryHandler.SplitDict();


            ThreadStart[] threadStarts = new ThreadStart[DictionaryHandler.chunckCollection.Count];
            for (int i = 0; i < DictionaryHandler.chunckCollection.Count; i++)
            {
                threadStarts[i] = new ThreadStart(() => CrackingHandler.RunCracking(DictionaryHandler.chunckCollection[i]));
                new Thread(threadStarts[i]).Start();
            }
            Console.WriteLine(DictionaryHandler.chunckCollection[1].Count);
        }