Japanese English

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

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

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

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

<?php declare(strict_types=1); namespace OneTeamSoftware\WC\Shipping; use OneTeamSoftware\Logger\LoggerInterface; class ShipmentNotifier { protected $id; protected $notifyForStatuses; public function __construct(string $hsNwz, LoggerInterface $w8Mi0) { $this->id = $hsNwz; $this->logger = $w...



難読化されたPHPコード

<?php
declare(strict_types=1);
namespace OneTeamSoftware\WC\Shipping;
use OneTeamSoftware\Logger\LoggerInterface;
class ShipmentNotifier
{
    protected $id;
    protected $notifyForStatuses;
    public function __construct(string $hsNwz, LoggerInterface $w8Mi0)
    {
        $this->id = $hsNwz;
        $this->logger = $w8Mi0;
        $this->notifyForStatuses = [];
    }
    public function register(): void
    {
        add_action($this->id . "\137\163\150\x69\160\155\145\156\x74\x5f\163\164\141\164\x75\x73\x5f\143\x68\x61\x6e\147\145\144", [$this, "\155\141\171\x62\x65\116\x6f\164\x69\146\x79"], 10, 2);
    }
    public function setNotifyForStatuses(array $FgrMn): void
    {
        $this->notifyForStatuses = $FgrMn;
    }
    public function maybeNotify(int $iKfxj, array $uT9iq): void
    {
        if (empty($this->notifyForStatuses) || empty($uT9iq["\x73\164\x61\164\x75\163"])) {
            return;
        }
        $YjKHd = wc_get_order($iKfxj);
        if (empty($YjKHd)) {
            return;
        }
        $this->logger->debug(__FILE__, 83, "\155\x61\171\142\x65\116\157\164\x69\x66\x79\x2c\x20\x6f\x72\x64\x65\162\x49\x64\72\40\x25\144\x2c\40\x73\150\x69\x70\155\145\156\x74\x3a\40\x25\163", $iKfxj, print_r($uT9iq, true));
        if ($this->canNotifyForStatus($uT9iq["\x73\x74\x61\x74\165\x73"])) {
            $this->notify($iKfxj, $uT9iq);
        }
    }
    protected function notify(int $iKfxj, array $uT9iq): void
    {
        $this->logger->debug(__FILE__, 99, "\156\157\164\151\x66\x79\x2c\x20\157\x72\x64\x65\162\x49\x64\x3a\40\x25\144", $iKfxj);
        $VU8ug = sprintf(__("\x53\150\151\160\x6d\145\156\x74\x20\45\x73\40\163\164\141\x74\x75\x73\40\150\x61\163\40\143\150\x61\x6e\x67\x65\144\x20\x74\x6f\40\45\163", $this->id), false === empty($uT9iq["\143\141\x72\x72\x69\x65\162\x5f\164\x72\x61\x63\x6b\x69\x6e\147\137\x63\x6f\x64\x65"]) ? $uT9iq["\143\141\162\162\151\145\x72\137\164\x72\x61\143\x6b\151\x6e\147\x5f\x63\157\144\x65"] : '', false === empty($uT9iq["\163\164\x61\164\x75\x73\x5f\156\x61\x6d\145"]) ? $uT9iq["\163\x74\141\x74\x75\163\x5f\x6e\x61\x6d\145"] : $uT9iq["\x73\x74\141\x74\x75\x73"]);
        do_action("\x77\157\x6f\143\157\155\155\x65\162\143\x65\x5f\x6e\x65\167\x5f\x63\165\x73\164\157\x6d\145\x72\x5f\156\157\x74\x65", ["\x6f\x72\144\145\x72\137\151\144" => $iKfxj, "\143\x75\x73\164\157\155\x65\x72\x5f\156\157\x74\x65" => $VU8ug]);
    }
    protected function canNotifyForStatus(string $aCNOl): bool
    {
        $eMO9e = false;
        if (in_array($aCNOl, $this->notifyForStatuses, true) || isset($this->notifyForStatuses[$aCNOl])) {
            $this->logger->debug(__FILE__, 126, "\x77\x65\x20\143\x61\156\x20\156\x6f\164\x69\146\171\x20\146\x6f\162\40\x25\x73\40\163\164\141\x74\x75\163", $aCNOl);
            $eMO9e = true;
        } elseif (in_array("\141\x6e\x79", $this->notifyForStatuses, true) || isset($this->notifyForStatuses["\x61\156\171"])) {
            $this->logger->debug(__FILE__, 129, "\167\x65\x20\x63\141\156\x20\x6e\157\x74\151\146\171\40\146\157\x72\x20\141\x6e\171\40\163\x74\x61\164\165\163");
            $eMO9e = true;
        }
        return $eMO9e;
    }
}

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

<?php

declare (strict_types=1);
namespace OneTeamSoftware\WC\Shipping;

use OneTeamSoftware\Logger\LoggerInterface;
class ShipmentNotifier
{
    protected $id;
    protected $notifyForStatuses;
    public function __construct(string $hsNwz, LoggerInterface $w8Mi0)
    {
        $this->id = $hsNwz;
        $this->logger = $w8Mi0;
        $this->notifyForStatuses = [];
    }
    public function register() : void
    {
        add_action($this->id . "_shipment_status_changed", [$this, "maybeNotify"], 10, 2);
    }
    public function setNotifyForStatuses(array $FgrMn) : void
    {
        $this->notifyForStatuses = $FgrMn;
    }
    public function maybeNotify(int $iKfxj, array $uT9iq) : void
    {
        if (empty($this->notifyForStatuses) || empty($uT9iq["status"])) {
            return;
        }
        $YjKHd = wc_get_order($iKfxj);
        if (empty($YjKHd)) {
            return;
        }
        $this->logger->debug("/var/www/html/input.php", 83, "maybeNotify, orderId: %d, shipment: %s", $iKfxj, print_r($uT9iq, true));
        if ($this->canNotifyForStatus($uT9iq["status"])) {
            $this->notify($iKfxj, $uT9iq);
        }
    }
    protected function notify(int $iKfxj, array $uT9iq) : void
    {
        $this->logger->debug("/var/www/html/input.php", 99, "notify, orderId: %d", $iKfxj);
        $VU8ug = sprintf(__("Shipment %s status has changed to %s", $this->id), false === empty($uT9iq["carrier_tracking_code"]) ? $uT9iq["carrier_tracking_code"] : '', false === empty($uT9iq["status_name"]) ? $uT9iq["status_name"] : $uT9iq["status"]);
        do_action("woocommerce_new_customer_note", ["order_id" => $iKfxj, "customer_note" => $VU8ug]);
    }
    protected function canNotifyForStatus(string $aCNOl) : bool
    {
        $eMO9e = false;
        if (in_array($aCNOl, $this->notifyForStatuses, true) || isset($this->notifyForStatuses[$aCNOl])) {
            $this->logger->debug("/var/www/html/input.php", 126, "we can notify for %s status", $aCNOl);
            $eMO9e = true;
        } elseif (in_array("any", $this->notifyForStatuses, true) || isset($this->notifyForStatuses["any"])) {
            $this->logger->debug("/var/www/html/input.php", 129, "we can notify for any status");
            $eMO9e = true;
        }
        return $eMO9e;
    }
}


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

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

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