+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: obfuscation

  1. #1
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    obfuscation

    Whats the best way to obfuscate a PHP file?

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  2. #2
    lemon-tree's Avatar
    lemon-tree is offline x10 Minion lemon-tree has a spectacular aura about
    Join Date
    Nov 2007
    Posts
    1,420

    Re: obfuscation

    There is no simple way to do it without either using a convoluted calling method or by using a PHP compiler, however compiling generally needs full access to the server as the compiled PHP may either be an Apache mod file or a fully individual executable. Plus the compiled code will not be very distributable as it is built for a particular server OS etc. If there was any good way of doing it, you'd be seeing it in use by all the forum makers etc as they want to protect their code (Excluding the open source ones).
    If you fancy a challenge, try compiling and installing HipHop (Used and built by FaceBook) and then use it to build your code. It will create a full individual server executable that can then be run through the command line much like Apache etc but is completely specified to match your codebase.
    Last edited by lemon-tree; 10-16-2010 at 09:57 AM.

  3. #3
    bdistler's Avatar
    bdistler is offline x10 Lieutenant bdistler is an unknown quantity at this point
    Join Date
    May 2010
    Location
    Catalina AZ USA
    Posts
    349

    Re: obfuscation

    I use "PHP Obfuscator"

    from http://www.raizlabs.com/software/phpobfuscator/

    The software is free and you can use it in commercial projects

    No special server side libraries or server components
    but only for winXP and up

    For big projects ($$$$) I use "Zend Guard"
    from http://www.zend.com/en/products/guard/

  4. #4
    bhupendra2895's Avatar
    bhupendra2895 is offline x10 Elder bhupendra2895 is an unknown quantity at this point
    Join Date
    Jun 2010
    Location
    India
    Posts
    554

    Re: obfuscation

    It means that if some bug in apache causes php files to display their contents, then user will not be able to see anything?I didin't knew about this.This thing work in shared hosting or requires some server setup (VPS/Dedicated hosting).
    Liked this? Click on the icon on the bottom of post to make me .

  5. #5
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: obfuscation

    I've been researching a bit, it looks like most of the ways are rubbish. For example:

    Code:
    $hash="\md\5h\as\h0";@eval("encrypted code");
    I've seen quite a few do that, simple changing eval() to echo() will echo the PHP code; not very secure

    I'll look into Zend Guard, but doesn't that require some software on the server?

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  6. #6
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: obfuscation

    Oh also @bhupendra:

    Obfuscation means that the code isn't editable or viewable. If you're selling code, the customer will not be able to edit the code, so if they need an edit they will come back to you.

    Yes, it also stop bugs in Apache becoming massive security errors, too

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  7. #7
    bdistler's Avatar
    bdistler is offline x10 Lieutenant bdistler is an unknown quantity at this point
    Join Date
    May 2010
    Location
    Catalina AZ USA
    Posts
    349

    Re: obfuscation

    Quote Originally Posted by Alex Mac View Post
    I've been researching a bit, it looks like most of the ways are rubbish. For example:

    Code:
    $hash="\md\5h\as\h0";@eval("encrypted code");
    I've seen quite a few do that, simple changing eval() to echo() will echo the PHP code; not very secure

    I'll look into Zend Guard, but doesn't that require some software on the server?

    ~Callum
    "Zend Guard" == yes -- AND $$$
    "PHP Obfuscator" == no -- NO $$$

    Obfuscator will also help you when someone gets inside the server
    and gets your code.

  8. #8
    fretwizz is offline x10Hosting Member fretwizz is an unknown quantity at this point
    Join Date
    Jun 2008
    Posts
    57

    Re: obfuscation

    Quote Originally Posted by bdistler View Post
    "Zend Guard" == yes -- AND $$$
    "PHP Obfuscator" == no -- NO $$$

    Obfuscator will also help you when someone gets inside the server
    and gets your code.
    How does it help once someone gets your code?

  9. #9
    bdistler's Avatar
    bdistler is offline x10 Lieutenant bdistler is an unknown quantity at this point
    Join Date
    May 2010
    Location
    Catalina AZ USA
    Posts
    349

    Re: obfuscation

    Quote Originally Posted by fretwizz View Post
    How does it help once someone gets your code?
    If someone gets into you site via FTP they can get you script add a 'bug'
    of some type to run a script and put both your script and theirs back on your site
    - this is the "Big" thing

    I had this on my site at 1and1.com hosting

    If they can not edit you scrip (can not read it) they can not add the "Bug"

    If they just take your scripts they can not read them to make a edit
    so they can use them

  10. #10
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: obfuscation

    I thought Zend Guard was free? :/

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. PHP Obfuscation
    By driveflexfuel in forum Programming Help
    Replies: 6
    Last Post: 07-21-2009, 06:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers