pk-fr / yakpro-po

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

[Question] Is there a way to prevent obfuscating only selected string literals using a prefix #117

Open thilinah opened 8 months ago

thilinah commented 8 months ago

Is there a way to prevent obfuscating only selected string literals using a prefix when obfuscate_string_literal option is selected?

KminekMatej commented 6 months ago

Could you give an example of what are you trying to achieve?

thilinah commented 6 months ago

There was a situation where I wanted to generally obfuscate string literals in code, except some strings, which can be identified by a prefix.

When obfuscate_string_literal is enabled, all the string literals will be obfuscated. I wanted to see if there is a way to skip some selected strings. This is because when only partially obfuscating a project, non-obfuscated code will need to refer to these selected strings.

Anyhow, I've realized this is not supported and already implemented for myself. But if anyone else thinks this is useful, please let me know and I'll open a PR.

KminekMatej commented 6 months ago

I think that this obfuscator doesnt support that at the time. I am currently making a huge refactoring with planned PR where ignoring can be (optionally) based on regex string, so that could perhaps solve your problem. I will let you know once the PR is ready