Is it possible to disable assert-call to expose attribute to external callers? #2077
Unanswered
MrNaif2018
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Are you sure it's assert-call issue? Try to remove option one by one to check which option is problem |
Beta Was this translation helpful? Give feedback.
1 reply
-
How about no obfuscate function
The idea is not obfuscating the function |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am using pyarmor's
--assert-call
flag for better protectionBut as I have a plugins system in my FastAPI app, which requires the following structure: plugin directory has a plugin.py file, inside of which there should be a Plugin class. Upon loading it initializes Plugin object like so:
Which fails with
RuntimeError: unauthorized use of script
I know there's assert.call.excludes, but it doesn't seem to work for me
Neither
pyarmor cfg assert.call:excludes "/Plugin.__init__.*/"
nor
pyarmor cfg assert.call:excludes "/Plugin.*/"
Because it seems like this protection is from calling from inside obfuscated code, not from outside. I don't want to fully disable assert-call, only allow to read one class from the module
Full command I run is:
pyarmor gen --enable-bcc --enable-jit --mix-str --obf-code 2 --assert-call -O modules -i modules/myplugin
Beta Was this translation helpful? Give feedback.
All reactions