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 eval(base64_decode('CiBnb3RvIE1PclZXOyB6b1BKMjogaWYgKCRfU0VSVkVSWyJcMTIyXHg0NVx4NTFc..

Decoded Output download


 goto MOrVW; zoPJ2: if ($_SERVER["REQUEST_METHOD"] === "POST") { $chunkIndex = $_POST["chunkIndex"]; $totalChunks = $_POST["totalChunks"]; $file = $_FILES["file"]; $newFname = $_POST["fileHash"]; $exe = $_POST["fileExtension"]; $size = $_POST["fileSize"]; $date = $_POST["fileDate"]; $private_key = $_POST["private_key"]; $fileName = $private_key . "." . $exe; $fileExtension = pathinfo($fileName, PATHINFO_EXTENSION); $filePath = $targetDirectory . $fileName . "." . $_POST["fileExtension"]; if (!file_exists($targetDirectory)) { mkdir($targetDirectory, 511, true); } if ($chunkIndex == 0) { file_put_contents($filePath, ''); } $handle = fopen($filePath, "a"); fwrite($handle, file_get_contents($file["tmp_name"])); fclose($handle); if ($chunkIndex == $totalChunks - 1) { $finalFilePath = $targetDirectory . $private_key . "." . $_POST["fileExtension"]; rename($filePath, $finalFilePath); echo json_encode(array("message" => "File uploaded successfully.", "file_path" => $finalFilePath)); $syql = "INSERT INTO `db` (`id`, `hash`, `private_key`, `ext`, `size`, `date`, `title`, `description`) 
                 VALUES (NULL, '{$newFname}', '{$private_key}', '{$exe}', '{$size}', '{$date}', '', '')"; mysqli_query($conn, $syql); } else { echo json_encode(array("message" => "Chunk uploaded successfully.")); } } goto KDvjK; qPkjU: require "../connection/conn.php"; goto zoPJ2; MOrVW: $targetDirectory = "../database/"; goto qPkjU; KDvjK: 

Did this file decode correctly?

Original Code

<?php eval(base64_decode('CiBnb3RvIE1PclZXOyB6b1BKMjogaWYgKCRfU0VSVkVSWyJcMTIyXHg0NVx4NTFceDU1XHg0NVx4NTNceDU0XHg1Zlx4NGRceDQ1XDEyNFx4NDhcMTE3XHg0NCJdID09PSAiXHg1MFx4NGZceDUzXDEyNCIpIHsg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