Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: Ignore variable names beginning by ... #17

Open
pk-fr opened this issue Apr 12, 2015 · 3 comments
Open

improvement: Ignore variable names beginning by ... #17

pk-fr opened this issue Apr 12, 2015 · 3 comments

Comments

@pk-fr
Copy link

pk-fr commented Apr 12, 2015

In my project, I work with indirect function names or variable names.... ( i.e. $$v = 'xxx')
they all start with a prefix .

is it possible to add a joker in
obfuscator.scramble_variable.ignore: (and obfuscator.scramble_private_method.ignore:)

  • foo*

meaning variable (or function) starting by foo

@pk-fr
Copy link
Author

pk-fr commented Apr 12, 2015

I have started looking at your code....
perhaps could be optimized :

  • using 2 arrays : 1 for ignore, and 1 for ignore_starting_with...
  • using array_keys instead of values ( isset is far more efficient than in_array, when hundreeds of variables are to be ignored)

@naneau
Copy link
Owner

naneau commented Apr 12, 2015

Perhaps a regular expression for variable names could be implemented, it would solve this problem. In general, however, you'll find that variable variables will cause problems with this kind of obfuscation.

@pk-fr
Copy link
Author

pk-fr commented Apr 12, 2015

It would be great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants