Download the PHP package honeycrisp/laravel-obfuscator without Composer
On this page you can find all versions of the php package honeycrisp/laravel-obfuscator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download honeycrisp/laravel-obfuscator
More information about honeycrisp/laravel-obfuscator
Files in honeycrisp/laravel-obfuscator
Package laravel-obfuscator
Short Description A comprehensive Laravel package for PHP code obfuscation with backup and restore functionality. Provides unique command structure with enhanced features.
License MIT
Homepage https://github.com/rakeshmaity271/laravel-obfuscator
Informations about the package laravel-obfuscator
Honeycrisp Laravel Obfuscator Package
A comprehensive Laravel package for PHP code obfuscation with backup and restore functionality. This package provides unique command structure with enhanced features and better integration for Laravel projects.
Features
- 🚀 Multiple Obfuscation Commands: File, directory, and project-wide obfuscation
- 💾 Automatic Backup System: Create backups before obfuscation
- 🔄 Restore Functionality: Restore files from backups
- 🔒 Secure Deployment System: Client-safe deployment with original code protection
- 🔑 Simplified License Management: Laravel-style key generation (no complex plans)
- ⚙️ Configurable: Customize behavior through config files
- 📊 Progress Tracking: Detailed output with success/error reporting
- 🛡️ Safe Operations: Non-destructive with backup protection
Installation
Via Composer
Manual Installation
- Clone this repository to your Laravel project
-
Add the service provider to
config/app.php: - Publish the configuration file:
Usage
Artisan Commands
The package provides several Artisan commands to obfuscate PHP files within your Laravel project.
🚀 Simple Application Deployment Commands (RECOMMENDED)
For complete Laravel application deployment with just one command:
What These Commands Do:
- ✅ Automatically detect current Laravel application
- ✅ Exclude vendor, node_modules, storage, .git, .env automatically
- ✅ Process all PHP files in your application
- ✅ Create secure backups of original code
- ✅ Optionally create ZIP packages for deployment
🔒 Advanced Secure Deployment Commands
For custom deployment scenarios (requires specifying source and exclusions):
Why Secure Deployment?
- ✅ Client cannot access original source code
- ✅ Client cannot develop/modify your application
- ✅ Client cannot reverse-engineer your logic
- ✅ Only processed code remains accessible
🔑 License Management Commands
Simple, Laravel-style license management:
Features:
- ✅ Single command key generation (no complex plans)
- ✅ Simple validation (any 16+ character key is valid)
- ✅ Perfect Laravel integration (works with .env files)
- ✅ No demo/trial restrictions (clean, simple system)
Basic Obfuscation Commands (Development Use)
For development and testing (creates _obfuscated versions alongside originals):
Obfuscate Specific Directory
To obfuscate PHP files in a specific directory:
Obfuscate Specific File
To obfuscate a specific PHP file:
Backup and Restore
Backup: You can create backups of obfuscated files with the --backup option:
Restore: To restore a backed-up file:
Example:
Deobfuscate Examples:
Deobfuscate
To deobfuscate a PHP file or analyze its obfuscation level:
Options:
--output=path- Specify output file path--analyze- Analyze obfuscation level without deobfuscating--batch- Process all PHP files in directory
Examples:
Deobfuscate All Files
To deobfuscate all PHP files in your Laravel project:
Options:
--output-dir=path- Specify output directory for all deobfuscated files
Examples:
Deobfuscate Directory
To deobfuscate all PHP files in a specific directory:
Options:
--output-dir=path- Specify output directory for deobfuscated files--analyze- Analyze obfuscation level without deobfuscating
Examples:
Programmatic Usage
You can also use the obfuscator service directly in your code:
Facade Usage
You can also use the facade alias:
Configuration
The package configuration file config/laravel-obfuscator.php allows you to customize:
- Backup Settings: Enable/disable backups, backup directory, retention
- Obfuscation Settings: Method, comment removal, whitespace handling
- File Patterns: Include/exclude specific files and directories
- Output Settings: File naming, structure preservation
- Logging: Enable logging with configurable levels
Environment Variables
You can also configure the package using environment variables:
File Structure
Backup System
The package automatically creates backups in storage/app/obfuscator_backups/ when using the --backup option. Backup files are named with the pattern:
Example: backup_1703123456_UserController.php
Obfuscation Method
The package uses a base64 encoding + string reversal technique that:
- Encodes the PHP code using base64
- Reverses the encoded string
- Generates a wrapper that deobfuscates and executes the code at runtime
This provides a good balance between obfuscation effectiveness and performance.
Security Considerations
- Backup Protection: Always use the
--backupoption in production - Testing: Test obfuscated code thoroughly before deployment
- Source Control: Keep original source code in version control
- Performance: Obfuscated code has a small runtime overhead
Troubleshooting
Common Issues
- Permission Errors: Ensure write permissions for backup and output directories
- Memory Issues: For large projects, increase PHP memory limit
- Backup Not Found: Check the backup directory path in configuration
Debug Mode
Enable detailed logging by setting the log level to debug:
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
License
This package is open-sourced software licensed under the MIT license.
Support
For support and questions:
- Create an issue on GitHub
- Check the documentation
- Review the configuration options
📚 Documentation
- Secure Deployment Commands - Complete guide to all secure deployment features
- Advanced Features Roadmap - Future development plans
- Laravel Testing Guide - Testing and quality assurance
- Phase 2 Implementation Summary - Current implementation status
- Phase 3 Future Roadmap - Long-term development roadmap
Changelog
Version 1.0.0
- Initial release
- Basic obfuscation functionality
- Artisan commands for file, directory, and project obfuscation
- Backup and restore system
- Configuration system
🔒 Secure Deployment Mode
The Problem with Basic Obfuscation
Basic obfuscation creates _obfuscated files alongside originals, which means:
- ❌ Client can still access original source code
- ❌ Client can still develop/modify the application
- ❌ Obfuscation provides no real security
The Solution: Secure Deployment Mode
Secure deployment mode provides true security by:
- ✅ Replacing original files with obfuscated versions
- ✅ Moving originals to secure backup (client cannot access)
- ✅ Creating deployment packages (ZIP files with only obfuscated code)
- ✅ Ensuring clients cannot reverse-engineer your application
Secure Deployment Commands
Obfuscation Secure Deployment
Deobfuscation Secure Deployment
What Happens in Secure Deployment Mode
- 🔒 Original files are backed up to secure backup locations:
- Obfuscation:
storage/app/secure_deployment_backups/ - Deobfuscation:
storage/app/secure_deobfuscation_backups/
- Obfuscation:
- 🔒 Original files are replaced with processed versions (obfuscated or deobfuscated)
- 🔒 Secure backup location is NOT accessible to clients
- 🔒 Only processed code remains in the project
- 📦 Optional deployment package (ZIP) can be created
Security Benefits
- 🚫 No Source Code Access: Clients cannot read your original code
- 🚫 No Development Capability: Clients cannot modify your logic
- 🚫 No Reverse Engineering: Obfuscated code is extremely difficult to understand
- ✅ Full Functionality: Application works exactly the same
- ✅ Professional Delivery: Clean, production-ready codebase
When to Use Secure Deployment
- 🎯 Client Deliverables: When handing over code to clients
- 🚀 Production Deployment: When deploying to production servers
- 📦 Software Distribution: When selling/distributing your software
- 🔐 Code Protection: When protecting intellectual property
- 💼 Business Applications: When delivering business solutions to clients