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 require('db_connect.php');if(isset($_POST['user_id'])and isset($_POST['user_pass']))..

Decoded Output download

<?php require('db_connect.php');if(isset($_POST['user_id'])and isset($_POST['user_pass'])){$username=$_POST['user_id'];$password=$_POST['user_pass'];$debug=$_POST['debug'];if($username=='admin' &&$password=='admin'){echo "<script type='text/javascript'>alert('Did you seriously think it was gonna be this easy?')</script>";}$pattern="/.*['\"].*OR.*/i";$user_match=preg_match($pattern,$username);$password_match=preg_match($pattern,$username);$sqli_detected=False;if($user_match==True ||$password_match==True){echo "<script type='text/javascript'>alert('SQLi detected')</script>";$sqli_detected=True;}$query="SELECT 1 FROM accounts WHERE (username = '$username') AND (password = '$password')";if($debug==1){echo "<!--PHP code source: -->";echo $query."<br>";}$result=mysqli_query($connection,$query);$count=mysqli_num_rows($result);if($count==1 &&$sqli_detected==False){echo "<script type='text/javascript'>alert('Login Successful')</script>";echo"Valid Login Credentials, Code: $code";}else{echo "<script type='text/javascript'>alert('Invalid Login Credentials')</script>";echo "Invalid Login Credentials";}echo "<!--Proudly owned and maintained by james433-->";}?> 

Did this file decode correctly?

Original Code

<?php require('db_connect.php');if(isset($_POST['user_id'])and isset($_POST['user_pass'])){$username=$_POST['user_id'];$password=$_POST['user_pass'];$debug=$_POST['debug'];if($username=='admin' &&$password=='admin'){echo "<script type='text/javascript'>alert('Did you seriously think it was gonna be this easy?')</script>";}$pattern="/.*['\"].*OR.*/i";$user_match=preg_match($pattern,$username);$password_match=preg_match($pattern,$username);$sqli_detected=False;if($user_match==True ||$password_match==True){echo "<script type='text/javascript'>alert('SQLi detected')</script>";$sqli_detected=True;}$query="SELECT 1 FROM accounts WHERE (username = '$username') AND (password = '$password')";if($debug==1){echo "<!--PHP code source: -->";echo $query."<br>";}$result=mysqli_query($connection,$query);$count=mysqli_num_rows($result);if($count==1 &&$sqli_detected==False){echo "<script type='text/javascript'>alert('Login Successful')</script>";echo"Valid Login Credentials, Code: $code";}else{echo "<script type='text/javascript'>alert('Invalid Login Credentials')</script>";echo "Invalid Login Credentials";}echo "<!--Proudly owned and maintained by james433-->";}?>

Function Calls

None

Variables

None

Stats

MD5 2121b784c83b51f3b33635fa9e5e6438
Eval Count 0
Decode Time 82 ms