pyarmor 8.5.9__zip → 8.5.11__zip
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.
- {pyarmor-8.5.9 → pyarmor-8.5.11}/PKG-INFO +1 -1
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/__init__.py +1 -1
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/__main__.py +1 -13
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/bug.py +14 -3
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/context.py +43 -10
- pyarmor-8.5.11/pyarmor/cli/core.data.1 +0 -0
- pyarmor-8.5.11/pyarmor/cli/core.data.3 +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/default.cfg +19 -4
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/generate.py +1 -4
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/hdinfo.py +17 -1
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/register.py +8 -1
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/repack.py +1 -1
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/config.py +1 -1
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor.egg-info/PKG-INFO +1 -1
- pyarmor-8.5.11/pyarmor.egg-info/requires.txt +1 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/setup.py +1 -1
- pyarmor-8.5.9/pyarmor/cli/core.data.1 +0 -0
- pyarmor-8.5.9/pyarmor/cli/core.data.3 +0 -0
- pyarmor-8.5.9/pyarmor.egg-info/requires.txt +0 -1
- {pyarmor-8.5.9 → pyarmor-8.5.11}/MANIFEST.in +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/README.md +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/README.rst +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/__init__.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/benchmark.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/build_meta.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/bootstrap.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/config.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/core.data.2 +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/docker.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/merge.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/mixer.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/plugin.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/public_capsule.zip +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/resource.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cli/shell.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/cobuilder.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/README-ZH.md +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/README.md +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/build-for-exe.bat +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/build-for-freeze.bat +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/build-with-project.bat +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/build-with-project.sh +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/cx_Freeze/hello.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/cx_Freeze/queens.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/cx_Freeze/setup.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/helloworld/foo.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/obfuscate-app.bat +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/obfuscate-app.sh +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/obfuscate-pkg.bat +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/obfuscate-pkg.sh +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pack-obfuscated-scripts.bat +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pack-obfuscated-scripts.sh +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/py2exe/hello.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/py2exe/queens.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/py2exe/setup.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Arithmetic.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Calls.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/CommandLine.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Constructs.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Dict.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Exceptions.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Imports.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Instances.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Lists.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Lookups.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/NewInstances.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Numbers.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Setup.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Strings.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/Tuples.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/With.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/clockres.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/package/__init__.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/package/submodule.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/pybench.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/pybench/systimes.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/simple/queens.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/testmod/hello.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/testmod/queens.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/testpkg/main.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/testpkg/mypkg/__init__.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/examples/testpkg/mypkg/foo.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/helper/__init__.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/helper/build_data_module.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/helper/buildext.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/helper/get_bind_key.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/helper/get_license_info.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/helper/get_platform_name.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/helper/merge.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/helper/repack.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/helper/superuntime.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/license.tri +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/packer.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/platforms/darwin/x86_64/_pytransform.dylib +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/platforms/linux/x86/_pytransform.so +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/platforms/linux/x86_64/_pytransform.so +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/platforms/windows/x86/_pytransform.dll +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/platforms/windows/x86_64/_pytransform.dll +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/plugins/README.md +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/plugins/check_ntp_time.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/polyfills/__init__.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/polyfills/argparse.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/product.key +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/project.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/protect_code.pt +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/protect_code2.pt +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/public.key +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/public_capsule.zip +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/pyarmor-deprecated.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/pyarmor-webui.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/pyarmor.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/pyimcore.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/pyshield.key +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/pyshield.lic +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/pytransform.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/reform.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/register.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/sppmode.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor/utils.py +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor.egg-info/SOURCES.txt +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor.egg-info/dependency_links.txt +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor.egg-info/entry_points.txt +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/pyarmor.egg-info/top_level.txt +0 -0
- {pyarmor-8.5.9 → pyarmor-8.5.11}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: pyarmor
|
|
3
|
-
Version: 8.5.
|
|
3
|
+
Version: 8.5.11
|
|
4
4
|
Summary: A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
|
|
5
5
|
Home-page: https://github.com/dashingsoft/pyarmor
|
|
6
6
|
Author: Jondy Zhao
|
|
@@ -335,19 +335,7 @@ def cmd_reg(ctx, args):
|
|
|
335
335
|
|
|
336
336
|
|
|
337
337
|
def cmd_man(ctx, args):
|
|
338
|
-
|
|
339
|
-
if not os.path.exists(pkgpath):
|
|
340
|
-
from subprocess import check_output
|
|
341
|
-
check_output([
|
|
342
|
-
sys.executable, '-m', 'pip', 'install',
|
|
343
|
-
'--disable-pip-version-check', 'pyarmor.man'
|
|
344
|
-
])
|
|
345
|
-
|
|
346
|
-
from pyarmor.man.cli import main_entry
|
|
347
|
-
try:
|
|
348
|
-
main_entry(args)
|
|
349
|
-
except KeyboardInterrupt:
|
|
350
|
-
logging.info('Quit from Pyarmor.Man, Bye-Bye')
|
|
338
|
+
logging.info('This feature is still developing ...')
|
|
351
339
|
|
|
352
340
|
|
|
353
341
|
def main_parser():
|
|
@@ -36,7 +36,7 @@ $tracelog
|
|
|
36
36
|
$tb
|
|
37
37
|
''')
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
UNUSED_ENABLE_DEBUG_HINTS = '''something is wrong
|
|
40
40
|
*=============================================================*
|
|
41
41
|
* Please enable debug option `-d` to run it again *
|
|
42
42
|
* pyarmor -d gen options ... *
|
|
@@ -45,11 +45,10 @@ ENABLE_DEBUG_HINTS = '''something is wrong
|
|
|
45
45
|
* *
|
|
46
46
|
* Please also check *
|
|
47
47
|
* https://pyarmor.readthedocs.io/en/latest/questions.html *
|
|
48
|
-
* or run `pyarmor man` to find solutions quickly *
|
|
49
48
|
*=============================================================*
|
|
50
49
|
'''
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
UNUSED_SOLUTION_HINTS = Template('''something is wrong
|
|
53
52
|
*=============================================================*
|
|
54
53
|
* Please check *
|
|
55
54
|
* https://pyarmor.readthedocs.io/en/latest/questions.html *
|
|
@@ -61,6 +60,17 @@ SOLUTION_HINTS = Template('''something is wrong
|
|
|
61
60
|
*=============================================================*
|
|
62
61
|
''')
|
|
63
62
|
|
|
63
|
+
ENABLE_DEBUG_HINTS = 'please enable debug option `-d` to run it again'
|
|
64
|
+
|
|
65
|
+
SOLUTION_HINTS = Template('''something is wrong
|
|
66
|
+
*=============================================================*
|
|
67
|
+
* Please check console log to find out what's wrong *
|
|
68
|
+
* *
|
|
69
|
+
* If still not solved, please find solutions by *
|
|
70
|
+
* https://pyarmor.readthedocs.io/en/latest/questions.html *
|
|
71
|
+
*=============================================================*
|
|
72
|
+
''')
|
|
73
|
+
|
|
64
74
|
|
|
65
75
|
def generate_bug_report(e, logfile=LOG_FILE, output=BUG_FILE):
|
|
66
76
|
'Generate file `pyarmor.report.bug` in current path'
|
|
@@ -111,6 +121,7 @@ def find_solutions(e):
|
|
|
111
121
|
logger.error(ENABLE_DEBUG_HINTS)
|
|
112
122
|
return
|
|
113
123
|
|
|
124
|
+
logger.info('generate bug file "%s"', BUG_FILE)
|
|
114
125
|
generate_bug_report(e)
|
|
115
126
|
logger.error(SOLUTION_HINTS.substitute(bugfile=BUG_FILE))
|
|
116
127
|
|
|
@@ -40,7 +40,7 @@ def __pyarmor__():
|
|
|
40
40
|
|
|
41
41
|
def format_system():
|
|
42
42
|
plat = platform.system().lower()
|
|
43
|
-
plat = ('
|
|
43
|
+
plat = ('cygwin' if plat.startswith('cygwin') else
|
|
44
44
|
'linux' if plat.startswith('linux') else
|
|
45
45
|
'freebsd' if plat.startswith(
|
|
46
46
|
('freebsd', 'openbsd', 'isilon onefs')) else plat)
|
|
@@ -64,7 +64,11 @@ def __pyarmor__():
|
|
|
64
64
|
('armv6', ('armv6l',)),
|
|
65
65
|
('armv7', ('armv7l',)),
|
|
66
66
|
('aarch32', ('aarch32',)),
|
|
67
|
-
('aarch64', ('aarch64', 'arm64'))
|
|
67
|
+
('aarch64', ('aarch64', 'arm64')),
|
|
68
|
+
('ppc64le', ('ppc64le',)),
|
|
69
|
+
('mips32el', ('mipsel', 'mips32el')),
|
|
70
|
+
('mips64el', ('mips64el',)),
|
|
71
|
+
('riscv64', ('riscv64',)),
|
|
68
72
|
)
|
|
69
73
|
for alias, archlist in arch_table:
|
|
70
74
|
if mach in archlist:
|
|
@@ -92,12 +96,21 @@ __pyarmor__ = ExtensionFileLoader(
|
|
|
92
96
|
'''
|
|
93
97
|
|
|
94
98
|
|
|
95
|
-
def format_platform(plat, arch):
|
|
99
|
+
def format_platform(plat=None, arch=None):
|
|
96
100
|
from struct import calcsize
|
|
97
101
|
from fnmatch import fnmatchcase
|
|
98
102
|
|
|
103
|
+
# Fix pyarmor.cli.core 6.5.2 issue, may be removed in 6.5.3
|
|
104
|
+
if plat is None and arch is None:
|
|
105
|
+
if os.getenv('PYARMOR_PLATFORM'):
|
|
106
|
+
plat, arch = os.getenv('PYARMOR_PLATFORM').split('.')
|
|
107
|
+
else:
|
|
108
|
+
from platform import system, machine
|
|
109
|
+
plat, arch = system().lower(), machine().lower()
|
|
110
|
+
|
|
99
111
|
plat_table = (
|
|
100
|
-
('windows', ('windows',
|
|
112
|
+
('windows', ('windows',)),
|
|
113
|
+
('cygwin', ('cygwin*',)),
|
|
101
114
|
('darwin', ('darwin',)),
|
|
102
115
|
('linux', ('linux*',)),
|
|
103
116
|
('freebsd', ('freebsd*', 'openbsd*', 'isilon onefs')),
|
|
@@ -196,14 +209,23 @@ class Context(object):
|
|
|
196
209
|
return cfg
|
|
197
210
|
|
|
198
211
|
def _named_config(self, name, encoding=None):
|
|
199
|
-
|
|
200
|
-
|
|
212
|
+
nlist = []
|
|
213
|
+
if self.cfg.getboolean('builder', 'propagate_package_options'):
|
|
214
|
+
i = name.find('.')
|
|
215
|
+
while i > -1:
|
|
216
|
+
nlist.append(name[:i])
|
|
217
|
+
i = name.find('.', i+1)
|
|
218
|
+
nlist.append(name)
|
|
219
|
+
flist = [os.path.join(b, a)
|
|
220
|
+
for a in nlist
|
|
221
|
+
for b in (self.global_path, self.local_path)]
|
|
201
222
|
return self._read_config(flist, encoding=encoding)
|
|
202
223
|
|
|
203
224
|
def read_token(self):
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
225
|
+
for filename in (self.license_group_token, self.license_token):
|
|
226
|
+
if os.path.exists(filename):
|
|
227
|
+
with open(filename, 'rb') as f:
|
|
228
|
+
return f.read()
|
|
207
229
|
|
|
208
230
|
def save_token(self, data):
|
|
209
231
|
with open(self.license_token, 'wb') as f:
|
|
@@ -211,6 +233,12 @@ class Context(object):
|
|
|
211
233
|
raise RuntimeError('got invalid token %r' % data)
|
|
212
234
|
f.write(data)
|
|
213
235
|
|
|
236
|
+
def save_group_token(self, data):
|
|
237
|
+
with open(self.license_group_token, 'wb') as f:
|
|
238
|
+
if not data.endswith(b'=='):
|
|
239
|
+
raise RuntimeError('got invalid token %r' % data)
|
|
240
|
+
f.write(data)
|
|
241
|
+
|
|
214
242
|
def clear_token(self):
|
|
215
243
|
if os.path.exists(self.license_token):
|
|
216
244
|
with open(self.license_token, 'wb') as f:
|
|
@@ -249,7 +277,8 @@ class Context(object):
|
|
|
249
277
|
if self.cfg.has_section(extra_sect):
|
|
250
278
|
options.update(self.cfg.items(extra_sect))
|
|
251
279
|
if name:
|
|
252
|
-
|
|
280
|
+
# If input path is '.', package name will start with '..'
|
|
281
|
+
cfg = self._named_config(name.strip('.') + '.ruler')
|
|
253
282
|
if cfg.has_section(sect):
|
|
254
283
|
options.update(cfg.items(sect))
|
|
255
284
|
return options
|
|
@@ -334,6 +363,10 @@ class Context(object):
|
|
|
334
363
|
def license_token(self):
|
|
335
364
|
return os.path.join(self.reg_path, '.license.token')
|
|
336
365
|
|
|
366
|
+
@property
|
|
367
|
+
def license_group_token(self):
|
|
368
|
+
return os.path.join(self.reg_path, '.license.group.token')
|
|
369
|
+
|
|
337
370
|
@property
|
|
338
371
|
def license_info(self):
|
|
339
372
|
from .register import parse_token
|
|
Binary file
|
|
Binary file
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
;; Pyarmor version
|
|
4
4
|
major = 8
|
|
5
5
|
minor = 5
|
|
6
|
-
patch =
|
|
6
|
+
patch = 11
|
|
7
7
|
|
|
8
8
|
;; Compatible core version
|
|
9
|
-
cli.core = 6.5.
|
|
9
|
+
cli.core = 6.5.3
|
|
10
10
|
|
|
11
11
|
;; Deprecated since Pyarmor 8.2.5
|
|
12
12
|
; cli.runtime = 3.2.5
|
|
@@ -102,6 +102,11 @@ rft_dev_mode = 0
|
|
|
102
102
|
;; Export module and classes
|
|
103
103
|
; rft_export_names = pkg.mod pkg.mod.cls pkg.mod.attr
|
|
104
104
|
|
|
105
|
+
;; How to reform import statement
|
|
106
|
+
;; 0 Convert import statement to security form
|
|
107
|
+
;; 1 Simple rename the imported name
|
|
108
|
+
rft_simple_import = 0
|
|
109
|
+
|
|
105
110
|
;; Extra paths to find dependent package
|
|
106
111
|
; pypaths =
|
|
107
112
|
|
|
@@ -115,6 +120,13 @@ rft_dev_mode = 0
|
|
|
115
120
|
;; Group device flag for machine id
|
|
116
121
|
group_device_flag = 22
|
|
117
122
|
|
|
123
|
+
;; Whether propagate package private configuration to module
|
|
124
|
+
;;
|
|
125
|
+
;; If enable, "pkg.mod" will inherit "pkg" configuration
|
|
126
|
+
;;
|
|
127
|
+
;; Otherwise, "pkg.mod" doesn't merge "pkg" configuration
|
|
128
|
+
propagate_package_options = 0
|
|
129
|
+
|
|
118
130
|
;;
|
|
119
131
|
;; Part 2: global/local/module level options
|
|
120
132
|
;;
|
|
@@ -193,6 +205,9 @@ clear_frame_locals = 0
|
|
|
193
205
|
;; Whether encrypt name in statement import
|
|
194
206
|
rft_mix_import_name = 0
|
|
195
207
|
|
|
208
|
+
;; Strip leading name package
|
|
209
|
+
strip_package_name = 1
|
|
210
|
+
|
|
196
211
|
;;
|
|
197
212
|
;; Compatiable options
|
|
198
213
|
;;
|
|
@@ -395,7 +410,7 @@ enable_comprehension = 1
|
|
|
395
410
|
|
|
396
411
|
[windows.x86_64.bcc]
|
|
397
412
|
cc = clang.exe
|
|
398
|
-
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=x86_64-elf-windows -c
|
|
413
|
+
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=x86_64-elf-windows -c -DENABLE_BCC_MEMSET
|
|
399
414
|
|
|
400
415
|
[windows.x86.bcc]
|
|
401
416
|
cc = clang.exe
|
|
@@ -414,7 +429,7 @@ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables
|
|
|
414
429
|
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector -shared -nostdlib -Tlinux.armv7.ldscript
|
|
415
430
|
|
|
416
431
|
[darwin.x86_64.bcc]
|
|
417
|
-
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=x86_64-elf-gnu_linux -fPIC -c
|
|
432
|
+
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=x86_64-elf-gnu_linux -fPIC -c -DENABLE_BCC_MEMSET
|
|
418
433
|
|
|
419
434
|
[darwin.aarch64.bcc]
|
|
420
435
|
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=arm64-macho-darwin -fPIC -fno-addrsig -fno-stack-protector -shared -nostdlib -lsystem
|
|
@@ -141,10 +141,7 @@ class Builder(object):
|
|
|
141
141
|
continue
|
|
142
142
|
|
|
143
143
|
logger.info('obfuscating %s', r)
|
|
144
|
-
code = self.
|
|
145
|
-
if code is None:
|
|
146
|
-
self._copy_script(path, r)
|
|
147
|
-
continue
|
|
144
|
+
code = Pytransform3.generate_obfuscated_script(self.ctx, r)
|
|
148
145
|
source = r.generate_output(
|
|
149
146
|
template, code, relative=relative, pkgname=pkgname,
|
|
150
147
|
bootpath=bootpath, rev=rev
|
|
@@ -36,6 +36,22 @@ def get_hd_info(hdtype, name=None):
|
|
|
36
36
|
return str(e)
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
def get_all_ifmac():
|
|
40
|
+
try:
|
|
41
|
+
buf = Pytransform3.get_hd_info(HT_IFMAC, name='*')
|
|
42
|
+
i = 0
|
|
43
|
+
n = len(buf)
|
|
44
|
+
rlist = []
|
|
45
|
+
while i < n and buf[i]:
|
|
46
|
+
j = i + 1 + buf[i]
|
|
47
|
+
rlist.append(':'.join(['%02x' % x for x in buf[i+1:j]]))
|
|
48
|
+
i = j
|
|
49
|
+
except Exception as e:
|
|
50
|
+
return str(e)
|
|
51
|
+
|
|
52
|
+
return '<%s>' % ','.join(set(rlist))
|
|
53
|
+
|
|
54
|
+
|
|
39
55
|
def main(argv):
|
|
40
56
|
parser = argparse.ArgumentParser()
|
|
41
57
|
parser.add_argument('devname', nargs='*', help=(
|
|
@@ -49,7 +65,7 @@ def main(argv):
|
|
|
49
65
|
print('Default Harddisk Serial Number: %s' % get_hd_info(HT_HARDDISK))
|
|
50
66
|
print('Default Mac address: %s' % get_hd_info(HT_IFMAC))
|
|
51
67
|
print('Default IPv4 address: %s' % get_hd_info(HT_IPV4))
|
|
52
|
-
print('Multiple Mac addresses: %s' %
|
|
68
|
+
print('Multiple Mac addresses: %s' % get_all_ifmac())
|
|
53
69
|
print('Domain: %s' % get_hd_info(HT_DOMAIN))
|
|
54
70
|
|
|
55
71
|
for name in args.devname:
|
|
@@ -151,6 +151,11 @@ class Register(object):
|
|
|
151
151
|
def register_regfile(self, regfile, clean=True):
|
|
152
152
|
from zipfile import ZipFile
|
|
153
153
|
|
|
154
|
+
for x in (self.ctx.license_group_token, self.ctx.license_token):
|
|
155
|
+
if os.path.exists(x):
|
|
156
|
+
logger.info('remove old token "%s"', x)
|
|
157
|
+
os.remove(x)
|
|
158
|
+
|
|
154
159
|
path = self.ctx.reg_path
|
|
155
160
|
with ZipFile(regfile, 'r') as f:
|
|
156
161
|
for item in ('license.lic', '.pyarmor_capsule.zip'):
|
|
@@ -199,7 +204,7 @@ class Register(object):
|
|
|
199
204
|
raise CliError('this group device license is not for '
|
|
200
205
|
'this docker host')
|
|
201
206
|
logger.debug('extracting %s', name)
|
|
202
|
-
self.ctx.
|
|
207
|
+
self.ctx.save_group_token(f.read(name))
|
|
203
208
|
return
|
|
204
209
|
if 'group.info' in namelist:
|
|
205
210
|
logger.info('refer to http://pyarmor.readthedocs.io/en/stable/how-to/register.html'
|
|
@@ -217,6 +222,8 @@ class Register(object):
|
|
|
217
222
|
rlist = []
|
|
218
223
|
with socket(AF_INET, SOCK_STREAM) as s:
|
|
219
224
|
s.connect((host, port))
|
|
225
|
+
logger.info('socket addr: %s', str(s.getsockname()))
|
|
226
|
+
logger.info('remote addr: %s', str(s.getpeername()))
|
|
220
227
|
s.sendall(b'PADH' + b'x' * 60)
|
|
221
228
|
while True:
|
|
222
229
|
flag = s.recv(1)
|
|
@@ -554,7 +554,7 @@ def repack_pyzarchive(pyzpath, pyztoc, obfpath, rtname, cipher=None):
|
|
|
554
554
|
fullpath = fullpath + 'c'
|
|
555
555
|
if os.path.exists(fullpath):
|
|
556
556
|
logger.info('replace item "%s"', name)
|
|
557
|
-
with open(fullpath, 'r') as f:
|
|
557
|
+
with open(fullpath, 'r', encoding='utf-8') as f:
|
|
558
558
|
co = compile(f.read(), '<frozen %s>' % name, 'exec')
|
|
559
559
|
code_dict[name] = co
|
|
560
560
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: pyarmor
|
|
3
|
-
Version: 8.5.
|
|
3
|
+
Version: 8.5.11
|
|
4
4
|
Summary: A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.
|
|
5
5
|
Home-page: https://github.com/dashingsoft/pyarmor
|
|
6
6
|
Author: Jondy Zhao
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pyarmor.cli.core~=6.5.3
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
pyarmor.cli.core~=6.5.2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|