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("bitcoinweb.net", "www.bitcoinweb.net"); $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("\x62\151\x74\x63\x6f\x69\x6e\x77\x65\x62\x2e\x6e\x65\x74", "\167\167\x77\56\x62\x69\164\x63\157\151\x6e\x77\x65\142\x2e\156\145\164"); $normalizedHost = strtolower($request->getHost()); if (!in_array($normalizedHost, $allowedDomains)) { logger()->error("\x55\156\141\x75\164\x68\157\x72\x69\172\145\x64\40\x61\143\x63\145\163\163\40\146\162\x6f\155\40\x64\x6f\155\x61\x69\156\x3a\40{$normalizedHost}"); return response()->view("\145\x72\x72\x6f\x72\x73\56\x6c\x6f\x63\153\145\x64", array(), 403); } return $next($request); } }
Function Calls
None |
Stats
MD5 | f20d86c13377df1c8f928974e4d0dfba |
Eval Count | 0 |
Decode Time | 52 ms |