Japanese English

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

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

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

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

<?php /* __________________________________________________ | Obfuscated by YAK Pro - Php Obfuscator 2.0.3 | | on 2023-10-31 14:25:56 | | GitHub: https://github.com/pk-fr/yakpro-po | |__________________________________________________| */ namespace Plugin\AmazonPayV2_42\Controller\Admin;use Eccub...



難読化されたPHPコード

<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.3   |
    |              on 2023-10-31 14:25:56              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
namespace Plugin\AmazonPayV2_42\Controller\Admin;use Eccube\Controller\AbstractController;use Plugin\AmazonPayV2_42\Form\Type\Admin\ConfigType;use Plugin\AmazonPayV2_42\Repository\ConfigRepository;use Symfony\Component\Form\FormError;use Symfony\Component\Routing\Annotation\Route;use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;use Symfony\Component\HttpFoundation\Request;use Symfony\Component\Validator\Constraints as Assert;use Symfony\Component\Validator\Validator\ValidatorInterface;class ConfigController extends AbstractController{protected $validator;protected $configRepository;public function __construct(ValidatorInterface $validator, ConfigRepository $configRepository){$this->validator = $validator;$this->configRepository = $configRepository;}    /**
     * @Route("/%eccube_admin_route%/amazon_pay_v2_42/config", name="amazon_pay_v2.42_admin_config")
     * @Template("@AmazonPayV2_42/admin/config.twig")
     */
public function index(Request $request){goto wGRV8;S09Sh:SBAmA:goto TNIob;YI61Y:zZcre:goto S09Sh;K9QqS:if (!($Config->getAmazonAccountMode() == $this->eccubeConfig['amazon_pay_v2']['account_mode']['owned'])) {goto WPeos;}goto hyNfM;LyU7O:$form['private_key_path']->addError(new FormError('プライベートキーパスの先頭に"/"は利用できません'));goto J0AEP;dqEoJ:g5UVC:goto wrLce;y5br1:goto jCdRt;goto qMJw4;PX7cx:$Config = $form->getData();goto S1MG1;TNIob:$testAccount = $this->eccubeConfig['amazon_pay_v2']['test_account'];goto hj_sm;aKQlP:goto AwZEj;goto JCeBO;x5566:xeWcZ:goto y5br1;wrLce:$form['private_key_path']->addError(new FormError('プライベートキーファイルが見つかりません。'));goto Ssck3;JJrMZ:$form['prod_key']->addError(new FormError('本番切り替えキーは有効なキーではありません。'));goto x5566;wGRV8:$Config = $this->configRepository->get(true);goto Sj60e;lmDoZ:if (!($form->isSubmitted() && $form->isValid())) {goto zZcre;}goto aFZ3W;aFZ3W:$this->entityManager->persist($Config);goto EFtl0;ffgFx:$form->handleRequest($request);goto cQkiX;hj_sm:return ['form' => $form->createView(), 'testAccount' => $testAccount];goto yhtxI;I883L:foreach ($errors as $error) {$messages[] = $error->getMessage();j0C2d:}goto J12Zo;j29fD:WPeos:goto lmDoZ;Z1yWU:$errors = $this->validator->validate($prod_key, [new Assert\NotBlank()]);goto NvANb;Ld_0E:if (password_verify($prod_key, '$2y$10$m3aYrihBaIKarlrmI39tGORK4fFBC7cWoSLFy6jkMpT7IduYVsVtO')) {goto xeWcZ;}goto JJrMZ;S1MG1:if (!($Config->getEnv() == $this->eccubeConfig['amazon_pay_v2']['env']['prod'])) {goto hlVxi;}goto WQjd_;mKuCD:if (mb_substr($Config->getPrivateKeyPath(), 0, 1) == '/') {goto syMW1;}goto kWeHW;WQjd_:$prod_key = $Config->getProdKey();goto Z1yWU;NvANb:if ($errors->count() != 0) {goto p16pz;}goto Ld_0E;J0AEP:goto AwZEj;goto dqEoJ;rIdzF:jCdRt:goto xBTla;J12Zo:lDxYZ:goto SeFQ3;kWeHW:if (!is_file($privateKeyPath) || file_exists($privateKeyPath) === false) {goto g5UVC;}goto aKQlP;cQkiX:if (!($form->isSubmitted() && $form->isValid())) {goto SBAmA;}goto PX7cx;qMJw4:p16pz:goto I883L;EFtl0:$this->entityManager->flush($Config);goto jfVoc;JCeBO:syMW1:goto LyU7O;SeFQ3:$form['prod_key']->addError(new FormError($messages[0]));goto rIdzF;FPMVQ:return $this->redirectToRoute('amazon_pay_v2.42_admin_config');goto YI61Y;hyNfM:$privateKeyPath = $this->getParameter('kernel.project_dir') . '/' . $Config->getPrivateKeyPath();goto mKuCD;Ssck3:AwZEj:goto j29fD;jfVoc:$this->addSuccess('amazon_pay_v2.admin.save.success', 'admin');goto FPMVQ;Sj60e:$form = $this->createForm(ConfigType::class, $Config);goto ffgFx;xBTla:hlVxi:goto K9QqS;yhtxI:}}

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

<?php

/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.3   |
    |              on 2023-10-31 14:25:56              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
namespace Plugin\AmazonPayV2_42\Controller\Admin;

use Eccube\Controller\AbstractController;
use Plugin\AmazonPayV2_42\Form\Type\Admin\ConfigType;
use Plugin\AmazonPayV2_42\Repository\ConfigRepository;
use Symfony\Component\Form\FormError;
use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Validator\ValidatorInterface;
class ConfigController extends AbstractController
{
    protected $validator;
    protected $configRepository;
    public function __construct(ValidatorInterface $validator, ConfigRepository $configRepository)
    {
        $this->validator = $validator;
        $this->configRepository = $configRepository;
    }
    /**
     * @Route("/%eccube_admin_route%/amazon_pay_v2_42/config", name="amazon_pay_v2.42_admin_config")
     * @Template("@AmazonPayV2_42/admin/config.twig")
     */
    public function index(Request $request)
    {
        $Config = $this->configRepository->get(true);
        $form = $this->createForm(ConfigType::class, $Config);
        $form->handleRequest($request);
        if (!($form->isSubmitted() && $form->isValid())) {
            goto SBAmA;
        }
        $Config = $form->getData();
        if (!($Config->getEnv() == $this->eccubeConfig['amazon_pay_v2']['env']['prod'])) {
            goto hlVxi;
        }
        $prod_key = $Config->getProdKey();
        $errors = $this->validator->validate($prod_key, [new Assert\NotBlank()]);
        if ($errors->count() != 0) {
            foreach ($errors as $error) {
                $messages[] = $error->getMessage();
            }
            $form['prod_key']->addError(new FormError($messages[0]));
            goto rIdzF;
        }
        if (password_verify($prod_key, '$2y$10$m3aYrihBaIKarlrmI39tGORK4fFBC7cWoSLFy6jkMpT7IduYVsVtO')) {
            goto xeWcZ;
        }
        $form['prod_key']->addError(new FormError('本番切り替えキーは有効なキーではありません。'));
        xeWcZ:
        rIdzF:
        hlVxi:
        if (!($Config->getAmazonAccountMode() == $this->eccubeConfig['amazon_pay_v2']['account_mode']['owned'])) {
            goto WPeos;
        }
        $privateKeyPath = $this->getParameter('kernel.project_dir') . '/' . $Config->getPrivateKeyPath();
        if (mb_substr($Config->getPrivateKeyPath(), 0, 1) == '/') {
            $form['private_key_path']->addError(new FormError('プライベートキーパスの先頭に"/"は利用できません'));
            goto AwZEj;
        }
        if (!is_file($privateKeyPath) || file_exists($privateKeyPath) === false) {
            $form['private_key_path']->addError(new FormError('プライベートキーファイルが見つかりません。'));
            goto Ssck3;
        }
        Ssck3:
        AwZEj:
        WPeos:
        if (!($form->isSubmitted() && $form->isValid())) {
            SBAmA:
            $testAccount = $this->eccubeConfig['amazon_pay_v2']['test_account'];
            return ['form' => $form->createView(), 'testAccount' => $testAccount];
        }
        $this->entityManager->persist($Config);
        $this->entityManager->flush($Config);
        $this->addSuccess('amazon_pay_v2.admin.save.success', 'admin');
        return $this->redirectToRoute('amazon_pay_v2.42_admin_config');
    }
}


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

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

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