A serial number marked in VMProtect as “blocked” should not be accepted by the licensing system. When you rebuild your application next time, VMProtect will add the hash of blacklisted serial numbers to the protected application. As a result, the licensing system of the application will reject these serial numbers in the future.
First, let’s minimize the contents of the main() function:
int main(int argc, char **argv)
{
char *serial = "Xserialnumber"; // we set the serial number directly in the code for simplicity
int res = VMProtectSetSerialNumber(serial);
print_state(res);
return 0;
}
Now run the program and make sure the licensing system accepts our serial number:
state = 0
Now add this serial number to the blacklist of the licensing system. Add the following line to the INI file:
BlackListedSerialNumber=Xserialnumber
And run the program again:
state = SERIAL_STATE_FLAG_BLACKLISTED
Should we inform the user that the serial number they enter is blacklisted? That is up to you. You can simply say the serial number is incorrect, or inform the user that the key is compromised. The licensing system only reports the fact that a blacklisted serial number is being used.