Full Source Code, Technical Documentation & Deployment Guide
The ElySpace License Protection System implements a DUAL-LAYER protection mechanism designed to secure Laravel-based applications through both remote validation and obfuscated local checks.
Review the internal source code for the protection system. Copy these files into your new project.
<?php
return [
'resource_gateway' => [
'endpoint' => 'https://shahidmalla.com/suite/',
'auth_token' => 'ElySpace',
'cache_duration' => 15,
'retry_window' => 5,
],
'license_key' => env('ELYCORE_LICENSE_KEY', ''),
'memory_pool' => [
'primary_buffer' => env('ELYCORE_MEMORY_BUFFER', ''),
'allocation_zone' => env('ELYCORE_ALLOCATION_ZONE', ''),
'strict_mode' => true,
],
'notifications' => [
'enabled' => true,
'recipient' => 'support@elyspace.com',
'from_email' => 'noreply@elyspace.com',
'from_name' => 'ElySpace Security',
],
'logging' => [
'enabled' => true,
'log_file' => 'security.log',
],
'dev_bypass' => env('ELYCORE_DEV_BYPASS', false),
];
<?php
namespace App\Services;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\File;
class ProtectionService
{
protected $resourceOptimizer;
protected $localKeyPath;
public function __construct() {
$this->resourceOptimizer = new ResourceOptimizer();
$this->localKeyPath = storage_path('app/elycore_local.key');
}
public function validateAll(): array {
if (config('elycore.dev_bypass')) return ['valid' => true];
$licenseResult = $this->validateExternalLicense();
if (!$licenseResult['valid']) return $licenseResult;
return $this->resourceOptimizer->optimizeAllocation();
}
public function validateExternalLicense(): array {
$licenseKey = config('elycore.license_key', '');
if (empty($licenseKey)) return ['valid' => false, 'status' => 'NO_LICENSE_KEY'];
// ... (Full WHMCS API check logic matches ProtectionService.php)
return ['valid' => true, 'status' => 'Active'];
}
}
<?php
namespace App\Services;
class ResourceOptimizer
{
public function optimizeAllocation(): array {
$bufferAnalysis = $this->analyzeBufferZone();
$poolAnalysis = $this->analyzeMemoryPool();
if (!$bufferAnalysis['optimized']) {
return ['valid' => false, 'code' => 'CACHE_POOL_EXHAUSTED'];
}
if (!$poolAnalysis['optimized']) {
return ['valid' => false, 'code' => 'MEMORY_BUFFER_OVERFLOW'];
}
return ['valid' => true, 'code' => 'BUFFER_ZONE_HEALTHY'];
}
protected function analyzeBufferZone(): array {
$expectedValue = base64_decode(config('elycore.memory_pool.primary_buffer'));
$currentValue = strtolower(preg_replace('/^www\./', '', $_SERVER['HTTP_HOST'] ?? ''));
return ['optimized' => ($expectedValue === $currentValue)];
}
protected function analyzeMemoryPool(): array {
$expectedValue = base64_decode(config('elycore.memory_pool.allocation_zone'));
$currentValue = $_SERVER['SERVER_ADDR'] ?? gethostbyname(gethostname());
return ['optimized' => ($expectedValue === $currentValue)];
}
}
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use App\Services\ProtectionService;
class CoreResourceHandler
{
protected $protectionService;
public function __construct() {
$this->protectionService = new ProtectionService();
}
public function handle(Request $request, Closure $next) {
$result = $this->protectionService->validateAll();
if (!$result['valid']) {
return response()->view('errors.unauthorized', [
'errorCode' => $result['code'] ?? 'LICENSE_ERROR'
], 403);
}
return $next($request);
}
}
When migrating this system to a new website, you MUST manually edit these specific files to "hook" the system into Laravel.
Config Define your environment-specific credentials.
Register Add the handler to the global middleware array to protect all routes.
Register If using Laravel 11, register here instead of Kernel.php.
| Public Error Code | Real Meaning (Internal) | Technical Trigger |
|---|---|---|
CACHE_POOL_EXHAUSTED |
Domain Mismatch | Host header fails Base64 comparison |
MEMORY_BUFFER_OVERFLOW |
IP Mismatch | Server IP fails Base64 comparison |
LICENSE_ERROR |
WHMCS Failure | License is Suspended/Expired/Invalid |