Checking a hash?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fsssf
    New Member
    • Nov 2008
    • 6

    Checking a hash?

    Hey I'm trying to make a anti cheat that checks if the hash is the same (to check if someone hooked something in) But I got no clue how to this
    So if key is 12345 it continue else it closes itself can anybody help me out whit this matter?


    Thanks in advance.



    btw this has to be in c#
  • joedeene
    Contributor
    • Jul 2008
    • 579

    #2
    Originally posted by fsssf
    Hey I'm trying to make a anti cheat that checks if the hash is the same (to check if someone hooked something in) But I got no clue how to this
    So if key is 12345 it continue else it closes itself can anybody help me out whit this matter?


    Thanks in advance.



    btw this has to be in c#
    I'd like to welcome you to Bytes.com and to the community. I'd also like to the Posting Guidelines as you have posted a Homework Question.

    As to the question, If you're wanting to use the Hashtable Class to help get the job done for you please clarify. Also, closing forms and processes aren't very difficult, I'm willing to help you furthermore if you can post more specific coding problems.

    joedeene

    Comment

    • fsssf
      New Member
      • Nov 2008
      • 6

      #3
      I know you cant help¨me withouth code but after reading the link you gave me I got this question I want this to happen:


      If hash key is 12345 continue
      else stop.
      Code:
      If  (hashkey != 12345)
      MessageBox.Show("passed");
      Continue()
      
      }
      
      else
      
      {
      
      MessageBox.Show("not passed");
      Close()
      
      }

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        How are you creating your hash? Have you looked at the System.Security .Cryptography namespace?

        After you create a Hash key you need to store it somewhere...lik e in a database or XML document or text file...so that you can check to see if it's been used already.

        @joedeene:

        The OP is asking for direction on where to start with their project...they have not asked for a full solution to their project and so this question does not fall under the category of "homework question". Also, this question doesn't pertain to HashTables but rather the act of Hashing to create a key in order for security checking purposes.

        In the future if you think that a member has broken a rule on the forum do not take it upon yourself to scold them but rather hit the "report" button so that a moderator can take the appropriate action.

        -Moderator Frinny

        Comment

        • fsssf
          New Member
          • Nov 2008
          • 6

          #5
          I already got the hash code from the program but I don´t know how to calculate it whitin the program. I´ll try search on the link you gave me ( System.Security .Cryptography Namespace )

          Would protecting the memory be effectfull so someone can't hook something in?

          Comment

          • Frinavale
            Recognized Expert Expert
            • Oct 2006
            • 9749

            #6
            Originally posted by fsssf
            I already got the hash code from the program but I don´t know how to calculate it whitin the program. I´ll try search on the link you gave me ( System.Security .Cryptography Namespace )
            I don' t know what you mean when you say you already got the hash code from the program.

            Usually what happens is that you create a hash (using something like the Objects made available to you through the Cryptography Namespace) on whatever data it is you need to check and store that hash. Once the data is submitted again you use the same hashing algorithm to once again create a hash based on the data. Once you have this hash you compare it to the one you stored. This method is used so that your application doesn't have to store user passwords...it' s used when sending data to check data integrity etc etc.

            You will not be able to re-create the hash code if your program did not create it in the first place...and the program you're using doesn't provide you with a way to do the check.


            Originally posted by fsssf
            Would protecting the memory be effectfull so someone can't hook something in?
            I have no idea what you're talking about here.

            -Frinny

            Comment

            • fsssf
              New Member
              • Nov 2008
              • 6

              #7
              Originally posted by Frinavale
              I don' t know what you mean when you say you already got the hash code from the program.

              Usually what happens is that you create a hash (using something like the Objects made available to you through the Cryptography Namespace) on whatever data it is you need to check and store that hash. Once the data is submitted again you use the same hashing algorithm to once again hash the data. Once you have this hash you compare it to the one you stored. This method is used so that your application doesn't have to store user passwords...it' s used when sending data to check data integrity etc etc.

              You will not be able to re-create the hash code if your program did not create it in the first place...and the program you're using doesn't provide you with a way to do the check.




              I have no idea what you're talking about here.

              -Frinny
              I´m not sure if were talking about the same thing
              each program got a unique hash
              example google toolbars hash is xxxxxxx
              I want my program to check if the hash is xxxxxx and not something else

              Comment

              • Frinavale
                Recognized Expert Expert
                • Oct 2006
                • 9749

                #8
                Originally posted by fsssf
                I´m not sure if were talking about the same thing
                each program got a unique hash
                example google toolbars hash is xxxxxxx
                I want my program to check if the hash is xxxxxx and not something else
                Are you talking about the GUID?

                Comment

                • fsssf
                  New Member
                  • Nov 2008
                  • 6

                  #9
                  Originally posted by Frinavale
                  Are you talking about the GUID?
                  yes I´m talking about GUID hope you can help me ( already thanks for replying )

                  Comment

                  • Frinavale
                    Recognized Expert Expert
                    • Oct 2006
                    • 9749

                    #10
                    Ok you need to provide more information about what you are doing.

                    I don't know what your application is doing so I have no idea why you would have a need for the GUID...nor do I know what the the GUID is for. Is the GUID representing a COM object? A person? A computer???

                    Why do you need the GUID, how did you get it, what should you be doing with it?

                    Please provide more information so I'm clear on what the problem is.

                    -Frinny

                    Comment

                    • fsssf
                      New Member
                      • Nov 2008
                      • 6

                      #11
                      Originally posted by Frinavale
                      Ok you need to provide more information about what you are doing.

                      I don't know what your application is doing so I have no idea why you would have a need for the GUID...nor do I know what the the GUID is for. Is the GUID representing a COM object? A person? A computer???

                      Why do you need the GUID, how did you get it, what should you be doing with it?

                      Please provide more information so I'm clear on what the problem is.

                      -Frinny
                      My application is running a game I want to use GUID so people cant hook hacks in the GUID i s representing a hash string I need it to prevent hooking hacks in I should be blocking other hashes.

                      Comment

                      • Frinavale
                        Recognized Expert Expert
                        • Oct 2006
                        • 9749

                        #12
                        Originally posted by fsssf
                        My application is running a game I want to use GUID so people cant hook hacks in the GUID i s representing a hash string I need it to prevent hooking hacks in I should be blocking other hashes.
                        Does your application include the game as a resource?

                        Is your game running using COM or .NET?

                        If it's COM, a GUID is created for the application so that it can be registered (into the Windows Registry). If the GUID is changed and your application includes it as a resource than your application will crash.

                        If it's .NET then hopefully the application has been compiled with a Strong Name ...if the application is changed then the Strong Name will also change.

                        I haven't actually had to use Strong-Named assemblies yet....So please check out the link on Strong Names that I provided you with because it provides you with articles on how to create and use Strong-Named assemblies and will cover the topic much more thoroughly than I could.

                        (Note that ever assembly that a strong-named assembly references must be signed with a strong name as well)

                        -Frinny

                        Comment

                        Working...