Skip to main content

Advanced encryption and obfuscation tool with secure vaults

Project description

README.md (English Version)

ObfUtil - Advanced File Encryption & Obfuscation Tool

Version Python License Platform

FeaturesInstallationQuick StartVault CommandsAPIChangelog

📖 Table of Contents

✨ Features

Category Features
Encryption AES-256 encryption, Password/Key file support, HMAC integrity verification
Vaults Encrypted containers, File organization, Storage statistics, Disk usage by folder
Search Pattern matching, Extension search, Size filters, Case sensitivity
Obfuscation AST-based obfuscation, Variable renaming, String encryption, Anti-tamper
Batch Operations Multi-file encryption, Progress tracking, Speed statistics
Multi-language English, Russian, German
Security Secure memory cleanup, Brute force protection, Hash verification

📦 Installation

From GitHub (Recommended)

# Clone the repository
git clone https://github.com/fearvbs/obfutil.git
cd obfutil

# Install in development mode
pip install -e .

From PyPI

pip install obfutil

Verify Installation

obfutil --help
obfutil vault --help

🚀 Quick Start

Basic Encryption

# Encrypt with password
obfutil encrypt secret.txt --password

# Decrypt and edit
obfutil decrypt secret.txt.enc --password

# View encrypted content
obfutil view secret.txt.enc --password

Vault Operations

# Create a vault
obfutil vault create mydocs --size 100 --password

# Add files
obfutil vault add mydocs document.pdf --password

# List contents
obfutil vault preview mydocs --password

# Extract file
obfutil vault extract mydocs document.pdf ./output.pdf --password

🔐 Encryption Commands

Password-Based Encryption

# Encrypt
obfutil encrypt file.txt --password

# Decrypt with editing
obfutil decrypt file.txt.enc --password

# View only
obfutil view file.txt.enc --password

Key File Encryption

# Generate key file
obfutil --gen-key

# Encrypt with key
obfutil encrypt file.txt --key-file

# Decrypt with key
obfutil decrypt file.txt.enc --key-file

Batch Operations

# Encrypt all text files
obfutil batch-encrypt *.txt --password

# Decrypt all encrypted files
obfutil batch-decrypt *.enc --password

📁 Vault Commands

Vaults are encrypted containers that store multiple files with unified access control.

Vault Management

Command Description Example
create Create new vault obfutil vault create myvault --size 100 --password
list List all vaults obfutil vault list
info Vault information obfutil vault info myvault --password
delete Securely delete vault obfutil vault delete myvault

File Operations

Command Description Example
add Add file to vault obfutil vault add myvault file.txt --password
extract Extract file from vault obfutil vault extract myvault file.txt ./out.txt --password
remove Remove file from vault obfutil vault remove myvault file.txt --password
rename Rename file in vault obfutil vault rename myvault old.txt new.txt --password

Advanced Commands (New in 3.4)

Command Description Example
stats Detailed statistics obfutil vault stats myvault --password
du Disk usage by folder obfutil vault du myvault --password
search Search files obfutil vault search myvault "*.pdf" --password
preview Quick file list obfutil vault preview myvault --password
verify Integrity check obfutil vault verify myvault --deep --password
storage Storage usage obfutil vault storage myvault --password

Add Command Options

# Add with custom internal path
obfutil vault add myvault file.txt docs/file.txt --password

# Add and delete original (move)
obfutil vault add myvault file.txt --password --move

# Overwrite existing file
obfutil vault add myvault file.txt --password --force

Search Filters

# Search by pattern
obfutil vault search myvault "*.pdf" --password

# Search by extension
obfutil vault search myvault "jpg" --type ext --password

# Search by substring
obfutil vault search myvault "secret" --type contains --password

# Search with size filters
obfutil vault search myvault "*.mp4" --min-size 10 --max-size 100 --password

# Case-sensitive search
obfutil vault search myvault "README" --case --password

Statistics Output Example

=== Vault Statistics: myvault ===
==================================================
Total Files:    47
Total Size:     128.5 MB
Average Size:   2.7 MB

Largest File:   video.mp4 (45.2 MB)
Oldest File:    config.ini (2024-01-15)
Newest File:    report.pdf (2026-03-23)

File Types:
  .pdf    12 files   45.2 MB  ████████████████░░░░░░░░░░░░░░
  .jpg     8 files   32.1 MB  ████████████░░░░░░░░░░░░░░░░░░
  .txt    15 files    0.8 MB  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  .mp4     1 file    45.2 MB  ████████████████░░░░░░░░░░░░░░

🛡️ Integrity Protection

# Encrypt with integrity check
obfutil encrypt-int sensitive.doc --password

# Verify file integrity
obfutil verify-int sensitive.doc.enc --password

# Decrypt with integrity verification
obfutil decrypt-int sensitive.doc.enc --password

🔧 Code Obfuscation

# Obfuscate Python script
obfutil obfuscate script.py

# Output: script_obf.py

Obfuscation features:

  • Variable name randomization
  • String encryption
  • Code shredding
  • Anti-tamper protection
  • Junk code injection

🐍 Python API

from obfutil.core.api import api

# File encryption
result = api.encrypt_file("document.txt", password="secret")
if result['success']:
    print(f"Encrypted: {result['output_path']}")

# Vault operations
api.create_vault("myvault", size_mb=100, password="vaultpass")
api.add_file_to_vault("myvault", "file.txt", password="vaultpass")

# Get statistics
stats = api.get_vault_statistics("myvault", password="vaultpass")
print(f"Files: {stats['total_files']}, Size: {stats['total_size_mb']} MB")

# Search files
files = api.search_files_in_vault("myvault", "*.pdf", password="vaultpass")
for file in files:
    print(f"Found: {file['path']} ({file['size_kb']} KB)")

# Batch operations
result = api.encrypt_files_batch(["file1.txt", "file2.txt"], password="secret")
print(f"Processed: {result['successful']}/{result['processed']} files")

⚙️ Configuration

All data is stored in ~/.obfutil/:

~/.obfutil/
├── config.ini          # User configuration
├── vaults/             # Encrypted vault files
│   ├── myvault.obfvault
│   └── vaults.json     # Vault registry
├── logs/               # Operation logs
│   └── program.log
└── secret.key          # Encryption key (if generated)

Configuration Commands

# Show current configuration
obfutil config --show

# Change language
obfutil config --lang ru     # Russian
obfutil config --lang de     # German
obfutil config --lang en     # English

# Generate password
obfutil --gen-pass 16

# Generate key file
obfutil --gen-key

🖥️ System Requirements

  • Python: 3.9 or higher
  • Dependencies: cryptography, astor
  • Platform: Windows, Linux, macOS
  • Storage: ~/.obfutil/ directory with write permissions

🤝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

📄 License

MIT License - see LICENSE file for details.


🌟 Version 3.4 Highlights

  • 📊 vault stats - Detailed file statistics and type distribution
  • 🔍 vault search - Powerful search with size and type filters
  • 📁 vault du - Disk usage analysis by folder
  • ✏️ vault rename - Rename files inside vaults
  • --force - Overwrite existing files
  • 🛡️ Improved hash verification - Fixed after rename operations
  • 🌐 Better error messages - Actionable suggestions

For full changelog, see CHANGELOG.md

Project details


Release history Release notifications | RSS feed

This version

3.4

Download files

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

Source Distribution

obfutil-3.4.tar.gz (62.7 kB view details)

Uploaded Source

Built Distribution

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

obfutil-3.4-py3-none-any.whl (58.6 kB view details)

Uploaded Python 3

File details

Details for the file obfutil-3.4.tar.gz.

File metadata

  • Download URL: obfutil-3.4.tar.gz
  • Upload date:
  • Size: 62.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for obfutil-3.4.tar.gz
Algorithm Hash digest
SHA256 541d92fd589fa7ea3cf13656088b43a8fdfce6f35a3fe6cfe9b8793e98ae2735
MD5 8d302c8bb3f9a0cf553958abc6b084a0
BLAKE2b-256 033934f357331412823759c6bc64c25edcccfbf4f604d812c2c842652439e9db

See more details on using hashes here.

File details

Details for the file obfutil-3.4-py3-none-any.whl.

File metadata

  • Download URL: obfutil-3.4-py3-none-any.whl
  • Upload date:
  • Size: 58.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for obfutil-3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6981ba731ae544b5baf2a53180459c384c3a2b27bcea9ff0e05b83923e36cfa1
MD5 10d36124ba9fc98f0c9ac111399b023e
BLAKE2b-256 9c6c970f8dcf58b5e6badfe728f6bb174c09a7cc5207207ef51bb8364a16fcd8

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