Page 1 of 1
Automaticly generating watermark for each user
Posted: Wed Jun 04, 2025 1:16 pm
by arturarkowiak
Hello. Currently I have exe file that i distribute to every user. But I wanted to take advantage of watermarks feature that would allow me to track which user leaked and cracked the program. I'm wondering is there any way I could modify or add watermark with value that I will specify?
Code: Select all
local vmp_core = vmprotect.core()
local watermark_name = "BUILD_INFO"
local watermark_data = "12321312"
vmp_core:watermarks():add(watermark_name) --how do i put watermark_data in here
print("Watermark has been generated!")
Re: Automaticly generating watermark for each user
Posted: Thu Jun 05, 2025 2:23 am
by Admin
Are you a registered user?
Re: Automaticly generating watermark for each user
Posted: Thu Jun 05, 2025 1:56 pm
by arturarkowiak
Yes, I bought pro version
Re: Automaticly generating watermark for each user
Posted: Fri Jun 06, 2025 2:47 am
by Admin
What is your registered email?
Re: Automaticly generating watermark for each user
Posted: Fri Jun 06, 2025 8:00 am
by arturarkowiak
I sent in PM
Re: Automaticly generating watermark for each user
Posted: Fri Jun 06, 2025 8:06 am
by Admin
Try the following code:
Code: Select all
local vmp_core = vmprotect.core()
local watermark_name = "BUILD_INFO"
local watermark_data = "12321312"
vmp_core:watermarks():add(watermark_name, watermark_data)
print("Watermark has been generated!")
Re: Automaticly generating watermark for each user
Posted: Fri Jun 06, 2025 10:49 am
by arturarkowiak
I have been playing around with watermarks and I'm not sure how they work. Because there is a list of watermarks where each can be blocked, but there is option to select one. What is the difference between not blocking and selecting?
I saw that Watermark class has setBlocked(bool) function, but i see that whether i set it to true or false, it always unblocks the watermark. I tested it with following script, comments reflect what is happening for me during tests
Code: Select all
function OnBeforeCompilation()
local vmp_core = vmprotect.core()
for i = 1, vmp_core:watermarks():count() do
local found_watermark = vmp_core:watermarks():item(i)
local found_watermark_name = found_watermark:name()
-- now there are listed correct states that are set manually by user
print(found_watermark_name .. " first state: " .. (found_watermark:blocked() and "" or "not ") .. "blocked")
found_watermark:setBlocked(true)
-- they all should be locked, but everything is getting unlocked
print(found_watermark_name .. " second state: " .. (found_watermark:blocked() and "" or "not ") .. "blocked")
found_watermark:setBlocked(false)
-- for test, they still remain unlocked
print(found_watermark_name .. " third state: " .. (found_watermark:blocked() and "" or "not ") .. "blocked")
end
end
Re: Automaticly generating watermark for each user
Posted: Sat Jun 07, 2025 5:01 am
by Admin
I saw that Watermark class has setBlocked(bool) function, but i see that whether i set it to true or false, it always unblocks the watermark.
Fixed in the 2372 build.