pyarmor 8.5.10__zip → 8.5.12__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.10 → pyarmor-8.5.12}/PKG-INFO +1 -1
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/__init__.py +1 -1
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/__main__.py +4 -14
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/context.py +14 -5
- pyarmor-8.5.12/pyarmor/cli/core.data.1 +0 -0
- pyarmor-8.5.12/pyarmor/cli/core.data.3 +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/default.cfg +16 -3
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/register.py +23 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/config.py +1 -1
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor.egg-info/PKG-INFO +1 -1
- pyarmor-8.5.10/pyarmor/cli/core.data.1 +0 -0
- pyarmor-8.5.10/pyarmor/cli/core.data.3 +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/MANIFEST.in +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/README.md +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/README.rst +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/__init__.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/benchmark.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/build_meta.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/bootstrap.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/bug.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/config.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/core.data.2 +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/docker.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/generate.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/hdinfo.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/merge.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/mixer.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/plugin.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/public_capsule.zip +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/repack.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/resource.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cli/shell.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/cobuilder.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/README-ZH.md +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/README.md +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/build-for-exe.bat +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/build-for-freeze.bat +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/build-with-project.bat +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/build-with-project.sh +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/cx_Freeze/hello.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/cx_Freeze/queens.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/cx_Freeze/setup.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/helloworld/foo.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/obfuscate-app.bat +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/obfuscate-app.sh +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/obfuscate-pkg.bat +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/obfuscate-pkg.sh +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pack-obfuscated-scripts.bat +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pack-obfuscated-scripts.sh +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/py2exe/hello.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/py2exe/queens.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/py2exe/setup.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Arithmetic.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Calls.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/CommandLine.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Constructs.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Dict.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Exceptions.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Imports.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Instances.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Lists.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Lookups.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/NewInstances.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Numbers.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Setup.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Strings.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/Tuples.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/With.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/clockres.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/package/__init__.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/package/submodule.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/pybench.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/pybench/systimes.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/simple/queens.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/testmod/hello.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/testmod/queens.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/testpkg/main.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/testpkg/mypkg/__init__.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/examples/testpkg/mypkg/foo.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/helper/__init__.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/helper/build_data_module.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/helper/buildext.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/helper/get_bind_key.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/helper/get_license_info.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/helper/get_platform_name.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/helper/merge.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/helper/repack.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/helper/superuntime.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/license.tri +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/packer.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/platforms/darwin/x86_64/_pytransform.dylib +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/platforms/linux/x86/_pytransform.so +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/platforms/linux/x86_64/_pytransform.so +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/platforms/windows/x86/_pytransform.dll +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/platforms/windows/x86_64/_pytransform.dll +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/plugins/README.md +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/plugins/check_ntp_time.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/polyfills/__init__.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/polyfills/argparse.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/product.key +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/project.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/protect_code.pt +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/protect_code2.pt +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/public.key +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/public_capsule.zip +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/pyarmor-deprecated.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/pyarmor-webui.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/pyarmor.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/pyimcore.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/pyshield.key +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/pyshield.lic +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/pytransform.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/reform.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/register.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/sppmode.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor/utils.py +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor.egg-info/SOURCES.txt +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor.egg-info/dependency_links.txt +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor.egg-info/entry_points.txt +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor.egg-info/requires.txt +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/pyarmor.egg-info/top_level.txt +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/setup.cfg +0 -0
- {pyarmor-8.5.10 → pyarmor-8.5.12}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: pyarmor
|
|
3
|
-
Version: 8.5.
|
|
3
|
+
Version: 8.5.12
|
|
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
|
|
@@ -238,8 +238,8 @@ def cmd_gen(ctx, args):
|
|
|
238
238
|
packer = Repacker(ctx, args.pack, options['inputs'], args.output)
|
|
239
239
|
packer.check()
|
|
240
240
|
builder.process(options, packer=packer)
|
|
241
|
-
packer.build()
|
|
242
241
|
Plugin.post_build(ctx, pack=args.pack)
|
|
242
|
+
packer.build()
|
|
243
243
|
else:
|
|
244
244
|
builder.process(options)
|
|
245
245
|
Plugin.post_build(ctx)
|
|
@@ -304,6 +304,7 @@ def cmd_reg(ctx, args):
|
|
|
304
304
|
logger.error('invalid registeration file "%s"', regfile)
|
|
305
305
|
raise CliError('please use ".zip" file to register group device')
|
|
306
306
|
regsvr = WebRegister(ctx)
|
|
307
|
+
regsvr.check_request_interval()
|
|
307
308
|
regsvr.register_group_device(regfile, args.device)
|
|
308
309
|
logger.info('The device regfile has been generated successfully')
|
|
309
310
|
|
|
@@ -315,6 +316,7 @@ def cmd_reg(ctx, args):
|
|
|
315
316
|
|
|
316
317
|
else:
|
|
317
318
|
regsvr = WebRegister(ctx)
|
|
319
|
+
regsvr.check_request_interval()
|
|
318
320
|
info, msg = regsvr.prepare(regfile, args.product, upgrade=upgrade)
|
|
319
321
|
prompt = 'Are you sure to continue? (yes/no) '
|
|
320
322
|
if args.confirm:
|
|
@@ -335,19 +337,7 @@ def cmd_reg(ctx, args):
|
|
|
335
337
|
|
|
336
338
|
|
|
337
339
|
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')
|
|
340
|
+
logging.info('This feature is still developing ...')
|
|
351
341
|
|
|
352
342
|
|
|
353
343
|
def main_parser():
|
|
@@ -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)
|
|
@@ -209,12 +209,20 @@ class Context(object):
|
|
|
209
209
|
return cfg
|
|
210
210
|
|
|
211
211
|
def _named_config(self, name, encoding=None):
|
|
212
|
-
|
|
213
|
-
|
|
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)]
|
|
214
222
|
return self._read_config(flist, encoding=encoding)
|
|
215
223
|
|
|
216
224
|
def read_token(self):
|
|
217
|
-
for filename in (self.
|
|
225
|
+
for filename in (self.license_group_token, self.license_token):
|
|
218
226
|
if os.path.exists(filename):
|
|
219
227
|
with open(filename, 'rb') as f:
|
|
220
228
|
return f.read()
|
|
@@ -269,7 +277,8 @@ class Context(object):
|
|
|
269
277
|
if self.cfg.has_section(extra_sect):
|
|
270
278
|
options.update(self.cfg.items(extra_sect))
|
|
271
279
|
if name:
|
|
272
|
-
|
|
280
|
+
# If input path is '.', package name will start with '..'
|
|
281
|
+
cfg = self._named_config(name.strip('.') + '.ruler')
|
|
273
282
|
if cfg.has_section(sect):
|
|
274
283
|
options.update(cfg.items(sect))
|
|
275
284
|
return options
|
|
Binary file
|
|
Binary file
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
;; Pyarmor version
|
|
4
4
|
major = 8
|
|
5
5
|
minor = 5
|
|
6
|
-
patch =
|
|
6
|
+
patch = 12
|
|
7
7
|
|
|
8
8
|
;; Compatible core version
|
|
9
9
|
cli.core = 6.5.3
|
|
@@ -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,7 @@ clear_frame_locals = 0
|
|
|
193
205
|
;; Whether encrypt name in statement import
|
|
194
206
|
rft_mix_import_name = 0
|
|
195
207
|
|
|
208
|
+
;; Unused, now this option isn't used
|
|
196
209
|
;; Strip leading name package
|
|
197
210
|
strip_package_name = 1
|
|
198
211
|
|
|
@@ -398,7 +411,7 @@ enable_comprehension = 1
|
|
|
398
411
|
|
|
399
412
|
[windows.x86_64.bcc]
|
|
400
413
|
cc = clang.exe
|
|
401
|
-
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=x86_64-elf-windows -c
|
|
414
|
+
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=x86_64-elf-windows -c -DENABLE_BCC_MEMSET
|
|
402
415
|
|
|
403
416
|
[windows.x86.bcc]
|
|
404
417
|
cc = clang.exe
|
|
@@ -417,7 +430,7 @@ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables
|
|
|
417
430
|
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector -shared -nostdlib -Tlinux.armv7.ldscript
|
|
418
431
|
|
|
419
432
|
[darwin.x86_64.bcc]
|
|
420
|
-
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=x86_64-elf-gnu_linux -fPIC -c
|
|
433
|
+
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=x86_64-elf-gnu_linux -fPIC -c -DENABLE_BCC_MEMSET
|
|
421
434
|
|
|
422
435
|
[darwin.aarch64.bcc]
|
|
423
436
|
cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=arm64-macho-darwin -fPIC -fno-addrsig -fno-stack-protector -shared -nostdlib -lsystem
|
|
@@ -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'):
|
|
@@ -357,6 +362,24 @@ class WebRegister(Register):
|
|
|
357
362
|
conn.request("GET", url[k:])
|
|
358
363
|
return conn.getresponse()
|
|
359
364
|
|
|
365
|
+
def check_request_interval(self, delta=30.0):
|
|
366
|
+
"""Make sure no more than 2 requests in 1 minute"""
|
|
367
|
+
tspath = os.path.join(self.ctx.reg_path, 'last_register')
|
|
368
|
+
try:
|
|
369
|
+
st = os.stat(tspath)
|
|
370
|
+
except FileNotFoundError:
|
|
371
|
+
os.makedirs(tspath)
|
|
372
|
+
else:
|
|
373
|
+
from time import sleep, time
|
|
374
|
+
d = delta - (time() - st.st_mtime)
|
|
375
|
+
if d > 0:
|
|
376
|
+
logger.info('last register was within %d seconds, '
|
|
377
|
+
'waiting for %d seconds', delta, d)
|
|
378
|
+
while time() - st.st_mtime < delta:
|
|
379
|
+
logger.info('waiting ...')
|
|
380
|
+
sleep(3.0)
|
|
381
|
+
os.utime(tspath)
|
|
382
|
+
|
|
360
383
|
def _send_request(self, url, timeout=6.0):
|
|
361
384
|
try:
|
|
362
385
|
return self._request(url)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 1.1
|
|
2
2
|
Name: pyarmor
|
|
3
|
-
Version: 8.5.
|
|
3
|
+
Version: 8.5.12
|
|
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
|
|
Binary file
|
|
Binary file
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|