De-obfuscate PHP malware/viruses and tampering code on Wordpress to original readable code.
*Please note that not all obfuscation codes can be decoded.<?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\Common\Constant;use Eccube\Controller\AbstractController;use Eccube\Entity\Order;use Eccube\Repository\PluginRepository;use Eccube\Repository\Master\PageMaxRepository;use Eccube\Repository\OrderRepository;use Eccube\Repository\PaymentRepository;use Eccube\Util\FormUtil;use Knp\Component\Pager\PaginatorInterface;use Plugin\AmazonPayV2_42\Form\Type\Admin\SearchPaymentType;use Plugin\AmazonPayV2_42\Service\Method\AmazonPay;use Plugin\AmazonPayV2_42\Service\AmazonOrderHelper;use Plugin\AmazonPayV2_42\Repository\Master\AmazonStatusRepository;use Symfony\Component\Routing\Annotation\Route;use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;use Symfony\Component\HttpFoundation\Request;class PaymentStatusController extends AbstractController{protected $paymentStatusRepository;protected $pageMaxRepository;protected $orderRepository;public function __construct(AmazonStatusRepository $amazonStatusRepository, AmazonOrderHelper $amazonOrderHelper, PageMaxRepository $pageMaxRepository, OrderRepository $orderRepository, PaymentRepository $paymentRepository, PluginRepository $pluginRepository){goto j0O1s;j0O1s:$this->amazonStatusRepository = $amazonStatusRepository;goto ubMQN;bKoqv:$this->paymentRepository = $paymentRepository;goto QD3NX;ubMQN:$this->amazonOrderHelper = $amazonOrderHelper;goto Hsdeb;o63Yf:$this->orderRepository = $orderRepository;goto bKoqv;Hsdeb:$this->pageMaxRepository = $pageMaxRepository;goto o63Yf;QD3NX:$this->pluginRepository = $pluginRepository;goto BPt_A;BPt_A:} /** * 決済状況一覧画面 * * @Route("/%eccube_admin_route%/amazon_pay_v2/payment_status", name="amazon_pay_v2_admin_payment_status") * @Route("/%eccube_admin_route%/amazon_pay_v2/payment_status/{page_no}", requirements={"page_no" = "\d+"}, name="amazon_pay_v2_admin_payment_status_pageno") * @Template("@AmazonPayV2_42/admin/Order/payment_status.twig") */ public function index(Request $request, PaginatorInterface $paginator, $page_no = null){goto URWKl;vvMwM:$page_count_param = (int) $request->get('page_count');goto TUVbS;lKWMo:WQtuw:goto E2D16;ck5Mn:$this->session->set('amazon_pay_v2.admin.payment_status.search', FormUtil::getViewData($searchForm));goto Z2IvW;yyb3D:b9t50:goto NdG5A;sKkrd:sKmif:goto cMa5f;qPVef:vRTom:goto yyb3D;DxKaD:$this->session->set('amazon_pay_v2.admin.payment_status.search', $searchData);goto N1siq;Fl0rc:if (null !== $page_no || $request->get('resume')) {goto NcqdF;}goto ASyeC;sHu7m:if (!$page_count_param) {goto b9t50;}goto Vav34;ZeKV0:GT92S:goto eTjjp;gpS8z:NcqdF:goto svNiD;tdKxK:return ['searchForm' => $searchForm->createView(), 'pagination' => [], 'pageMaxis' => $pageMaxis, 'page_no' => $page_no, 'page_count' => $page_count, 'has_errors' => true];goto psKDg;NdG5A:if ('POST' === $request->getMethod()) {goto sKmif;}goto Fl0rc;ASyeC:$page_no = 1;goto gzRln;H7gEK:goto NbTF1;goto sKkrd;zVNm1:$page_count = $this->session->get('amazon_pay_v2.admin.payment_status.search.page_count', $this->eccubeConfig->get('eccube_default_page_count'));goto vvMwM;Z2IvW:$this->session->set('amazon_pay_v2.admin.payment_status.search.page_no', $page_no);goto AzyG7;Vav34:foreach ($pageMaxis as $pageMax) {goto eplAt;k0M1z:goto vRTom;goto qYfGL;qYfGL:bebTB:goto aPhkl;aPhkl:mnIv0:goto XYTik;eplAt:if (!($page_count_param == $pageMax->getName())) {goto bebTB;}goto nPpyn;nPpyn:$page_count = $pageMax->getName();goto cEMdC;cEMdC:$this->session->set('amazon_pay_v2.admin.payment_status.search.page_count', $page_count);goto k0M1z;XYTik:}goto qPVef;DjWSR:$page_no = 1;goto IjJD6;oxgbc:$pagination = $paginator->paginate($qb, $page_no, $page_count);goto Wjmx0;E2D16:$this->session->set('amazon_pay_v2.admin.payment_status.search.page_no', (int) $page_no);goto ZeKV0;psKDg:goto M08pL;goto sn446;Wjmx0:return ['searchForm' => $searchForm->createView(), 'pagination' => $pagination, 'pageMaxis' => $pageMaxis, 'page_no' => $page_no, 'page_count' => $page_count, 'has_errors' => false];goto gSUla;x9pNP:$searchData = FormUtil::submitAndGetData($searchForm, $viewData);goto lyfvL;kF6X5:NbTF1:goto fMfKX;AzyG7:M08pL:goto kF6X5;N1siq:$this->session->set('amazon_pay_v2.admin.payment_status.search.page_no', $page_no);goto puqWU;lyfvL:naBxx:goto H7gEK;WwWD1:$page_no = $this->session->get('amazon_pay_v2.admin.payment_status.search.page_no', 1);goto ul7Cy;sn446:tVktS:goto DjWSR;fMfKX:$qb = $this->createQueryBuilder($searchData);goto oxgbc;IjJD6:$searchData = $searchForm->getData();goto ck5Mn;cMa5f:$searchForm->handleRequest($request);goto YH1dI;ul7Cy:goto GT92S;goto lKWMo;eTjjp:$viewData = $this->session->get('amazon_pay_v2.admin.payment_status.search', []);goto x9pNP;TUVbS:$pageMaxis = $this->pageMaxRepository->findAll();goto sHu7m;puqWU:goto naBxx;goto gpS8z;YH1dI:if ($searchForm->isSubmitted() && $searchForm->isValid()) {goto tVktS;}goto tdKxK;gzRln:$searchData = [];goto DxKaD;URWKl:$searchForm = $this->createForm(SearchPaymentType::class);goto zVNm1;svNiD:if ($page_no) {goto WQtuw;}goto WwWD1;gSUla:} /** * 一括処理. * * @Route("/%eccube_admin_route%/amazon_pay_v2/payment_status/request_action/", name="amazon_pay_v2_admin_payment_status_request", methods={"POST"}) */ public function requestAction(Request $request){goto rXObd;kzsFB:Vk2nu:goto UVFeL;OqyJD:$ids = $request->get($amazon_request . '_id');goto sf8J0;Djn6Q:$Orders = $this->orderRepository->findBy(['id' => $ids]);goto DQde3;DQde3:foreach ($Orders as $Order) {goto CWjPR;a_iOC:$this->addError($result_message, 'admin');goto mJOIa;fV7tX:PzrPz:goto mZ_rI;Iq_uE:if (empty($amazonErr)) {goto W5K1p;}goto EhPkE;T1F54:W5K1p:goto GHGpf;ugi1s:Gn3nI:goto fV7tX;mJOIa:goto Gn3nI;goto T1F54;EhPkE:$result_message = "■注文番号:" . $Order->getId() . " : " . $request_name . "処理に失敗しました。" . $amazonErr;goto a_iOC;aTcgP:$this->addSuccess($result_message, 'admin');goto ugi1s;CWjPR:$amazonErr = $this->amazonOrderHelper->adminRequest($amazon_request, $Order);goto Iq_uE;GHGpf:$result_message = "■注文番号:" . $Order->getId() . " : " . $request_name . "処理に成功しました。";goto aTcgP;mZ_rI:}goto PxGgw;vJX9Q:if (isset($amazon_request)) {goto ElEup;}goto iWNKT;GjE0m:umMaK:goto e9dCk;PxGgw:vGsFp:goto LWsIP;PcLzu:$requestOrderId = $request->get('amazon_order_id');goto dJjdD;LWsIP:return $this->redirectToRoute('amazon_pay_v2_admin_payment_status_pageno', ['resume' => Constant::ENABLED]);goto bd2iN;UVFeL:$ids = [$requestOrderId];goto GjE0m;Kcu1o:$this->isTokenValid();goto PcLzu;dJjdD:if (!empty($requestOrderId)) {goto Vk2nu;}goto OqyJD;rXObd:$amazon_request = $request->get('amazon_request');goto vJX9Q;sf8J0:goto umMaK;goto kzsFB;iWNKT:throw new BadRequestHttpException();goto W0cIq;e9dCk:$request_name = $amazon_request == 'capture' ? '売上' : '取消';goto Djn6Q;W0cIq:ElEup:goto Kcu1o;bd2iN:}private function createQueryBuilder(array $searchData){goto NBrHS;NsGSD:$qb->andWhere($qb->expr()->in('o.OrderStatus', ':OrderStatuses'))->setParameter('OrderStatuses', $searchData['OrderStatuses']);goto mAYmU;TBKIe:FbAsK:goto W2a87;F81RS:$qb->andWhere($qb->expr()->in('o.AmazonPayV2AmazonStatus', ':AmazonStatuses'))->setParameter('AmazonStatuses', $searchData['AmazonStatuses']);goto PwiaI;NBrHS:$qb = $this->entityManager->createQueryBuilder();goto xUlFW;mAYmU:o0vsi:goto VkEt9;xUlFW:$qb->select('o')->from(Order::class, 'o')->orderBy('o.order_date', 'DESC')->addOrderBy('o.id', 'DESC');goto ZAxd3;DHqCf:return $qb;goto hDp0s;z7Bvl:$PaymentV2 = $this->paymentRepository->findOneBy(['method_class' => AmazonPay::class]);goto CdEb2;PwiaI:JIa2V:goto DHqCf;CdEb2:if (isset($V1Enable_flg)) {goto FbAsK;}goto cQJjs;ONacb:$qb->andWhere($qb->expr()->orX($qb->expr()->eq('o.Payment', ':PaymentV1'), $qb->expr()->eq('o.Payment', ':PaymentV2')))->setParameter('PaymentV1', $PaymentV1)->setParameter('PaymentV2', $PaymentV2)->andWhere($qb->expr()->orX($qb->expr()->isNotNull('o.AmazonStatus'), $qb->expr()->isNotNull('o.AmazonPayV2AmazonStatus')));goto Rrgid;VkEt9:if (!(!empty($searchData['AmazonStatuses']) && count($searchData['AmazonStatuses']) > 0)) {goto JIa2V;}goto F81RS;cUOFV:goto daD1Q;goto TBKIe;Wfcs4:$qb->andWhere('o.order_date IS NOT NULL');goto fvx50;cQJjs:$qb->andWhere('o.Payment = :PaymentV2')->setParameter('PaymentV2', $PaymentV2)->andWhere('o.AmazonPayV2AmazonStatus IS NOT NULL');goto cUOFV;fvx50:if (!(!empty($searchData['OrderStatuses']) && count($searchData['OrderStatuses']) > 0)) {goto o0vsi;}goto NsGSD;ZAxd3:$V1Enable_flg = $this->pluginRepository->findOneBy(array('code' => 'AmazonPay', 'enabled' => Constant::ENABLED));goto z7Bvl;Rrgid:daD1Q:goto Wfcs4;W2a87:$PaymentV1 = $this->paymentRepository->findOneBy(['method_class' => \Plugin\AmazonPay\Service\Method\AmazonPay::class]);goto ONacb;hDp0s:}}
<?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\Common\Constant; use Eccube\Controller\AbstractController; use Eccube\Entity\Order; use Eccube\Repository\PluginRepository; use Eccube\Repository\Master\PageMaxRepository; use Eccube\Repository\OrderRepository; use Eccube\Repository\PaymentRepository; use Eccube\Util\FormUtil; use Knp\Component\Pager\PaginatorInterface; use Plugin\AmazonPayV2_42\Form\Type\Admin\SearchPaymentType; use Plugin\AmazonPayV2_42\Service\Method\AmazonPay; use Plugin\AmazonPayV2_42\Service\AmazonOrderHelper; use Plugin\AmazonPayV2_42\Repository\Master\AmazonStatusRepository; use Symfony\Component\Routing\Annotation\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use Symfony\Component\HttpFoundation\Request; class PaymentStatusController extends AbstractController { protected $paymentStatusRepository; protected $pageMaxRepository; protected $orderRepository; public function __construct(AmazonStatusRepository $amazonStatusRepository, AmazonOrderHelper $amazonOrderHelper, PageMaxRepository $pageMaxRepository, OrderRepository $orderRepository, PaymentRepository $paymentRepository, PluginRepository $pluginRepository) { $this->amazonStatusRepository = $amazonStatusRepository; $this->amazonOrderHelper = $amazonOrderHelper; $this->pageMaxRepository = $pageMaxRepository; $this->orderRepository = $orderRepository; $this->paymentRepository = $paymentRepository; $this->pluginRepository = $pluginRepository; } /** * 決済状況一覧画面 * * @Route("/%eccube_admin_route%/amazon_pay_v2/payment_status", name="amazon_pay_v2_admin_payment_status") * @Route("/%eccube_admin_route%/amazon_pay_v2/payment_status/{page_no}", requirements={"page_no" = "\d+"}, name="amazon_pay_v2_admin_payment_status_pageno") * @Template("@AmazonPayV2_42/admin/Order/payment_status.twig") */ public function index(Request $request, PaginatorInterface $paginator, $page_no = null) { $searchForm = $this->createForm(SearchPaymentType::class); $page_count = $this->session->get('amazon_pay_v2.admin.payment_status.search.page_count', $this->eccubeConfig->get('eccube_default_page_count')); $page_count_param = (int) $request->get('page_count'); $pageMaxis = $this->pageMaxRepository->findAll(); if (!$page_count_param) { goto b9t50; } foreach ($pageMaxis as $pageMax) { if (!($page_count_param == $pageMax->getName())) { } $page_count = $pageMax->getName(); $this->session->set('amazon_pay_v2.admin.payment_status.search.page_count', $page_count); goto vRTom; } vRTom: b9t50: if ('POST' === $request->getMethod()) { $searchForm->handleRequest($request); if ($searchForm->isSubmitted() && $searchForm->isValid()) { $page_no = 1; $searchData = $searchForm->getData(); $this->session->set('amazon_pay_v2.admin.payment_status.search', FormUtil::getViewData($searchForm)); $this->session->set('amazon_pay_v2.admin.payment_status.search.page_no', $page_no); M08pL: goto kF6X5; } return ['searchForm' => $searchForm->createView(), 'pagination' => [], 'pageMaxis' => $pageMaxis, 'page_no' => $page_no, 'page_count' => $page_count, 'has_errors' => true]; } if (null !== $page_no || $request->get('resume')) { if ($page_no) { $this->session->set('amazon_pay_v2.admin.payment_status.search.page_no', (int) $page_no); goto ZeKV0; } $page_no = $this->session->get('amazon_pay_v2.admin.payment_status.search.page_no', 1); ZeKV0: $viewData = $this->session->get('amazon_pay_v2.admin.payment_status.search', []); $searchData = FormUtil::submitAndGetData($searchForm, $viewData); goto lyfvL; } $page_no = 1; $searchData = []; $this->session->set('amazon_pay_v2.admin.payment_status.search', $searchData); $this->session->set('amazon_pay_v2.admin.payment_status.search.page_no', $page_no); lyfvL: kF6X5: $qb = $this->createQueryBuilder($searchData); $pagination = $paginator->paginate($qb, $page_no, $page_count); return ['searchForm' => $searchForm->createView(), 'pagination' => $pagination, 'pageMaxis' => $pageMaxis, 'page_no' => $page_no, 'page_count' => $page_count, 'has_errors' => false]; } /** * 一括処理. * * @Route("/%eccube_admin_route%/amazon_pay_v2/payment_status/request_action/", name="amazon_pay_v2_admin_payment_status_request", methods={"POST"}) */ public function requestAction(Request $request) { $amazon_request = $request->get('amazon_request'); if (isset($amazon_request)) { $this->isTokenValid(); $requestOrderId = $request->get('amazon_order_id'); if (!empty($requestOrderId)) { $ids = [$requestOrderId]; goto GjE0m; } $ids = $request->get($amazon_request . '_id'); GjE0m: $request_name = $amazon_request == 'capture' ? '売上' : '取消'; $Orders = $this->orderRepository->findBy(['id' => $ids]); foreach ($Orders as $Order) { $amazonErr = $this->amazonOrderHelper->adminRequest($amazon_request, $Order); if (empty($amazonErr)) { $result_message = "■注文番号:" . $Order->getId() . " : " . $request_name . "処理に成功しました。"; $this->addSuccess($result_message, 'admin'); goto ugi1s; } $result_message = "■注文番号:" . $Order->getId() . " : " . $request_name . "処理に失敗しました。" . $amazonErr; $this->addError($result_message, 'admin'); ugi1s: } return $this->redirectToRoute('amazon_pay_v2_admin_payment_status_pageno', ['resume' => Constant::ENABLED]); } throw new BadRequestHttpException(); } private function createQueryBuilder(array $searchData) { $qb = $this->entityManager->createQueryBuilder(); $qb->select('o')->from(Order::class, 'o')->orderBy('o.order_date', 'DESC')->addOrderBy('o.id', 'DESC'); $V1Enable_flg = $this->pluginRepository->findOneBy(array('code' => 'AmazonPay', 'enabled' => Constant::ENABLED)); $PaymentV2 = $this->paymentRepository->findOneBy(['method_class' => AmazonPay::class]); if (isset($V1Enable_flg)) { $PaymentV1 = $this->paymentRepository->findOneBy(['method_class' => \Plugin\AmazonPay\Service\Method\AmazonPay::class]); $qb->andWhere($qb->expr()->orX($qb->expr()->eq('o.Payment', ':PaymentV1'), $qb->expr()->eq('o.Payment', ':PaymentV2')))->setParameter('PaymentV1', $PaymentV1)->setParameter('PaymentV2', $PaymentV2)->andWhere($qb->expr()->orX($qb->expr()->isNotNull('o.AmazonStatus'), $qb->expr()->isNotNull('o.AmazonPayV2AmazonStatus'))); goto Rrgid; } $qb->andWhere('o.Payment = :PaymentV2')->setParameter('PaymentV2', $PaymentV2)->andWhere('o.AmazonPayV2AmazonStatus IS NOT NULL'); Rrgid: $qb->andWhere('o.order_date IS NOT NULL'); if (!(!empty($searchData['OrderStatuses']) && count($searchData['OrderStatuses']) > 0)) { goto o0vsi; } $qb->andWhere($qb->expr()->in('o.OrderStatus', ':OrderStatuses'))->setParameter('OrderStatuses', $searchData['OrderStatuses']); o0vsi: if (!(!empty($searchData['AmazonStatuses']) && count($searchData['AmazonStatuses']) > 0)) { goto JIa2V; } $qb->andWhere($qb->expr()->in('o.AmazonPayV2AmazonStatus', ':AmazonStatuses'))->setParameter('AmazonStatuses', $searchData['AmazonStatuses']); JIa2V: return $qb; } }
Malware detection & removal plugin for WordPress
(C)2020 Wordpress Doctor All rights reserved.