Skip to main content

cppy-obf banner

🛡️ CPPY-OBF

Next-Gen Enterprise Code Protection, Self-Executing Obfuscation & Hardware USB Dongle Security

PyPI version Python versions License: MIT Downloads

🚀 빠른 시작 • ✨ 핵심 기능 • 📖 사용 가이드 • 🔑 USB 보안키 • 🏗️ 작동 원리 • 🌐 공식 웹사이트


"소스코드는 완벽히 은닉하고, 실행은 자유롭게 유지하세요."
cppy-obf는 파이썬 및 소스코드를 군사급 AES-256 대칭키 암호화 + Gzip 압축 + C언어 바이너리 컴파일로 보호하며, 배포된 코드가 암호화된 상태에서도 키 입력 없이 즉시 실행되는 **독립 실행 난독화(Self-Executing Obfuscation)**와 물리적 USB 하드웨어 보안키 연동을 제공합니다.


⚡ 빠른 시작 (Quick Start)

1. 설치

pip install -U cppy-obf

2. 바로 사용하기

# 원본 코드를 난독화 & 암호화 (파일 자체는 바로 실행 가능!)
cppy --obf main.py

# 실행 테스트 (암호화되어 있어도 정상 작동)
python main.py

# 원본 코드로 다시 복원할 때
cppy --de-obf main.py

✨ 핵심 기술 (Key Features)

기능 명령어 설명
🚀 자체 실행 난독화 cppy --obf <파일> 코드는 암호화/압축되어 원본을 볼 수 없지만 프로그램은 정상 작동
🔑 USB 하드웨어 보안키 cppy --obf --usb <파일> 실물 USB 장치의 고유 하드웨어 시리얼과 복호화 키를 결합하여 USB 없이는 복호화 원천 차단
🔒 엔터프라이즈 AES-256 cppy en <파일> 코드를 완전히 잠금 처리하고 .cpde 비밀키 생성
🔓 간편한 원본 복호화 cppy de <파일> 분리된 키 또는 USB 인증을 통해 1초 만에 원본 소스 복원
📂 프로젝트 일괄 처리 cppy en-all <폴더> 수백 개의 소스코드 파일을 하위 디렉터리까지 재귀적으로 일괄 암호화/난독화
🛡️ 안티 템퍼링 서명 자동 적용 SHA-256 디지털 서명으로 1바이트라도 변조 시 프로세스 즉각 종료
🌍 글로벌 8개국 다국어 cppy 한국, cppy usa 한국어, 영어, 일본어, 중국어, 프랑스어 등 다국어 CLI 실시간 전환

🔍 Before & After 비교

❌ Before (원본 소스코드 - 유출 및 분석 위험)

# 결제 핵심 비즈니스 로직이 그대로 노출됨
def process_payment(user_id, amount):
    secret_key = "MY_COMPANY_SECRET_KEY_2026"
    discount_rate = 0.35 if is_vip(user_id) else 0.05
    return api_call(secret_key, user_id, amount * (1 - discount_rate))

🛡️ After (cppy --obf 적용 후 - 자체 실행 가능 래퍼)

# [CP.PY-OBFUSCATED-EXECUTABLE] - 원본 은닉 및 메모리 단독 실행
import base64 as _a, gzip as _g
from cryptography.fernet import Fernet as _F
_k = b"""WjRkM...[AES-256 보호 키 바이너리]...=="""
_payload = b"""gAAAAAB...[Gzip 압축 암호화된 실행 페이로드]...=="""

try:
    exec(_g.decompress(_F(_a.b64decode(_k)).decrypt(_a.b64decode(_payload))))
except Exception:
    pass

🔑 실물 USB 하드웨어 보안 동글 (Hardware USB Key)

cppy는 소프트웨어 키의 한계를 넘어, 실제 꽂혀 있는 USB 메모리를 물리적 보안 동글로 전환합니다:

cppy --obf --usb server.py
  1. 시스템에 연결된 USB 드라이브를 자동 감지합니다.
  2. 선택한 USB 볼륨을 CPDE_KEY로 설정하고 복호화 키를 주입합니다.
  3. **USB 컨트롤러의 물리적 고유 시리얼 번호(Hardware Serial)**를 암호화 검증 루틴에 강제 바인딩합니다.
  4. 키 파일을 다른 곳으로 복사하더라도, 정품 실물 USB가 꽂혀있지 않으면 복호화가 절대 불가능합니다.

📖 CLI 상세 사용법

1. 실행 가능한 자체 난독화 (Recommended)
# 파일 자체는 정상 실행되지만 코드는 암호화/압축으로 봉인
cppy --obf app.py

# 실물 USB 하드웨어 보안키와 결합
cppy --obf --usb app.py

# 난독화된 파일 원본 복원 (.obfde 키 사용)
cppy --de-obf app.py
2. 표준 AES-256 암호화 & 복호화
# 단일 파일 암호화 (.cpde 키 분리 생성)
cppy en secret.py

# 단일 파일 복호화
cppy de secret.py

# 폴더 전체 재귀 일괄 암호화
cppy en-all ./my_project

# 폴더 전체 재귀 일괄 복호화
cppy de-all ./my_project
3. 보안 상태 점검 & 도구 설정
# 프로젝트 디렉터리 내 파일별 암호화/보안 상태 검사
cppy status ./src

# .cpde 복호화 키 파일 내용(Hex/Base64) 조회
cppy key app.py.cpde

# 백업본(.bak)을 이용한 원본 롤백
cppy rollback app.py

# 언어 변경 (한국어, 영어, 일본어, 중국어 등)
cppy 한국
cppy usa
cppy japan

🌐 Ecosystem & Live Showcase


📄 License

Distributed under the MIT License. Free for commercial and private projects. See LICENSE for more information.

Built with 💙 by Lunar Company & Enterprise Security Engineers.

Metadata

Release files for cppy-obf 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for cppy-obf 0.1.2
File Interpreter ABI Platform
cppy_obf-0.1.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details

Release files / cppy_obf-0.1.2-cp311-cp311-win_amd64.whl

Download URL cppy_obf-0.1.2-cp311-cp311-win_amd64.whl
Size 877.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
4e93cc14666b1d948c7f634fb2c5c2a771247c8a43a0faa935fc0d7b64a67ecc
BLAKE2b-256 checksum
How to use checksums
ed5eea7d35b63e23f391d9563750ab559af2403efdfbc1f7ba472775684ed940
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page