Step #4: Test results
Date of expiration
Let’s create one more serial number and set it to expire in the 2005 year. This is a date from the past, so licensing module should not accept the serial number. Let’s check this. Go to the “Licenses” tab, click the “Add License” button and check the “Expiration date” box, then enter “September 30, 2005″ there. Then click the “OK” button and put the generated serial number to the “serial.txt” file. Finally, run the application:
C:\test>dummy_app.vmp.exe serial number is bad state = SERIAL_STATE_FLAG_DATE_EXPIRED
The licensing module returned “serial number is expired” code. Replace the number in the “serial.txt” file with the old one and check that it is accepted as before.
C:\test>dummy_app.vmp.exe serial number is correct, calling foo() I'm foo done
Blocking a serial number
Imagine that our “good” serial number was stolen and available on the Internet. We have to block it, so it will not work in the next versions of the application. We should locate it in the list of serial numbers and click “Block Serial Number” button in the right pane. However, if we run our protected application now, it will accept the blocked serial number, because it doesn’t know that it is blocked.
C:\test>dummy_app.vmp.exe serial number is correct, calling foo() I'm foo done
Make a copy of our application and name it “dummy_app1.vmp.exe”. Then switch to VMProtect and protect the application again. Run the new version:
C:\test>dummy_app.vmp.exe serial number is bad state = SERIAL_STATE_FLAG_BLACKLISTED
Run the old version of the application:
C:\test>dummy_app1.vmp.exe serial number is correct, calling foo() I'm foo done
As said above, the old version doesn’t know about blocked serial number and accepts it. The new version blocks such serial number. In the last step we’ll try to lock code to serial number. Before doing that please generate a new serial number or unlock this one and protect the application again. It should accept serial number from the “serial.txt” file before we can continue.