Post: File Compare - C#
03-08-2015, 11:16 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I made a quick tool to check the MD5's of files because I was bored and have nothing else to do, it's pretty simple and lazy coding so here you go. I made the compare button just so if you're lazy or the MD5's look similar it will tell you automatically. Otherwise you could just compare with your eyes but why do that when we have hax?

You must login or register to view this content.
You must login or register to view this content.


Download: You must login or register to view this content.

Virustotal: You must login or register to view this content.
Source: You must login or register to view this content.

The following user thanked Black Panther for this useful post:

Tyler
03-12-2015, 02:42 AM #2
Smooth
< ^ > < ^ >
You must login or register to view this content.

You must login or register to view this content. images were broke :p
03-13-2015, 06:35 AM #3
Pichu
RIP PICHU.
To efficiently compare files, this isn't exactly a good way to do it since you need to compare the bytes of a file. Since the MD5 method still reads through all the bytes, you'd be better off just reading the bytes into an array and comparing them that way.

First, you can just check to see if the file size is the same. If they are, we know the programs are different. Next, if the sizes are the same, we load the bytes into arrays and compare the array. If the arrays do not match, we know they are different. If they do match, they are the same.

Having to generate a MD5 requires computational power which is slow. Unless you require the hash, don't always use hashing for file comparison.

If you need to generate a database of say files that you want to omit, you can get the hash of them (preferably SHA1 to prevent accidental identification). You can then scan what you need and get the hash then compare to your indexed database for a match.

Here is an issue with with some file comparison, if I build a new program and alter a string value inside, it has new values meaning the same program, A and A are now A and B so either way it won't be caught. To then determine if they are same, you'll want to create a FileInfo function to check the file's info for further possible matches if the conclusion of matching has so far come out as false.

Give that a try. ^_^

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo