Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Check file infection by CRC32

Check file infection by CRC32

Scheduled Pinned Locked Moved Visual Basic
algorithmsquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gagan 20
    wrote on last edited by
    #1

    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

    D G 2 Replies Last reply
    0
    • G Gagan 20

      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

      D Offline
      D Offline
      David Skelly
      wrote on last edited by
      #2

      Google is your friend. Don't be afraid to use it. http://dotnet-snippets.com/dns/calculate-crc32-hash-from-file-SID587.aspx[^]

      G 1 Reply Last reply
      0
      • D David Skelly

        Google is your friend. Don't be afraid to use it. http://dotnet-snippets.com/dns/calculate-crc32-hash-from-file-SID587.aspx[^]

        G Offline
        G Offline
        Gagan 20
        wrote on last edited by
        #3

        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

        D D 2 Replies Last reply
        0
        • G Gagan 20

          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

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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...

          1 Reply Last reply
          0
          • G Gagan 20

            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

            D Offline
            D Offline
            David Skelly
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • G Gagan 20

              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

              G Offline
              G Offline
              Gagan 20
              wrote on last edited by
              #6

              Oopps...sorry for that stupid question, I got the point. Thanks to all for your help :) Gagan

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups