Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
namespace App\Http\Middleware; use App\Helpers\ListHelper; use Closure; use Illuminat..
Decoded Output download
<? namespace App\Http\Middleware;
use App\Helpers\ListHelper;
use Closure;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Auth;
class InitSettings
{
public function handle($request, Closure $next)
{
if (!$request->is("install*")) {
goto KHv1s;
}
return $next($request);
KHv1s:
setSystemConfig();
View::addNamespace("theme", theme_views_path());
if (!Auth::guard("web")->check()) {
goto eosNo;
}
if (!$request->session()->has("impersonated")) {
goto ogm2Y;
}
Auth::onceUsingId($request->session()->get("impersonated"));
ogm2Y:
if ($request->is("admin/*") || $request->is("account/*")) {
goto ofhtB;
}
return $next($request);
goto E8eiS;
ofhtB:
if ($request->is("admin/setting/system/*")) {
goto VVvFk;
}
$this->can_load();
VVvFk:
E8eiS:
$user = Auth::guard("web")->user();
if (!(!$user->isFromPlatform() && $user->merchantId())) {
goto sQJey;
}
setShopConfig($user->merchantId());
sQJey:
$permissions = Cache::remember("permissions_" . $user->id, system_cache_remember_for(), function () {
return ListHelper::authorizations();
});
$permissions = isset($extra_permissions) ? array_merge($extra_permissions, $permissions) : $permissions;
config()->set("permissions", $permissions);
if (!$user->isSuperAdmin()) {
goto r9HKC;
}
$slugs = Cache::remember("slugs", system_cache_remember_for(), function () {
return ListHelper::slugsWithModulAccess();
});
config()->set("authSlugs", $slugs);
r9HKC:
eosNo:
return $next($request);
}
private function can_load()
{
if (!(BTZCART_MIX_KEY != "017bf8bc885fb37b" || md5_file(base_path() . "/bootstrap/autoload.php") != "bc03a9a30f6e239b632b1ad96b6ab7c9")) {
goto yEWtS;
}
die("Did you " . "remove the " . "old files " . "!?");
yEWtS:
bytelabzAutoloadHelpers(getMysqliConnection());
}
} ?>
Did this file decode correctly?
Original Code
namespace App\Http\Middleware;
use App\Helpers\ListHelper;
use Closure;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Auth;
class InitSettings
{
public function handle($request, Closure $next)
{
if (!$request->is("\x69\x6e\163\164\x61\x6c\x6c\52")) {
goto KHv1s;
}
return $next($request);
KHv1s:
setSystemConfig();
View::addNamespace("\x74\150\145\155\145", theme_views_path());
if (!Auth::guard("\x77\x65\x62")->check()) {
goto eosNo;
}
if (!$request->session()->has("\x69\155\160\x65\x72\163\x6f\156\x61\x74\145\144")) {
goto ogm2Y;
}
Auth::onceUsingId($request->session()->get("\151\x6d\160\145\x72\x73\157\x6e\x61\x74\x65\144"));
ogm2Y:
if ($request->is("\141\x64\155\151\x6e\x2f\52") || $request->is("\141\x63\x63\x6f\x75\156\164\x2f\x2a")) {
goto ofhtB;
}
return $next($request);
goto E8eiS;
ofhtB:
if ($request->is("\141\144\155\151\156\57\x73\x65\x74\x74\151\156\147\x2f\x73\x79\x73\164\x65\155\x2f\52")) {
goto VVvFk;
}
$this->can_load();
VVvFk:
E8eiS:
$user = Auth::guard("\x77\145\142")->user();
if (!(!$user->isFromPlatform() && $user->merchantId())) {
goto sQJey;
}
setShopConfig($user->merchantId());
sQJey:
$permissions = Cache::remember("\160\145\x72\155\151\163\x73\151\x6f\x6e\163\x5f" . $user->id, system_cache_remember_for(), function () {
return ListHelper::authorizations();
});
$permissions = isset($extra_permissions) ? array_merge($extra_permissions, $permissions) : $permissions;
config()->set("\160\145\x72\155\x69\163\163\151\157\x6e\x73", $permissions);
if (!$user->isSuperAdmin()) {
goto r9HKC;
}
$slugs = Cache::remember("\163\x6c\x75\x67\x73", system_cache_remember_for(), function () {
return ListHelper::slugsWithModulAccess();
});
config()->set("\x61\165\x74\x68\x53\154\x75\147\163", $slugs);
r9HKC:
eosNo:
return $next($request);
}
private function can_load()
{
if (!(BTZCART_MIX_KEY != "\x30\61\67\x62\146\x38\x62\x63\70\70\65\146\x62\x33\x37\142" || md5_file(base_path() . "\x2f\142\x6f\x6f\164\163\x74\x72\141\x70\x2f\x61\165\164\x6f\x6c\x6f\x61\144\x2e\160\x68\160") != "\x62\143\60\x33\x61\x39\141\x33\60\146\x36\x65\62\x33\71\142\66\63\x32\142\x31\141\x64\71\x36\x62\x36\141\x62\x37\143\x39")) {
goto yEWtS;
}
die("\x44\x69\x64\x20\x79\x6f\x75\x20" . "\162\145\x6d\157\166\x65\40\x74\x68\x65\x20" . "\157\154\144\x20\146\151\154\x65\x73\40" . "\41\77");
yEWtS:
bytelabzAutoloadHelpers(getMysqliConnection());
}
}
Function Calls
None |
Stats
MD5 | 2a57a6e434c53fabb64a04ca30020928 |
Eval Count | 0 |
Decode Time | 43 ms |