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 error_reporting(0); $db_config_path = '../application/config/database.php'; if(..
Decoded Output download
<?php
error_reporting(0);
$db_config_path = '../application/config/database.php';
if($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST) {
require_once('taskCoreClass.php');
require_once('includes/databaseLibrary.php');
$core = new Core();
$database = new Database();
if($core->checkEmpty($_POST) == true)
{
if($database->create_database($_POST) == false)
{
$message = $core->show_message('error',"The database could not be created, make sure your the host, username, password, database name is correct.");
}
else if ($database->create_tables($_POST) == false)
{
$message = $core->show_message('error',"The database could not be created, make sure your the host, username, password, database name is correct.");
}
else if ($core->checkFile() == false)
{
$message = $core->show_message('error',"File application/config/database.php is Empty");
}
else if ($core->write_config($_POST) == false)
{
$message = $core->show_message('error',"The database configuration file could not be written, please chmod application/config/database.php file to 777");
}
if(!isset($message)) {
$urlWb = $core->getAllData($_POST['url']);
header( 'Location: ' . $urlWb ) ;
}
}
else {
$message = $core->show_message('error','The host, username, password, database name, and URL are required.');
echo "<script>window.history.back(-1);</script>";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SURMEKO | Surya Media Komunikasi</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet" href="assets/bower_components/bootstrap/dist/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="assets/bower_components/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="assets/bower_components/Ionicons/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="assets/css/AdminLTE.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="assets/plugins/iCheck/square/blue.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body>
<div class="container">
<div class="col-md-12 col-md-offset-0">
<h2>Surya Media Komunikasi - Installer</h2>
<hr>
<?php
if(is_writable($db_config_path))
{
?>
<?php if(isset($message)) {
echo '
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
' . $message . '
</div>';
}?>
<form id="install_form" method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>" class="form-horizontal">
<div class="box-body">
<div class="form-group">
<label for="hostname" class="control-label col-sm-2">Hostname</label>
<div class="col-sm-10">
<input type="text" id="hostname" value="localhost" class="form-control" name="hostname" readonly="readonly" />
<!-- <p class="help-block">Your Hostname.</p> -->
</div>
</div>
<div class="form-group">
<label for="username" class="control-label col-sm-2">Username</label>
<div class="col-sm-10">
<input type="text" id="username" class="form-control" name="username" placeholder="Username hosting !"/>
<!-- <p class="help-block">Your Username.</p> -->
</div>
</div>
<div class="form-group">
<label for="password" class="control-label col-sm-2">Password</label>
<div class="col-sm-10">
<input type="password" id="password" class="form-control" name="password" placeholder="Password hosting !" />
<!-- <p class="help-block">Your Password.</p> -->
</div>
</div>
<div class="form-group">
<label for="database" class="control-label col-sm-2">Database Name</label>
<div class="col-sm-10">
<input type="text" id="database" class="form-control" name="database" placeholder="Nama Database hosting !" />
<!-- <p class="help-block">Your Database Name.</p> -->
</div>
</div>
<div class="form-group">
<label for="database" class="control-label col-sm-2">URL</label>
<div class="col-sm-10">
<input type="text" id="url" class="form-control" name="url" placeholder="Copy URL Website Example = http://surmeko.com/" />
<!-- <p class="help-block">Your URL Website.</p> -->
</div>
</div>
<div class="form-group">
<label for="database" class="control-label col-sm-2">CodeIgniter Version</label>
<div class="col-sm-10">
<select class="form-control" id="template" name="template" />
<option value="2">2</option>
<option value="3">3</option>
</select>
<p class="help-block">Your CodeIgniter Version.</p>
</div>
</div>
</div>
<div class="box-footer">
<div class="form-group">
<label class="control-label col-sm-2"> </label>
<div class="col-sm-10">
<button type="submit" id="submit" class="btn btn-primary btn-block">
<i class="fa fa-database"> </i>
INSTALL DATABASE
</button>
</div>
</div>
</div>
<!-- <input type="submit" value="Pasang" class="btn btn-primary btn-block" id="submit" /> -->
</form>
<?php
}
else {
?>
<p class="alert alert-danger">
Please make the application/config/database.php file writable.<br>
<strong>Example</strong>:<br />
<code>chmod 777 application/config/database.php</code>
</p>
<?php
}
?>
</div>
<footer style="float:right;padding-top: 26px;">
<div class="col-md-12" style="text-align:center;margin-bottom:20px;">
<hr>
<label>Copyright - 2019 | <a href="http://surmeko.com" target="_blank">surmeko.com</a></label>
</div>
</footer>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="assets/bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="assets/resources/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- iCheck -->
<script src="assets/plugins/iCheck/icheck.min.js"></script>
<script>
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' /* optional */
});
});
</script>
</body>
</html>
Did this file decode correctly?
Original Code
<?php
error_reporting(0);
$db_config_path = '../application/config/database.php';
if($_SERVER['REQUEST_METHOD'] == 'POST' && $_POST) {
require_once('taskCoreClass.php');
require_once('includes/databaseLibrary.php');
$core = new Core();
$database = new Database();
if($core->checkEmpty($_POST) == true)
{
if($database->create_database($_POST) == false)
{
$message = $core->show_message('error',"The database could not be created, make sure your the host, username, password, database name is correct.");
}
else if ($database->create_tables($_POST) == false)
{
$message = $core->show_message('error',"The database could not be created, make sure your the host, username, password, database name is correct.");
}
else if ($core->checkFile() == false)
{
$message = $core->show_message('error',"File application/config/database.php is Empty");
}
else if ($core->write_config($_POST) == false)
{
$message = $core->show_message('error',"The database configuration file could not be written, please chmod application/config/database.php file to 777");
}
if(!isset($message)) {
$urlWb = $core->getAllData($_POST['url']);
header( 'Location: ' . $urlWb ) ;
}
}
else {
$message = $core->show_message('error','The host, username, password, database name, and URL are required.');
echo "<script>window.history.back(-1);</script>";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>SURMEKO | Surya Media Komunikasi</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet" href="assets/bower_components/bootstrap/dist/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="assets/bower_components/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="assets/bower_components/Ionicons/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="assets/css/AdminLTE.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="assets/plugins/iCheck/square/blue.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body>
<div class="container">
<div class="col-md-12 col-md-offset-0">
<h2>Surya Media Komunikasi - Installer</h2>
<hr>
<?php
if(is_writable($db_config_path))
{
?>
<?php if(isset($message)) {
echo '
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
' . $message . '
</div>';
}?>
<form id="install_form" method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>" class="form-horizontal">
<div class="box-body">
<div class="form-group">
<label for="hostname" class="control-label col-sm-2">Hostname</label>
<div class="col-sm-10">
<input type="text" id="hostname" value="localhost" class="form-control" name="hostname" readonly="readonly" />
<!-- <p class="help-block">Your Hostname.</p> -->
</div>
</div>
<div class="form-group">
<label for="username" class="control-label col-sm-2">Username</label>
<div class="col-sm-10">
<input type="text" id="username" class="form-control" name="username" placeholder="Username hosting !"/>
<!-- <p class="help-block">Your Username.</p> -->
</div>
</div>
<div class="form-group">
<label for="password" class="control-label col-sm-2">Password</label>
<div class="col-sm-10">
<input type="password" id="password" class="form-control" name="password" placeholder="Password hosting !" />
<!-- <p class="help-block">Your Password.</p> -->
</div>
</div>
<div class="form-group">
<label for="database" class="control-label col-sm-2">Database Name</label>
<div class="col-sm-10">
<input type="text" id="database" class="form-control" name="database" placeholder="Nama Database hosting !" />
<!-- <p class="help-block">Your Database Name.</p> -->
</div>
</div>
<div class="form-group">
<label for="database" class="control-label col-sm-2">URL</label>
<div class="col-sm-10">
<input type="text" id="url" class="form-control" name="url" placeholder="Copy URL Website Example = http://surmeko.com/" />
<!-- <p class="help-block">Your URL Website.</p> -->
</div>
</div>
<div class="form-group">
<label for="database" class="control-label col-sm-2">CodeIgniter Version</label>
<div class="col-sm-10">
<select class="form-control" id="template" name="template" />
<option value="2">2</option>
<option value="3">3</option>
</select>
<p class="help-block">Your CodeIgniter Version.</p>
</div>
</div>
</div>
<div class="box-footer">
<div class="form-group">
<label class="control-label col-sm-2"> </label>
<div class="col-sm-10">
<button type="submit" id="submit" class="btn btn-primary btn-block">
<i class="fa fa-database"> </i>
INSTALL DATABASE
</button>
</div>
</div>
</div>
<!-- <input type="submit" value="Pasang" class="btn btn-primary btn-block" id="submit" /> -->
</form>
<?php
}
else {
?>
<p class="alert alert-danger">
Please make the application/config/database.php file writable.<br>
<strong>Example</strong>:<br />
<code>chmod 777 application/config/database.php</code>
</p>
<?php
}
?>
</div>
<footer style="float:right;padding-top: 26px;">
<div class="col-md-12" style="text-align:center;margin-bottom:20px;">
<hr>
<label>Copyright - 2019 | <a href="http://surmeko.com" target="_blank">surmeko.com</a></label>
</div>
</footer>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="assets/bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="assets/resources/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- iCheck -->
<script src="assets/plugins/iCheck/icheck.min.js"></script>
<script>
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' /* optional */
});
});
</script>
</body>
</html>
Function Calls
| is_writable | 1 |
| error_reporting | 1 |
Stats
| MD5 | 1492cf821cd8865651dd0d84ae1fe28b |
| Eval Count | 0 |
| Decode Time | 134 ms |