Skip to main content

파일 암호화/복호화 도구 (File Encryption/Decryption Tool)

Project description

Slock (Sloth Lock)

Python 파일 암호화 및 메모리 기반 복호화 실행 도구 (Python File Encryption and Memory-based Decryption Execution Tool)

참고 / Note:

  • 프로젝트 이름은 Slock (Sloth Lock)입니다.

  • PyPI 패키지 이름은 sloth-lock입니다.

  • 설치 시에는 sloth-lock을 사용하세요.

  • The project name is Slock (Sloth Lock).

  • The PyPI package name is sloth-lock.

  • Use sloth-lock when installing the package.

개요 / Overview

Slock은 Python 파일을 암호화하고, 암호화된 파일을 메모리에서 직접 복호화하여 실행할 수 있는 도구입니다. 소스 코드를 보호하면서도 원본과 동일한 기능을 유지할 수 있습니다.

Slock is a tool that encrypts Python files and executes them by decrypting directly in memory. It allows you to protect your source code while maintaining the same functionality as the original.

주요 기능 / Key Features

1. Python 파일 암호화 / Python File Encryption

  • Python 파일 암호화 지원 / Support for Python file encryption
  • 안전한 암호화 알고리즘 사용 / Uses secure encryption algorithms
  • 사용자 친화적인 명령줄 인터페이스 / User-friendly command-line interface

2. 메모리 기반 복호화 실행 / Memory-based Decryption Execution

  • 암호화된 파일을 메모리에서 직접 복호화하여 실행 / Direct execution of encrypted files by decrypting in memory
  • 디스크에 복호화된 파일을 저장하지 않음 / No decrypted files are stored on disk
  • 원본 코드 보호 / Protects original source code

3. 패키지 구조 지원 / Package Structure Support

  • Python 패키지 구조 자동 감지 및 유지 / Automatic package structure detection and maintenance
  • 모듈 간 의존성 자동 처리 / Automatic handling of module dependencies
  • 하위 패키지 지원 / Supports subpackages

4. 패키지 구조 자동화 / Package Structure Automation

  • 암호화 시 자동으로 __init__.py 파일 생성 / Automatically creates __init__.py files during encryption
  • Python 패키지 구조 유지 / Maintains Python package structure
  • 하위 패키지 지원 / Supports subpackages

설치 방법 / Installation

pip install sloth-lock

사용 방법 / Usage

1. 파일 암호화 / File Encryption

slock-enc {input_file.py} {output_file.py.enc} {password_text}

2. 파일 복호화 / File Decryption

slock-dec {input_file.py.enc} {output_file.py} {password_text}

3. 디렉토리 암호화 / Directory Encryption

slock-enc-dir {input_directory} {encrypted_directory} {password_text}

4. 암호화된 모듈 실행 / Running Encrypted Modules

slock-run-dir {encrypted_directory} {password_text} {module_name}

예시 / Example

프로젝트 암호화 및 실행 / Project Encryption and Execution

  1. 테스트 프로젝트 구조 / Test Project Structure:
my_project/
├── main.py
└── utils/
    ├── __init__.py
    └── util.py
  1. 파일 내용 / File Contents:

main.py:

from utils.util import get_greeting

def main():
    name = "나무늘보"
    message = get_greeting(name)
    print(message)

if __name__ == "__main__":
    main()

utils/util.py:

def get_greeting(name):
    return f"안녕하세요, {name}님!"
  1. 프로젝트 암호화 / Project Encryption:
python -m slock.cli.cli encrypt-dir {my_project} {encrypted_project} {my_password_text}
  1. 암호화된 모듈 실행 / Running Encrypted Module:
python -m slock.cli.cli run-dir {encrypted_project} {my_password_text} {my_project.main}

실행 결과 / Execution Result:

안녕하세요, 나무늘보님!

이 예시는 메인 모듈(main.py)이 다른 폴더의 유틸리티 모듈(utils/util.py)을 참조하는 일반적인 Python 프로젝트 구조를 보여줍니다. 암호화된 파일은 메모리에서 복호화되어 실행되며, 원본 코드는 보호됩니다.

This example demonstrates a typical Python project structure where the main module (main.py) references a utility module (utils/util.py). The encrypted files are decrypted in memory and executed, while the original code remains protected.

주의사항 / Notes

  1. 암호화된 파일은 메모리에서 복호화되어 실행되며, 디스크에 복호화된 파일이 저장되지 않습니다. Encrypted files are decrypted in memory and executed, with no decrypted files stored on disk.

  2. 암호화된 파일을 실행할 때는 반드시 올바른 비밀번호를 입력해야 합니다. You must enter the correct password when running encrypted files.

  3. 패키지 구조는 자동으로 유지되므로 별도의 설정이 필요하지 않습니다. Package structure is maintained automatically, so no additional configuration is needed.

  4. 암호화된 파일은 .py.enc 확장자를 가집니다. Encrypted files have the .py.enc extension.

라이선스 / License

MIT License

저자 / Author

cryingmiso (if.sloth@gmail.com)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sloth_lock-0.2.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sloth_lock-0.2.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file sloth_lock-0.2.0.tar.gz.

File metadata

  • Download URL: sloth_lock-0.2.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.16

File hashes

Hashes for sloth_lock-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8ee51f82416445b63bb00f2f887a45a016efeb729061e30aa8ec97c40d958160
MD5 a192ac931459acba9a64cfcce8064cde
BLAKE2b-256 e416e76e8de9a951c1c196178cc1d27001914cfa4d0a3322ba98bf0ef125c493

See more details on using hashes here.

File details

Details for the file sloth_lock-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sloth_lock-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.16

File hashes

Hashes for sloth_lock-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b69780a7dece75d425dbc3476ed0b33679d33c369509a68adc3930c9c27049c3
MD5 6cfec57ea0d2074b4646e51c227ea61c
BLAKE2b-256 76e3ca0f24b91b48945c813f531becaae3250a2ce16567e2c408f82cc202a2c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page