Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace App\Ufw\Command; use App\System\Command; use App\Ufw\Firewall\AllowTcpRu..

Decoded Output download

<?php 
 namespace App\Ufw\Command; use App\System\Command; use App\Ufw\Firewall\AllowTcpRule as TcpRule; class AllowTcpRule extends Command { private TcpRule $tcpRule; private bool $dryRun = false; public function __construct(TcpRule $tcpRule) { $this->tcpRule = $tcpRule; } public function getCommand() : string { goto Dc20d; Cac51: $this->command = sprintf("/usr/bin/sudo /usr/sbin/ufw %s allow proto tcp from %s to any port %s", true === $dryRun ? "--dry-run" : '', $ip, $portRange); goto bb3a5; c97d3: $ip = $this->tcpRule->getIp(); goto Fc094; D7b12: return $this->command; goto Af864; bb3a5: Bae22: goto D7b12; Fc094: $portRange = $this->tcpRule->getPortRange(); goto c2e61; c2e61: $dryRun = $this->getDryRun(); goto Cac51; Dc20d: if (!(true === is_null($this->command))) { goto Bae22; } goto c97d3; Af864: } public function setDryRun($flag) : void { $this->dryRun = (bool) $flag; } public function getDryRun() : bool { return $this->dryRun; } public function isSuccessful() : bool { goto a7222; Df977: $isSuccessful = false === str_contains($output, "ERROR") ? true : false; goto Fe5f3; a7222: $output = $this->getOutput(); goto Df977; Fe5f3: return $isSuccessful; goto Edb40; Edb40: } } 
 ?>

Did this file decode correctly?

Original Code

<?php
 namespace App\Ufw\Command; use App\System\Command; use App\Ufw\Firewall\AllowTcpRule as TcpRule; class AllowTcpRule extends Command { private TcpRule $tcpRule; private bool $dryRun = false; public function __construct(TcpRule $tcpRule) { $this->tcpRule = $tcpRule; } public function getCommand() : string { goto Dc20d; Cac51: $this->command = sprintf("\57\x75\163\x72\57\142\x69\156\x2f\x73\165\x64\157\x20\x2f\x75\163\x72\57\163\x62\151\x6e\x2f\165\x66\167\40\45\163\40\141\154\154\157\167\x20\x70\x72\x6f\164\157\x20\164\143\160\40\146\162\157\x6d\x20\45\x73\40\164\x6f\40\x61\x6e\171\x20\160\x6f\162\164\40\45\163", true === $dryRun ? "\x2d\55\x64\162\171\x2d\162\x75\156" : '', $ip, $portRange); goto bb3a5; c97d3: $ip = $this->tcpRule->getIp(); goto Fc094; D7b12: return $this->command; goto Af864; bb3a5: Bae22: goto D7b12; Fc094: $portRange = $this->tcpRule->getPortRange(); goto c2e61; c2e61: $dryRun = $this->getDryRun(); goto Cac51; Dc20d: if (!(true === is_null($this->command))) { goto Bae22; } goto c97d3; Af864: } public function setDryRun($flag) : void { $this->dryRun = (bool) $flag; } public function getDryRun() : bool { return $this->dryRun; } public function isSuccessful() : bool { goto a7222; Df977: $isSuccessful = false === str_contains($output, "\x45\x52\122\x4f\122") ? true : false; goto Fe5f3; a7222: $output = $this->getOutput(); goto Df977; Fe5f3: return $isSuccessful; goto Edb40; Edb40: } }

Function Calls

None

Variables

None

Stats

MD5 b84ace5cc5196a3237f38b4b44381f8e
Eval Count 0
Decode Time 63 ms