最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

pyinstaller - RuntimeError: unauthorized use of script (1:1107) after obfuscating Python script with PyArmor and compiling with

programmeradmin1浏览0评论

I obfuscated my Python script using PyArmor and then compiled it into a binary executable using Nuitka. However, when I try to run the .exe file, I receive the following error:

Traceback (most recent call last):
  File "<frozen __main__>", line 3, in <module>
RuntimeError: unauthorized use of script (1:1107)

Here is the Nuitka command I used:

nuitka --onefile --standalone --output-dir=C:\Users\<user>\Desktop\Programmation\<folder>\<folder>\OCk92\dist\build --output-filename=OCk92.exe --include-data-dir=C:\Users\<user>\Desktop\Programmation\<folder>\<folder>\.Key=DATA --include-data-files=C:\Users\<user>\Desktop\Programmation\<folder>\<folder>\OCk92\dist\pyarmor_runtime_000000\__init__.py=pyarmor_runtime_000000\__init__.py --include-data-files=C:\Users\<user>\Desktop\Programmation\<folder>\<folder>\OCk92\dist\pyarmor_runtime_000000\pyarmor_runtime.pyd=pyarmor_runtime_000000\pyarmor_runtime.pyd C:\Users\<user>\Desktop\Programmation\<folder>\<folder>\OCk92\dist\Source\Main.py

I tried adding restrict_module=0 in the PyArmor configuration, but it didn’t change anything. The binary works fine with PyInstaller but fails with Nuitka.

Here is my PyArmor configuration:

pyarmor gen Source
pyarmor cfg build Source restrict_module=0

What could be causing this issue, and how can I fix it?

                                                                                 ( translated by chatgpt into FRENCH 2 ENGLISH )

I obfuscated my Python script using PyArmor and compiled it with Nuitka. I expected the final .exe file to run correctly, but instead, I got the error:

RuntimeError: unauthorized use of script (1:1107)

I tried adding restrict_module=0 in the PyArmor configuration, but it didn’t change anything. The binary works fine with PyInstaller but fails with Nuitka.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论