Protecting source code with serial key based on PS_SHOP_DOMAIN

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 (http://php.net/manual/en/book.blenc.php)
  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 important enough* or should I use something else? And, if I should use something else, what would that be?

*important enough – being used by an important part of the code, thus making is impossible to change the value without breaking the entire Prestashop installation.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s