If you run it from a so called no name machine you will get the.
If you run this script on a HP machine you will get some sort of serial number coming from HPs motherboard. This information is obtained from the BIOS. GenVal = genVal + Val(Asc(Mid$(tempVar, i, 1))) Thanks for the best VB6 forum on the net. If getPlusMinus(Mid(appName, i, 1)) = False Then This tutorial is all about getting and displaying the hard disk serial number for a complete disk but not in just a single drive using vb.net. Public Function authKey(key, appName) As BooleanĪppVal = appVal + Val(Asc(Mid$(appName, i, 1))) LastErrorText Exit Sub End If This example demonstrates getting the SERIALNUMBER part of the subject, if one such part exists in the certs subject.
GenNumber = UCase(tmpVar) ' <<< Returns the new key
Here we show you that there are ways to spoof those hardware.
TmpVar = tmpVar & Mid((genVal * appVal) & "JSDEU", 1, 5) ' <<< Last part of the code is the There are tons of information about changing your hard disk volume serial number, but not the real one that is hard coded to the HDD. If genVal < 0 Then genVal = 0 - genVal ' <<< If the number is less than 0 then make it GenVal = genVal + Val(Asc(Mid$(tmpVar, i, 1))) GenVal = genVal - Val(Asc(Mid$(tmpVar, i, 1))) GenVal = genVal + Val(Asc(Mid$(tmpVar, i, 1))) ' Makes it mathematicaly harder If getPlusMinus(Mid(appName, i, 1)) = False Then ' depending on various things If i < Len(appName) Then ' first sections. Private Function getPlusMinus(chrr) As Boolean ' 25 Then ' <<< Add a ' - ' every 5 charachtersįor i = 1 To Len(tmpVar) - 0 ' <<< Creates a number based on the The FreeVBCode site provides free Visual Basic code, examples. Instructions: Copy the declarations and code below and paste directly into your VB project. This is the snippet Retrieve the Motherboards Serial Number Using WMI on FreeVBCode. A simple sub procedure to demo the module is included at the end of the source. The code may not be fool proof but it works very well for simple applications, and unless you know how the program works and the 'application name' you use, then it cannot be hacked by less than an extremely talented mathematician. Using the application name allows you to use the same serial creator or checker code for multiple applications.
This is a simple module which creates 25 character serial numbers that you can use in your programs with millions of combinations per "application name".