07-26-2023, 09:29 PM
I'm developing a Prestashop module which I need to protect against
* easy code modification (I'm completely aware there is no program that can't be decompiled in certain way or at least being opcode-exposed)
* make sure each client pays for the module
after spending ~1 hour thinking on this, I came out with the following solution:
1. Implement a serial key validation based on the value of `PS_SHOP_DOMAIN`
2. Encrypt the source code with PHP's blenc_encrypt (
3. Make a configuration view in the module that would allow the user to paste the key that was previously purchased from my website.
My question is, what parts of Prestashop actually depend on `PS_SHOP_DOMAIN`? Is that value <b>important enough*</b> or should I use something else? And, if I should use something else, what would that be?
<b>*important enough</b> - being used by an important part of the code, thus making is impossible to change the value without breaking the entire Prestashop installation.
* easy code modification (I'm completely aware there is no program that can't be decompiled in certain way or at least being opcode-exposed)
* make sure each client pays for the module
after spending ~1 hour thinking on this, I came out with the following solution:
1. Implement a serial key validation based on the value of `PS_SHOP_DOMAIN`
2. Encrypt the source code with PHP's blenc_encrypt (
[To see links please register here]
)3. Make a configuration view in the module that would allow the user to paste the key that was previously purchased from my website.
My question is, what parts of Prestashop actually depend on `PS_SHOP_DOMAIN`? Is that value <b>important enough*</b> or should I use something else? And, if I should use something else, what would that be?
<b>*important enough</b> - being used by an important part of the code, thus making is impossible to change the value without breaking the entire Prestashop installation.