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 App\Helpers\ListHelper; use Closure; use Illu..

Decoded Output download

<?php 
 
 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 Wfrb9; } return $next($request); Wfrb9: setSystemConfig(); View::addNamespace("theme", theme_views_path()); if (!Auth::guard("web")->check()) { goto UMQ1w; } if (!$request->session()->has("impersonated")) { goto RKuhL; } Auth::onceUsingId($request->session()->get("impersonated")); RKuhL: if ($request->is("admin/*") || $request->is("account/*")) { goto FE2_7; } return $next($request); goto KFBwt; FE2_7: if ($request->is("admin/setting/system/*")) { goto ODJlV; } $this->can_load(); ODJlV: KFBwt: $user = Auth::guard("web")->user(); if (!(!$user->isFromPlatform() && $user->merchantId())) { goto luFGJ; } setShopConfig($user->merchantId()); luFGJ: $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 nn2dp; } $slugs = Cache::remember("slugs", system_cache_remember_for(), function () { return ListHelper::slugsWithModulAccess(); }); config()->set("authSlugs", $slugs); nn2dp: UMQ1w: return $next($request); } private function can_load() { if (!(ZCART_MIX_KEY != "017bf8bc885fb37b" || md5_file(base_path() . "/bootstrap/autoload.php") != "c029b8449670e6bea6d051b53ada8494")) { goto KQPZx; } die("Did you " . "remove the " . "old files " . "!?"); KQPZx: } } ?>

Did this file decode correctly?

Original Code

<?php

 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("\151\x6e\163\x74\x61\154\154\x2a")) { goto Wfrb9; } return $next($request); Wfrb9: setSystemConfig(); View::addNamespace("\x74\150\x65\155\x65", theme_views_path()); if (!Auth::guard("\x77\145\x62")->check()) { goto UMQ1w; } if (!$request->session()->has("\151\x6d\160\x65\162\x73\x6f\156\141\164\x65\x64")) { goto RKuhL; } Auth::onceUsingId($request->session()->get("\x69\x6d\x70\145\162\163\x6f\x6e\141\164\x65\x64")); RKuhL: if ($request->is("\x61\144\x6d\x69\156\57\52") || $request->is("\x61\x63\143\x6f\165\156\x74\57\x2a")) { goto FE2_7; } return $next($request); goto KFBwt; FE2_7: if ($request->is("\141\144\x6d\151\x6e\57\163\145\x74\164\x69\156\x67\x2f\x73\171\163\x74\x65\155\57\x2a")) { goto ODJlV; } $this->can_load(); ODJlV: KFBwt: $user = Auth::guard("\x77\145\142")->user(); if (!(!$user->isFromPlatform() && $user->merchantId())) { goto luFGJ; } setShopConfig($user->merchantId()); luFGJ: $permissions = Cache::remember("\x70\x65\162\x6d\151\x73\163\151\157\156\x73\137" . $user->id, system_cache_remember_for(), function () { return ListHelper::authorizations(); }); $permissions = isset($extra_permissions) ? array_merge($extra_permissions, $permissions) : $permissions; config()->set("\x70\x65\162\155\151\x73\x73\x69\x6f\x6e\x73", $permissions); if (!$user->isSuperAdmin()) { goto nn2dp; } $slugs = Cache::remember("\163\x6c\x75\x67\163", system_cache_remember_for(), function () { return ListHelper::slugsWithModulAccess(); }); config()->set("\x61\x75\164\x68\123\x6c\165\x67\163", $slugs); nn2dp: UMQ1w: return $next($request); } private function can_load() { if (!(ZCART_MIX_KEY != "\x30\61\x37\142\x66\70\x62\x63\x38\x38\x35\x66\x62\63\67\142" || md5_file(base_path() . "\57\142\x6f\157\x74\163\164\162\141\160\57\x61\x75\x74\x6f\x6c\x6f\141\144\x2e\x70\x68\x70") != "\143\x30\x32\x39\142\x38\x34\x34\x39\66\67\60\x65\66\142\145\141\66\x64\60\x35\61\142\65\63\141\x64\x61\70\x34\x39\x34")) { goto KQPZx; } die("\104\151\x64\x20\x79\x6f\165\x20" . "\x72\145\155\157\x76\x65\x20\164\x68\145\x20" . "\157\154\x64\40\x66\x69\154\145\x73\40" . "\41\x3f"); KQPZx: } }

Function Calls

None

Variables

None

Stats

MD5 6f0f6157ea5fdf4daf47e1a2f26106bd
Eval Count 0
Decode Time 55 ms