Untitled

 avatar
plain_text
8 hours ago
24.0 KB
7
Indexable
PHP Fatal error:  Constant expression contains invalid operations in /var/www/pterodactyl/app/Http/Controllers/Admin/Arix/ArixPresetController.php on line 1

   Symfony\Component\ErrorHandler\Error\FatalError 

  Constant expression contains invalid operations

  at app/Http/Controllers/Admin/Arix/ArixPresetController.php:1
  ➜   1▕ <?php namespace Pterodactyl\Http\Controllers\Admin\Arix; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Http; use Prologue\Alerts\AlertsMessageBag; use Pterodactyl\Http\Controllers\Controller; use Pterodactyl\Http\Requests\Admin\Arix\ArixPresetRequest; use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface; class ArixPresetController extends Controller{ private const NfMZF=150; private array $allowedKeyPrefixes=[base64_decode(hex2bin(str_rot13('5n3256755n584n686243343q'))),base64_decode(hex2bin(str_rot13('5957357562335675593256745n5735304p673q3q'))),base64_decode(hex2bin(str_rot13('6333523562476p755n79343q'))),base64_decode(hex2bin(str_rot13('62474635623356304p673q3q'))),base64_decode(hex2bin(str_rot13('59323974634739755n5735306379343q'))),base64_decode(hex2bin(str_rot13('5n47467n61474n7659584n6o56326p6o5n3256306379343q'))),base64_decode(hex2bin(str_rot13('5932397362334n7n4p673q3q'))),base64_decode(hex2bin(str_rot13('625756305953343q'))),base64_decode(hex2bin(str_rot13('6332396n615746734p673q3q'))),base64_decode(hex2bin(str_rot13('62476p7561334q75'))),base64_decode(hex2bin(str_rot13('595752325957356n5n575175'))),base64_decode(hex2bin(str_rot13('625746706243343q')))]; private array $blockedKeys=[base64_decode(hex2bin(str_rot13('595752325957356n5n5751756333566963324r7961584230615739754p6q56755n48427661573530'))),base64_decode(hex2bin(str_rot13('595752325957356n5n5751756333566963324r7961584230615739754p6q6p6o5n57353061575n705n58493q'))),base64_decode(hex2bin(str_rot13('595752325957356n5n5751756333566963324r7961584230615739754p6r4r6p59334n6p64413q3q'))),base64_decode(hex2bin(str_rot13('595752325957356n5n575175636q566r61584r30636q463061573975'))),base64_decode(hex2bin(str_rot13('5957357562335675593256745n5735304p6q4r3059557870626q733q'))),base64_decode(hex2bin(str_rot13('625746706243356o5n585n6p624739775n584n446232526p'))),base64_decode(hex2bin(str_rot13('625746706243356p5n476p3062334n446232526p'))),base64_decode(hex2bin(str_rot13('625746706243356p5n476p3062334n4o63323975')))]; private array $jsonValueKeys=[base64_decode(hex2bin(str_rot13('5n47467n61474n7659584n6o56326p6o5n32563063773q3q'))),base64_decode(hex2bin(str_rot13('62476p7561334q3q'))),base64_decode(hex2bin(str_rot13('6332396n615746734p6r4r7659326p6862484q3q'))),base64_decode(hex2bin(str_rot13('595752325957356n5n575175624746755n3356685n325650634852706232357n')))]; public function __construct( private AlertsMessageBag $alert, private SettingsRepositoryInterface $settings){} public function index():\Illuminate\Http\JsonResponse{$response=Http::get(base64_decode(hex2bin(str_rot13('6148523063484q364p793968636q6p344p6q646r4p326p7564475679626q46734p3246776153397459584n725n5852776247466n5n513q3q')))); return response()->json([base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))=>$response->successful(),base64_decode(hex2bin(str_rot13('5n47463059513q3q')))=>$response->json()]);} private function flattenArray(array $array,string $prefix=''):array{goto wb3kT;ElcRo: return $result;goto gdC8O;wb3kT:$result=[];goto K6GlS;tXUMM:oPw4B:goto ElcRo;K6GlS: foreach ($array as $key=>$value){goto WfxxV;A2bPg:$result=array_merge($result,$this->flattenArray($value,$fullKey));goto f3pyu;RtTM8:$result[$fullKey]=$value;goto UDeCp;UK2E3: if (is_array($value)){goto lt0Vi;}goto IIjeA;nOIG0: if (in_array($fullKey,$this->jsonValueKeys,true)){goto Mi_wF;}goto A2bPg;mF9uP:goto DTgzN;goto nFBTf;IIjeA:$result[$fullKey]=$value;goto mF9uP;nFBTf:lt0Vi:goto nOIG0;tMPKT:Mi_wF:goto RtTM8;WfxxV:$fullKey=$prefix?base64_decode(hex2bin(str_rot13('65795277636q566q615868394p6r736o6132563566513q3q'))):$key;goto UK2E3;b6Fg2:dqpUs:goto oyRjL;X9BEm:DTgzN:goto b6Fg2;UDeCp:GvM3l:goto X9BEm;f3pyu:goto GvM3l;goto tMPKT;oyRjL:}goto tXUMM;gdC8O:} private function rgbToHex(string $value):string{goto UJ1ih;EugB0: if (!($parts===false||count($parts)!==3)){goto SNAnR;}goto OlufR;OlufR: return $value;goto PbkcY;scHAY: return sprintf(base64_decode(hex2bin(str_rot13('497955774q6r676p4q444n344n54417965413q3q'))),(int)$parts[0],(int)$parts[1],(int)$parts[2]);goto wYdJ1;PbkcY:SNAnR:goto USmIQ;fnJHq:DxSUF:goto scHAY;UJ1ih:$parts=preg_split(base64_decode(hex2bin(str_rot13('4p31787n4o79383q'))),trim($value));goto EugB0;USmIQ: foreach ($parts as $part){goto znb_6;znb_6: if (is_numeric($part)){goto SC33m;}goto SXDwe;Mn54P:SC33m:goto wLEfB;wLEfB:rwl2Y:goto XjcVT;SXDwe: return $value;goto Mn54P;XjcVT:}goto fnJHq;wYdJ1:} private function isWhitelistedKey(string $key):bool{goto zroQx;b9Dvp:q0EoN:goto vbubh;Au4mR: foreach ($this->allowedKeyPrefixes as $prefix){goto ziBLB;Cs4t7:AtvOB:goto slk24;U3Tk4:jl3nJ:goto Cs4t7;ziBLB: if (!str_starts_with($key,$prefix)){goto jl3nJ;}goto iXULF;iXULF: return true;goto U3Tk4;slk24:}goto b9Dvp;M2xpH: return true;goto A5_H4;vbubh: return false;goto C0gJw;A5_H4:n6XgT:goto Au4mR;zroQx: if (!in_array($key,$this->jsonValueKeys,true)){goto n6XgT;}goto M2xpH;C0gJw:} public function import(ArixPresetRequest $request):\Illuminate\Http\JsonResponse{ try {goto fhhCz;wv2Ca: if ($licensed){goto MWyAa;}goto WbPas;fFYPq:MWyAa:goto wCSY8;wCSY8:$incomingPreset=$request->validated()[base64_decode(hex2bin(str_rot13('63484n6p63325630')))]??[];goto DE3w0;Y5o4U:$imported=0;goto cGY8x;NrRs_: foreach ($incomingFlat as $key=>$value){goto X7eDM;h5qvJ: if (!(str_starts_with($key,base64_decode(hex2bin(str_rot13('5932397362334n7n4p673q3q'))))&&is_string($value))){goto zhCtg;}goto rKxcQ;LzE6g:$dbKey=str_replace('.',':',$key);goto Fdd1q;Fdd1q:$this->settings->set(base64_decode(hex2bin(str_rot13('6332563064476p755n334q364s6q4679615867366579526o596o746p6558303q'))),$convertedValue);goto A18LM;MYr6V:goto oHITK;goto nPoiL;rKxcQ:$value=$this->rgbToHex($value);goto LeOI2;IL56w:$imported++;goto A6rSz;nPoiL:UfHLO:goto h5qvJ;A18LM:$updated[$key]=$convertedValue;goto IL56w;X7eDM: if (!(!$this->isWhitelistedKey($key)||in_array($key,$this->blockedKeys,true))){goto UfHLO;}goto MYr6V;VBVHA:$convertedValue=$this->convertValue($value);goto LzE6g;A6rSz:oHITK:goto wMYGp;LeOI2:zhCtg:goto VBVHA;wMYGp:}goto q1tEF;fhhCz:$licensed=Cache::remember(base64_decode(hex2bin(str_rot13('59584n706546397361574r6p626r4r6p58335n6862476p6o'))),3600, function (){$response=Http:: asForm()->post(base64_decode(hex2bin(str_rot13('6148523063484q364p793968636q6p344p6q646r4p327870593256756332557659584n7065433130614756745n513q3q'))),[base64_decode(hex2bin(str_rot13('62476p6n5n57357n5n513q3q')))=>config(base64_decode(hex2bin(str_rot13('59584n706546526s5n57316p4p6q7870593256756332553q'))))]); return (bool)($response->json()[base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))]??false);});goto wv2Ca;DE3w0:$incomingFlat=$this->flattenArray($incomingPreset);goto RqLY1;RqLY1: if (!(count($incomingFlat)>self::NfMZF)){goto EJfyg;}goto HL394;cGY8x:$updated=[];goto NrRs_;WbPas: return response()->json([base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))=>false,base64_decode(hex2bin(str_rot13('6257567n6332466r5n513q3q')))=>base64_decode(hex2bin(str_rot13('54476p6n5n57357n5n534232595778705n4746306157397549475n686157786p5n413q3q')))],403);goto fFYPq;HL394: return response()->json([base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))=>false,base64_decode(hex2bin(str_rot13('6257567n6332466r5n513q3q')))=>base64_decode(hex2bin(str_rot13('55484n6p63325630494756345932566p5n484q67625746346157313162534268624778766432566o4947746p65584q674o413q3q'))). self::NfMZF . base64_decode(hex2bin(str_rot13('4o53343q')))],422);goto PTrSf;GolK9: return response()->json([base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))=>true,base64_decode(hex2bin(str_rot13('6257567n6332466r5n513q3q')))=>base64_decode(hex2bin(str_rot13('5357317762334n305n5751676579527062584276636r526p5n4830676332563064476p755n334q676333566n5932567n63325n31624778354p673q3q'))),base64_decode(hex2bin(str_rot13('6157317762334n305n57513q')))=>$imported,base64_decode(hex2bin(str_rot13('6458426o5958526p5n413q3q')))=>$updated]);goto wyPX1;q1tEF:kTtc1:goto GolK9;PTrSf:EJfyg:goto Y5o4U;wyPX1:} catch (\Exception $e){ return response()->json([base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))=>false,base64_decode(hex2bin(str_rot13('6257567n6332466r5n513q3q')))=>base64_decode(hex2bin(str_rot13('526q46706247566o4948527649476p746347397964434277636q567n5n58513649413q3q'))). $e->getMessage()],500);}} private function convertValue($incomingValue):mixed{goto X0mIo;N9Qt0:MhL6Y:goto Ud32r;x7xE7:So8Oj:goto IRdEJ;Ud32r: return (string)$incomingValue;goto C_pBb;KLeQK: return null;goto o55eI;IRdEJ: if (!(is_array($incomingValue)||is_object($incomingValue))){goto MhL6Y;}goto h6Tww;o55eI:gTjpc:goto Tqi5O;X0mIo: if (!($incomingValue===null)){goto gTjpc;}goto KLeQK;h6Tww: return json_encode($incomingValue);goto N9Qt0;k0w2D: return $incomingValue?base64_decode(hex2bin(str_rot13('64484n315n513q3q'))):base64_decode(hex2bin(str_rot13('5n6q46736332553q')));goto x7xE7;Tqi5O: if (!is_bool($incomingValue)){goto So8Oj;}goto k0w2D;C_pBb:}}


   Whoops\Exception\ErrorException 

  Constant expression contains invalid operations

  at app/Http/Controllers/Admin/Arix/ArixPresetController.php:1
  ➜   1▕ <?php namespace Pterodactyl\Http\Controllers\Admin\Arix; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Http; use Prologue\Alerts\AlertsMessageBag; use Pterodactyl\Http\Controllers\Controller; use Pterodactyl\Http\Requests\Admin\Arix\ArixPresetRequest; use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface; class ArixPresetController extends Controller{ private const NfMZF=150; private array $allowedKeyPrefixes=[base64_decode(hex2bin(str_rot13('5n3256755n584n686243343q'))),base64_decode(hex2bin(str_rot13('5957357562335675593256745n5735304p673q3q'))),base64_decode(hex2bin(str_rot13('6333523562476p755n79343q'))),base64_decode(hex2bin(str_rot13('62474635623356304p673q3q'))),base64_decode(hex2bin(str_rot13('59323974634739755n5735306379343q'))),base64_decode(hex2bin(str_rot13('5n47467n61474n7659584n6o56326p6o5n3256306379343q'))),base64_decode(hex2bin(str_rot13('5932397362334n7n4p673q3q'))),base64_decode(hex2bin(str_rot13('625756305953343q'))),base64_decode(hex2bin(str_rot13('6332396n615746734p673q3q'))),base64_decode(hex2bin(str_rot13('62476p7561334q75'))),base64_decode(hex2bin(str_rot13('595752325957356n5n575175'))),base64_decode(hex2bin(str_rot13('625746706243343q')))]; private array $blockedKeys=[base64_decode(hex2bin(str_rot13('595752325957356n5n5751756333566963324r7961584230615739754p6q56755n48427661573530'))),base64_decode(hex2bin(str_rot13('595752325957356n5n5751756333566963324r7961584230615739754p6q6p6o5n57353061575n705n58493q'))),base64_decode(hex2bin(str_rot13('595752325957356n5n5751756333566963324r7961584230615739754p6r4r6p59334n6p64413q3q'))),base64_decode(hex2bin(str_rot13('595752325957356n5n575175636q566r61584r30636q463061573975'))),base64_decode(hex2bin(str_rot13('5957357562335675593256745n5735304p6q4r3059557870626q733q'))),base64_decode(hex2bin(str_rot13('625746706243356o5n585n6p624739775n584n446232526p'))),base64_decode(hex2bin(str_rot13('625746706243356p5n476p3062334n446232526p'))),base64_decode(hex2bin(str_rot13('625746706243356p5n476p3062334n4o63323975')))]; private array $jsonValueKeys=[base64_decode(hex2bin(str_rot13('5n47467n61474n7659584n6o56326p6o5n32563063773q3q'))),base64_decode(hex2bin(str_rot13('62476p7561334q3q'))),base64_decode(hex2bin(str_rot13('6332396n615746734p6r4r7659326p6862484q3q'))),base64_decode(hex2bin(str_rot13('595752325957356n5n575175624746755n3356685n325650634852706232357n')))]; public function __construct( private AlertsMessageBag $alert, private SettingsRepositoryInterface $settings){} public function index():\Illuminate\Http\JsonResponse{$response=Http::get(base64_decode(hex2bin(str_rot13('6148523063484q364p793968636q6p344p6q646r4p326p7564475679626q46734p3246776153397459584n725n5852776247466n5n513q3q')))); return response()->json([base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))=>$response->successful(),base64_decode(hex2bin(str_rot13('5n47463059513q3q')))=>$response->json()]);} private function flattenArray(array $array,string $prefix=''):array{goto wb3kT;ElcRo: return $result;goto gdC8O;wb3kT:$result=[];goto K6GlS;tXUMM:oPw4B:goto ElcRo;K6GlS: foreach ($array as $key=>$value){goto WfxxV;A2bPg:$result=array_merge($result,$this->flattenArray($value,$fullKey));goto f3pyu;RtTM8:$result[$fullKey]=$value;goto UDeCp;UK2E3: if (is_array($value)){goto lt0Vi;}goto IIjeA;nOIG0: if (in_array($fullKey,$this->jsonValueKeys,true)){goto Mi_wF;}goto A2bPg;mF9uP:goto DTgzN;goto nFBTf;IIjeA:$result[$fullKey]=$value;goto mF9uP;nFBTf:lt0Vi:goto nOIG0;tMPKT:Mi_wF:goto RtTM8;WfxxV:$fullKey=$prefix?base64_decode(hex2bin(str_rot13('65795277636q566q615868394p6r736o6132563566513q3q'))):$key;goto UK2E3;b6Fg2:dqpUs:goto oyRjL;X9BEm:DTgzN:goto b6Fg2;UDeCp:GvM3l:goto X9BEm;f3pyu:goto GvM3l;goto tMPKT;oyRjL:}goto tXUMM;gdC8O:} private function rgbToHex(string $value):string{goto UJ1ih;EugB0: if (!($parts===false||count($parts)!==3)){goto SNAnR;}goto OlufR;OlufR: return $value;goto PbkcY;scHAY: return sprintf(base64_decode(hex2bin(str_rot13('497955774q6r676p4q444n344n54417965413q3q'))),(int)$parts[0],(int)$parts[1],(int)$parts[2]);goto wYdJ1;PbkcY:SNAnR:goto USmIQ;fnJHq:DxSUF:goto scHAY;UJ1ih:$parts=preg_split(base64_decode(hex2bin(str_rot13('4p31787n4o79383q'))),trim($value));goto EugB0;USmIQ: foreach ($parts as $part){goto znb_6;znb_6: if (is_numeric($part)){goto SC33m;}goto SXDwe;Mn54P:SC33m:goto wLEfB;wLEfB:rwl2Y:goto XjcVT;SXDwe: return $value;goto Mn54P;XjcVT:}goto fnJHq;wYdJ1:} private function isWhitelistedKey(string $key):bool{goto zroQx;b9Dvp:q0EoN:goto vbubh;Au4mR: foreach ($this->allowedKeyPrefixes as $prefix){goto ziBLB;Cs4t7:AtvOB:goto slk24;U3Tk4:jl3nJ:goto Cs4t7;ziBLB: if (!str_starts_with($key,$prefix)){goto jl3nJ;}goto iXULF;iXULF: return true;goto U3Tk4;slk24:}goto b9Dvp;M2xpH: return true;goto A5_H4;vbubh: return false;goto C0gJw;A5_H4:n6XgT:goto Au4mR;zroQx: if (!in_array($key,$this->jsonValueKeys,true)){goto n6XgT;}goto M2xpH;C0gJw:} public function import(ArixPresetRequest $request):\Illuminate\Http\JsonResponse{ try {goto fhhCz;wv2Ca: if ($licensed){goto MWyAa;}goto WbPas;fFYPq:MWyAa:goto wCSY8;wCSY8:$incomingPreset=$request->validated()[base64_decode(hex2bin(str_rot13('63484n6p63325630')))]??[];goto DE3w0;Y5o4U:$imported=0;goto cGY8x;NrRs_: foreach ($incomingFlat as $key=>$value){goto X7eDM;h5qvJ: if (!(str_starts_with($key,base64_decode(hex2bin(str_rot13('5932397362334n7n4p673q3q'))))&&is_string($value))){goto zhCtg;}goto rKxcQ;LzE6g:$dbKey=str_replace('.',':',$key);goto Fdd1q;Fdd1q:$this->settings->set(base64_decode(hex2bin(str_rot13('6332563064476p755n334q364s6q4679615867366579526o596o746p6558303q'))),$convertedValue);goto A18LM;MYr6V:goto oHITK;goto nPoiL;rKxcQ:$value=$this->rgbToHex($value);goto LeOI2;IL56w:$imported++;goto A6rSz;nPoiL:UfHLO:goto h5qvJ;A18LM:$updated[$key]=$convertedValue;goto IL56w;X7eDM: if (!(!$this->isWhitelistedKey($key)||in_array($key,$this->blockedKeys,true))){goto UfHLO;}goto MYr6V;VBVHA:$convertedValue=$this->convertValue($value);goto LzE6g;A6rSz:oHITK:goto wMYGp;LeOI2:zhCtg:goto VBVHA;wMYGp:}goto q1tEF;fhhCz:$licensed=Cache::remember(base64_decode(hex2bin(str_rot13('59584n706546397361574r6p626r4r6p58335n6862476p6o'))),3600, function (){$response=Http:: asForm()->post(base64_decode(hex2bin(str_rot13('6148523063484q364p793968636q6p344p6q646r4p327870593256756332557659584n7065433130614756745n513q3q'))),[base64_decode(hex2bin(str_rot13('62476p6n5n57357n5n513q3q')))=>config(base64_decode(hex2bin(str_rot13('59584n706546526s5n57316p4p6q7870593256756332553q'))))]); return (bool)($response->json()[base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))]??false);});goto wv2Ca;DE3w0:$incomingFlat=$this->flattenArray($incomingPreset);goto RqLY1;RqLY1: if (!(count($incomingFlat)>self::NfMZF)){goto EJfyg;}goto HL394;cGY8x:$updated=[];goto NrRs_;WbPas: return response()->json([base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))=>false,base64_decode(hex2bin(str_rot13('6257567n6332466r5n513q3q')))=>base64_decode(hex2bin(str_rot13('54476p6n5n57357n5n534232595778705n4746306157397549475n686157786p5n413q3q')))],403);goto fFYPq;HL394: return response()->json([base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))=>false,base64_decode(hex2bin(str_rot13('6257567n6332466r5n513q3q')))=>base64_decode(hex2bin(str_rot13('55484n6p63325630494756345932566p5n484q67625746346157313162534268624778766432566o4947746p65584q674o413q3q'))). self::NfMZF . base64_decode(hex2bin(str_rot13('4o53343q')))],422);goto PTrSf;GolK9: return response()->json([base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))=>true,base64_decode(hex2bin(str_rot13('6257567n6332466r5n513q3q')))=>base64_decode(hex2bin(str_rot13('5357317762334n305n5751676579527062584276636r526p5n4830676332563064476p755n334q676333566n5932567n63325n31624778354p673q3q'))),base64_decode(hex2bin(str_rot13('6157317762334n305n57513q')))=>$imported,base64_decode(hex2bin(str_rot13('6458426o5958526p5n413q3q')))=>$updated]);goto wyPX1;q1tEF:kTtc1:goto GolK9;PTrSf:EJfyg:goto Y5o4U;wyPX1:} catch (\Exception $e){ return response()->json([base64_decode(hex2bin(str_rot13('6333566n5932567n63773q3q')))=>false,base64_decode(hex2bin(str_rot13('6257567n6332466r5n513q3q')))=>base64_decode(hex2bin(str_rot13('526q46706247566o4948527649476p746347397964434277636q567n5n58513649413q3q'))). $e->getMessage()],500);}} private function convertValue($incomingValue):mixed{goto X0mIo;N9Qt0:MhL6Y:goto Ud32r;x7xE7:So8Oj:goto IRdEJ;Ud32r: return (string)$incomingValue;goto C_pBb;KLeQK: return null;goto o55eI;IRdEJ: if (!(is_array($incomingValue)||is_object($incomingValue))){goto MhL6Y;}goto h6Tww;o55eI:gTjpc:goto Tqi5O;X0mIo: if (!($incomingValue===null)){goto gTjpc;}goto KLeQK;h6Tww: return json_encode($incomingValue);goto N9Qt0;k0w2D: return $incomingValue?base64_decode(hex2bin(str_rot13('64484n315n513q3q'))):base64_decode(hex2bin(str_rot13('5n6q46736332553q')));goto x7xE7;Tqi5O: if (!is_bool($incomingValue)){goto So8Oj;}goto k0w2D;C_pBb:}}

      +1 vendor frames 

  2   [internal]:0
      Whoops\Run::handleShutdown()
Editor is loading...
Leave a Comment