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] ERROR invalid network date format #1981

Closed
hansroh opened this issue Nov 8, 2024 · 9 comments
Closed

[BUG] ERROR invalid network date format #1981

hansroh opened this issue Nov 8, 2024 · 9 comments
Labels

Comments

@hansroh
Copy link

hansroh commented Nov 8, 2024

My CI license raises error from today. I dosen't modify code related with pyarmor at all.

#14 [build  7/16] RUN pyarmor reg pyarmor-ci-4815.zip && pyarmor -v
#14 0.672 INFO     Python 3.11.0
#14 0.673 INFO     Pyarmor 9.0.4 (trial), 000000, non-profits
#14 0.675 INFO     Platform linux.x86_64
#14 0.675 INFO     register "pyarmor-ci-4815.zip"
#14 0.676 INFO     This license registration information:
#14 0.676 
#14 0.676 License Type    : pyarmor-basic
#14 0.676 License No.     : pyarmor-vax-004815
#14 0.676 License To      : Hans Roh
#14 0.676 License Product : KrackNet
#14 0.676 
#14 0.676 BCC Mode        : No
#14 0.676 RFT Mode        : No
#14 0.676 CI/CD Mode      : Yes

#12  [build  8/16] RUN pyarmor gen --outer skitaid.py:
#12 0.511 INFO     Python 3.11.0
#12 0.512 INFO     Pyarmor 9.0.4 (basic), 004815, KrackNet
#12 0.513 INFO     Platform linux.x86_64
#12 0.513 INFO     search inputs ...
#12 0.513 INFO     find script skitaid.py
#12 0.513 INFO     find 1 top resources
#12 1.294 ERROR    invalid network date format
  • My Basic license works fine.
  • I installed 9.0.3, but same error occurred.
@hansroh hansroh added the bug label Nov 8, 2024
@jondy
Copy link
Contributor

jondy commented Nov 8, 2024

This issue will be fixed in next pyarmor.cli.core release

For now, download the dev version from

https://pyarmor.dashingsoft.com/downloads/temp/linux.x86_64/libs/cp3.9/pytransform3.so

Overwrite /path/to/package/pyarmor/cli/core/pytransform3.so

@hansroh
Copy link
Author

hansroh commented Nov 8, 2024

Another question:

I must deploy my app today.

So I run build-docker container locally and I copied files under ~/.pyarmor to /root/.pyarmor in build-docker container.

  • licence.lic
  • .license.token
  • .pyarmor_capsule.zip

and without license registration, pyarmor Basic license works.

If on same machine, does pyarmor Basic licence work even in a docker container with just copying pyarmor license files?

Or it consumed license installable machine count? As my understanding the machine limit is 100.

@hansroh
Copy link
Author

hansroh commented Nov 8, 2024

@jondy I run Python 3.11. Doesn't work.

ERROR    /usr/local/lib/python3.11/dist-packages/pyarmor/cli/core/pytransform3.so: undefined symbol: _PyFloat_Pack8

@hansroh
Copy link
Author

hansroh commented Nov 8, 2024

Oh, 3.11 link exists also.

CI license works.

@hansroh
Copy link
Author

hansroh commented Nov 8, 2024

Nope. dosen't work.

At the end of obfuscating,

15 53.85 INFO     write dist/kracknet/rkn/models/ssd/service_model.py
#15 53.85 INFO     obfuscating file __init__.py
#15 54.12 INFO     write dist/kracknet/rkn/models/ssd/__init__.py
#15 54.12 INFO     obfuscate scripts OK
#15 54.16 free(): invalid pointer
#15 54.35 Aborted (core dumped)

@hansroh
Copy link
Author

hansroh commented Nov 8, 2024

I look into my .license.token, there is some kind of expiation date.

Until that date, I think just copying token is fine.

I will use this token today.

@hansroh
Copy link
Author

hansroh commented Nov 8, 2024

@jondy I expected the pyarmor.rkey files generated from my "004815 basic" license to work with pyarmored scripts on any machine or CI pipeline, but I encountered the following error.

kracknet    | Traceback (most recent call last):
kracknet    |   File "/app/./skitaid.py", line 3, in <module>
kracknet    |     from pyarmor_runtime_004815 import __pyarmor__
kracknet    |   File "/app/pyarmor_runtime_004815/__init__.py", line 2, in <module>
kracknet    |     from .pyarmor_runtime import __pyarmor__
kracknet    | RuntimeError: Invalid input packet. (1:10748)

Today,

  1. I created pyarmor.rkey on my host machine with basic pyarmor license.
  2. Source codes were obfuscated within build-docker with --outer option and copied license.lic and .license.token.

Is the above RuntimeError a result of an unusual usage today? Or I must the obfuscation and rkey generation be performed in the same docker?
(rkey which was created in bulid-docker works fine.)

If it's the latter, does it mean I need to create separate Docker containers with obfuscated code and rkey for each customer?

@jondy
Copy link
Contributor

jondy commented Nov 9, 2024

I have uploaded new dev version to fix crash issue, please download it agagin.

I expected the pyarmor.rkey files generated from my "004815 basic" license to work with pyarmored scripts on any machine or CI pipeline

With same license and same outer key name, the runtime key should work even if it's generated in different machine.

Please check Man page, and test it with one simple script. If it doesn't work as expected, please submit new issue.

@hansroh
Copy link
Author

hansroh commented Nov 9, 2024

@jondy Maybe my mistake, I am testing now.

New dev version works fine.

Thank you.

@hansroh hansroh closed this as completed Nov 9, 2024
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