Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10

Thread: Encrypt work?

  1. #1
    New Coder
    Join Date
    Sep 2005
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Encrypt work?

    I'm making some blocks and stuff that people can download and use..I was wondering if there is a way to encrypt the file contents so it can't be changed.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    If your referring to php pages being downloaded, I recall hearing of a method in which this can be done. However, in the long run its probably not overly effective. Think of it like html, I remember seeing sites for 'encrypt and protect your html!', as if its even possible to do so. If a server or a browser can decrypt and display the request, than so can a human. The only possible way to preform any type of encryption is with the use of a key - and if you have both the key and the data, its easy to decrypt.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    There's places like this http://www.sourcecop.com but like fou-lu said, I wouldn't really bother though. Just a waste of your money and time

  • #4
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by crazykilla
    ...to encrypt the file contents so it can't be changed.
    Encryption can make the contents unreadable but not unchagable.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #5
    New Coder
    Join Date
    Sep 2005
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Only thing I want is..when someone downloads my blocks or whatever else i make they cant edit the code so they cant remove the copyright info etc..

  • #6
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    Quote Originally Posted by crazykilla
    Only thing I want is..when someone downloads my blocks or whatever else i make they cant edit the code so they cant remove the copyright info etc..
    Can't be done: PHP will always need to decode it, so it can always be decoded and edited.

  • #7
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Thats right, take Nightfire's codecop or whatever it is link. Take a look at their example code. All it is is a new class which has been created -> which means you need to include these files as well for the server to decode. Not real encryption in the least, as its decrypted prior to fullfilling the request. Also meaning, it gives a cracker an excellent starting point. Crack the key, crack the code - can't be too tough when you have the source class.
    You can never truely protect your work. Even with your script, if altered by more than 80%, it becomes legal property of the owner. Thats what I refer to as patchwork php, putting your scripts together out of sections of other peoples scripts.
    There is one other way to protect your developement without the use of encryption: get a name for the product. Take vBulletin as a good example, its everywhere and easily recognized. Anybody that directly takes the vbulletin scriptwork, and alters the copywrite for their own distribution would be found out in very short accord.
    Oh, I'm also assuming here that you are referring to a copywrite within the script itself, not within the html.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #8
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Error 404
    Can't be done: PHP will always need to decode it, so it can always be decoded and edited.
    Hmm... while this may be true in theory, it's not that important.
    You can always reverse engineer an encode file, but the skill, efford and time that would be required to do this will probably putt of most people.
    I wonder how many people on this forum would be able and motivated to back-program a peace of PHP that was ecoded with the ZenD Encoder or Sourceguardian.
    If you have some selfwritten app in PHP that you wanna distribute, then i think the chances are very limited that one of your clients will take the efford to reverse engineer it.
    Of course, it'll cost you 250 (for Sourceguardian) to 960 (for Zend Encoder) dollars to buy the encoding-package, so you'll need to sell quite a few copies...
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #9
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,462
    Thanks
    0
    Thanked 633 Times in 623 Posts
    Encoding the PHP may be useful to stop people from easily modifying the downloaded code but there is no way to encrypt the final version of the web page that it creates that cannot be decrypted in a few seconds using a web browser.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #10
    New Coder
    Join Date
    Apr 2005
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by felgall
    Encoding the PHP may be useful to stop people from easily modifying the downloaded code but there is no way to encrypt the final version of the web page that it creates that cannot be decrypted in a few seconds using a web browser.

    Yes, but the webpage showing in the browser won't show the PHP code.. only the results of the code.
    You just said something along the lines of.. If I eat the cookie, I'll know exactly how it was made..


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •