zivar / laravel-security
Hardware-bound cryptographic licensing and anti-piracy security package for Laravel applications.
Requires
- php: ^8.2
- illuminate/console: ^10.0|^11.0|^12.0|^13.0
- illuminate/http: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
Requires (Dev)
- phpunit/phpunit: ^10.0|^11.0
README
Hardware-bound cryptographic licensing and anti-piracy security package for Laravel applications.
๐ Overview
zivar/laravel-security protects commercial Laravel applications against unauthorized server migration and software piracy:
- ๐ Hardware Binding Engine: Binds application execution to physical server metrics (BIOS UUID, OS Machine ID, CPU Model, MAC Address).
- ๐ Asymmetric RSA Cryptography: Validates license authenticity using SHA-256 signatures backed by 2048-bit RSA keys.
- ๐ก๏ธ Early Boot & Global Protection: Automatically intercepts HTTP requests across
webandapiroute groups during framework bootstrapping. - โก Zero Paid Dependencies: Runs natively on standard PHP 8.2+ environments without requiring paid extensions.
๐ Requirements
- PHP:
^8.2or^8.3or^8.4 - Laravel Framework:
^10.0or^11.0or^12.0or^13.0 - OpenSSL Extension: Enabled
๐ Client Installation & Setup Guide
Step 1: Install Package via Composer
Install the package in your Laravel project:
composer require zivar/laravel-security
The Service Provider automatically registers global protection middleware across all HTTP requests.
Step 2: Retrieve Server Hardware Fingerprint
To obtain your server's unique Hardware Fingerprint Hash, execute the following Artisan command:
php artisan security:fingerprint
Output Example:
=== Zivar Security Server Fingerprint ===
Hardware Fingerprint Hash: 8f7d9a102b3c4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f
๐ Copy and send this Hardware Fingerprint Hash to your software vendor to request your official license file.
Step 3: Place Public Verification Key
Copy the public.pem verification key provided by your vendor into your application's storage directory:
storage/app/keys/public.pem
Step 4: Activate Official License Key
Activate your software license file (license.lic) using the Artisan activation command:
php artisan security:activate path/to/license.lic
Output Example:
License key file successfully installed to: storage/app/license.lic
โ License verified successfully!
Step 5: Verify Active License Status
Verify your active license status and hardware match anytime:
php artisan security:status
Output Example:
=== Zivar Security License Status Check ===
Hardware Fingerprint : 8f7d9a102b3c4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b...
License File Path : storage/app/license.lic
Public Key Path : storage/app/keys/public.pem
STATUS: VALID โ
+---------------+--------------------------------------------------+
| Field | Value |
+---------------+--------------------------------------------------+
| License ID | LIC-8A2F9B1C0E4D |
| Client Name | Authorized Client |
| Hardware Hash | 8f7d9a102b3c4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b... |
| Expires At | 2027-08-12T21:40:00+07:00 |
+---------------+--------------------------------------------------+
๐ ๏ธ Available Client Commands
| Command | Description |
|---|---|
php artisan security:fingerprint |
Display current server hardware fingerprint hash. |
php artisan security:activate {file} |
Install and activate license file on this server. |
php artisan security:status |
Check active license details and hardware match. |
โ๏ธ Environment Variables (Optional)
You can customize license paths via your application's .env file:
ZIVAR_SECURITY_ENABLED=true ZIVAR_LICENSE_PATH=storage/app/license.lic ZIVAR_PUBLIC_KEY=storage/app/keys/public.pem ZIVAR_ENFORCE_HARDWARE=true
๐งช Testing
Run PHPUnit tests:
vendor/bin/phpunit
๐ฌ Kontak & Sosial Media (Author)
Jika Anda memiliki pertanyaan, saran pengembangan, atau ingin berkolaborasi, silakan hubungi pengembang melalui:
๐ License
The MIT License (MIT). Please see License File for details.