Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace App\Http\Middleware; use Closure; use Illuminate\Http\Request; class Dom..
Decoded Output download
<?php
namespace App\Http\Middleware; use Closure; use Illuminate\Http\Request; class DomainCheckMiddleware { public function handle($request, Closure $next) { $allowedDomains = array("coinbrust.com", "www.coinbrust.com"); $normalizedHost = strtolower($request->getHost()); if (!in_array($normalizedHost, $allowedDomains)) { logger()->error("Unauthorized access from domain: {$normalizedHost}"); return response()->view("errors.locked", array(), 403); } return $next($request); } } ?>
Did this file decode correctly?
Original Code
<?php
namespace App\Http\Middleware; use Closure; use Illuminate\Http\Request; class DomainCheckMiddleware { public function handle($request, Closure $next) { $allowedDomains = array("\143\x6f\151\x6e\142\162\x75\163\x74\x2e\x63\x6f\x6d", "\x77\x77\167\x2e\143\x6f\x69\x6e\142\162\165\x73\164\x2e\143\157\x6d"); $normalizedHost = strtolower($request->getHost()); if (!in_array($normalizedHost, $allowedDomains)) { logger()->error("\x55\x6e\141\165\164\x68\157\x72\x69\x7a\x65\144\x20\141\143\x63\x65\x73\163\40\x66\162\157\155\x20\x64\157\x6d\x61\151\x6e\x3a\x20{$normalizedHost}"); return response()->view("\x65\162\162\157\x72\x73\56\x6c\157\143\x6b\x65\144", array(), 403); } return $next($request); } }
Function Calls
None |
Stats
MD5 | 9cd3a5113e1068ad14bc914bad7f8f30 |
Eval Count | 0 |
Decode Time | 54 ms |