Exemplo n.º 1
0
        public static void Main(string[] args)
        {
            //testspeedRainbowTablevsNonRainbowTable();
            IAttackMethod attackmethod = new DictinaryAttack();
            IHashFunction hashfunction = new sha256();
            DateTime      start        = DateTime.Now;

            Console.WriteLine(attackmethod.attack("12345678"));
            Console.WriteLine((DateTime.Now - start).TotalMilliseconds);
            //Console.WriteLine(str + " = " + attackmethod.attack(str));

            // Keep the console window open in debug mode.
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
Exemplo n.º 2
0
        public static void testspeedRainbowTablevsNonRainbowTable()
        {
            IAttackMethod attackmethod  = new DictinaryAttackWithCommonPasswords();
            IAttackMethod attackmethod1 = new rainbowTable();
            IHashFunction hashfunction  = new sha256();
            DateTime      start         = DateTime.Now;

            foreach (string str in new Fileloader().getTargetFile())
            {
                Console.WriteLine(str + " = " + attackmethod.attackhash(str, hashfunction.hash));
            }
            Console.WriteLine((DateTime.Now - start).TotalMilliseconds);
            start = DateTime.Now;
            foreach (string str in new Fileloader().getTargetFile())
            {
                Console.WriteLine(str + " = " + attackmethod1.attack(str));
            }
            Console.WriteLine((DateTime.Now - start).TotalMilliseconds);

            // Keep the console window open in debug mode.
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }