Results 1 to 7 of 7

Thread: Why bother encoding PHP

  1. #1
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Why bother encoding PHP

    The system I am working on runs from some core files that've been encoded (the REXISTHEDOG4FBI / REXISTHECAT4FBI stuff) and I am wondering, what is the point? Does it speed it up? I ask because it's very easy to find out the 'source' for said encoded file.

  2. #2
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,164
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts

    Re: Why bother encoding PHP

    Depends on how its been optimized.

    Zend Guard - Zend Optimizer Overview - Zend.com

    They claim that it really does speed PHP up. But its akin to trying to make a caravan go quickly. Not very easy.

    You can actually compile it with Phlanger (free) and then run it under mono or IIS, normally then you see a massive performance increase. A mate found it was cheaper to do this, buy a windows license for IIS, than buy a new hardware.

    PHP was never built with any mind for performance (amongst other issues).
    throw new ArgumentException (String, String, Exception)

  3. #3
    Senior Member
    Join Date
    Mar 2005
    Posts
    432
    Thanks
    15
    Thanked
    24 times in 17 posts

    Re: Why bother encoding PHP

    Most optomisers have the advantage of hiding the source code as well.

  4. #4
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Re: Why bother encoding PHP

    Yeah we've got Zend Optimizer running and it actually made a hell of alot of difference. If we had to resources to do it, I'd be tempted to give Phlanger/IIS a try.

  5. #5
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Re: Why bother encoding PHP

    It's not actually being encoded, it's just being encrypted with

    Encrypt PHP: Encrypt and Obfuscate Your PHP Code - Sourcecop

    so basically, it doesn't increase performance and is to stop people seeing the source code. However you can just change the eval function to highlight_string and it will show the code (see below), so it all seems a bit pointless to me! Am I still missing something? : o

    PHP Code:
                          <?php if(!function_exists('findsysfolder')){function findsysfolder($fld){$fld1=dirname($fld);$fld=$fld1.'/scopbin';clearstatcache();if(!is_dir($fld))return 
                        
    findsysfolder($fld1);else return $fld;}}require_once(findsysfolder(__FILE__).'/911006.php');$REXISTHECAT4FBI='FE50E574D754E76AC679F242F450F768FB5DCB77F34DE341 
                        660C280D176E374DE7FB3B090A782B6B68DBC97BEAD93B681C452F25BE26'
    ;g0666f0acdeed38d4cd9084ade1739498(f0666f0acdeed38d4cd9084ade1739498(__FILE__));$REXISTHEDOG4FBI='7B8BFD 
                        9 A267394F45482A65F3B86CAD218BF12B019CB713D71E017C76A9A40993B63FA548C35A95AF8336DA15C2B7499445AF05CEF6CD1CDC249AC42A433C250E27396DA2FB92DB1E270E017B162E63EDA462EEDBEFE5782CA 
                        312 07FA62A 9488CED103E1AC9 F4F8C8CD4 94981B2107DA9D3A1E926CF78DD70D3C0F368FF5B8899F871D7B65AFC35DA7CD9C1164781C0D3 
                        A42EC64A58683D19F595069DECBEC2D68BB6DE311435489B3583CEF53F45DF25E5A50F425BF77EA6E9C563F2C23 
                        6235AB8'
    ;$REXISTHECAT4FBI='94CD76CD371C5A7BC70C186E779C293B9B49BACA5A781A6'
                        eval(
    y0666f0acdeed38d4cd9084ade1739498('143B1C67ABADD638 9',$REXISTHEDOG4FBI));?>

  6. #6
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable

    Re: Why bother encoding PHP

    There's no performance gain, it only obfuscates the code by stripping out whitespaces and name mangling, but anyone with enough time on their hands can easily break it down to something resembling the inputted code, whether the person is a competitor looking to poach code, or a cracker trying to find vulnerabilities.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  7. #7
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Re: Why bother encoding PHP

    yeah that's what I am saying, highlight_string() instead of eval(), does exactly that

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MySQL extension for PHP 5.2.3 not working
    By Jerrythafast in forum Help! Quick Relief From Tech Headaches
    Replies: 18
    Last Post: 13-06-2007, 08:03 PM
  2. php noob
    By j.o.s.h.1408 in forum Software
    Replies: 15
    Last Post: 23-05-2007, 10:37 AM
  3. PHP and file uploads timing out too soon
    By McClane in forum Software
    Replies: 12
    Last Post: 02-12-2006, 05:57 PM
  4. PHP Code
    By mike_w in forum Software
    Replies: 6
    Last Post: 06-11-2005, 05:16 PM
  5. Video Encoding
    By MurphmanL in forum PC Hardware and Components
    Replies: 4
    Last Post: 22-02-2004, 03:33 AM

Posting Permissions

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