- core/core.h: Core::copyright() 返回空串(保留函数,调用方不变) - VMProtectCon/main.cc: 横幅有版权串才拼接,空则只打版本 - VMProtect/about_dialog.cc: 版权文本为空时隐藏该 QLabel - minidumpfixer/main.cpp: 去掉横幅里的厂商版权 - core/vmprotect.rc、shellext/shellext.rc: CompanyName / LegalCopyright 置空 (ProductName、OriginalFilename 保持不变,属产品标识非版权) - help/en、help/ru 共 150 个页面: 去掉页脚 \xA9 2006-2015 Copyright VMProtect Software - core/VMProtectLicense.ini: 测试授权里的厂商用户名/邮箱换成本地占位值 - .NET AssemblyInfo(5 处) 与 utils/x86disasm: 去掉无主版权串
66 lines
2.2 KiB
HTML
66 lines
2.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<link rel="Stylesheet" type="text/css" href=
|
|
"../../default.css" />
|
|
<meta http-equiv="Content-Type" content=
|
|
"text/html; charset=utf-8" />
|
|
|
|
<title>Step 1.10: User data</title>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>Step 1.10: User data</h1>
|
|
|
|
<p>A serial number can hold up to 255 bytes of arbitrary data that the licensing system passes to the program as they are. The data can hold any additional information about the sale, data required for operation of the full version or something else. Let's modify our
|
|
<strong>main()</strong> function so that it would read data from a serial number and display them on the screen:</p>
|
|
<pre class="code">int main(int argc, char **argv)
|
|
{
|
|
char *serial = "Xserialnumber";
|
|
int res = VMProtectSetSerialNumber(serial);
|
|
print_state(res);
|
|
if (res) return 0;
|
|
|
|
VMProtectSerialNumberData sd = {0};
|
|
VMProtectGetSerialNumberData(&sd, sizeof(sd));
|
|
printf("Serial number has %d byte(s) of data\n", sd.nUserDataLength);
|
|
for (int i = 0; i < sd.nUserDataLength; i++)
|
|
printf("%02X ", sd.bUserData[i]);
|
|
printf("\n");
|
|
return 0;
|
|
}
|
|
</pre>
|
|
|
|
<p>We also reduce the Ini-file to this:</p>
|
|
<pre class="code">[TestLicense]
|
|
AcceptedSerialNumber=Xserialnumber
|
|
</pre>
|
|
|
|
<p>Now, we run the program and make sure our serial number works well, but doesn't contain any data:</p>
|
|
<pre class="code">state = 0
|
|
Serial number has 0 byte(s) of data
|
|
</pre>
|
|
|
|
<p>To add new user data into the serial number, we need to create the UserData variable in the ini-file and assign data to it in the HEX format. Symbols must go in pairs, that is the length of a line must be a multiple of 2. Like this:</p>
|
|
<pre class="code">UserData=010203A0B0C0D0E0
|
|
</pre>
|
|
|
|
<p>In this case, if we runthe program we will receive the following result:</p>
|
|
<pre class="code">state = 0
|
|
Serial number has 8 byte(s) of data
|
|
01 02 03 A0 B0 C0 D0 E0
|
|
</pre><br />
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<hr noshade="noshade" size="1" />
|
|
|
|
<div align="center">
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|