pyarmor.cli 9.2.6__3-py3-none-any.whl

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.
Binary file
Binary file
Binary file
@@ -0,0 +1,564 @@
1
+ [pyarmor]
2
+
3
+ ;; Pyarmor version
4
+ major = 9
5
+ minor = 2
6
+ patch = 6
7
+
8
+ ;; Compatible core version for package: pyarmor.cli.core
9
+ cli.core = 8.1.1
10
+
11
+ ;; Compatible core version for package: pyarmor.mini
12
+ ;; Which is required to run MINI, VMC, or ECC mode scripts
13
+ mini.core = 3.0
14
+
15
+ ;; Deprecated since Pyarmor 8.2.5
16
+ ; cli.runtime = 3.2.5
17
+
18
+ ;; Default timeout when send request to remote server for
19
+ ;; check Pyarmor license
20
+ ;; register Pyarmor license
21
+ timeout = 6
22
+
23
+ regurl = https://api.dashingsoft.com/product/key/enter/%s/?
24
+ buyurl = https://jondy.github.io/paypal/index.html
25
+ docurl = https://pyarmor.readthedocs.io/{lang}/latest
26
+
27
+ [finder]
28
+ recursive = 0
29
+ ;; includes =
30
+ excludes = */__pycache__
31
+ pyexts = .py .pyw
32
+
33
+ ;; Data files need to copy to output path
34
+ ;; *.txt only copy .txt file
35
+ ;; * means all data files
36
+ ;; 0 means nothing to copy
37
+ data_files = 0
38
+
39
+ ;;
40
+ ;; How to find dependent packages
41
+ ;;
42
+ findall = 0
43
+
44
+ [builder]
45
+ ;;
46
+ ;; Part 1: only global/local settings, not in module level
47
+ ;;
48
+
49
+ ;; File encoding to read scripts
50
+ encoding = utf-8
51
+
52
+ ;; Trace obfuscation
53
+ enable_trace = 0
54
+
55
+ ;; Use Themida to protect runtime package in windows
56
+ enable_themida = 0
57
+
58
+ ;; Import prefix to import runtime package
59
+ import_prefix = 0
60
+
61
+ ;; Sometimes __file__ is not defined, replace it with __name__ to fix this issue
62
+ bootstrap_file = __file__
63
+
64
+ ;; Exclude co objects by co_name
65
+ exclude_co_names = <lambda> <listcomp> <setcomp> <dictcomp> <genexpr>
66
+
67
+ ;; Common modules which are no restrict
68
+ exclude_restrict_modules = __init__
69
+
70
+ ;; Outer key name
71
+ outer_keyname = pyarmor.rkey
72
+
73
+ ;; The final marker is "# %s: " % VALUE
74
+ ;; If VALUE == "false", then disable inline plugin
75
+ inline_plugin_marker = pyarmor
76
+
77
+ ;; Default plugins
78
+ plugins = CodesignPlugin DarwinUniversalPlugin
79
+
80
+ ;; Using shared runtime package
81
+ ; use_runtime = /path/to/runtime
82
+
83
+ ;; How many loops for jit iv
84
+ jit_iv_threshold = 100
85
+
86
+ ;; Now "argument" is not available
87
+ rft_enables = builtin import function class method global local
88
+
89
+ ;; Exclude unknown attrs automically
90
+ ; 0 disable auto exclude, use auto include
91
+ ; 1 auto exclude and load .pyarmor/rft/exclude_table
92
+ ; 2 auto exclude but not load exclude_table
93
+ rft_auto_exclude = 1
94
+
95
+ ;; Export all the names in module attribute __all__
96
+ ;; It means leave all the names in the __all__ as they're
97
+ rft_auto_export = 1
98
+
99
+ ;; Enable dev mode for rft
100
+ rft_dev_mode = 0
101
+
102
+ ;; Export module and classes
103
+ ; rft_export_names = pkg.mod pkg.mod.cls pkg.mod.attr
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
+
110
+ ;; Extra paths to find dependent package
111
+ ; pypaths =
112
+
113
+ ;; List module names couldn't be found automically
114
+ ; hidden_imports =
115
+
116
+ ;; If it's enabled, disable some features to make scripts work with nuitka
117
+ ;; convenient settings for nuitka, but now it's TBD
118
+ ; support_nuitka = 0
119
+
120
+ ;; Group device flag for machine id
121
+ group_device_flag = 22
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
+
130
+ ;;
131
+ ;; Part 2: global/local/module level options
132
+ ;;
133
+
134
+ ;; The argument optimize specifies the optimization level of the
135
+ ;; compiler; the default value of -1 selects the optimization level of
136
+ ;; the interpreter as given by -O options. Explicit levels are 0 (no
137
+ ;; optimization; __debug__ is true), 1 (asserts are removed, __debug__
138
+ ;; is false) or 2 (docstrings are removed too).
139
+ optimize = -1
140
+
141
+ ;; It's not used now
142
+ type_comments = false
143
+
144
+ ;; Write refactor result scripts
145
+ trace_rft = 0
146
+
147
+ enable_jit = 0
148
+ enable_bcc = 0
149
+ enable_rft = 0
150
+
151
+ ;; Not implemented
152
+ ;; Enable opcode virtual protection
153
+ ;; This feature is meaningless in BCC mode
154
+ enable_vmc = 0
155
+
156
+ ;; New in v9.2.0
157
+ ;; Enable to obfuscate attribute name
158
+ ;; When obf_code == 2, it's enabled implicitly
159
+ mix_attr = 0
160
+
161
+ ;; assert: call import
162
+ assert_call = 0
163
+ assert_import = 0
164
+
165
+ ;; mix string constant
166
+ mix_str = 0
167
+
168
+ ;; hide function name in traceback
169
+ ;; 1: hide function.__name__
170
+ ;; 2: also hide function.__qualname__ (not implemented)
171
+ mix_coname = 0
172
+
173
+ ;; mix local variables
174
+ mix_localnames = 1
175
+
176
+ ;; mix argument names, it also clears annotations
177
+ mix_argnames = 0
178
+
179
+ ;; Obfuscate the whole module
180
+ obf_module = 1
181
+
182
+ ;; Obfuscate each code object
183
+ ;;
184
+ ;; 0: no obfuscation for each co
185
+ ;; 1: obfuscate each co
186
+ ;; 2: obfuscate each co plus mix attribute name
187
+ ;; this is deprecated since 9.2.0, use
188
+ ;; obf_code == 1 and mix_attr = 1
189
+ obf_code = 1
190
+
191
+ ;; 0: no wrap mode
192
+ ;; 1: simple wrap mode
193
+ ;; 2: full wrap mode
194
+ ;; Since Python 3.12, "2" is same as "1", both of them use full wrap mode
195
+ wrap_mode = 1
196
+
197
+ ;; 1: the obfuscated scripts can't be modified
198
+ ;; 2: private module, can't be imported by plain scripts
199
+ ;; 3: restrict module, module attribute is hidden for outer scripts
200
+ ;;
201
+ restrict_module = 1
202
+
203
+ ;; if set to 1, module attribute can't be written by plain scripts
204
+ readonly_module = 0
205
+
206
+ ;;
207
+ ;; Advanced features
208
+ ;;
209
+
210
+ ;; check license when importing each module
211
+ import_check_license = 0
212
+
213
+ ;; clear module co after importing
214
+ clear_module_co = 1
215
+
216
+ ;; clear frame.f_locals for wrap mode, it's meanless for non-wrap mode
217
+ clear_frame_locals = 0
218
+
219
+ ;; Model level to rename attributes ruler
220
+ ;;
221
+ ;; x.y.z:?.%.z
222
+ ;;
223
+ ;; ? auto map
224
+ ;; % force rename
225
+ ;;
226
+ ; rft_rulers =
227
+
228
+ ;; Model level to exclude names
229
+ ; rft_excludes =
230
+
231
+ ;; Whether encrypt name in statement import
232
+ rft_mix_import_name = 0
233
+
234
+ ;; Unused, now this option isn't used
235
+ ;; Strip leading name package
236
+ strip_package_name = 1
237
+
238
+ ;; Enable ProcessPoolExecuter to generate the obfuscated scripts
239
+ ;;
240
+ ;; 0: normal build
241
+ ;; 1: use ProcessPoolExecutor with max_workers=None
242
+ ;; N > 1: use ProcessPoolExecutor with max_workers=N
243
+ max_workers = 0
244
+
245
+ ;;
246
+ ;; Compatiable options
247
+ ;;
248
+
249
+ ;; Since pyarmor 8.5.3, pyarmor.core 6.5.1
250
+ ;;
251
+ ;; If private_module_same_as_restrict is set to 1, --private is same as --restrict, it's default behaviours in previous version. Both --private and --restrict don't allow plain scripts to import the obfsucated modules
252
+ ;;
253
+ ;; But the right way should be
254
+ ;;
255
+ ;; --private allow
256
+ ;; --restrict not allow
257
+ ;;
258
+ ;; When need this behaviours, set private_module_same_as_restrict is to 0
259
+ ;;
260
+ private_module_same_as_restrict = 0
261
+
262
+ [runtime]
263
+
264
+ ;; Generate extension for all Python3.7+
265
+ universal = 0
266
+
267
+ ;; Default runtime package name
268
+ package_name_format = pyarmor_runtime_{suffix}
269
+
270
+ ;; The file ext only keep .so/.pyd, for example
271
+ ;; pyarmor_runtime.cpython-37m-darwin.so
272
+ ;; if simple_extension_name == 1 then
273
+ ;; pyarmor_runtime.so
274
+ simple_extension_name = 1
275
+
276
+ ;; Whether patching extension to embedded runtime key
277
+ ;;
278
+ ;; 0: do not patch extension, but store runtime key to one file
279
+ ;; 1: runtime key is embedded into extension
280
+ ;;
281
+ ;; The purpose is to solve code sign issue for Darwin platform
282
+ ;; Do not patch extension will keep code sign, so need not re-sign
283
+ ;; But it need an extra file.
284
+ ;;
285
+ ;; Note: it's different from outer runtime key.
286
+ ;;
287
+ patch_extension = 1
288
+
289
+ ;; Obfuscate runtime key
290
+ ;; 0: no obfuscation
291
+ ;; 1: simple obfuscation
292
+ ;;
293
+ obf_key_mode = 0
294
+
295
+ ;; Enable outer runtime key
296
+ outer = 0
297
+
298
+ ;; Pyarmor raises PyExc_RuntimeError by default
299
+ ;; 0 raise PyExc_RuntimeError
300
+ ;; 1 raise PyExc_SystemExit
301
+ ;; 2 call libc exit to quit directly
302
+ on_error = 0
303
+
304
+ ;; Check runtime key periodically, support formats:
305
+ ;; 3600s
306
+ ;; 60m
307
+ ;; 1h
308
+ ;; 1 = 1h
309
+ ; period = 1
310
+
311
+ ;; Expired runtime key, support 2 forms:
312
+ ;;
313
+ ;; 30: expired in 30 days
314
+ ;; 2025-12-31
315
+ ;;
316
+ ; expired =
317
+
318
+ ;; Check network time by those servers
319
+ ;;
320
+ ;; Support formats:
321
+ ;;
322
+ ;; [and,]host1,host2,...
323
+ ;;
324
+ ;; If host is start with "http://", then send http request, otherwise use ntp protocol
325
+ ;;
326
+ ;; If host is special name "local", return local time
327
+ ;;
328
+ ;; If there are many hosts, first request host1, if not get response, then request host2, ...
329
+ ;;
330
+ ;; If there is leading "and,", then check all the hosts and return the largest timestamp
331
+ ;;
332
+ ;; For example,
333
+ ;;
334
+ ;; pool.ntp.org
335
+ ;; http://www.ntp.org
336
+ ;; http://146.75.112.223
337
+ ;; pool.ntp.org,http://worldtimeapi.org/api
338
+ ;; pool.ntp.org,http://worldtimeapi.org/api,local
339
+ ;; and,pool.ntp.org,http://worldtimeapi.org/api,local
340
+ ;;
341
+ nts = local
342
+ nts_timeout = 3
343
+
344
+ ;; Bind runtime key to multiple devices, one line one machine
345
+ ; devices =
346
+
347
+ ;; Bind runtime key to Python interperter. Each line defines a rule,
348
+ ;; match all the rules. The rule formats
349
+ ;;
350
+ ;; D
351
+ ;; S: symbol start end xxxxxx(md5)
352
+ ;;
353
+ ; interps =
354
+
355
+ ;; Insert runtime hooks
356
+ ; hooks = hooks.py
357
+
358
+ ;; Enable timer
359
+ timer = 0
360
+
361
+ ;; Target platforms
362
+ ; platforms =
363
+
364
+ ;; If there are customized runtime messages
365
+ messages = messages.cfg:utf-8
366
+
367
+ [assert.call]
368
+ ;; and: function is in obfuscated script and match ruler
369
+ ;; or: function is in obfuscated script or match ruler
370
+ auto_mode = and
371
+
372
+ ; includes =
373
+ ; excludes =
374
+
375
+ [assert.import]
376
+ ;; and: module is obfuscated and match ruler
377
+ ;; or: module is obfuscated or match ruler
378
+ auto_mode = and
379
+
380
+ ; includes =
381
+ ; excludes =
382
+
383
+ [mix.str]
384
+ ;; do not mix short string len(s) < this value
385
+ threshold = 8
386
+
387
+ ; includes =
388
+ ; excludes =
389
+
390
+ [pack]
391
+ ;; For Darwin to code sign binary file
392
+ ; codesign_identify =
393
+
394
+ ;; Strip output path to match archive info
395
+ strip = 0
396
+
397
+ ;; How to do when the obfuscated module has no matched .pyc in bundle
398
+ ;; error, issue a error and exit
399
+ ;; warning, issue a warning and continue
400
+ ;; ignore, do nothing
401
+ ;; append, append it to archive
402
+ no_matched_pyc = error
403
+
404
+ ;; Extra options to call PyInstaller when packing the obfuscated scripts
405
+ ;; One option one line, name and value separted by one whitespace
406
+ ;; For example
407
+ ;;
408
+ ;; pyi_options = -w
409
+ ;; --add-data default.cfg:.
410
+ ;; --icon myapp.ico
411
+ ;;
412
+ ;; The following options could not be used here:
413
+ ;;
414
+ ;; --distpath, --workpath, --specpath
415
+ ;;
416
+ ; pyi_options =
417
+
418
+ [bcc]
419
+ unsupported_functions = exec eval super locals __assert_armored__
420
+ unsupported_nodes = AsyncFunctionDef AsyncFor AsyncWith Await Yield YieldFrom GeneratorExp NamedExpr MatchValue MatchSingleton MatchSequence MatchMapping MatchClass MatchStar MatchAs MatchOr
421
+
422
+ ;; Include and exclude function/method names
423
+ ; includes =
424
+ ; excludes =
425
+
426
+ ;; Use opcode CALL_FUNCTION_EX to patch call
427
+ ;; Global option, all scripts must be same
428
+ call_function_ex = 0
429
+
430
+ ;; Generate bcc function to show right lineno in traceback
431
+ ;; If disable, lineno is always function definition lineno
432
+ trace_lineno = 0
433
+
434
+ keep_nest_name = 0
435
+
436
+ ;; Do not convert lambda to bcc
437
+ ignore_lambda = 0
438
+
439
+ ;; Use op_mkfunc2 to build unsupported functions
440
+ enable_pure_function = 1
441
+
442
+ ;; Convert comprehensions to bcc code
443
+ enable_comprehension = 1
444
+
445
+ [windows.x86_64.bcc]
446
+ cc = clang.exe
447
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=x86_64-elf-windows -c -DENABLE_BCC_MEMSET
448
+
449
+ [windows.x86.bcc]
450
+ cc = clang.exe
451
+ cflags = --target=i686-elf-linux -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector -fPIC -mno-sse -std=c99 -c
452
+
453
+ [linux.x86_64.bcc]
454
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fPIC -fno-stack-protector -c
455
+
456
+ [linux.aarch64.bcc]
457
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fPIC -fno-stack-protector -shared -nostdlib -DENABLE_BCC_MEMSET -Tlinux.aarch64.ldscript
458
+
459
+ [linux.x86.bcc]
460
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector -fPIC -c
461
+
462
+ [linux.armv7.bcc]
463
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector -shared -nostdlib -Tlinux.armv7.ldscript
464
+
465
+ [darwin.x86_64.bcc]
466
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=x86_64-elf-gnu_linux -fPIC -c -DENABLE_BCC_MEMSET
467
+
468
+ [darwin.aarch64.bcc]
469
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables --target=arm64-macho-darwin -fPIC -fno-addrsig -fno-stack-protector -shared -nostdlib -lsystem
470
+
471
+ [android.x86_64.bcc]
472
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fPIC -fno-stack-protector -c
473
+
474
+ [android.aarch64.bcc]
475
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fPIC -fno-stack-protector -shared -nostdlib -DENABLE_BCC_MEMSET -Tlinux.aarch64.ldscript
476
+
477
+ [android.x86.bcc]
478
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector -fPIC -c
479
+
480
+ [android.armv7.bcc]
481
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-stack-protector -shared -nostdlib -Tlinux.armv7.ldscript
482
+
483
+ [alpine.x86_64.bcc]
484
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fPIC -fno-stack-protector -c
485
+
486
+ [alpine.aarch64.bcc]
487
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fPIC -fno-stack-protector -shared -nostdlib -DENABLE_BCC_MEMSET -Tlinux.aarch64.ldscript
488
+
489
+ [freebsd.x86_64.bcc]
490
+ cflags = -O3 -Wno-unsequenced -fno-asynchronous-unwind-tables -fno-unwind-tables -fPIC -fno-stack-protector -c
491
+
492
+ ;;;;;;;;;;;;;;;;;;;;;;
493
+ ;;
494
+ ;; Logging settings
495
+ ;;
496
+ ;;;;;;;;;;;;;;;;;;;;;;
497
+ [loggers]
498
+ keys=root,cli,trace,bug
499
+
500
+ [handlers]
501
+ keys=console,trace,debug,bug
502
+
503
+ [formatters]
504
+ keys=console,debug,trace,bug
505
+
506
+ [logger_root]
507
+ handlers=console
508
+
509
+ [logger_cli]
510
+ level=INFO
511
+ handlers=console,debug
512
+ qualname=cli
513
+ propagate=0
514
+
515
+ [logger_trace]
516
+ level=ERROR
517
+ handlers=trace
518
+ qualname=trace
519
+ propagate=0
520
+
521
+ [logger_bug]
522
+ level=INFO
523
+ handlers=bug
524
+ qualname=cli.bug
525
+ propagate=0
526
+
527
+ [handler_console]
528
+ class=StreamHandler
529
+ level=INFO
530
+ formatter=console
531
+ args=(sys.stderr,)
532
+
533
+ [handler_debug]
534
+ class=FileHandler
535
+ level=CRITICAL
536
+ formatter=debug
537
+ args=('pyarmor.debug.log', 'w')
538
+ kwargs={'delay': True}
539
+
540
+ [handler_trace]
541
+ class=FileHandler
542
+ level=DEBUG
543
+ formatter=trace
544
+ args=('pyarmor.trace.log', 'w')
545
+ kwargs={'delay': True}
546
+
547
+ [handler_bug]
548
+ class=FileHandler
549
+ level=INFO
550
+ formatter=bug
551
+ args=('pyarmor.bug.log', 'w')
552
+ kwargs={'delay': True}
553
+
554
+ [formatter_console]
555
+ format=%(levelname)-8s %(message)s
556
+
557
+ [formatter_debug]
558
+ format=%(asctime)s %(message)s
559
+
560
+ [formatter_trace]
561
+ format=%(name)-20s %(message)s
562
+
563
+ [formatter_bug]
564
+ format=%(message)s