Results 1 to 11 of 11

Thread: Protect coding - PHP Encoder

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Protect coding - PHP Encoder

    Hi,
    Can anyone recommend a good free (if possible) tool that encode your php code?

    Say you wrote a script or application, want to let someone use it, but make it extremely difficult for them to alter your code, or copy it and do sth else with it.

    someting like sourceguardian perhaps.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Protect coding - PHP Encoder

    The only way to make it "difficult" to see the source code is to partially compiler the code into the PHP intermediate language and encrypt that. This means the parser will never see the original source code and it will hence be harder to recover.

    The ZenEncoder (not free) is the only one I know of that does this. All the others are pretty pointless. If you want my opinion it is not worth the bother, as I have said many times on this forum, if someone wants to copy your idea that much they could do it with or without the source code.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3
    New Member
    Join Date
    Jul 2008
    Posts
    1

    Re: Protect coding - PHP Encoder

    I would not agree that others except of zend are useless.
    For example zend can be decoded, but I haven't seen any solution for sourceguardian or ioncube or byterun or phpshield - these ones worth to take a look at. Also encoded scripts are running faster on the server without any php caching solution installed.

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Protect coding - PHP Encoder

    Quote Originally Posted by esvik
    I would not agree that others except of zend are useless.
    For example zend can be decoded, but I haven't seen any solution for sourceguardian or ioncube or byterun or phpshield - these ones worth to take a look at. Also encoded scripts are running faster on the server without any php caching solution installed.
    Those solutions you mentioned appear to work on the same principle as the Zen encoder. Those which are useless are the ones that merely attempt to hide the code and then unhide it at execution time.

    In any case, the byte code will always be recoverable be it originally encrypted or not. I would not recommend the use of an encoder because as mentioned above, source code or not, if someone wants to copy what you've done they can reverse engineer it by other means.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  5. #5

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Protect coding - PHP Encoder

    Tell you the "situation".
    Over past few months, in my free time I created (and still busy) a "framework" easily allow you to build a site in any number of languages. It's really a cool piece of work, and based on my experience the past few years needing create multi language sites by myself (not a easy task in one man team). This thing truly allow one person create and maintain a global multi langauge websites.

    Anyhow,I'm building the new version of company website on top of this. In my mind I'm taking my own work and customize it a little to suit companies needs.

    Nobody there got the brains to do anything with it, but I just create the impression to someone that might ever look at it, that you aint gonna mess around here ,cause this guy not only put a "licence" in there, but also encoded the code. Wanna decode it and delete license, fine.....It's not like I wanna sell it, it's jsut basically give me the feeling of this belongs to me.

    So..wanna make the php code look like crazy and scare any noobs off. Aint many in this neck of the woods that would understand this anyhow.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  6. #6
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Protect coding - PHP Encoder

    I suggest that you speak with your manager about this and review the company policy to see where you stand legally. The solution may simply be that you draw up a contract that allows the company to use what you created and an grants them ownership over any changes you make while modifying it for them. Some organisations contracts state that they implicitly have total ownership rights over the code you write while you are employed for them.

    You could find yourself in a difficult legal situation if you are found to have "deliberately" obfuscated the code in order to prevent or hinder future changes, which, may be construed as a denial of service if the changes required are to fix a bug. So before you do anything I would seek approval from management and inform them in writing of what you intend to do.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  7. #7

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Protect coding - PHP Encoder

    lol.....obviously you work in proper company...haha. come try mine.

    it's china after all...did not own a legal piece of software for over 3 years now. (not complaining XP over counter for 20rmb (3USD) works just fine)

    anyhow, code is so confusing (sorry to say, could not even get help on this forum with some cases) no one will be able to use it. laowai's (foreigner) developer here all retard loosers and chinese still got way to go. ;-)
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  8. #8

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Protect coding - PHP Encoder

    aargh, I tried the free stuff that is available, scramble up my whole class library, then my code fail immediately.

    just need sth that encode it just enough to let a non technical person or a noobish developer back off and keep me at the table.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  9. #9
    Addicted Member Jazz00006's Avatar
    Join Date
    Feb 2006
    Posts
    185

    Re: Protect coding - PHP Encoder

    One of the ways VisualAd told you to stay away from could be to base64 encode your script, then run an eval(bas64decode()) on it at run time.

    It's not super high protection, but it makes it look like garbage to any non-technical person.

  10. #10
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Protect coding - PHP Encoder

    Quote Originally Posted by Jazz00006
    One of the ways VisualAd told you to stay away from could be to base64 encode your script, then run an eval(bas64decode()) on it at run time.

    It's not super high protection, but it makes it look like garbage to any non-technical person.
    I would still say that it is a waste of time because every time you run the script you have to decode it, which of course consumes valuable processor cycles. I would also assume that base64 would look as garbage like to a non-technical person as PHP code.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  11. #11
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Protect coding - PHP Encoder

    And in fact, as with any run-time decryption... just change 'eval' to 'echo' and voilà!—you have the source.

Posting Permissions

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



Click Here to Expand Forum to Full Width