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
namespace Mgt\Varnish\Console\Command; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Output\OutputInterface; class FlushQueueCommand extends Command { protected $urlQueueResource; public function __construct(\Mgt\Varnish\Model\ResourceModel\UrlQueue $urlQueueResource) { $this->urlQueueResource = $urlQueueResource; parent::__construct(); } protected function configure() { goto de364; e0060: $this->setDescription("\115\x47\x54\x20\x56\x61\x72\x6e\x69\163\x68\40\103\x61\143\150\145\40\106\154\x75\163\x68\40\121\165\x65\x75\x65"); goto D4b20; D4b20: parent::configure(); goto d18d6; de364: $this->setName("\155\147\164\x2d\166\x61\162\156\151\163\x68\72\x66\x6c\x75\x73\150\55\161\165\145\165\x65"); goto e0060; d18d6: } protected function execute(InputInterface $input, OutputInterface $output) { try { goto Fb7d9; Aa5bf: $output->writeln("\74\x69\156\x66\157\x3e\x56\141\x72\x6e\x69\x73\x68\x20\x55\x72\x6c\40\121\x75\x65\x75\145\40\x66\154\x75\x73\x68\x65\x64\74\57\151\x6e\146\157\76"); goto C0f54; C0f54: return \Magento\Framework\Console\Cli::RETURN_SUCCESS; goto D0742; Fb7d9: $this->urlQueueResource->flushAll(); goto Aa5bf; D0742: } catch (\Exception $e) { goto afe69; B7517: $output->writeln(sprintf("\74\145\162\162\157\162\x3e\45\x73\x3c\57\145\x72\x72\x6f\162\x3e", $errorMessage)); goto Deb58; Deb58: return \Magento\Framework\Console\Cli::RETURN_FAILURE; goto ce11e; afe69: $errorMessage = $e->getMessage(); goto B7517; ce11e: } } protected function showStores(OutputInterface $output) { goto ba9d4; ba9d4: $table = $this->getHelperSet()->get("\x74\141\142\x6c\x65"); goto C0446; F9dba: Ef673: goto cb93a; e2d11: foreach ($stores as $store) { goto B9563; Ea75b: $table->addRow($row); goto af794; B9563: $row = [$store->getStoreId(), $store->getBaseUrl()]; goto Ea75b; af794: a7b59: goto C938b; C938b: } goto F9dba; cb93a: $table->render($output); goto E0779; C0446: $table->setHeaders(["\123\164\157\x72\x65\40\x49\104", "\x42\x61\x73\145\x20\x55\122\114"]); goto Cb1cf; Cb1cf: $stores = $this->storeManager->getStores(); goto e2d11; E0779: } }<?php
namespace Mgt\Varnish\Console\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Output\OutputInterface;
class FlushQueueCommand extends Command
{
protected $urlQueueResource;
public function __construct(\Mgt\Varnish\Model\ResourceModel\UrlQueue $urlQueueResource)
{
$this->urlQueueResource = $urlQueueResource;
parent::__construct();
}
protected function configure()
{
$this->setName("mgt-varnish:flush-queue");
$this->setDescription("MGT Varnish Cache Flush Queue");
parent::configure();
}
protected function execute(InputInterface $input, OutputInterface $output)
{
try {
$this->urlQueueResource->flushAll();
$output->writeln("<info>Varnish Url Queue flushed</info>");
return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
} catch (\Exception $e) {
$errorMessage = $e->getMessage();
$output->writeln(sprintf("<error>%s</error>", $errorMessage));
return \Magento\Framework\Console\Cli::RETURN_FAILURE;
}
}
protected function showStores(OutputInterface $output)
{
$table = $this->getHelperSet()->get("table");
$table->setHeaders(["Store ID", "Base URL"]);
$stores = $this->storeManager->getStores();
foreach ($stores as $store) {
$row = [$store->getStoreId(), $store->getBaseUrl()];
$table->addRow($row);
}
$table->render($output);
}
}Malware detection & removal plugin for WordPress
(C)2020 Wordpress Doctor All rights reserved.