dashingsoft / pyarmor

A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

Home Page:http://pyarmor.dashingsoft.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] request license token failed (3): <h1>Server Error (500)</h1>

smart0313 opened this issue · comments

#1706

1、重装了pyarmor

Installing collected packages: pyarmor.cli.core, pyarmor
Successfully installed pyarmor-8.5.0 pyarmor.cli.core-6.5.0

2、 重新生成组设备文件,提示 unsupported arch "x86"

C:\workspace\rpa-workwechat>pyarmor reg -g 5
INFO     Python 3.7.4
INFO     Pyarmor 8.5.0 (trial), 000000, non-profits
ERROR    unsupported arch "x86"
ERROR    somthing is wrong
*===========================================================*
*  Please check                                             *
*    https://pyarmor.readthedocs.io/en/latest/questions.html*
*  or run `pyarmor man` to find solutions quickly           *
*                                                           *
*  It's recommand to report issue by `pyarmor man` in order *
*  to provide necessary information, and avoid dupcliated   *
*  issues or unclear question.                              *
*===========================================================*

按照1e1c774已解决不支持x86
image

3、再次重新生成组设备文件,成功。且machine id 是以 m 开头

C:\workspace\rpa-workwechat>pyarmor reg -g 5
INFO     Python 3.7.4
INFO     Pyarmor 8.5.0 (trial), 000000, non-profits
INFO     Platform windows.x86
INFO     generating device file ".pyarmor\group\pyarmor-group-device.5"
INFO     current machine id is "mc155626e5573034e100d736d58983c1e"
INFO     device file has been generated successfully

4、生成离线设备注册文件

C:\workspace\rpa-workwechat>pyarmor reg -g 5 pyarmor-regfile-6219.zip
INFO     Python 3.7.4
INFO     Pyarmor 8.5.0 (trial), 000000, non-profits
INFO     Platform windows.x86
INFO     register device file ".pyarmor\group\pyarmor-group-device.5"
INFO     use group license "pyarmor-regfile-6219.zip"
INFO     send request to server
INFO     write registration file "pyarmor-device-regfile-6219.5.zip"
INFO     please copy deivce regfile to offline device and run
INFO         pyarmor reg pyarmor-device-regfile-6219.5.zip
INFO     The device regfile has been generated successfully

5、离线设备注册

C:\workspace\rpa-workwechat>pyarmor reg pyarmor-device-regfile-6219.5.zip
INFO     Python 3.7.4
INFO     Pyarmor 8.5.0 (trial), 000000, non-profits
INFO     Platform windows.x86
INFO     register "pyarmor-device-regfile-6219.5.zip"
INFO     machine id in group license: mc155626e5573034e100d736d58983c1e
INFO     got machine id: mc155626e5573034e100d736d58983c1e
INFO     this machine id matchs group license
INFO     This license registration information:

License Type    : pyarmor-group
License No.     : pyarmor-vax-006219
License To      : xxx有限公司
License Product :yyy

BCC Mode        : Yes
RFT Mode        : Yes

Notes
* Offline obfuscation

6、查看注册信息

C:\workspace\rpa-workwechat>pyarmor -v
Pyarmor 8.5.0 (group), 006219, yyy

License Type    : pyarmor-group
License No.     : pyarmor-vax-006219
License To      : xxx有限公司
License Product :yyy

BCC Mode        : Yes
RFT Mode        : Yes

Notes
* Offline obfuscation
* 

7、加密脚本

C:\workspace\rpa-workwechat>cd ..
C:\workspace>cd pyarmor_demo
C:\workspace\pyarmor_demo>pyarmor gen foo.py
INFO     Python 3.7.4
INFO     Pyarmor 8.5.0 (group), 006219, yyy
INFO     Platform windows.x86
INFO     search inputs ...
INFO     find script foo.py
INFO     find 1 top resources
ERROR    request license token failed (3): <h1>Server Error (500)</h1>
ERROR    somthing is wrong
*===========================================================*
*  Please check                                             *
*    https://pyarmor.readthedocs.io/en/latest/questions.html*
*  or run `pyarmor man` to find solutions quickly           *
*                                                           *
*  It's recommand to report issue by `pyarmor man` in order *
*  to provide necessary information, and avoid dupcliated   *
*  issues or unclear question.                              *
*===========================================================*

依然还是报错

request license token failed (3): <h1>Server Error (500)</h1>
C:\workspace\pyarmor_demo>python -m pyarmor.cli reg -g 5
INFO     Python 3.7.4
INFO     Pyarmor 8.5.0 (trial), 000000, non-profits
INFO     Platform windows.x86
INFO     generating device file ".pyarmor\group\pyarmor-group-device.5"
INFO     current machine id is "mc155626e5573034e100d736d58983c1e"
INFO     device file has been generated successfully
C:\workspace\pyarmor_demo>pyarmor cfg group_device_flag
INFO     Python 3.7.4
INFO     Pyarmor 8.5.0 (trial), 000000, non-profits
INFO     Platform windows.x86

------------------------------------------------------------
Section: builder

Current settings
  group_device_flag = 22

Global settings

Local settings

问题还是存在

Originally posted by @smart0313 in #1706 (comment)

请帮忙解决一下,无法注册成功进一步使用

请确认出现问题时候的 machine id,和设备注册文件的 machine id 是一致的

我感觉还是和你的环境有什么关系,应该不是 Pyarmor 的 bug,只要确认任何时候设备 machine id 保持一致就应该没有问题

现有如下几个问题,请帮助解答下:
1、现在多次验证machine id没有发生变化了,且与设备注册文件的id一致,但是一直500状态码这种是无法使用集团版的吗?
2、无法使用集团版是否只能
更换为专家版或者基础版?
3、如果可以更换那该如何申请?不能更换该
如何继续使用**?

2572 MainProcess 2024-03-18 14:57:25,580
Traceback (most recent call last):
  File "c:\users\administrator\appdata\local\programs\python\python37-32\lib\site-packages\pyarmor\cli\__main__.py", line 757, in main
    main_entry(sys.argv[1:])
  File "c:\users\administrator\appdata\local\programs\python\python37-32\lib\site-packages\pyarmor\cli\__main__.py", line 745, in main_entry
    return args.func(ctx, args)
  File "c:\users\administrator\appdata\local\programs\python\python37-32\lib\site-packages\pyarmor\cli\__main__.py", line 237, in cmd_gen
    builder.process(options)
  File "c:\users\administrator\appdata\local\programs\python\python37-32\lib\site-packages\pyarmor\cli\generate.py", line 155, in process
    Pytransform3.pre_build(self.ctx)
  File "c:\users\administrator\appdata\local\programs\python\python37-32\lib\site-packages\pyarmor\cli\core\__init__.py", line 120, in pre_build
    m = Pytransform3.init(ctx)
  File "c:\users\administrator\appdata\local\programs\python\python37-32\lib\site-packages\pyarmor\cli\core\__init__.py", line 100, in init
    m.init_ctx(ctx)
RuntimeError: request license token failed (3): <h1>Server Error (500)</h1>

试了另一台云服务器,注册成功。但是使用gen命令加密脚本就出现500错误。然后pyarmor -v 后又是未注册状态。。。

我感觉还是很可能是你的环境或者安装问题,有些步骤你没有提到和说清楚,至少我就搞不明白为什么开始会出现 a 开头的设备号,后来又是怎么修改好的

另外, 运行加密的时候为什么就不能使用一下调试选项呢, pyarmor -d gen ...

我不认为集团版许可证在 windows.x86 上有什么问题