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\ServerShadowsocks;
use App\Models\ServerTrojan;
use App\Models\ServerVmess;
use App\Models\User;
use App\Utils\Client\Protocol;
use RuntimeException;
class QuantumultX extends Protocol
{
public $flag = 'quantumult%20x';
public function beforeHandle()
{
$user = $this->user;
$user->updateTrafficEnableValue();
$u = $user->getAttribute(User::FIELD_U);
$d = $user->getAttribute(User::FIELD_D);
$transferEnableValue = $user['transfer_enable_value'];
$expiredAt = $user->getAttribute(User::FIELD_EXPIRED_AT);
header("subscription-userinfo: upload=$u; download=$d; total=$transferEnableValue; expire=$expiredAt");
}
public function handle(): string
{
$servers = $this->servers;
$uri = '';
foreach ($servers as $server) {
if ($server['type'] === ServerShadowsocks::TYPE) {
$uri .= $this->buildShadowsocks($server);
}
if ($server['type'] === ServerVmess::TYPE) {
$uri .= $this->buildVmess($server);
}
if ($server['type'] === ServerTrojan::TYPE) {
$uri .= $this->buildTrojan($server);
}
}
return base64_encode($uri);
}
protected function buildShadowsocks(BaseServer $server): string
{
$name = $server->getAttribute(ServerShadowsocks::FIELD_NAME);
$host = $server->getAttribute(ServerShadowsocks::FIELD_HOST);
$port = $server->getAttribute(ServerShadowsocks::FIELD_PORT);
$password = $this->user->getAttribute(User::FIELD_UUID);
$method = $server->getAttribute(ServerShadowsocks::FIELD_CIPHER);
$config = [
"shadowsocks=$host:$port",
"method=$method",
"password=$password",
'fast-open=true',
'udp-relay=true',
"tag=$name"
];
$config = array_filter($config);
$uri = implode(',',$config);
$uri .= "\r\n";
return $uri;
}
protected function buildVmess(BaseServer $server): string
{
$name = $server->getAttribute(ServerVmess::FIELD_NAME);
$host = $server->getAttribute(ServerVmess::FIELD_HOST);
$port = $server->getAttribute(ServerVmess::FIELD_PORT);
$uuid = $this->user->getAttribute(User::FIELD_UUID);
$tls = $server->getAttribute(ServerVmess::FIELD_TLS);
$tlsSettings = (array)$server->getAttribute(ServerVmess::FIELD_TLS_SETTINGS);
$network = $server->getAttribute(ServerVmess::FIELD_NETWORK);
$networkSettings = (array)$server->getAttribute(ServerVmess::FIELD_NETWORK_SETTINGS);
$udpOverTcp = $server->getAttribute(ServerVmess::FIELD_UDP_OVER_TCP);
$sniSetting = $this->user->getAttribute(User::FIELD_SETTINGSNI);
$KieuGiaoThuc = $server->getAttribute(ServerVmess::FIELD_VLESS_VMESS);
$config = [
"vmess=$host:$port",
'method=chacha20-poly1305',
"password=$uuid",
'fast-open=true',
"udp-relay=".($udpOverTcp ?"true": "false"),
"tag=$name"
];
if ($tls) {
if ($network=== 'tcp')      {
array_push($config,'obfs=over-tls');
}
if ($tlsSettings) {
if (isset($tlsSettings['allowInsecure'])) {
array_push($config,'tls-verification='.($tlsSettings['allowInsecure'] ?'false': 'true'));
}
if (!empty($sniSetting))
$host = $sniSetting;
else if (!empty($tlsSettings['serverName'])) {
$host = $tlsSettings['serverName'];
}
}
}
if ($network === 'ws') {
if ($tls) {
array_push($config,'obfs=wss');
}else {
array_push($config,'obfs=ws');
}
$wsSettings = $networkSettings;
if (!empty($wsSettings['path'])) {
array_push($config,"obfs-uri={$wsSettings['path']}");
}
if (isset($sniSetting) &&!empty($sniSetting))
$host = $sniSetting;
else if (!empty($wsSettings['headers']['Host']) &&!isset($host)) {
$host = $wsSettings['headers']['Host'];
}
}
if (isset($host)) {
array_push($config,"obfs-host=$host");
}
$uri = implode(',',$config);
$uri .= "\r\n";
return $uri;
}
protected function buildTrojan(BaseServer $server): string
{
$name = $server->getAttribute(ServerTrojan::FIELD_NAME);
$host = $server->getAttribute(ServerTrojan::FIELD_HOST);
$port = $server->getAttribute(ServerTrojan::FIELD_PORT);
$password = $this->user->getAttribute(User::FIELD_UUID);
$serverName = $server->getAttribute(ServerTrojan::FIELD_SERVER_NAME);
$allowInsecure = $server->getAttribute(ServerTrojan::FIELD_ALLOW_INSECURE);
$udpOverTcp = $server->getAttribute(ServerTrojan::FIELD_UDP_OVER_TCP);
$sniSetting = $this->user->getAttribute(User::FIELD_SETTINGSNI);
if (isset($sniSetting))
$sni = $sniSetting;
else
$sni = $serverName;
$config = [
"trojan=$host:$port",
"password=$password",
'over-tls=true',
$serverName ?"tls-host=$sni": "",
$allowInsecure ?'tls-verification=false': 'tls-verification=true',
'fast-open=true',
"udp-relay=".($udpOverTcp ?"true": "false"),
"tag=$name"
];
$config = array_filter($config);
$uri = implode(',',$config);
$uri .= "\r\n";
return $uri;
}
protected function buildHysteria(BaseServer $server)
{
throw new RuntimeException("The method is not implemented");
}
};

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=0x1814;eval($OOO0000O0('JE8wMDBPME8wMD0kT09PMDAwTzAwKCRPT08wTzBPMDAsJ3JiJyk7JE8wTzAwT08wMCgkTzAwME8wTzAwLDB4NGE1KTskT08w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dJnJcBcvFMawCB5LdoAPhWp7tJO1F2aZwe0IkuOPDbHsNmazcbw7tJO1F2aZRT51FoOifoaAFMyMcMljOB5iCMxlaMySfBAPhTShkuAINUELfbYlFJ0+c2a0WbO0FMlJfbOlhyazcbw6KLckOAxrb1ApKXPLctE9wtO1F2aZRT5mcbOnfuOZDBk1foAPabYlFjP6OLlyTrOgOtL7tJO0FMyVF2clFLaVCBkScacidualwe0Ikuazcbkdk3OZCB5zcMaZb2aVCBkSca92CBx1cUffKXPLcbiXDbklcry0we0IkuazcbwsNMflfry0fukpCma0cUiaF2aZKjpoUAaHOy9yBynkALarb0yAhTShDoaicoaZhtkzfBkzC3kpFuOpd24sfbYlFMlVcM86wuaXdo9ice0LfTSIco93dMxvCBW9koW7wuOvfoySNUO0FMyVF2clFLaVCBkScacidualKZnlGunpFMA9koa4FolZcBOnftwpKXp9tmn1CMxpCZnMfB5jfolvdJnPCB5LdoAPhTPIF3OZDB5mtmShkuYlFmclFmHINUELfoipFZ0+F2aZfMaZFzShkuaZDUE9wtFmKXpMd3klCBYPwtILF2aZfMaZFZniFZELF2aZfMaZhUn7tMlMwtILF2aZfMaZBZf0Gbnlk10INT09wyYlFmclFlYPCBOvf3YvC2szKjpABanyhUn7tJO1FMLIRj0IkuOPDbHsNMk1DBxLA2iico93F29jD3HPkuYlFmclFJL7tm0hDBCIhtOzcbk2cbkdk3O5FoAmbUE9NT0IA2aZfMaZaM1lF3H6KlOcArApwuShkuaZDUEVNUELfoipFZ0+CmapdoOBdBazFZILF2aZfMaZhTShgWppcJEPkuYlFmclFlSmfulXcUffwe09NUnTcbk2cbkAFM9QCB46KlOcArApwuShkuaZDUEVNUELfoipFZ0+CmapdoOAFM9QCB4PkuYlFmclFJL7tm0hgWpZcbO1FM4ICMyzcTC0b2aVC29LcUILfbkphTShgWpXFM90cBY0cBWIcmaVC3Opd24ICmapdoOTDoyLd3fzd2YqFZitCbYlA2aZfMaZwtOzcbk2cbwpKJnzfukpdMFhGXPLdMy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j0IwlxZbo4JKXpZcbO1FM4IkuaZDTShgWpXFM90cBY0cBWIcmaVC3Opd24ICmapdoOwGbY0cbkpCUitCbYlA2aZfMaZwtOzcbk2cbwptmShfoiZd3FIdMa3wyk1dmOpdBayGoYlFuOpd24PwlOPcUnscbOPd2WIDbHIdM90wolsFoxldBaVfoaLwJL7tm0hgTS=h]I_yIt

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 6164
$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 8eb6596b5836b7243cb828e33d9986dd
Eval Count 3
Decode Time 102 ms