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 /* Dev By Hoang Skyht 18-06-2024 */$OOO000000=urldecode('%66%67%36%73%62%65%68%70%72..

Decoded Output download


namespace App\Utils\Client\Protocols;
use App\Models\BaseServer;
use App\Models\ServerHysteria;
use App\Models\ServerShadowsocks;
use App\Models\ServerTrojan;
use App\Models\ServerVmess;
use App\Models\User;
use Symfony\Component\Yaml\Yaml;
class ClashMeta extends CLash
{
public $flag = 'clash';
public $subFlag = 'meta';
public function handle(): string
{
$servers = $this->servers;
$defaultConfig = resource_path() .'/rules/default.clash.pro.yaml';
$config = Yaml::parseFile($defaultConfig);
$proxy = [];
$proxies = [];
foreach ($servers as $server) {
if ($server['type'] === ServerShadowsocks::TYPE) {
array_push($proxy,$this->buildShadowsocks($server));
array_push($proxies,$server['name']);
}
if ($server['type'] === ServerVmess::TYPE) {
array_push($proxy,$this->buildVmess($server));
array_push($proxies,$server['name']);
}
if ($server['type'] === ServerTrojan::TYPE) {
array_push($proxy,$this->buildTrojan($server));
array_push($proxies,$server['name']);
}
if ($server['type'] === ServerHysteria::TYPE) {
array_push($proxy,$this->buildHysteria($server));
array_push($proxies,$server['name']);
}
}
$config['proxies'] = array_merge($config['proxies'] ?: [],$proxy);
foreach ($config['proxy-groups'] as $k =>$v) {
if (!is_array($config['proxy-groups'][$k]['proxies'])) {
continue;
}
$config['proxy-groups'][$k]['proxies'] = array_merge($config['proxy-groups'][$k]['proxies'],$proxies);
}
$serverAllTags = array_unique(array_merge(ServerVmess::allTags(),ServerShadowsocks::allTags(),ServerTrojan::allTags()));
foreach ($serverAllTags as $tag) {
$proxies = [];
foreach ($servers as $server) {
$tags = (array)$server->getAttribute(BaseServer::FIELD_TAGS);
$name = $server->getAttribute(BaseServer::FIELD_NAME);
if (empty($tags)) {
continue;
}
if (in_array($tag,$tags)) {
array_push($proxies,$name);
}
}
if ($proxies) {
array_push($config['proxy-groups'],['name'=>$tag,'type'=>'select','proxies'=>$proxies]);
}
}
$subsDomain = $_SERVER['HTTP_HOST'];
if ($subsDomain) {
array_unshift($config['rules'],"DOMAIN,{$subsDomain},DIRECT");
}
$yaml = Yaml::dump($config);
return str_replace('$app_name',config('v2board.app_name','V2Board'),$yaml);
}
protected function buildHysteria(BaseServer $server): array
{
$name = $server->getAttribute(ServerHysteria::FIELD_NAME);
$host = $server->getAttribute(ServerHysteria::FIELD_HOST);
$port = $server->getAttribute(ServerHysteria::FIELD_PORT);
$uuid = $this->user->getAttribute(User::FIELD_UUID);
$serverName = $server->getAttribute(ServerHysteria::FIELD_SERVER_NAME);
$allowInsecure = $server->getAttribute(ServerHysteria::FIELD_ALLOW_INSECURE);
$upMbps = $server->getAttribute(ServerHysteria::FIELD_UP_MBPS);
$downMbps = $server->getAttribute(ServerHysteria::FIELD_DOWN_MBPS);
$protocol = $server->getAttribute(ServerHysteria::FIELD_PROTOCOL);
$disableMTUDiscovery = $server->getAttribute(ServerHysteria::FIELD_DISABLE_CLIENT_MTU_DISCOVERY);
$obfs = $server->getAttribute(ServerHysteria::FIELD_OBFS);
$array = [];
$array['name'] = $name;
$array['type'] = 'hysteria';
$array['server'] = $host;
$array['port'] = $port;
$array['auth_str'] = $uuid;
$array['alpn'] = ['h3'];
$array['protocol'] = $protocol;
$array['up'] = $upMbps;
$array['down'] = $downMbps;
$array['fast-open'] = true;
$array['disable_mtu_discovery'] = $disableMTUDiscovery;
if ($obfs) {
$array['obfs'] = $obfs;
}
if ($serverName) {
$array['sni'] = $serverName;
}
if ($allowInsecure) {
$array['skip-cert-verify'] = (bool)$allowInsecure;
}
return $array;
}
};

Did this file decode correctly?

Original Code

<?php /* Dev By Hoang Skyht 18-06-2024 */$OOO000000=urldecode('%66%67%36%73%62%65%68%70%72%61%34%63%6f%5f%74%6e%64');$OOO0000O0=$OOO000000{4}.$OOO000000{9}.$OOO000000{3}.$OOO000000{5};$OOO0000O0.=$OOO000000{2}.$OOO000000{10}.$OOO000000{13}.$OOO000000{16};$OOO0000O0.=$OOO0000O0{3}.$OOO000000{11}.$OOO000000{12}.$OOO0000O0{7}.$OOO000000{5};$OOO000O00=$OOO000000{0}.$OOO000000{12}.$OOO000000{7}.$OOO000000{5}.$OOO000000{15};$O0O000O00=$OOO000000{0}.$OOO000000{1}.$OOO000000{5}.$OOO000000{14};$O0O000O0O=$O0O000O00.$OOO000000{11};$O0O000O00=$O0O000O00.$OOO000000{3};$O0O00OO00=$OOO000000{0}.$OOO000000{8}.$OOO000000{5}.$OOO000000{9}.$OOO000000{16};$OOO00000O=$OOO000000{3}.$OOO000000{14}.$OOO000000{8}.$OOO000000{14}.$OOO000000{8};$OOO0O0O00=__FILE__;$OO00O0000=0x1208;eval($OOO0000O0('JE8wMDBPME8wMD0kT09PMDAwTzAwKCRPT08wTzBPMDAsJ3JiJyk7JE8wTzAwT08wMCgkTzAwME8wTzAwLDB4NGE2KTskT08wME8wME8wPSRPT08wMDAwTzAoJE9PTzAwMDAwTygkTzBPMDBPTzAwKCRPMDAwTzBPMDAsMHgxN2MpLCdFbnRlcnlvdXdraFJIWUtOV09VVEFhQmJDY0RkRmZHZ0lpSmpMbE1tUHBRcVNzVnZYeFp6MDEyMzQ1Njc4OSsvPScsJ0FCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5Ky8nKSk7ZXZhbCgkT08wME8wME8wKTs='));return;?>y}wkUx`a`On|{tkr9NHenNHenNHe1zfukgFMaXdoyjcUImb19oUAxyb18mRtwmwJ4LT09NHr8XTzEXRJwmwJXLT09NHeEXHr8XhtONT08XHeEXHr8Pkr8XTzEXT08XHtILTzEXHr8XTzEXRtONTzEXTzEXHeEpRtfydmOlFmlvfbfqDykwBAsKa09aaryiWMkeC0OLOMcuc0lpUMpHdr1sAunOFaYzamcCGyp6HerZHzW1YjF4KUSvNUFSk0ytW0OyOLfwUApRTr1KT1nOAlYAaacbBylDCBkjcoaMc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zRT5JfBlScycscbYzhtOzcbk2cbwphTShCbkZCblgFuazDtILFukvGollFZXLF2aZfMaZBZfVCB1lk10pKXp9tMlMwtILF2aZfMaZBZf0Gbnlk10INT09wyYlFmclFlOZd2pidjP6aylWOULIGXpiFmkiGa9XfbYPhtOXFM94GUXLfoipFZ0+CmapdoOAFM9QCB4PkuYlFmclFJLpKXpiFmkiGa9XfbYPhtOXFM94DBazRtOzcbk2cbkdk25idBAmbUL7tm0hDBCIhtOzcbk2cbkdk3O5FoAmbUE9NT0IA2aZfMaZUulzfoaZDBr6KlOcArApwuShCbkZCblgFuazDtILFukvGuLSkuOPDbHsNMk1DBxLUulzfoaZDBrPkuYlFmclFJLpKXpiFmkiGa9XfbYPhtOXFM94DBazRtOzcbk2cbkdk25idBAmbUL7tm0hgWPLC29VcMlmBZfXFM94DBazk10INUniFmkiGa9scbkmcUILC29VcMlmBZfXFM94DBazk10INzPIB10SkunZd3i5hTShcM9ZcByjDtEPkoYvdMcpc1SmFukvGuLsc3kvfbnzk10ICbHIkoSINT4LfJLIGXppcJEPwBlzb2yZFMy5htOjd25MDBfdk3nZd3i5RBfZd3aXFZffBZOqbaSmFukvGollFZffhULIGXpjd250DB51cTShgWPLC29VcMlmBZfXFM94GU1mFM91FuHmbaSLD11dk3nZd3ipcbHmbUE9woyZFMy5b21lFMflhtOjd25MDBfdk3nZd3i5RBfZd3aXFZffBZOqbaSmFukvGollFZffRtOXFM94DBazhTShgWPLF2aZfMaZWBxSaoymFZE9woyZFMy5b3aVDby1cUiiFmkiGa9scbkmcUiTcbk2cbkBdBazFzP6CBxSaoymFZIpRyYlFmclFlYPCBOvf3YvC2szKjpidoxACBfzhtLSA2aZfMaZaukvDMyVKjpidoxACBfzhtLphTShcM9ZcByjDtEPkuYlFmclFLySdyOic3HICbHIkuOicZLIGXPLFukvGollFZE9wysfKXpMd3klCBYPwtILF2aZfMaZFZniFZELF2aZfMaZhUn7tJO0CBfzwe0IhoyZFMy5hUOzcbk2cbwsNMflfry0fukpCma0cUitCbYlA2aZfMaZKjpoUAaHOy9AWAfThTShko5idBAINUELF2aZfMaZRT5mcbOnfuOZDBk1foAPWMyzcaYlFmclFjP6OLlyTrOgTLyYOUL7tMlMwtildbn0GUILfoymFZLpwuShC29VfolVfBA7tm0hDBCIholVb2yZFMy5htO0CBFSkuOic3HphUn7tMyZFMy5b3n1F2IPkunZd3ipcbHSko5idBApKXp9tm0hDBCIhtOXFM94DBazhUn7tMyZFMy5b3n1F2IPkoYvdMcpc1SmFukvGuLsc3kvfbnzk10SBZfVCB1lkz0+kuOicZXmfulXcUF9NJfzcBxlC3WmRtfXFM94DBazkz0+kunZd3ipcbYfhTShgWp9tJOzfBkzOo9sCBlVwe0Iky9TOakBOakdk0iAayngUr9TatffKXppcJEPkuY1CmYrd21iDB4pwuShCbkZCblgfB5zDolMftILC29VcMlmBZfZfBxlFZffRtkrT01nUA4SGZOzfBkzOo9sCBlVgUxrUakyW1WJhTShgWPLGBysdtE9wylidBX6KMO1dbEPkoYvdMcpcZL7tmklfuaZdJnzfukgFMaXdoyjcUImkoyXFy9VCB1lkZxjd25MDBFPk3CZCM9iFMWVCbnXb25idBAmRtfBHLkvCbkLkZLSkulidBXpKXp9tmnZd3OlC3OlctnMfB5jfolvdJnJfBlScri5F3OlFMlihrkiF2aTcbk2cbwIkuYlFmclFJL6woyZFMy5tmShko5idBAINUELF2aZfMaZRT5mcbOnfuOZDBk1foAPA2aZfMaZUulzfoaZDBr6KLckOAxrb05nTAApKXPLDo9zftE9wtOzcbk2cbwsNMflfry0fukpCma0cUiTcbk2cbkwGbY0cbkpCTP6OLlyTrOgUr9TatL7tJOXd3k0we0IkuYlFmclFJ0+c2a0WbO0FMlJfbOlhyYlFmclFLi5F3OlFMliKjpoUAaHOy9WT1kAhTShkua1DBWINUELfoipFZ0+fbYlFJ0+c2a0WbO0FMlJfbOlhyazcbw6KLckOAxrb1aaUAWpKXPLF2aZfMaZTMyscUE9wtOzcbk2cbwsNMflfry0fukpCma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ShkoyZFMy5BZfvCMczk10INUELd2kMFzShgWppcJEPkuYlFmclFL5idBApwuShkoyZFMy5BZfzdMLmbUE9wtOzcbk2cbkKCB1lKXp9tMlMwtILCBxSd3fkdmYlC3aZcULIGXPLCbkZCbldk3YqDbEsC2aZft12cbkpcmLmbUE9wtiJd29ShUOidoxvf0lVF2ajfbklKXp9tmklfuaZdJELCbkZCbL7tm0hgTS=[bJJOg\weGJ{r[a

Function Calls

fopen 1
fread 3
strtr 2
fclose 1
urldecode 1
str_replace 1
base64_decode 3

Variables

$O000O0O00 True
$O0O000O00 fgets
$O0O000O0O fgetc
$O0O00OO00 fread
$OO00O0000 4616
$OO00O00O0 namespace App\Utils\Client\Protocols; use App\Models\BaseSe..
$OOO000000 fg6sbehpra4co_tnd
$OOO00000O strtr
$OOO0000O0 base64_decode
$OOO000O00 fopen
$OOO0O0O00 index.php

Stats

MD5 6a4c82d8222cbf79f9aec7e0e7f99498
Eval Count 3
Decode Time 78 ms