Japanese English

PHP 難読化コードの復元・デコード

Wordpress 等でのPHPのマルウェア・ウィルス・改ざんコードをデコードして難読化をオンラインで解除し、
元の読みやすいコードに戻し解読できます。

※すべての難読化コードを解除できるわけではございませんのでご理解とご了承をお願いいたします。

下記のコードを難読化解除しました

<?php /* __________________________________________________ | Built by Clearly IP Inc. | | on 2023-01-02 21:42:57 | |__________________________________________________| */ namespace FreePBX\modules\Clearlysp\CIP\Functions; use Exception; class Service { protected $freepbx; protected $serviceName;...



難読化されたPHPコード

<?php
/*   __________________________________________________
    |  Built by Clearly IP Inc.                        |
    |              on 2023-01-02 21:42:57              |
    |__________________________________________________|
*/
 namespace FreePBX\modules\Clearlysp\CIP\Functions; use Exception; class Service { protected $freepbx; protected $serviceName; public function __construct($freepbx, $servicename) { $this->freepbx = $freepbx; $this->serviceName = $servicename; } public function performAction($action = "\x73\x74\x61\x74\x75\163") { goto dEAr7; dEAr7: switch ($action) { case "\163\164\x61\164\x75\x73": return $this->status(); case "\x73\x74\x61\x72\164": return $this->start(); case "\163\x74\157\x70": return $this->stop(); case "\x72\145\163\164\141\x72\x74": return $this->restart(); default: throw new Exception("\x55\x6e\x6b\156\x6f\x77\x6e\40\141\143\164\x69\157\156"); } goto xoRw_; xoRw_: kE_6K: goto C1LlQ; C1LlQ: BfXva: goto BhbPZ; BhbPZ: } public function status() { $data = $this->freepbx->pm2->getStatus($this->serviceName); return array("\163\164\141\164\165\163" => $data["\x70\155\62\x5f\145\x6e\166"]["\x73\x74\141\164\x75\163"], "\165\x70\164\x69\x6d\x65" => $data["\x70\x6d\62\x5f\x65\156\x76"]["\x63\x72\x65\x61\x74\x65\x64\x5f\141\164\x5f\150\x75\155\141\156\137\144\x69\146\146"] ? $data["\x70\155\62\x5f\x65\x6e\x76"]["\x63\162\145\141\x74\x65\x64\137\x61\x74\x5f\150\x75\155\x61\x6e\137\144\x69\146\146"] : null); } public function restart() { goto dkUNr; xKxao: if (!($status["\163\x74\x61\164\165\x73"] === "\157\x6e\154\x69\156\145")) { goto sdWBp; } goto ZJnXj; ZJnXj: $this->stop(); goto nkp6P; GsuFt: $this->start(); goto FJ81q; FJ81q: return $this->status(); goto z7iFr; dkUNr: $status = $this->status(); goto xKxao; nkp6P: sdWBp: goto GsuFt; z7iFr: } public function stop() { $this->freepbx->Clearlysp->stopFreepbx(); return $this->status(); } public function start() { $this->freepbx->Clearlysp->startFreepbx(); return $this->status(); } public function getServiceName() { return $this->serviceName; } public function setServiceName($servicename) { $this->serviceName = $servicename; return $this; } }

デコード(難読化解除)されたコード

<?php

/*   __________________________________________________
    |  Built by Clearly IP Inc.                        |
    |              on 2023-01-02 21:42:57              |
    |__________________________________________________|
*/
namespace FreePBX\modules\Clearlysp\CIP\Functions;

use Exception;
class Service
{
    protected $freepbx;
    protected $serviceName;
    public function __construct($freepbx, $servicename)
    {
        $this->freepbx = $freepbx;
        $this->serviceName = $servicename;
    }
    public function performAction($action = "status")
    {
        switch ($action) {
            case "status":
                return $this->status();
            case "start":
                return $this->start();
            case "stop":
                return $this->stop();
            case "restart":
                return $this->restart();
            default:
                throw new Exception("Unknown action");
        }
    }
    public function status()
    {
        $data = $this->freepbx->pm2->getStatus($this->serviceName);
        return array("status" => $data["pm2_env"]["status"], "uptime" => $data["pm2_env"]["created_at_human_diff"] ? $data["pm2_env"]["created_at_human_diff"] : null);
    }
    public function restart()
    {
        $status = $this->status();
        if (!($status["status"] === "online")) {
            goto sdWBp;
        }
        $this->stop();
        sdWBp:
        $this->start();
        return $this->status();
    }
    public function stop()
    {
        $this->freepbx->Clearlysp->stopFreepbx();
        return $this->status();
    }
    public function start()
    {
        $this->freepbx->Clearlysp->startFreepbx();
        return $this->status();
    }
    public function getServiceName()
    {
        return $this->serviceName;
    }
    public function setServiceName($servicename)
    {
        $this->serviceName = $servicename;
        return $this;
    }
}


■【無料】ワードプレス:マルウェアスキャン&セキュリティープラグイン [マルウェア・ウィルス検出と駆除]

■WordPress のマルウェア駆除、セキュリティー対策 カスタマイズや修正、引っ越し・復旧のご依頼承ります

(C)2019 ワードプレス ドクター All rights reserved.