python-obfuscator 1.0.0

Python Obfuscator Web API interface can help you obfuscate and protect Python .py source code against analysis, reverse engineering and technology theft. Python Obfuscator provides advanced Python source code parsing based on AST trees, multiple advanced obfuscation, virtualization and protection strategies are available.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
# Python Obfuscator — Obfuscate, Virtualize & Protect Python Code

**[Python Obfuscator](https://www.pelock.com/products/python-obfuscator)** is a tool to obfuscate, virtualize & protect Python `.py` scripts against reverse engineering with a VM engine (or finite-state automata machine), self-defending integrity checks, polymorphic string encryption, anti-debugging, anti-vm, anti-emulation and 50+ total obfuscation strategies!

It's available for Windows & Linux, plus VSCode/Cursor extension:

* https://www.pelock.com/products/python-obfuscator/download

Multiple programming APIs available:

* https://www.pelock.com/products/python-obfuscator/api

An online obfuscator interface:

* https://www.pelock.com/python-obfuscator/

## Why Python scripts need obfuscation?

Scripts are typically distributed as plain `.py` files or bundled inside packages. That convenience means anyone with file access can read the full logic, hunt for credentials or API keys in strings, and steal your algorithms unless you take extra steps to hide intent.

[Python](https://www.python.org/) is one of the most popular general-purpose scripting languages. It is widely used for automation, backend services, data processing, tooling, and licensing/agent code that customers run on their own machines.

## Obfuscation strategies

Python Obfuscator comes with many advanced obfuscation, virtualization & protection strategies. You can easily tune protection versus size and performance.

![Python Obfuscation options](https://www.pelock.com/img/en/products/python-obfuscator/python-obfuscator-virtualizer-obfuscation-options.png)

### ![Obfuscation](https://www.pelock.com/img/en/icons/obfuscation-32.png) Powerful obfuscation

Polymorphic string encryption is the core of the string pipeline: each build generates a fresh decryptor so literals never share one static algorithm. Integers, floats, and decoy noise join that layer. The result conceals literals and structure while preserving tested runtime behaviour.

### ![Processor](https://www.pelock.com/img/en/icons/processor-32.png) Code virtualization

Code virtualization is the main control-flow defense. Selected statements are lifted into a randomly generated VM engine (or FSA / flattened dispatcher) with shuffled dispatch tables, decoy opcodes, and an obfuscated dispatcher loop. Analysts must interpret the virtual machine instead of reading plain Python.

### ![Node](https://www.pelock.com/img/en/icons/node-32.png) Finite-state automata (FSA)

Finite-state automata (FSA) obfuscation rewrites linear Python statement blocks into dual-state automata with opaque schedulers and shuffled dispatch handlers. Instead of reading code top to bottom, analysts must follow numeric states, transition tables, and decoy paths to reconstruct the original order.

### ![Bug](https://www.pelock.com/img/en/icons/bug-32.png) Anti-debugging

Anti-debugging protection inserts polymorphic probes that detect attached debuggers, tracing hooks, and related host signals, together with anti-VM, anti-sandbox and anti-emulator checks. When a check fires, the obfuscated script exits silently instead of revealing protected logic under interactive analysis.

### ![System monitor](https://www.pelock.com/img/en/icons/system-monitor-32.png) Self-integrity checks

Self-defending integrity checks verify that the obfuscated file has not been patched. A bootstrap probe hashes the on-disk script and sets a tamper key when it no longer matches the obfuscated build. String decryptors consume that key, so edited scripts return garbage instead of plaintext.

### ![Brick link](https://www.pelock.com/img/en/icons/brick-link-32.png) Protection linker

The protection linker adds decoy functions and fake calls so a copied fragment still looks like real program code. Hidden traps fire only if someone edits the file or runs a piece of it on its own. When the script starts normally, those extras stay silent and the program runs as usual.

## Before and after obfuscation

Look at this example — the same script becomes harder to read at a glance after obfuscation.

### Sample Python script before obfuscation

```python
label = 'SecretKey'
port = 443

def get_sum(a, b):
    return a + b

print(label, port)
r = get_sum(11, 31)
print(r)
```

### After obfuscation

![Obfuscated Python script](https://www.pelock.com/img/en/products/python-obfuscator/python-obfuscator-virtualizer-obfuscated-virtualized-python-code.png)

Would you still recognise the original intent if you only had the obfuscated text and no prior copy of the script?

### How does Python Obfuscator work?

The engine parses Python source into an AST tree, then applies selectable transforms. Code virtualization (VM, FSA, or flattening) rewrites execution so analysts cannot read the script top to bottom. Polymorphic string encryption hides literals; self-defending integrity probes detect patched files. Also available: identifier renaming, numeric encryption, noise and decoy insertion, the protection linker, and anti-debugging checks. Many techniques are specific to this product; some ideas are shared with our other protection tools.

![Python Obfuscator Pipeline](https://www.pelock.com/img/en/products/python-obfuscator/python-obfuscator-obfuscation-pipeline.png)

When all passes finish, the engine emits a new `.py` file. Edge cases in the Python grammar and hosting environments mean you should always test the output in your target runtime.

## Protect your Python scripts & algorithms

Take no chances, use **Python Obfuscator** to obfuscate, virtualize and protect your Python scripts and algorithms.

Our company has a long history in obfuscation technologies and code obfuscators (see our [PowerShell](https://www.pelock.com/products/powershell-pro-obfuscator), [Java](https://www.pelock.com/products/jobfuscator), [AutoIt](https://www.pelock.com/products/autoit-obfuscator), [x86 Assembly](https://www.pelock.com/products/obfuscator) &  obfuscators).

We actively bugfix, research and develop new obfuscation strategies for our tools.

You can count on our expertise and support in this field.

### Installation

The preferred way of WebApi interface installation is via [crates.io](https://crates.io/).

Run:

```bash
cargo add python-obfuscator
```

Or add this entry directly to your `Cargo.toml` in `[dependencies]`:

```toml
python-obfuscator = "1.0.0"
```

The crate is available at https://crates.io/crates/python-obfuscator

From a checkout of this repository you can run the included examples, for example:

```bash
cargo run --example python-obfuscator-example-simple
```

### Example of obfuscating Python script source code using default options

```rust
/******************************************************************************
 * Python Obfuscator WebApi interface usage example.
 *
 * In this example we will obfuscate sample source with default options.
 *
 * Version        : v1.0.0
 * Language       : Rust
 * Author         : Bartosz Wójcik
 * Web page       : https://www.pelock.com
 *
 *****************************************************************************/

use python_obfuscator::{PythonObfuscator, PythonObfuscatorResponse};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    //
    // include Python Obfuscator class
    //

    //
    // when developing from a repository clone without installing the package use:
    //
    // use python_obfuscator::{PythonObfuscator, PythonObfuscatorResponse};
    // (path dependency in Cargo.toml pointing to this crate)

    //
    // create Python Obfuscator class instance (we are using our activation key)
    //
    let my_python_obfuscator =
        PythonObfuscator::new(Some("ABCD-ABCD-ABCD-ABCD".to_string()));

    //
    // source code in Python format
    //
    let script_source_code = r#"label = 'SecretKey'
port = 443

def get_sum(a, b):
    return a + b

print(label, port)
r = get_sum(11, 31)
print(r)"#;

    //
    // by default all obfuscation options are enabled, so we can just simply call:
    //
    let result = my_python_obfuscator
        .obfuscate_script_source(script_source_code, true)
        .await;

    //
    // it's also possible to pass a Python script file path instead of a string e.g.
    //
    // let result = my_python_obfuscator
    //     .obfuscate_script_file(std::path::Path::new("/path/to/project/script.py"), true)
    //     .await;

    //
    // result object holds the obfuscation results as well as other information
    //
    // result.error         - error code
    // result.output        - obfuscated code
    // result.demo          - demo mode (empty/invalid key); strategy flags ignored; always integers_to_arrays, mba_binops, encrypt_strings (no virt; 1000 char limit)
    // result.license_expiration - license end date (Y-m-d), empty if none
    // result.usages_total  - total obfuscations for this activation code
    //
    match result {
        Some(PythonObfuscatorResponse::Object(obj)) => {
            //
            // display obfuscated code
            //
            if obj.error == PythonObfuscator::ERROR_SUCCESS {
                println!("{}", obj.output.unwrap_or_default());
            } else {
                return Err(
                    format!("An error occurred, error code: {}", obj.error).into(),
                );
            }
        }
        Some(PythonObfuscatorResponse::Json(_)) => {}
        None => {
            return Err("Something unexpected happen while trying to obfuscate the code.".into());
        }
    }

    Ok(())
}

```

### An example of obfuscating Python script source code with customized obfuscation strategies

```rust
/******************************************************************************
 * Python Obfuscator WebApi interface usage example.
 *
 * In this example we will obfuscate sample source with every public option
 * set, so you can see the full client surface and turn flags on or off.
 *
 * Version        : v1.0.0
 * Language       : Rust
 * Author         : Bartosz Wójcik
 * Web page       : https://www.pelock.com
 *
 *****************************************************************************/

use python_obfuscator::{
    CodeVirtualization, PythonObfuscator, PythonObfuscatorResponse, RenameStyle,
};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    //
    // include Python Obfuscator class
    //

    //
    // when developing from a repository clone without installing the package use:
    //
    // use python_obfuscator::{PythonObfuscator, PythonObfuscatorResponse};
    // (path dependency in Cargo.toml pointing to this crate)

    //
    // create Python Obfuscator class instance (we are using our activation key)
    //
    let mut my_python_obfuscator =
        PythonObfuscator::new(Some("ABCD-ABCD-ABCD-ABCD".to_string()));

    //
    // should the source code be compressed (both input & compressed)
    //
    my_python_obfuscator.enable_compression = false;

    //
    // globals
    //
    // fixed random seed for reproducible obfuscation output (optional)
    //
    my_python_obfuscator.seed = None;

    //
    // randomization density / intensity (0-100)
    //
    my_python_obfuscator.randomization_density = None;

    //
    // identifier renaming style: RenameStyle::Il, O0, Confusable, Hex, Homoglyph, or Mangled
    //
    my_python_obfuscator.rename_style = Some(RenameStyle::Il);

    //
    // code virtualization (exactly one): Vm, Fsa, or Flat
    // set to None to skip virtualization
    //
    my_python_obfuscator.code_virtualization = Some(CodeVirtualization::Vm);

    //
    // protection (opt-in on the service for --all; shown enabled here so every flag is visible)
    //
    // protection against tampering with protected code (integrity verification)
    //
    my_python_obfuscator.self_defending = true;

    //
    // protection linker (decoy call graph; requires self_defending)
    //
    my_python_obfuscator.protection_linker = true;

    //
    // insert anti-debugging detections
    //
    my_python_obfuscator.detect_debugger = true;

    //
    // insert virtual machine (anti-VM) detections
    //
    my_python_obfuscator.anti_vm = true;

    //
    // insert anti-sandbox detections
    //
    my_python_obfuscator.anti_sandbox = true;

    //
    // insert anti-emulators (CPU) detections
    //
    my_python_obfuscator.anti_emulator = true;

    //
    // renaming
    //
    // rename variable names to random string values
    //
    my_python_obfuscator.rename_variables = true;

    //
    // rename parameter names to random string values
    //
    my_python_obfuscator.rename_parameters = true;

    //
    // rename function names to random string values
    //
    my_python_obfuscator.rename_functions = true;

    //
    // rename function call references consistently with renamed functions
    //
    my_python_obfuscator.rename_function_calls = true;

    //
    // shuffle function order in the output source
    //
    my_python_obfuscator.shuffle_functions = true;

    //
    // fold/resolve constant expressions at obfuscation time
    //
    my_python_obfuscator.resolve_constants = true;

    //
    // strings
    //
    // split strings into concatenated chunks
    //
    my_python_obfuscator.split_strings = true;

    //
    // apply light transformations/mutations to string literals
    //
    my_python_obfuscator.modify_strings = true;

    //
    // encrypt strings using randomly generated polymorphic encryption algorithms
    //
    my_python_obfuscator.encrypt_strings = true;

    //
    // store string fragments in char-code array vaults
    //
    my_python_obfuscator.string_char_array_vault = true;

    //
    // numeric
    //
    // encrypt integers
    //
    my_python_obfuscator.encrypt_integers = true;

    //
    // encrypt floating point numbers
    //
    my_python_obfuscator.encrypt_floating = true;

    //
    // replace binary operators with mixed boolean-arithmetic (MBA) equivalents
    //
    my_python_obfuscator.mba_binops = true;

    //
    // represent integers via floating-point math
    //
    my_python_obfuscator.integers_to_floating = true;

    //
    // move integers to arrays
    //
    my_python_obfuscator.integers_to_arrays = true;

    //
    // move floats to arrays
    //
    my_python_obfuscator.floats_to_arrays = true;

    //
    // apply redundant xor / affine integer masks
    //
    my_python_obfuscator.affine_integer_mask = true;

    //
    // encrypted array literals
    //
    // encrypt integer array literals
    //
    my_python_obfuscator.array_int_crypt = true;

    //
    // encrypt character array literals
    //
    my_python_obfuscator.array_char_crypt = true;

    //
    // encrypt floating-point array literals
    //
    my_python_obfuscator.array_double_crypt = true;

    //
    // encrypt string array literals
    //
    my_python_obfuscator.array_string_crypt = true;

    //
    // decoy value pools
    //
    // insert a shared bucket of random noise values used by other strategies
    //
    my_python_obfuscator.insert_random_value_bucket = true;

    //
    // populate the random value bucket with decoy integers
    //
    my_python_obfuscator.random_bucket_integers = true;

    //
    // populate the random value bucket with decoy arrays
    //
    my_python_obfuscator.random_bucket_arrays = true;

    //
    // populate the random value bucket with decoy functions
    //
    my_python_obfuscator.random_bucket_functions = true;

    //
    // populate the random value bucket with decoy characters
    //
    my_python_obfuscator.random_bucket_characters = true;

    //
    // populate the random value bucket with anti-regex decoy noise
    //
    my_python_obfuscator.random_bucket_anti_regex = true;

    //
    // populate the random value bucket with autostart decoy stubs
    //
    my_python_obfuscator.random_bucket_autostart = true;

    //
    // opaque predicates & noise
    //
    // rewrite selected statements using ternary operators
    //
    my_python_obfuscator.insert_ternary_operators = true;

    //
    // replace boolean conditions with equivalent complex expressions
    //
    my_python_obfuscator.complexify_booleans = true;

    //
    // insert opaque predicate branches
    //
    my_python_obfuscator.opaque_branches = true;

    //
    // insert opaque mixer chains into control flow
    //
    my_python_obfuscator.opaque_mixer_chain = true;

    //
    // insert dead code
    //
    my_python_obfuscator.insert_dead_code = true;

    //
    // wrap code in try/finally blocks with dead noise
    //
    my_python_obfuscator.try_finally_noise = true;

    //
    // decoys
    //
    // insert decoy functions
    //
    my_python_obfuscator.decoy_functions = true;

    //
    // insert decoy lambda expressions
    //
    my_python_obfuscator.lambda_decoys = true;

    //
    // insert literal padding noise
    //
    my_python_obfuscator.literal_padding = true;

    //
    // insert fake import statement markers
    //
    my_python_obfuscator.fake_import_markers = true;

    //
    // use dynamic getattr()-based indirect calls
    //
    my_python_obfuscator.dynamic_getattr_calls = true;

    //
    // rewrite absolute imports into __import__ / getattr
    //
    my_python_obfuscator.obfuscate_imports = true;

    //
    // insert dead callback/event registration stubs
    //
    my_python_obfuscator.callback_registration_stubs = true;

    //
    // other
    //
    // strip comments from the output source
    //
    my_python_obfuscator.remove_comments = true;

    //
    // source code in Python format
    //
    let script_source_code = r#"label = 'SecretKey'
port = 443

def get_sum(a, b):
    return a + b

print(label, port)
r = get_sum(11, 31)
print(r)"#;

    //
    // obfuscate the source code with the options set above
    //
    let result = my_python_obfuscator
        .obfuscate_script_source(script_source_code, true)
        .await;

    //
    // it's also possible to pass a Python script file path instead of a string e.g.
    //
    // let result = my_python_obfuscator
    //     .obfuscate_script_file(std::path::Path::new("/path/to/project/script.py"), true)
    //     .await;

    //
    // result object holds the obfuscation results as well as other information
    //
    // result.error         - error code
    // result.output        - obfuscated code
    // result.demo          - demo mode (empty/invalid key); strategy flags ignored; always integers_to_arrays, mba_binops, encrypt_strings (no virt; 1000 char limit)
    // result.license_expiration - license end date (Y-m-d), empty if none
    // result.usages_total  - total obfuscations for this activation code
    //
    match result {
        Some(PythonObfuscatorResponse::Object(obj)) => {
            //
            // display obfuscated code
            //
            if obj.error == PythonObfuscator::ERROR_SUCCESS {
                println!("{}", obj.output.unwrap_or_default());
            } else {
                return Err(
                    format!("An error occurred, error code: {}", obj.error).into(),
                );
            }
        }
        Some(PythonObfuscatorResponse::Json(_)) => {}
        None => {
            return Err("Something unexpected happen while trying to obfuscate the code.".into());
        }
    }

    Ok(())
}

```

### Check activation key status

```rust
/******************************************************************************
 * Python Obfuscator WebApi interface usage example.
 *
 * In this example we will verify our activation key status.
 *
 * Version        : v1.0.0
 * Language       : Rust
 * Author         : Bartosz Wójcik
 * Web page       : https://www.pelock.com
 *
 *****************************************************************************/

use python_obfuscator::{PythonObfuscator, PythonObfuscatorResponse};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    //
    // include Python Obfuscator class
    //

    //
    // if you don't want to use crates.io use a path dependency to this crate
    //
    // [dependencies]
    // python-obfuscator = { path = ".." }

    //
    // create Python Obfuscator class instance (we are using our activation key)
    //
    let my_python_obfuscator =
        PythonObfuscator::new(Some("ABCD-ABCD-ABCD-ABCD".to_string()));

    //
    // login to the service
    //
    let result = my_python_obfuscator.login(true).await;

    //
    // result object holds the information about the license
    //
    // result.demo          - demo mode (empty/invalid key); strategy flags ignored; always integers_to_arrays, mba_binops, encrypt_strings (no virt; 1000 char limit)
    // result.license_expiration - license end date (Y-m-d), empty if none
    // result.usages_total  - total obfuscations for this activation code
    // result.string_limit  - max. source code size allowed (it's 1000 bytes for demo mode)
    //
    match result {
        Some(PythonObfuscatorResponse::Object(obj)) => {
            println!(
                "Demo version status - {}",
                if obj.demo.unwrap_or(false) {
                    "true"
                } else {
                    "false"
                }
            );
            println!(
                "License expiration - {:?}",
                obj.license_expiration
            );
            println!(
                "Total obfuscations - {}",
                obj.usages_total.unwrap_or(0)
            );
            println!(
                "Max. source code size - {}",
                obj.string_limit.unwrap_or(0)
            );
        }
        Some(PythonObfuscatorResponse::Json(_)) => {}
        None => {
            return Err("Something unexpected happen while trying to login to the service.".into());
        }
    }

    Ok(())
}

```

## Skip selected functions and classes

Use the [Python Obfuscator Decorator](https://github.com/PELock/Python-Obfuscator-Decorator) package to mark functions and classes that should skip chosen strategies. You need it only to **run original source**. The obfuscator reads `@obfuscator.skip` from the AST, applies the skip, then **strips** the decorator and unused `import obfuscator` lines. Obfuscated output has no runtime dependency on this package.

Package on PyPI: https://pypi.org/project/python-obfuscator-decorator/

### Installation

```
pip install python-obfuscator-decorator
```

or

```
python3 -m pip install python-obfuscator-decorator
```

Import package name: **`obfuscator`**. PyPI distribution name: **`python-obfuscator-decorator`**.

### Simple usage

```python
import obfuscator


@obfuscator.skip()
def handshake(secret: str) -> str:
    """Skip every mutating strategy on this function."""
    return secret
```

Also valid:

- `@obfuscator.skip(obfuscator.ENCRYPT_STRINGS, obfuscator.CODE_VIRTUALIZATION)` — skip listed strategies
- `@obfuscator.skip("encrypt_strings")` — string keys match engine strategy names
- `@obfuscator.skip` (bare, no call) — skip every mutating strategy on that construct
- `import obfuscator as alias` then `@alias.skip(...)`

`CODE_VIRTUALIZATION` skips all virtualization modes (VM, FSA, flatten) on that function or class.

## Use Python Obfuscator Online

Online interface for Python Obfuscator is available at:

https://www.pelock.com/python-obfuscator/

## Windows GUI client and command line version

You can download it at:

https://www.pelock.com/products/python-obfuscator/download

#### Python Obfuscator comes also with full GUI version for Windows

![Python Obfuscator Windows Client](https://www.pelock.com/img/en/products/python-obfuscator/python-obfuscator-virtualizer.png)

#### Obfuscation options

![Python Obfuscation options](https://www.pelock.com/img/en/products/python-obfuscator/python-obfuscator-virtualizer-obfuscation-options.png)

#### Command line interface aka CLI

Python Obfuscator ships with a command-line interface for Windows and Linux automation. Use it to integrate obfuscation into build servers, CI jobs, or batch packaging.

![Python Obfuscator command-line interface](https://www.pelock.com/img/en/products/python-obfuscator/python-obfuscator-virtualizer-obfuscation-from-command-line.png)

## Demo mode limitations

In demo mode the obfuscator always applies `integers_to_arrays`, `mba_binops`, and `encrypt_strings` (no code virtualization). Source size is limited to 1000 characters.

Bartosz Wójcik

* Visit my site at — https://www.pelock.com
* X — https://x.com/PELock
* GitHub — https://github.com/PELock