I remember some time ago there was some software named something like "cmpare" or some shit, to test the difference between two executables, was mainly made to check if build is unique etc, anybody knows what its named or any similar software?
|
C
"compare" two files? |
|
Feb 27, 2017 05:13 PM
(This post was last modified: Feb 27, 2017 05:15 PM by Kantos.)
You can also use the 'diff' program that's common on unix-like systems. The 'diff' program exists on my Windows installation as well, not sure if that's due to git-bash or not.
[img]http://66.media.tumblr.com/acfffd664b499bccaea0a5bcfd0debf0/tumblr_of816spRTW1twdas2o1_400.jpg[/img] (Feb 28, 2017 03:54 AM)Masm4ever Wrote: On Windows, it's fc fileA fileB Or you could not use the shell and make your own program or function that does i, it's childsplay. (Mar 2, 2017 05:34 AM)maldev0 Wrote: Calculate the md5/sha1 hash of the code section in the PE header of the two specific files and compare them That won't cover the data section though.
Why can't you just use sha256sum or another checksum hash function? Preferably not an MD5 or SHA1 checksum, as collisions have been proven (recently with SHA1), and there is even code out there to make two C programs have the exact same MD5 sum yet do completely different things (you can check that out here), I know it wasn't the question, but it is relevant, and damn cool.
There are no proven sha256 or sha512 collision algorithms though that I am aware of (afaik SHA1 doesn't have an algorithm to make two do different things, other than just not work at all... yet). You can compare the files with Code sha256sum file1 file2 |
|
|


![[Image: scK6Gck.gif]](https://i.imgur.com/scK6Gck.gif)
![[Image: m7EgqG6.png]](https://i.imgur.com/m7EgqG6.png)

