Check file infection by CRC32
-
Hi all. I want to create a program in which I want to compare hashvalue of an ordinary file and a same ordinary but damaged file so that I could distinct them by using CRC32 algorithm. If current CRC32 value of a file is not equal to its actual value then it will show a message that file is damaged otherwise file is not damaged. Suggest me how can I do this (and give me some piece of code to better understand it). Thanks. Gagan Gagan
-
Hi all. I want to create a program in which I want to compare hashvalue of an ordinary file and a same ordinary but damaged file so that I could distinct them by using CRC32 algorithm. If current CRC32 value of a file is not equal to its actual value then it will show a message that file is damaged otherwise file is not damaged. Suggest me how can I do this (and give me some piece of code to better understand it). Thanks. Gagan Gagan
Google is your friend. Don't be afraid to use it. http://dotnet-snippets.com/dns/calculate-crc32-hash-from-file-SID587.aspx[^]
-
Google is your friend. Don't be afraid to use it. http://dotnet-snippets.com/dns/calculate-crc32-hash-from-file-SID587.aspx[^]
Thanks for your help but I have still some doubt. That example only explain that how to compute CRC32 hash value of a file but how can I differtiate two same files, one is in good condition and one is damaged or infected by some virus, by computing CRC32 hash values of both files. Suggest me how to do this. Thanks. Gagan
-
Thanks for your help but I have still some doubt. That example only explain that how to compute CRC32 hash value of a file but how can I differtiate two same files, one is in good condition and one is damaged or infected by some virus, by computing CRC32 hash values of both files. Suggest me how to do this. Thanks. Gagan
Uhhh...compare the two hash values??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
Thanks for your help but I have still some doubt. That example only explain that how to compute CRC32 hash value of a file but how can I differtiate two same files, one is in good condition and one is damaged or infected by some virus, by computing CRC32 hash values of both files. Suggest me how to do this. Thanks. Gagan
Dave K is right. If the two files are identical, they will give the same hash value. If the hash values are different, the files are different. Simple as that.
-
Hi all. I want to create a program in which I want to compare hashvalue of an ordinary file and a same ordinary but damaged file so that I could distinct them by using CRC32 algorithm. If current CRC32 value of a file is not equal to its actual value then it will show a message that file is damaged otherwise file is not damaged. Suggest me how can I do this (and give me some piece of code to better understand it). Thanks. Gagan Gagan