Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<html><head><title>Ping Service</title></head><body><form method="POST" action="index.php"..
Decoded Output download
<html><head><title>Ping Service</title></head><body><form method="POST" action="index.php"> <input type="text" name="ip" placeholder="127.0.0.1"> <input type="submit"></form><pre><?php $flag = "".file_get_contents(".passwd")."";if(isset($_POST["ip"]) && !empty($_POST["ip"])){ $ip = @preg_replace("/[\\$|`;&<>]/", "", $_POST["ip"]); //$ip = @str_replace(['\', '$', '|', '`', ';', '&', '<', '>'], "", $_POST["ip"]); $response = @shell_exec("timeout 5 bash -c 'ping -c 3 ".$ip."'"); $receive = @preg_match("/3 packets transmitted, (.*) received/s",$response,$out); if ($out[1]=="3") { echo "Ping OK"; } elseif ($out[1]=="0") { echo "Ping NOK"; } else { echo "Syntax Error"; }}?></pre></body></html>
Did this file decode correctly?
Original Code
<html><head><title>Ping Service</title></head><body><form method="POST" action="index.php"> <input type="text" name="ip" placeholder="127.0.0.1"> <input type="submit"></form><pre><?php $flag = "".file_get_contents(".passwd")."";if(isset($_POST["ip"]) && !empty($_POST["ip"])){ $ip = @preg_replace("/[\\\$|`;&<>]/", "", $_POST["ip"]); //$ip = @str_replace(['\\', '$', '|', '`', ';', '&', '<', '>'], "", $_POST["ip"]); $response = @shell_exec("timeout 5 bash -c 'ping -c 3 ".$ip."'"); $receive = @preg_match("/3 packets transmitted, (.*) received/s",$response,$out); if ($out[1]=="3") { echo "Ping OK"; } elseif ($out[1]=="0") { echo "Ping NOK"; } else { echo "Syntax Error"; }}?></pre></body></html>
Function Calls
None |
Stats
MD5 | 116bbfd2e9ca87fa07d4337aa0de1983 |
Eval Count | 0 |
Decode Time | 91 ms |