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("PD9waHANCmdsb2JhbCAgJHNlcnZlck5hbWUgICAgIDsNCmdsb2JhbCAgJHV..

Decoded Output download

?>b'<?php
global  $serverName     ;
global  $uid            ;
global  $pwd            ;

$serverName = \'(local)\'  ;
$uid        = \'sa\'      ;
$pwd        = "@Liav240101m1w240"    ;

function sql_connect($database){
  global  $serverName     ;
  global  $uid            ;
  global  $pwd            ;
  
  $connectionInfo = array( "UID"      =>  $uid        ,
                           "PWD"      =>  $pwd        ,
                           "Database" =>  $database   
                         );

  $oConn = sqlsrv_connect( $serverName, $connectionInfo);
  if( $oConn === false ) {
    die (\'Unable to connect to the database\'); # Unable to connect to the database
  }
  
  return $oConn;
}
?>
'

Did this file decode correctly?

Original Code

<?php eval("?>".base64_decode("PD9waHANCmdsb2JhbCAgJHNlcnZlck5hbWUgICAgIDsNCmdsb2JhbCAgJHVpZCAgICAgICAgICAgIDsNCmdsb2JhbCAgJHB3ZCAgICAgICAgICAgIDsNCg0KJHNlcnZlck5hbWUgPSAnKGxvY2FsKScgIDsNCiR1aWQgICAgICAgID0gJ3NhJyAgICAgIDsNCiRwd2QgICAgICAgID0gIkBMaWF2MjQwMTAxbTF3MjQwIiAgICA7DQoNCmZ1bmN0aW9uIHNxbF9jb25uZWN0KCRkYXRhYmFzZSl7DQogIGdsb2JhbCAgJHNlcnZlck5hbWUgICAgIDsNCiAgZ2xvYmFsICAkdWlkICAgICAgICAgICAgOw0KICBnbG9iYWwgICRwd2QgICAgICAgICAgICA7DQogIA0KICAkY29ubmVjdGlvbkluZm8gPSBhcnJheSggIlVJRCIgICAgICA9PiAgJHVpZCAgICAgICAgLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIlBXRCIgICAgICA9PiAgJHB3ZCAgICAgICAgLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIkRhdGFiYXNlIiA9PiAgJGRhdGFiYXNlICAgDQogICAgICAgICAgICAgICAgICAgICAgICAgKTsNCg0KICAkb0Nvbm4gPSBzcWxzcnZfY29ubmVjdCggJHNlcnZlck5hbWUsICRjb25uZWN0aW9uSW5mbyk7DQogIGlmKCAkb0Nvbm4gPT09IGZhbHNlICkgew0KICAgIGRpZSAoJ1VuYWJsZSB0byBjb25uZWN0IHRvIHRoZSBkYXRhYmFzZScpOyAjIFVuYWJsZSB0byBjb25uZWN0IHRvIHRoZSBkYXRhYmFzZQ0KICB9DQogIA0KICByZXR1cm4gJG9Db25uOw0KfQ0KPz4NCg==")); ?>

Function Calls

base64_decode 1

Variables

None

Stats

MD5 bd802c586b893341d1e703edfdddad3d
Eval Count 1
Decode Time 67 ms