1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
   | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using System.Configuration;
 
 
namespace HackThis
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
 
                string password = ConfigurationManager.AppSettings["password"];
                char[] pwd = password.ToCharArray();
                int maxLoop = password.Length;
                int speed = Int32.Parse(ConfigurationManager.AppSettings["speed"]);
 
                string buffer = string.Empty;
                string pwdFinal = string.Empty;
 
                for (int j = 0; j < maxLoop; j++)
                {
                    for (int i = 0; i < 480; i++)
                    {
                        buffer = GetKeys(2);
                        Console.Write(buffer+" ");
 
                        if ((i + 1) % 20 == 0)
                        {
                            Console.WriteLine();                            
                        }                        
                    }
 
                    Console.WriteLine();
                    pwdFinal += pwd[j];
                    Console.WriteLine("Decoding password : {0}", pwdFinal);
 
                    System.Threading.Thread.Sleep(speed);
 
                    if (j < maxLoop - 1)
                    {
                        Console.Clear();
                    }
                }                
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            finally
            {
                Console.Read();
            }
        }
 
        static string GetKeys(int maxSize)
        {
            char[] chars = new char[72];
            chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW XYZ1234567890&#@!$%=|-_".ToCharArray();
 
            byte[] data = new byte[1];
 
            RNGCryptoServiceProvider crypto = new RNGCryptoServiceProvider();
            crypto.GetNonZeroBytes(data);
            data = new byte[maxSize];
            crypto.GetNonZeroBytes(data);
 
            StringBuilder sb = new StringBuilder();
            foreach (byte b in data)
            {
                sb.Append(chars[b % (chars.Length - 1)]);
            }
 
            return sb.ToString();
        }
    }
} | 
Partager