Announcement

Collapse
No announcement yet.

Getting HardwareID using Crypto

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting HardwareID using Crypto

    I read the sample from Crypto to collect the Hardware ID. But it confusing and i am not sure Crypto is working. I added Crypto to plugins so that is good. I am not sure i need to add or what to add to session variables since the example shows a variable. Do i put X's for the variable? If i could get a clue on what goes in there i may get the example to work from the screen action.

  • #2
    What is the string returned by Crypto.GetHardwareID()?

    Ulrich

    Comment


    • #3
      Here is the code i tried to use to show the value.

      Code:
      SessionVar.Set("%HardwareID%", Mcrypt.GetHardwareID());
      
      encoded_string = ("Crypto.HardwareID()");
      -- Display the contents of the string, just to show you what it looks like.
      Dialog.Message("This is what the encoded string looks like:", encoded_string);

      Here is what the error returned. So not sure i am making a mistake by using the example code or its just not working.

      The first line of code above is line 11.
      Error will appear.

      Code:
      On Startup, Line 11: attempt to call field 'GetHardwareID' (a nil value)

      Comment


      • #4
        I also do not have anything set in session variables. Should i add the entire line 11 as the variable?

        Comment


        • #5
          Edit: The reply i made with line 11 was actually Crypto not Mycrypt.

          Comment


          • #6
            I tried 2 different session variables and get the same error.

            SessionVar.Set("%HardwareID%", Crypto.GetHardwareID());

            Crypto.GetHardwareID());

            Comment


            • #7
              I see now. I checked the VS project, and when I made the Crypto plugin freely available, I removed the software licensing code, and without it the function for the hardware fingerprint is also not compiled/linked into the library.

              There is no single method for getting a hardware fingerprint. The one used by Themida is using information about the hardware and operating system to generate a nice set of hexadecimal numbers - how this is done exactly I do not know. You could develop your own fingerprint, gathering the serial numbers of the CPU, motherboard, the NIC MAC address, etc, and create something with it. I can also attempt to recompile the plugin, leaving out the licensing code but adding back the software protection, so the GetHardwareID() function becomes again available, but I may need a day or two for this.

              Ulrich

              Comment


              • #8
                Please check your email for a new build of the plugin with the code restored.

                Ulrich

                Comment


                • #9
                  That did the trick. My message received back displays the hardwareID in the format mentioned. Should be downhill from now. Thanks.

                  Comment


                  • #10
                    Took about an hour to get the variable to show up in the display screen CTRL box.
                    The reason was because i tried to use the example set var in the session variable list and that would either display on the code/text or cause the program to crash.
                    Then i tried to place the code on the on preload page i wanted to display. But that would fail but still showed it working from the message dialog.

                    So from what i learned the sessions variable can only show the text value you enter and not strings or execute code. And the on preload will not enter a value into a display box at the same time its trying to figure it out. So my solution was to add the example Crypto code to the On Startup page so its already has pre loaded the hardware info to the %HardwareID% session. The the disaply box just uses %HardwareID% as you normally would set.

                    Comment

                    Working...
                    X