c#Bruteforce生成HeX值

时间:2015-03-31 14:31:34

标签: c# brute-force

所以最近几天我一直在做一个普通的C#控制台应用程序来暴力破解特定的密钥结构

我的问题是我试图创建一个可以从已知密钥继续的强力应用程序

在这种情况下,我知道起始键是

  

00000001008500

我试图只强制键的最后部分以获得最终键

  

000000010085000B14187441FFC3EC0B

问题在于,而不是添加下一个租约者,例如

  

000000010085001

     

000000010085002

它做到了

  

000000010085001000000010085002

任何建议都会有很大帮助

我正在使用的代码如下

//define likely password characters
    static char[] Match =  {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
    //your password
    static string FindPassword;
    static int Combi;
    static string space;        

    static void Main(string[] args)
    {
        space = " ";
        int Count;
        Console.WriteLine("Welcome to BRUTE FORCE ");
        Console.WriteLine(space);

        FindPassword = "000000010085000B14187441FFC3EC0B";

        DateTime today = DateTime.Now;
        today.ToString("yyyy-MM-dd_HH:mm:ss");
        Console.WriteLine(space);
        Console.WriteLine("START:\t{0}", today);
        for (Count = 0; Count <= 15; Count++)
        {
            Recurse(Count, 0, "");
        }
    }

    static void Recurse(int Lenght, int Position, string BaseString)
    {
        int Count = 0;

        for (Count = 0; Count < Match.Length ; Count++)
        {
            Combi++;
            if (Position < Lenght - 1)
            {
                Recurse(Lenght, Position + 1, "00000001008500"+BaseString + Match[Count]);
            }
            if (BaseString + Match[Count] == FindPassword)
            {
                DateTime today = DateTime.Now;
                today.ToString("yyyy-MM-dd_HH:mm:ss");
                Console.WriteLine(space);
                Console.WriteLine("END:\t{0}\nCombi:\t{1}", today, Combi);
                Console.WriteLine(BaseString.ToString() + Match[Count]);
                Console.ReadLine();
                Environment.Exit(0);
            }
        }

0 个答案:

没有答案