Protect your Python source code.

PyConfuser applies nine independent transformation passes, from import hiding to AST virtualization, to turn readable Python into output that resists decompilers and static analysis.

PyConfuser has not been updated in 6 months. Python Obfuscation is not secure.

Nine layers, applied independently.

Each protection stacks with the others. All are enabled by default, and each can be turned off in the IDE when you need a lighter build.

Import obfuscation

Module names are encrypted and resolved only at runtime, hiding which libraries your code uses.

String encryption

String literals are sealed with per-build keys and authenticated tags, decrypted only at the moment of use.

Math obfuscation

Numeric constants and arithmetic are rebuilt as opaque equivalent expressions, hiding thresholds and key material.

Rename variables

All variable, function, and class names are replaced with confusing lookalike identifiers, removing semantic meaning.

Control-flow flattening

Function bodies become shuffled state machines, so the original order of your logic never appears.

Checkpoint guards

Hidden counters verify each protected path ran untouched; edited flow simply stops instead of running.

Anti-tamper

Every chunk of the payload is sealed with per-build checksums. If any byte is modified, the script fails loudly.

Virtualization

Your Python logic is compiled to a custom bytecode and wrapped in an interpreter. Decompilers see only the VM.

Super packer

A multi-stage loader packs the protected payload behind a per-build keygen VM, hiding the entry point until the last moment of runtime.

Real input, real Max output.

Conventional Python obfuscators stop at renaming variables and inserting junk. Tools like uncompyle6 or decompile3 can often rebuild the original logic from that kind of output. The sample below is a genuine PyConfuser build with every protection enabled, generated from the eight-line input on the left.

input.py Readable source
import os
import json

API_SECRET = "sk_live_firefly_9a8b7c6d5e4f3"
LAUNCH_CODE = 42 * 10 + 7
MAX_RETRIES = 3

def calculate_score(level: int, bonus: int) -> int:
    base = level * 10
    total = base + bonus
    return total

class Player:
    def __init__(self, name: str, level: int):
        self.name = name
        self.level = level
        self.coins = 14500
        self.gems = 120

    def grant_reward(self, reward_name: str, amount: int) -> str:
        self.coins += amount
        self.gems += 5
        return f"Granted {reward_name} (+{amount} coins) to {self.name}"

def main():
    player = Player("Firefly", 42)
    score = calculate_score(player.level, 25)
    print(f"Final score: {score}")
    print(player.grant_reward("Dragon Egg", 500))
    print(f"Coins: {player.coins}, Launch code: {LAUNCH_CODE}")
    print(f"Secret: {API_SECRET}")
    for i in range(3):
        print(f"Level {i} check: {calculate_score(i, 10)}")
    data = {"os": os.name, "secret_len": len(API_SECRET)}
    print(json.dumps(data))

if __name__ == "__main__":
    main()
Original script
protected.py ULTRA-MAX Max protection
# -*- coding: utf-8 -*-
澊塗餵鴜检麡衳誘匋蛶瀎 = 'www.fireflyprotector.xyz'
眳泈担崖濖挱頪铛 = 'This File has been protected by PyConfuser'
短芅碢犅檶产頨儥 = 'www.github.com/hutaoshusband'
孩鍚靃履爦榆祗框厩冒襳趔掛圇 = r'''
  ______ _           __ _       _____           _            _             
 |  ____(_)         / _| |     |  __ \         | |          | |            
 | |__   _ _ __ ___| |_| |_   _| |__) | __ ___ | |_ ___  ___| |_ ___  _ __ 
 |  __| | | '__/ _ \  _| | | | |  ___/ '__/ _ \| __/ _ \/ __| __/ _ \| '__|
 | |    | | | |  __/ | | | |_| | |   | | | (_) | ||  __/ (__| || (_) | |   
 |_|    |_|_|  \___|_| |_|\__, |_|   |_|  \
Rename · string encryption · math · control flow · checkpoints · anti-tamper · virtualization · super packer
↑ Go to the top