pyarmor.cli 9.2.7__tar.gz → 9.2.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/PKG-INFO +1 -1
  2. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/__init__.py +1 -1
  3. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/context.py +8 -6
  4. pyarmor_cli-9.2.8/pyarmor/cli/core.data.1 +0 -0
  5. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/core.data.2 +0 -0
  6. pyarmor_cli-9.2.8/pyarmor/cli/core.data.3 +0 -0
  7. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/default.cfg +2 -1
  8. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/hdinfo.py +12 -1
  9. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/merge.py +2 -0
  10. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/register.py +4 -0
  11. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor.cli.egg-info/PKG-INFO +1 -1
  12. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/setup.py +1 -1
  13. pyarmor_cli-9.2.7/pyarmor/cli/core.data.1 +0 -0
  14. pyarmor_cli-9.2.7/pyarmor/cli/core.data.3 +0 -0
  15. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/README.rst +0 -0
  16. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/__main__.py +0 -0
  17. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/batch.py +0 -0
  18. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/bootstrap.py +0 -0
  19. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/bug.py +0 -0
  20. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/command.py +0 -0
  21. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/config.py +0 -0
  22. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/docker.py +0 -0
  23. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/generate.py +0 -0
  24. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/mixer.py +0 -0
  25. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/model.py +0 -0
  26. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/plugin.py +0 -0
  27. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/project.py +0 -0
  28. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/public_capsule.zip +0 -0
  29. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/repack.py +0 -0
  30. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/resource.py +0 -0
  31. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor/cli/shell.py +0 -0
  32. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor.cli.egg-info/SOURCES.txt +0 -0
  33. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor.cli.egg-info/dependency_links.txt +0 -0
  34. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor.cli.egg-info/entry_points.txt +0 -0
  35. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor.cli.egg-info/requires.txt +0 -0
  36. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/pyarmor.cli.egg-info/top_level.txt +0 -0
  37. {pyarmor_cli-9.2.7 → pyarmor_cli-9.2.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyarmor.cli
3
- Version: 9.2.7
3
+ Version: 9.2.8
4
4
  Summary: A comand line tool to obfuscate python scripts
5
5
  Home-page: https://github.com/dashingsoft/pyarmor
6
6
  Author: Jondy Zhao
@@ -1,6 +1,6 @@
1
1
  import logging
2
2
 
3
- __VERSION__ = '9.2.7'
3
+ __VERSION__ = '9.2.8'
4
4
 
5
5
  logger = logging.getLogger('cli')
6
6
 
@@ -743,23 +743,25 @@ class Context(object):
743
743
  else:
744
744
  host = http_proxy[i:j]
745
745
  port = http_proxy[j+1:]
746
- url = b'http://pyarmor.dashingsoft.com'
746
+ url = b'http://api.dashingsoft.com'
747
747
  return b'\x00'.join([host, port, url, header, b'\x00'])
748
748
 
749
749
  def request_token(self, url, timeout=6.0):
750
750
  from urllib.request import urlopen
751
751
 
752
- def get_response(host):
752
+ parts = url.split('?', 1)
753
+ parts[0] = self._opts('pyarmor', 'tokurl')
754
+ url = '?'.join(parts)
755
+
756
+ def get_response(url):
753
757
  try:
754
758
  from ssl import _create_unverified_context
755
759
  context = _create_unverified_context()
756
- req = 'https://%s%s' % (host, url)
757
760
  except Exception:
758
761
  context = None
759
- req = 'http://%s%s' % (host, url)
760
- return urlopen(req, None, timeout, context=context)
762
+ return urlopen(url, None, timeout, context=context)
761
763
 
762
- with get_response('pyarmor.dashingsoft.com') as res:
764
+ with get_response(url) as res:
763
765
  return res.read()
764
766
 
765
767
  #
@@ -3,7 +3,7 @@
3
3
  ;; Pyarmor version
4
4
  major = 9
5
5
  minor = 2
6
- patch = 7
6
+ patch = 8
7
7
 
8
8
  ;; Compatible core version for package: pyarmor.cli.core
9
9
  cli.core = 8.1.2
@@ -23,6 +23,7 @@ timeout = 6
23
23
  regurl = https://api.dashingsoft.com/product/key/enter/%s/?
24
24
  buyurl = https://jondy.github.io/paypal/index.html
25
25
  docurl = https://pyarmor.readthedocs.io/{lang}/latest
26
+ tokurl = https://api.dashingsoft.com/product/auth/r2/
26
27
 
27
28
  [finder]
28
29
  recursive = 0
@@ -59,7 +59,18 @@ def main(argv):
59
59
  'or harddisk name like "/dev/sda"'))
60
60
  args = parser.parse_args(argv)
61
61
 
62
- print('Machine ID: %s' % get_hd_info(GROUP_LICENSE_MACHINE_FLAG)[1:])
62
+ machid = get_hd_info(GROUP_LICENSE_MACHINE_FLAG)[1:]
63
+ if machid[1] == '-':
64
+ machid2 = machid.replace('-', 'm', 1)
65
+ else:
66
+ machid2 = get_hd_info(GROUP_LICENSE_MACHINE_FLAG)[1:]
67
+
68
+ if machid == machid2:
69
+ print('This device is stable device')
70
+ print('Machine ID: %s' % machid2)
71
+ else:
72
+ print('This device is unstable device')
73
+ print('Machind ID is unstable in this device')
63
74
 
64
75
  if not args.devname:
65
76
  print('Default Harddisk Serial Number: %s' % get_hd_info(HT_HARDDISK))
@@ -139,6 +139,8 @@ def merge_runtimes(paths, rname, output):
139
139
  if not os.path.exists(rpath):
140
140
  raise RuntimeError('no runtime package found')
141
141
  for x in os.scandir(rpath):
142
+ if x.name == '__pycache__':
143
+ continue
142
144
  if x.is_dir():
143
145
  logger.info('copy runtime files "%s" to "%s"', x.name, dest)
144
146
  shutil.copytree(x.path, os.path.join(dest, x.name))
@@ -219,6 +219,8 @@ class Register(object):
219
219
  [x[7:] for x in namelist if x.startswith('tokens')]))
220
220
  for idver in MACHFLAGS:
221
221
  machid = self._get_machine_id(idver).decode('utf-8')
222
+ if machid.startswith('-'):
223
+ raise CliError('group license not works in unstable device')
222
224
  logger.debug('got machine id: %s', machid)
223
225
  name = '/'.join(['tokens', machid])
224
226
  if name in namelist:
@@ -379,6 +381,8 @@ class Register(object):
379
381
  uinfo = uname()
380
382
  devflag = self.ctx.cfg['builder'].getint('group_device_flag', 21)
381
383
  machid = self._get_machine_id(devflag).decode('utf-8')
384
+ if machid.startswith('-'):
385
+ raise CliError('group license not works in unstable device')
382
386
  logger.info('current machine id is "%s"', machid)
383
387
  tpl = Template('\n'.join([
384
388
  '# Generated by Pyarmor $rev, $timestamp',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyarmor.cli
3
- Version: 9.2.7
3
+ Version: 9.2.8
4
4
  Summary: A comand line tool to obfuscate python scripts
5
5
  Home-page: https://github.com/dashingsoft/pyarmor
6
6
  Author: Jondy Zhao
@@ -1,6 +1,6 @@
1
1
  from setuptools import setup
2
2
 
3
- __VERSION__ = ' 9.2.7'
3
+ __VERSION__ = ' 9.2.8'
4
4
 
5
5
  with open('README.rst') as f:
6
6
  long_description = f.read()
Binary file
Binary file
File without changes
File without changes