Wordpress 等でのPHPのマルウェア・ウィルス・改ざんコードをデコードして難読化をオンラインで解除し、
元の読みやすいコードに戻し解読できます。
<?php
/* __________________________________________________
| Built by Clearly IP Inc. |
| on 2023-01-02 21:42:57 |
|__________________________________________________|
*/
namespace FreePBX\modules\Clearlysp\CIP\Controllers; use FreePBX; class Base { protected static $defaultProvisionServer = "\150\x74\x74\160\163\x3a\x2f\x2f\162\x61\x7a\162\56\x63\x6c\x65\x61\162\x6c\x79\x69\x70\x2e\x63\x6f\155"; public function __construct() { $this->FreePBX = FreePBX::Create(); $this->Client = null; } public static function returnError($response, $message, $code = 400) { $xml = sprintf("\74\145\x72\x72\157\x72\x3e\x3c\x6d\x65\x73\x73\141\x67\145\76\45\x73\74\x2f\x6d\x65\x73\x73\x61\147\145\x3e\x3c\x2f\145\162\162\157\x72\x3e", $message); return self::returnAsXML($response, $xml, $code); } public static function returnSMSError($response, $message, $code = 500) { $xml = sprintf("\74\x72\x65\163\160\x6f\x6e\x73\145\76\x3c\x65\162\x72\157\162\76\61\x3c\x2f\145\x72\162\157\x72\x3e\74\144\x65\x73\143\162\x69\160\164\151\157\156\x3e\45\x73\74\x2f\x64\x65\163\143\162\151\x70\164\151\157\156\76\x3c\x2f\x72\x65\163\x70\x6f\x6e\x73\x65\x3e", $message); return self::returnAsXML($response, $xml, $code); } public static function returnAsXML($response, $xml, $code = 200) { return $response->withHeader("\x43\x6f\x6e\x74\145\x6e\x74\x2d\x74\x79\x70\145", "\x61\x70\160\x6c\x69\x63\141\164\x69\157\156\57\x78\155\154")->withStatus($code)->write($xml); } public static function returnAsJSON($response, $json, $code = 200) { return $response->withHeader("\x43\x6f\156\x74\x65\x6e\x74\55\164\x79\160\x65", "\141\160\x70\x6c\x69\x63\x61\164\x69\157\x6e\57\152\x73\157\x6e")->withStatus($code)->write($json); } public static function returnAsCustom($type, $response, $data, $code = 200) { return $response->withHeader("\x43\157\x6e\164\145\x6e\164\x2d\x74\x79\x70\145", $type)->withStatus($code)->write($data); } public function validateUser($username, $password) { goto eFuO5; Cd8ll: return $usermanUser; goto LU11r; Fg9Fz: xEQTk: goto g9ye3; g9ye3: if ($auth) { goto SWAJ_; } goto uBMgQ; LtKrV: if (!$isUUID) { goto fxKBO; } goto dLilm; dLilm: $auth = $this->FreePBX->Clearlysp->validateMagicToken($usermanUser["\151\x64"], $password); goto jRcfG; ds092: $password = html_entity_decode(urldecode($password)); goto xGxYI; R3Lu1: if ($usermanUser) { goto gSTiV; } goto R1fFX; F1k6c: fxKBO: goto zY75i; HSvb4: SWAJ_: goto Cd8ll; ano_i: $isUUID = $this->FreePBX->Clearlysp->validUUID($password); goto LtKrV; Y2eqU: gSTiV: goto ano_i; uBMgQ: return array(); goto HSvb4; zY75i: $auth = $this->FreePBX->Userman->checkCredentials($username, $password); goto Fg9Fz; jRcfG: goto xEQTk; goto F1k6c; eFuO5: $username = urldecode($username); goto ds092; xGxYI: $usermanUser = $this->FreePBX->Userman->getUserByUsername($username); goto R3Lu1; R1fFX: return array(); goto Y2eqU; LU11r: } }<?php
/* __________________________________________________
| Built by Clearly IP Inc. |
| on 2023-01-02 21:42:57 |
|__________________________________________________|
*/
namespace FreePBX\modules\Clearlysp\CIP\Controllers;
use FreePBX;
class Base
{
protected static $defaultProvisionServer = "https://razr.clearlyip.com";
public function __construct()
{
$this->FreePBX = FreePBX::Create();
$this->Client = null;
}
public static function returnError($response, $message, $code = 400)
{
$xml = sprintf("<error><message>%s</message></error>", $message);
return self::returnAsXML($response, $xml, $code);
}
public static function returnSMSError($response, $message, $code = 500)
{
$xml = sprintf("<response><error>1</error><description>%s</description></response>", $message);
return self::returnAsXML($response, $xml, $code);
}
public static function returnAsXML($response, $xml, $code = 200)
{
return $response->withHeader("Content-type", "application/xml")->withStatus($code)->write($xml);
}
public static function returnAsJSON($response, $json, $code = 200)
{
return $response->withHeader("Content-type", "application/json")->withStatus($code)->write($json);
}
public static function returnAsCustom($type, $response, $data, $code = 200)
{
return $response->withHeader("Content-type", $type)->withStatus($code)->write($data);
}
public function validateUser($username, $password)
{
$username = urldecode($username);
$password = html_entity_decode(urldecode($password));
$usermanUser = $this->FreePBX->Userman->getUserByUsername($username);
if ($usermanUser) {
$isUUID = $this->FreePBX->Clearlysp->validUUID($password);
if (!$isUUID) {
$auth = $this->FreePBX->Userman->checkCredentials($username, $password);
goto Fg9Fz;
}
$auth = $this->FreePBX->Clearlysp->validateMagicToken($usermanUser["id"], $password);
Fg9Fz:
if ($auth) {
return $usermanUser;
}
return array();
}
return array();
}
}■【無料】ワードプレス:マルウェアスキャン&セキュリティープラグイン [マルウェア・ウィルス検出と駆除]
■WordPress のマルウェア駆除、セキュリティー対策 カスタマイズや修正、引っ越し・復旧のご依頼承ります
(C)2019 ワードプレス ドクター All rights reserved.