Get hardware serial numbers (registration machine)

xiaoxiao2021-03-06  69

The registration mechanism of the general software can generate the corresponding public key and private key by getting the hardware serial number. However, using the code to get the hard disk serial number with Managed Code can't solve all the problems, such as the use of the non-administrator's permissions, the first few days of the last few days released "How to get the hard disk serial number? .NET version [C #] ", there is no solving this problem, there is also a lot of problems with WMI.

To get a successful sequence number of the hard disk, you can only rely on unmanaged code. Diskid32 is a source code disclosed C program that can solve the above problems. Because the code is compared to the bottom layer, I am not familiar with VC and DDK. I have no ability to package it as a DLL. I hope you will help!

Also, this Native DLL is set up, but there is still a problem that there is no problem. If the DLL is encapsulated into the Native DLL, the DLL is easy to replace with another, after all, in Managed Code, you can see the function of calling Native DLL declaration, others simply imitate the interface to rewrite a new one, it is easy to achieve the purpose of crack. . However, I have not tested it. I don't know if I don't know.

So I thought another method is to encapsulate the Native DLL that get the hard disk serial number as the resource file to the Managed Code, and then write the DLL to disk when it is necessary to adjust the DLL, and then bound dynamically bind . Since Managed Code can be protected by the obfuscator, this is not modified, this I am "how to protect our .NET assembly? "The answer has been given. Dynamic Binding Native DLL is another technical puzzle, I have found some information, share with you. Late binding on native dlls with c # late-binding dlls in c # using legacy plug-insidin .NET - Part 1using legacy plug-ins with .net - Part 2c-function pointer for .Netdynamic Pinvoke Method Calls but the most cattle Below this trick! Save the Native Code in the managed code in the byhenon array, then call it, it is a cow B, but I have not fully understood, I hope everyone will practice practice. There is another article on the encrypted string for the EXECUTE NATIVE CODE from .NET. Poly-Engine Crypt String I hope you have a lot of communication .NET programs to find the best solution!

转载请注明原文地址:https://www.9cbs.com/read-91960.html

New Post(0)