pk-fr / yakpro-po

YAK Pro - Php Obfuscator
http://www.php-obfuscator.com
Other
1.24k stars 350 forks source link

A class named File will be not obfuscated #114

Open hoit opened 1 year ago

hoit commented 1 year ago

Hello,

If you create a class which is named File, it will be not obfuscated, i guess it is related to this option in the config file : $conf->t_ignore_pre_defined_classes

KminekMatej commented 6 months ago

Actually this goes to global ignore status, since every string, having same name as any internal php function is silently ignored during obfusction. There is a file() function in native php's functions, therefore string File wont be obfuscated anywhere.

Logically, this neednt to be ignored in class name obfuscator, but since ignore list is simply a global array of strings, there is currently no way to determine whether ins this context its safe to obfuscate or not.

Temporary solution is to rename your File class to sth else.

Correct solution needs huge refactoring of how ignore list is generated and handled