Dynamically importing obfuscated script #1715
Replies: 1 comment
-
I ended up creating a script that dynamically generates a proxy python script in the same module which contains the import of the actual class to be loaded dynamically, which is not obfuscated by Pyarmor. This allows me to keep the code clean of this, while still being able to use Pyarmor for obfuscation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my python code, I'm importing a module dynamically at runtime using the following line:
the code executes, but there's no class-object in the loaded py_file_module. This is probably due to the obfuscation, but I'm not sure how to proceed so that it's able to properly import the class and create an instance from it?
ideally I'd have both the code above and the py-file that is being imported obfuscated, but if the dynamic loading needs to be non-obfuscated that's also an option.
I'm not a python expert, but how I make this work?
Beta Was this translation helpful? Give feedback.
All reactions