I try to protect a c++ executable by default setting but the vmprotect_con (same as vmprotect_gui) only outputs a smaller vmp executable, which being segmentation fault finally. Is there some steps I missing ?
Questions about VMProtect Demo
Re: Questions about VMProtect Demo
Could you send us a test example (original binary + VMP files) that shows this problem?
Re: Questions about VMProtect Demo
Of course. I run the test example and VMProtect on Ubuntu 18.04 x64. Attachments (https://github.com/goodmorning-coder/vmprotect-example) include the test example, its vmp format and some shared libraries the test example depends on. If You like you can run the test example by './test -help'.Admin wrote:Could you send us a test example (original binary + VMP files) that shows this problem?
On Ubuntu 18.04, the shared libraries follow the soft links by
Code: Select all
libLTO.so.8 => /usr/local/llvm8r/lib/libLTO.so.8
libOptRemarks.so.8 => /usr/local/llvm8r/lib/libOptRemarks.so.8
libedit.so.0 => /lib/x86_64-linux-gnu/libedit.so.0
Re: Questions about VMProtect Demo
You have to switch off the option "Pack the Output File", because libstdc++.so calls some exported functions in your application while initialization.
Re: Questions about VMProtect Demo
I have switched off that option in GUI version of VMProtect and got the executable vmp format successfully. Thank you for the solution but I still stuck in later steps. I try to follow the steps in "Stage 2: Real mode" from the document (http://vmpsoft.com/support/user-manual/ ... plication/) and protect the main function in the test example. After pasting the generated serial number to serial.txt in the same folder of test_vmp, the test_vmp still failed to recognize the serial number (Warning that "This code requires valid serial number to run", which is the same behavior as I run test_vmp without serial.txt). Was there something accidentally confused ?Admin wrote:You have to switch off the option "Pack the Output File", because libstdc++.so calls some exported functions in your application while initialization.
Re: Questions about VMProtect Demo
It seems you forgot to call VMProtectSetSerialNumber(serial) before calling a locked function:and protect the main function in the test example. After pasting the generated serial number to serial.txt
http://vmpsoft.com/vmprotect/user-manua ... ial-number
Re: Questions about VMProtect Demo
Oh I see ... by adding this function to the the main() function, the program now works well. I think VMProtect is powerful but still have two little questions about it:Admin wrote:It seems you forgot to call VMProtectSetSerialNumber(serial) before calling a locked function:and protect the main function in the test example. After pasting the generated serial number to serial.txt
http://vmpsoft.com/vmprotect/user-manua ... ial-number
1. Does VMProtect (assume in demo version) locks the main() function to a serial number by default if there are more than one functions in the protected application? I try to lock the main() function itself to the serial number in VMProtect GUI but the program is terminated by the serial number requisition.
2. Does every function I want to lock to the serial number need to invoke VMProtectSetSerialNumber() (assume in the normal version of VMProtect)? I hope the answer is no so I can easily lock them only in VMProtect GUI.
Re: Questions about VMProtect Demo
What part of our user manual is still not clear for you?
Re: Questions about VMProtect Demo
I'm not sure if I understood the contents in http://vmpsoft.com/vmprotect/user-manua ... ial-number correctly, so I hope my questions can be confirmed. By the way, is it possible to link VMProtectSDK statically instead of dynamically?Admin wrote:What part of our user manual is still not clear for you?
Re: Questions about VMProtect Demo
Before calling a locked function you have to use our licensing system inside your application something like this:
Code: Select all
#include "VMProtectSDK.h"
int main()
{
char *serial = read_serial("serial.txt");
int status = VMProtectSetSerialNumber(serial);
if (status != SERIAL_STATE_SUCCESS) {
printf("Serial number error: %d", status);
return 1;
}
return main_locked_by_serial();
}
int main_locked_by_serial()
{
// your main code here
...
}
For what? Just check dependences of a protected application.By the way, is it possible to link VMProtectSDK statically instead of dynamically?