Closed lucasexe closed 4 years ago
tried to apply only bug fixes... perhaps i missed some ... only_private feature is not working, you can test this small example:
<?php
class test
{
public function main()
{
$this::hello();
}
private function hello()
{
echo "hello {$this->x}\n";
$this::hi();
}
private function hi()
{
echo "private hi\n";
}
private $x = "world";
}
$x = new test;
$x->main();
?>
method call is done at run time, it is impossible to easyly differentiate a call to a public method or to a private method within a class.... ( the function can be defined after the call ) perhaps a day, I will try it can be done with a mimimum of 2 passes, the first classifying all methods, than the second pas, analysing all calls... even with this, if some part of the class is defined within an include, it will be quite impossible.
Bug found: "Namespace scramble" wasn't covering all cases: Example:
In the code above, 'MyApp' and 'Logs' weren't being scrambled.
Another situation when the result code was ill-formed:
Besides the bug fix, I also have added a new feature to obfuscate only private properties/methods inside a class. This is an intermediate alternative when we can't obfuscate all methods/properties.
I've used the code below to validate my implementation:
The result: