python-obfuscator icon indicating copy to clipboard operation
python-obfuscator copied to clipboard

Builtin methods like 'str' and 'int' are changed which cause the error of program

Open DeriZSY opened this issue 3 years ago • 3 comments

Hi, thanks for making this available. I found that some built-in methods for type conversion will be changed during the conversion. for example:

    self.fps = int(25)

is changed to:

    self.fps = l125(25)

what should I do to avoid it?

DeriZSY avatar Jan 25 '22 12:01 DeriZSY

Hi, thanks for making this available. I found that some built-in methods for type conversion will be changed during the conversion. for example:

    self.fps = int(25)

is changed to:

    self.fps = l125(25)

what should I do to avoid it?

Check if your code still works. It should. In python, setting a variable to a function name will make the variable run the function. For example: toint = int print(toint("8")) Will do the same thing as: print(int("8"))

HorridModz avatar Jul 29 '22 20:07 HorridModz

Hi, thanks for making this available. I found that some built-in methods for type conversion will be changed during the conversion. for example:

    self.fps = int(25)

is changed to:

    self.fps = l125(25)

what should I do to avoid it?

Check if your code still works. It should. In python, setting a variable to a function name will make the variable run the function. For example: toint = int print(toint("8")) Will do the same thing as: print(int("8"))

While a cool workaround, this isn't good in production because it would require a lot of edits if you want to simply obfuscate your code

ghost avatar Sep 09 '22 20:09 ghost

The obfuscator should list built-in names and avoid obfuscating them.

none-None1 avatar Feb 06 '24 09:02 none-None1