Jean Jay
Jean Jay

Reputation: 1

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

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.

Upvotes: 0

Views: 18

Answers (0)

Related Questions