DiogenesPolanco / phpobfuscator

Automatically exported from code.google.com/p/phpobfuscator
0 stars 0 forks source link

extended class name and class variables name is not change #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If you try to obfuscate a class which extends another class, extended class
name is not change.

Test.php :
<?php
class X {
    var $i = 0;
    function X() {
        $this->i = 1;
    }
}
class Y extends X {
    var $j = 0;
    function Y () {
        $this->i = 2;
        $this->j = 10;
    }
}
?>

Test.php(obfuscated):
<?php class C02129BB861061D1A052C592E2DC6B383 {     var
$RA16D2280393CE6A2A5428A4A8D09E354 = 0;     function
C02129BB861061D1A052C592E2DC6B383() {       $this->i = 1;   } }  class
C57CEC4137B614C87CB4E24A3D003A3E0 extends X {   var
$RA7B9A383688A89B5498FC84118153069 = 0;     function
C57CEC4137B614C87CB4E24A3D003A3E0 () {      $this->i = 2;       $this->j = 10;  } } ?>

--------------------------
'class X' change to 'class C02129BB861061D1A052C592E2DC6B383' and 'class Y
extends X' change to 'class C57CEC4137B614C87CB4E24A3D003A3E0 extends X'
but it must be 'class C57CEC4137B614C87CB4E24A3D003A3E0 extends
C02129BB861061D1A052C592E2DC6B383'.

And, as you can see in test.php $this->i and $this->j are not change

Original issue reported on code.google.com by tuna...@gmail.com on 7 Mar 2007 at 10:59

GoogleCodeExporter commented 9 years ago
I have a similar problem now that it completely removes the extends keyword and 
base 
class. 

I have version 0.1.0.0

PHP gives error that it does not find the base class, even though the line the 
error 
is referring to is not even in the code! ie (class X not found on Line 7, when 
there's no instantiation of class X on line 7 at all!) 

weird. 

Original comment by dlite...@gmail.com on 26 Mar 2008 at 4:53