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

[BUG] decorator is ignored in spp mode #922

Open
shgefu opened this issue Jan 20, 2023 · 5 comments
Open

[BUG] decorator is ignored in spp mode #922

shgefu opened this issue Jan 20, 2023 · 5 comments
Assignees
Labels

Comments

@shgefu
Copy link

shgefu commented Jan 20, 2023

环境python3.7
Pyarmor 7.7.4
采用终极模式加密, 约束模式105, 复杂函数加密, 动态加密, 混淆字符串等设置,程序能启动但是运行过程中点button打开文件的时候报错如下:

Traceback (most recent call last):
File "", line 35, in spp_caller
TypeError: too many positional arguments

@jondy
Copy link
Contributor

jondy commented Jan 20, 2023

快速的解决方案是忽略 spp 出错的模块,或者能提供一个重现错误的简单脚本

@shgefu
Copy link
Author

shgefu commented Jan 20, 2023

怎么忽略 ,我不懂怎么设置或者怎么弄, 我可以先忽略试试可以跑就行了, 如果不行我看能写给你写个简单脚本。

@shgefu
Copy link
Author

shgefu commented Jan 20, 2023

目前发现报错的的基本上都是pyqt5界面对象事件槽指定的事件操作, 它一般是如下设置:

self.pushButton.cliecked.connect(self.event_a)

def event_a(self):
xxxx

当我点击pushButton的时候,按道理会调用connect的self.event_a句柄指定的函数, 但是pyarmor加密之后,所有事件函数调用都会报错,或者直接退出。

@jondy
Copy link
Contributor

jondy commented Jan 30, 2023

这应该是 spp mode 的一个 bug,子函数的 decorator 都被忽略了,这个 bug 将在下一个版本 v8.0.1 中修正。

@shgefu
Copy link
Author

shgefu commented Jan 31, 2023

OK, 按说明注释掉,错误消失,暂时只能先这样了。

@jondy jondy changed the title 加密后的脚本运行报错: spp mode 没有处理 decorator Mar 26, 2023
@jondy jondy changed the title spp mode 没有处理 decorator [BUG] decorator is ignored in spp mode Apr 11, 2023
@jondy jondy added bug and removed question labels Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants