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 $host = "l\x6fc\x61\154h\x6f\x73\x74"; $username = "\162oot"; $password = ""; $da..

Decoded Output download

<?php   
$host = "localhost"; $username = "root"; $password = ""; $database_name = "edukasi2";   
$conn = mysqli_connect($host, $username, $password, $database_name); $conn->set_charset("utf8");   
$tables = array(); $sql = "SHOW TABLES"; $result = mysqli_query($conn, $sql); while ($row = mysqli_fetch_row($result)) { $tables[] = $row[0]; } $sqlScript = ""; foreach ($tables as $table) {   
$query = "SHOW CREATE TABLE $table"; $result = mysqli_query($conn, $query); $row = mysqli_fetch_row($result); $sqlScript .= "

" . $row[1] . ";

"; $query = "SELECT * FROM $table"; $result = mysqli_query($conn, $query); $columnCount = mysqli_num_fields($result);   
for ($i = 0; $i < $columnCount; $i ++) { while ($row = mysqli_fetch_row($result)) { $sqlScript .= "INSERT INTO $table VALUES("; for ($j = 0; $j < $columnCount; $j ++) { $row[$j] = $row[$j]; if (isset($row[$j])) { $sqlScript .= '"' . $row[$j] . '"'; } else { $sqlScript .= '""'; } if ($j < ($columnCount - 1)) { $sqlScript .= ','; } } $sqlScript .= ");
"; } } $sqlScript .= "
"; } if(!empty($sqlScript)) {   
$backup_file_name = $database_name . '_backup_' . time() . '.sql'; $fileHandler = fopen($backup_file_name, 'w+'); $number_of_lines = fwrite($fileHandler, $sqlScript); fclose($fileHandler);   
header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . basename($backup_file_name)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($backup_file_name)); ob_clean(); flush(); readfile($backup_file_name); exec('rm ' . $backup_file_name); } ?>

Did this file decode correctly?

Original Code

<?php  
$host = "l\x6fc\x61\154h\x6f\x73\x74"; $username = "\162oot"; $password = ""; $database_name = "e\x64\x75k\x61si\x32";  
$conn = mysqli_connect($host, $username, $password, $database_name); $conn->set_charset("\165tf\070");  
$tables = array(); $sql = "\123\110\x4f\127 \124\101BLE\x53"; $result = mysqli_query($conn, $sql); while ($row = mysqli_fetch_row($result)) { $tables[] = $row[0]; } $sqlScript = ""; foreach ($tables as $table) {  
$query = "\x53\x48\117\x57 \x43\122E\101\x54\105 \124\101\102\x4cE $table"; $result = mysqli_query($conn, $query); $row = mysqli_fetch_row($result); $sqlScript .= "\n\n" . $row[1] . ";\n\n"; $query = "S\x45\x4c\105\103\124 * \106\x52\x4fM $table"; $result = mysqli_query($conn, $query); $columnCount = mysqli_num_fields($result);  
for ($i = 0; $i < $columnCount; $i ++) { while ($row = mysqli_fetch_row($result)) { $sqlScript .= "\x49\x4e\123ER\124 \x49N\x54\x4f $table V\x41\114\x55E\123("; for ($j = 0; $j < $columnCount; $j ++) { $row[$j] = $row[$j]; if (isset($row[$j])) { $sqlScript .= '"' . $row[$j] . '"'; } else { $sqlScript .= '""'; } if ($j < ($columnCount - 1)) { $sqlScript .= ','; } } $sqlScript .= ");\n"; } } $sqlScript .= "\n"; } if(!empty($sqlScript)) {  
$backup_file_name = $database_name . '_backup_' . time() . '.sql'; $fileHandler = fopen($backup_file_name, 'w+'); $number_of_lines = fwrite($fileHandler, $sqlScript); fclose($fileHandler);  
header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=' . basename($backup_file_name)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($backup_file_name)); ob_clean(); flush(); readfile($backup_file_name); exec('rm ' . $backup_file_name); } ?>

Function Calls

mysqli_connect 1

Variables

$host localhost
$password
$username root
$database_name edukasi2

Stats

MD5 7003a8f4cd180d7d4e74765382d95607
Eval Count 0
Decode Time 51 ms