如何暴力输入一个exe文件?

How to brute force inputs into a exe?

所以我有这个 exe 哈希生成器,我必须在其中找到生成给定特定哈希的字符串。因为我知道字符串的长度,所以我想知道也许我可以强行将输入输入到可执行文件中。或者有人可以告诉我如何对整个 exe 进行逆向工程以找出它是如何生成哈希的。

您可以编写自定义程序来生成要测试的字符串 (C#)

using System;
using System.IO;


namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            using (StreamWriter sw = new StreamWriter(@"C:\temp\keys.txt"))
            {
                for (int i = 0; i < 100; i++)
                {
                    // Replace this line by the string you want to test
                    var str = Guid.NewGuid();
                    Console.WriteLine(str);
                    sw.WriteLine(str);
                }
            }

        }
    }
}

然后,使用命令重定向将该控制台应用程序的输出重定向到您的 EXE 文件。 (参见 https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true)如果您想保留结果,请不要忘记将您的 exe 输出重定向到文本文件

consoleAppCs.exe | YourExe.exe > "C:\temp\output.txt"

然后您将在 c:\temp\ 文件夹中有两个要比较的文本文件