Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Protecting My Code, from people that crack software
ghostrider
post Mar 5 2007, 09:17 PM
Post #1


Super Member
*********

Group: Members
Posts: 397
Joined: 9-June 06
From: Wisconsin
Member No.: 24,924



Is there any one way that I can protect something that I have written? 2 weeks ago I was contracted to write a script for a friend in California for $300. I have known him for a while, and I know he will respect my work, but if I sell this to other people how can I make sure they do the same? I would like to sell this script to others. I have thought of a couple possible ways to protect my code but I don't really like any of them. My question to you is whether I should use one of these ideas, or if there is a simpler way to protect my work.

My first idea would be running the script off my own server and giving any customer that buys it access to it. However this wastes bandwidth and includes more programming for me, and even more modification of my script. It would also require me to step up more mysql tables which in turn takes up my space.

My second option would to be to use an include statement. Without function.php, my script is uesless. I could write a small PHP file that is included in the script, a PHP file that I could change to either allow or deny the transfer of function.php. It would work something like this.

CODE
// This is the code on the user's server
include('http://www.ghostrider.trap17.com/check.php');


CODE
// This is check.php
// This PHP file would be transfered from the user's server.
// $allowed would either be true or false, which would allow me to control whether or not the user gets the code.
<?PHP
$allowed = TRUE;
if ($allowed == TRUE) {
include('http://www.ghostrider.trap17.com/somerandomfilename.php');
}
else {
die();
}


The above script presents two problems however. If my server is done, that means his script is done, which looks horrible on my part. Also if I ever change domain names or hosts then all the scripts need to be uploaded to reflect that.

These are my two ideas? Does anyone have any other ideas, or a way I can improve on these?
Thank you.
Go to the top of the page
 
+Quote Post
andybebad
post Mar 9 2007, 12:43 AM
Post #2


Newbie [Level 1]
*

Group: Members
Posts: 12
Joined: 8-March 07
From: Gtown, Wisconsin
Member No.: 39,728



you could try encrypting the code. http://php-encoder.phpcipher.qarchive.org/

This post has been edited by andybebad: Mar 9 2007, 12:47 AM
Go to the top of the page
 
+Quote Post
JakeB
post Mar 13 2007, 05:34 PM
Post #3


Newbie
*

Group: Members
Posts: 1
Joined: 13-March 07
From: USA - RI
Member No.: 39,970



Zend has an encryption software, and there are many free code obsfucators out there. Obsfucators basically change variable names, functions, etc into human-unreadable names so that it is impossible to make sense of the code. Google them wink.gif
Go to the top of the page
 
+Quote Post
zeeman48
post Mar 24 2007, 08:14 PM
Post #4


Newbie [Level 1]
*

Group: Members
Posts: 12
Joined: 19-November 06
Member No.: 33,689



I've used POBS before, and it works pretty well for obfuscation.
As for product use approval and activation, I happen to be working on a similar project at the moment. If you'd like, I can share some of my work with you (provided I get any work done, of course biggrin.gif ).
Go to the top of the page
 
+Quote Post
Johnny
post Mar 24 2007, 09:07 PM
Post #5


[::Boy Wonder::]
***************

Group: Members
Posts: 2,098
Joined: 5-April 05
From: Costa Mesa, CA
Member No.: 5,294
T17 GFX Crew



Encryption is the way to go. I had a gallery script at one point that had some pretty nasty encryption on it. Do it right and there's literally no way anyone will get around it.
Go to the top of the page
 
+Quote Post
zeeman48
post Mar 24 2007, 09:20 PM
Post #6


Newbie [Level 1]
*

Group: Members
Posts: 12
Joined: 19-November 06
Member No.: 33,689



But with encryption, you usually have to install some kind of module for PHP, and the most powerful software for this are things like Zend, which cost lots of money, and makes life harder for end users. Yes, it makes it more difficult for malicious users to steal your code, but you are also making life harder for your users, who don't neccessarially want to steal your code.
On top of this, Obfuscation is not "reversable", you can't decrypt it or break the code. And, even if you obfuscate your code so it looks like Aramaic, and then encrypt it 50 times, the cleverest pirates can still break it.
Yeah, encryption and obfuscation can deter some of the "n00bs" and "script kiddies", but if someone is determined to do something, they will eventually succeed.

I would say that if you're really paranoid about not getting paid, do this:
First, create some kind of product activation system. My recomendation would be to lock the activation code to the domain name so that it's harder to just type in the key.
Next, put some product key verification code in every script file, except those that you won't be obfuscating (e.g. config.php, etc.)
Then, obfuscate all your code so it can't be read very easily.
Finally, encode all of it with Zend or something so it can't be read, but set it up so that your script will stop working at the end of the year so users are forced to come back and get another key (you choose if they have to pay for the upgrade) and copy of the software. This will keep your users annoyed but on a short leash and makes it harder to pirate your software.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How do you test your php code(77)
  2. Php Clock(7)
  3. Change Permission With Php Code(3)
  4. Adapting Html Code Embed To Work On Phpnuke(7)
  5. Dynamic Image / Signature Generator(12)
  6. Wap Source Code Viewer(4)
  7. Evilboard (forum Software) - Multiple Categorys - Don't Work :((6)
  8. More Dynamic ?id=browsing With Php (associative Array)(1)
  9. Display The Current Date/time(3)
  10. Use Bb Code On Your Site!(7)
  11. Some Basic Php Code Snippets For All Levels Of Experience(3)
  12. My Code Doesnt Resize Large Images, Please Help.(2)
  13. Php Education Class (first Code)(0)
  14. How To Make A Random 7 Number Code?(2)
  15. Whats Wrong>?(9)
  1. Awesome Source Code Viewer Script(7)
  2. Html Code Tester. Online Script(15)
  3. I Need Some Proof Reading For My Code Please! [resolved](7)
  4. Will This Code Work(5)
  5. Use Rss In Php Code(3)
  6. Php Code(15)
  7. Php Code Needed(5)
  8. Php Code?(12)
  9. Php Code Needed Iii(10)
  10. Php And Mysql Programming(2)
  11. Malicious Code Injection(3)
  12. Php Source Code Unveiled In Browser?(7)
  13. Create Table - Mysql Code - Help(1)


 



- Lo-Fi Version Time is now: 8th September 2008 - 06:13 PM