How to Tell If Two Executable (Binary) Windows Files are the same
Posted on 2011-10-17
I am attempting to compare two executables that are compiled from the same source code within Visual Studio 2008 and Visual Studio 2010. When I attempt to use WinMerge or PE Explorer, I can get the same source code showing several variations from one another even though they were compiled from the same source code. For instance if I were to compile executable_A at 1pm and then compile executable_B at 2pm, I would end up with several distinctions within the *.exe file itself when comparing them with WinMerge or PE Explorer. From using these programs, I have found that the date/time stamp of when the *.exe was created is different and embedded into the *.exe as well as there is something called a "magic number" that is different if you were to compile the same source code on two different computers. I was wondering if someone knew of a way to make the executables be the same throughout the entire executable file, by removing the date/time stamp or removing the "magic number" that is found when using these two applications to compare *.exe. (During the testing of these applications, I used some source code that was compiled in Visual Basic, C++, and C#. All languages ended up with the same results.)
Any help that could be provided on this issue would be greatly appreciated.