liftoff / pyminifier

Pyminifier is a Python code minifier, obfuscator, and compressor.
GNU General Public License v3.0
1.43k stars 221 forks source link

Can this package be used for de-obfuscating Python code after an obfuscation? #149

Open monocongo opened 11 months ago

monocongo commented 11 months ago

I want to obfuscate my code (change the names of fields and functions to nonsense) so I can submit it (reasonably) safely to services such as StackOverflow or ChatGPT. Once I get an answer I want to be able to translate that answer code's fields and function names back to the original names. Can we use this tool for that, or modify it to behave like that? I'm thinking that on the obfuscation step, we could add an option to save a "before/after" dictionary. Then later we could use this dictionary to de-obfuscate the result code that contains the nonsense names.

Thanks in advance for any guidance, and for all the effort to keep this package maintained.