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 session_start(); require_once('db.php'); require_once('./loginfile/functions.php'..
Decoded Output download
<?php
session_start();
require_once('db.php');
require_once('./loginfile/functions.php');
F058267E703CAEFC4DC17965B7AA0C071('1 2 3');
$R3656889A448A7AF799D2D7955BED2354="";
//log the operation
$R0FB88179FE9A6BA01C021E2222AEBBB4="Backup";
FBFBE668584C8320187E0864A5E48BF4A($_SESSION['user_name'],$R0FB88179FE9A6BA01C021E2222AEBBB4,$RD1332545C2BE8973AF741AE0D9D1C9BE,$R51B8C08FE27EA159A14DBF80945E9F85);
//include "connect.tpl";
function F81B75F3AD10A1B1E70B60F059D690F29($RADA370F97D905F76B3C9D4E1FFBB7FFF,$RE0D5EDB560A26D4E1BECD832EA026E32,$RB148E7F41FDC3BE4B14E8D17E068BBAD,$R9B395079675C6A66FF23EA9C6C4A668E,$R695CD54D1F9CB31C11C71AF5EF74FDDB = '*')
{
global $R3656889A448A7AF799D2D7955BED2354;
$R1261CD629575ACC614AF0867C1E29E37 = mysql_connect($RADA370F97D905F76B3C9D4E1FFBB7FFF,$RE0D5EDB560A26D4E1BECD832EA026E32,$RB148E7F41FDC3BE4B14E8D17E068BBAD);
mysql_select_db($R9B395079675C6A66FF23EA9C6C4A668E,$R1261CD629575ACC614AF0867C1E29E37);
//get all of the tables
if($R695CD54D1F9CB31C11C71AF5EF74FDDB == '*')
{
$R695CD54D1F9CB31C11C71AF5EF74FDDB = array();
$R679E9B9234E2062F809DBD3325D37FB6 = mysql_query('SHOW TABLES');
while($R4EEB713E57BBAAF1217CF39632604473 = mysql_fetch_row($R679E9B9234E2062F809DBD3325D37FB6))
{
$R695CD54D1F9CB31C11C71AF5EF74FDDB[] = $R4EEB713E57BBAAF1217CF39632604473[0];
}
}
else
{
$R695CD54D1F9CB31C11C71AF5EF74FDDB = is_array($R695CD54D1F9CB31C11C71AF5EF74FDDB) ? $R695CD54D1F9CB31C11C71AF5EF74FDDB : explode(',',$R695CD54D1F9CB31C11C71AF5EF74FDDB);
}
//cycle through
foreach($R695CD54D1F9CB31C11C71AF5EF74FDDB as $R90E8291866BD6CB7ED5089CE7E833D11)
{
$R679E9B9234E2062F809DBD3325D37FB6 = mysql_query('SELECT * FROM '.$R90E8291866BD6CB7ED5089CE7E833D11);
$R99D356D5BE7505F59D4E07CE3AD7118E = mysql_num_fields($R679E9B9234E2062F809DBD3325D37FB6);
// $RF22A1FC2263E04EC8AE7A008A249229E.= 'DROP TABLE '.$R90E8291866BD6CB7ED5089CE7E833D11.';';
$RAAE6940545D4C6B65E61108BE1B52933 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE '.$R90E8291866BD6CB7ED5089CE7E833D11));
$RF22A1FC2263E04EC8AE7A008A249229E.= "
".$RAAE6940545D4C6B65E61108BE1B52933[1].";
";
for ($RA16D2280393CE6A2A5428A4A8D09E354 = 0; $RA16D2280393CE6A2A5428A4A8D09E354 < $R99D356D5BE7505F59D4E07CE3AD7118E; $RA16D2280393CE6A2A5428A4A8D09E354++)
{
while($R4EEB713E57BBAAF1217CF39632604473 = mysql_fetch_row($R679E9B9234E2062F809DBD3325D37FB6))
{
$RF22A1FC2263E04EC8AE7A008A249229E.= 'INSERT INTO '.$R90E8291866BD6CB7ED5089CE7E833D11.' VALUES(';
for($RA7B9A383688A89B5498FC84118153069=0; $RA7B9A383688A89B5498FC84118153069<$R99D356D5BE7505F59D4E07CE3AD7118E; $RA7B9A383688A89B5498FC84118153069++)
{
$R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069] = addslashes($R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069]);
$R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069] = ereg_replace("
","\n",$R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069]);
if (isset($R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069])) { $RF22A1FC2263E04EC8AE7A008A249229E.= '"'.$R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069].'"' ; } else { $RF22A1FC2263E04EC8AE7A008A249229E.= '""'; }
if ($RA7B9A383688A89B5498FC84118153069<($R99D356D5BE7505F59D4E07CE3AD7118E-1)) { $RF22A1FC2263E04EC8AE7A008A249229E.= ','; }
}
$RF22A1FC2263E04EC8AE7A008A249229E.= ");
";
}
}
$RF22A1FC2263E04EC8AE7A008A249229E.="
";
}
//save file
$RD9A93554B5AF46132E19F5DCFCD27AB5=fopen('backupdata.sql','w+');
//$RD9A93554B5AF46132E19F5DCFCD27AB5 = fopen('db-backup-'.time().'-'.(md5(implode(',',$R695CD54D1F9CB31C11C71AF5EF74FDDB))).'.sql','w+');
if(fwrite($RD9A93554B5AF46132E19F5DCFCD27AB5,$RF22A1FC2263E04EC8AE7A008A249229E)){
//$R3656889A448A7AF799D2D7955BED2354= 'db-backup-'.time().'-'.(md5(implode(',',$R695CD54D1F9CB31C11C71AF5EF74FDDB))).'.sql';
$R3656889A448A7AF799D2D7955BED2354='backupdata.sql';
}
fclose($RD9A93554B5AF46132E19F5DCFCD27AB5);
}
//copy the data folder of mysql to this directory to be used for quick recovery
function F27FD46E69CA28F5DE97632701512AB02( $R7B5C40C2661BE2363CC09FDC872AEB44, $R4BAA43B5672B5195D67BF015D3E5A273 ) {
if ( is_dir( $R7B5C40C2661BE2363CC09FDC872AEB44 ) ) {
@mkdir( $R4BAA43B5672B5195D67BF015D3E5A273 );
$R20FD65E9C7406034FADC682F06732868 = dir( $R7B5C40C2661BE2363CC09FDC872AEB44 );
while ( FALSE !== ( $R3244A15A51872C741B9286A979855F3E = $R20FD65E9C7406034FADC682F06732868->read() ) ) {
if ( $R3244A15A51872C741B9286A979855F3E == '.' || $R3244A15A51872C741B9286A979855F3E == '..' ) {
continue;
}
$R695AD4DA619E434A88E09BC89FA084E7 = $R7B5C40C2661BE2363CC09FDC872AEB44 . '/' . $R3244A15A51872C741B9286A979855F3E;
if ( is_dir( $R695AD4DA619E434A88E09BC89FA084E7 ) ) {
F27FD46E69CA28F5DE97632701512AB02( $R695AD4DA619E434A88E09BC89FA084E7, $R4BAA43B5672B5195D67BF015D3E5A273 . '/' . $R3244A15A51872C741B9286A979855F3E );
continue;
}
copy( $R695AD4DA619E434A88E09BC89FA084E7, $R4BAA43B5672B5195D67BF015D3E5A273 . '/' . $R3244A15A51872C741B9286A979855F3E );
}
$R20FD65E9C7406034FADC682F06732868->close();
}else {
copy( $R7B5C40C2661BE2363CC09FDC872AEB44, $R4BAA43B5672B5195D67BF015D3E5A273 );
}
}
//source for wamp2x
$R7B5C40C2661BE2363CC09FDC872AEB44="../../bin/mysql/mysql5.0.51b/data";
//$R7B5C40C2661BE2363CC09FDC872AEB44="../../mysql/data";
$R4BAA43B5672B5195D67BF015D3E5A273="C:/data";
F27FD46E69CA28F5DE97632701512AB02( $R7B5C40C2661BE2363CC09FDC872AEB44, $R4BAA43B5672B5195D67BF015D3E5A273 );
F81B75F3AD10A1B1E70B60F059D690F29($RADA370F97D905F76B3C9D4E1FFBB7FFF,$R2D76471E6F56A63E6F0105DD92DB4254,$R243E61E9410A9F577D2D662C67025EE9,$RD4E4E5F0A4498077954D60DA7C973EF1);
$R0D117B292A6E3F1BB586E7959CF24E69=$R3656889A448A7AF799D2D7955BED2354;
//echo $R0D117B292A6E3F1BB586E7959CF24E69;
header ("Content-Type: application/download");
header ("Content-Disposition: attachment; filename=$R0D117B292A6E3F1BB586E7959CF24E69");
header("Content-Length: " . filesize("$R0D117B292A6E3F1BB586E7959CF24E69"));
$RF500F4A848E2EB2F8AAC3A6734D7EC38 = fopen("$R0D117B292A6E3F1BB586E7959CF24E69", "r");
fpassthru($RF500F4A848E2EB2F8AAC3A6734D7EC38);
// delete the copies of the file generated in the server
//if (file_exists($R0D117B292A6E3F1BB586E7959CF24E69)) { unlink($R0D117B292A6E3F1BB586E7959CF24E69); }
?>
Did this file decode correctly?
Original Code
<?php
session_start();
require_once('db.php');
require_once('./loginfile/functions.php');
F058267E703CAEFC4DC17965B7AA0C071('1 2 3');
$R3656889A448A7AF799D2D7955BED2354="";
//log the operation
$R0FB88179FE9A6BA01C021E2222AEBBB4="Backup";
FBFBE668584C8320187E0864A5E48BF4A($_SESSION['user_name'],$R0FB88179FE9A6BA01C021E2222AEBBB4,$RD1332545C2BE8973AF741AE0D9D1C9BE,$R51B8C08FE27EA159A14DBF80945E9F85);
//include "connect.tpl";
function F81B75F3AD10A1B1E70B60F059D690F29($RADA370F97D905F76B3C9D4E1FFBB7FFF,$RE0D5EDB560A26D4E1BECD832EA026E32,$RB148E7F41FDC3BE4B14E8D17E068BBAD,$R9B395079675C6A66FF23EA9C6C4A668E,$R695CD54D1F9CB31C11C71AF5EF74FDDB = '*')
{
global $R3656889A448A7AF799D2D7955BED2354;
$R1261CD629575ACC614AF0867C1E29E37 = mysql_connect($RADA370F97D905F76B3C9D4E1FFBB7FFF,$RE0D5EDB560A26D4E1BECD832EA026E32,$RB148E7F41FDC3BE4B14E8D17E068BBAD);
mysql_select_db($R9B395079675C6A66FF23EA9C6C4A668E,$R1261CD629575ACC614AF0867C1E29E37);
//get all of the tables
if($R695CD54D1F9CB31C11C71AF5EF74FDDB == '*')
{
$R695CD54D1F9CB31C11C71AF5EF74FDDB = array();
$R679E9B9234E2062F809DBD3325D37FB6 = mysql_query('SHOW TABLES');
while($R4EEB713E57BBAAF1217CF39632604473 = mysql_fetch_row($R679E9B9234E2062F809DBD3325D37FB6))
{
$R695CD54D1F9CB31C11C71AF5EF74FDDB[] = $R4EEB713E57BBAAF1217CF39632604473[0];
}
}
else
{
$R695CD54D1F9CB31C11C71AF5EF74FDDB = is_array($R695CD54D1F9CB31C11C71AF5EF74FDDB) ? $R695CD54D1F9CB31C11C71AF5EF74FDDB : explode(',',$R695CD54D1F9CB31C11C71AF5EF74FDDB);
}
//cycle through
foreach($R695CD54D1F9CB31C11C71AF5EF74FDDB as $R90E8291866BD6CB7ED5089CE7E833D11)
{
$R679E9B9234E2062F809DBD3325D37FB6 = mysql_query('SELECT * FROM '.$R90E8291866BD6CB7ED5089CE7E833D11);
$R99D356D5BE7505F59D4E07CE3AD7118E = mysql_num_fields($R679E9B9234E2062F809DBD3325D37FB6);
// $RF22A1FC2263E04EC8AE7A008A249229E.= 'DROP TABLE '.$R90E8291866BD6CB7ED5089CE7E833D11.';';
$RAAE6940545D4C6B65E61108BE1B52933 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE '.$R90E8291866BD6CB7ED5089CE7E833D11));
$RF22A1FC2263E04EC8AE7A008A249229E.= "\n\n".$RAAE6940545D4C6B65E61108BE1B52933[1].";\n\n";
for ($RA16D2280393CE6A2A5428A4A8D09E354 = 0; $RA16D2280393CE6A2A5428A4A8D09E354 < $R99D356D5BE7505F59D4E07CE3AD7118E; $RA16D2280393CE6A2A5428A4A8D09E354++)
{
while($R4EEB713E57BBAAF1217CF39632604473 = mysql_fetch_row($R679E9B9234E2062F809DBD3325D37FB6))
{
$RF22A1FC2263E04EC8AE7A008A249229E.= 'INSERT INTO '.$R90E8291866BD6CB7ED5089CE7E833D11.' VALUES(';
for($RA7B9A383688A89B5498FC84118153069=0; $RA7B9A383688A89B5498FC84118153069<$R99D356D5BE7505F59D4E07CE3AD7118E; $RA7B9A383688A89B5498FC84118153069++)
{
$R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069] = addslashes($R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069]);
$R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069] = ereg_replace("\n","\\n",$R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069]);
if (isset($R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069])) { $RF22A1FC2263E04EC8AE7A008A249229E.= '"'.$R4EEB713E57BBAAF1217CF39632604473[$RA7B9A383688A89B5498FC84118153069].'"' ; } else { $RF22A1FC2263E04EC8AE7A008A249229E.= '""'; }
if ($RA7B9A383688A89B5498FC84118153069<($R99D356D5BE7505F59D4E07CE3AD7118E-1)) { $RF22A1FC2263E04EC8AE7A008A249229E.= ','; }
}
$RF22A1FC2263E04EC8AE7A008A249229E.= ");\n";
}
}
$RF22A1FC2263E04EC8AE7A008A249229E.="\n\n\n";
}
//save file
$RD9A93554B5AF46132E19F5DCFCD27AB5=fopen('backupdata.sql','w+');
//$RD9A93554B5AF46132E19F5DCFCD27AB5 = fopen('db-backup-'.time().'-'.(md5(implode(',',$R695CD54D1F9CB31C11C71AF5EF74FDDB))).'.sql','w+');
if(fwrite($RD9A93554B5AF46132E19F5DCFCD27AB5,$RF22A1FC2263E04EC8AE7A008A249229E)){
//$R3656889A448A7AF799D2D7955BED2354= 'db-backup-'.time().'-'.(md5(implode(',',$R695CD54D1F9CB31C11C71AF5EF74FDDB))).'.sql';
$R3656889A448A7AF799D2D7955BED2354='backupdata.sql';
}
fclose($RD9A93554B5AF46132E19F5DCFCD27AB5);
}
//copy the data folder of mysql to this directory to be used for quick recovery
function F27FD46E69CA28F5DE97632701512AB02( $R7B5C40C2661BE2363CC09FDC872AEB44, $R4BAA43B5672B5195D67BF015D3E5A273 ) {
if ( is_dir( $R7B5C40C2661BE2363CC09FDC872AEB44 ) ) {
@mkdir( $R4BAA43B5672B5195D67BF015D3E5A273 );
$R20FD65E9C7406034FADC682F06732868 = dir( $R7B5C40C2661BE2363CC09FDC872AEB44 );
while ( FALSE !== ( $R3244A15A51872C741B9286A979855F3E = $R20FD65E9C7406034FADC682F06732868->read() ) ) {
if ( $R3244A15A51872C741B9286A979855F3E == '.' || $R3244A15A51872C741B9286A979855F3E == '..' ) {
continue;
}
$R695AD4DA619E434A88E09BC89FA084E7 = $R7B5C40C2661BE2363CC09FDC872AEB44 . '/' . $R3244A15A51872C741B9286A979855F3E;
if ( is_dir( $R695AD4DA619E434A88E09BC89FA084E7 ) ) {
F27FD46E69CA28F5DE97632701512AB02( $R695AD4DA619E434A88E09BC89FA084E7, $R4BAA43B5672B5195D67BF015D3E5A273 . '/' . $R3244A15A51872C741B9286A979855F3E );
continue;
}
copy( $R695AD4DA619E434A88E09BC89FA084E7, $R4BAA43B5672B5195D67BF015D3E5A273 . '/' . $R3244A15A51872C741B9286A979855F3E );
}
$R20FD65E9C7406034FADC682F06732868->close();
}else {
copy( $R7B5C40C2661BE2363CC09FDC872AEB44, $R4BAA43B5672B5195D67BF015D3E5A273 );
}
}
//source for wamp2x
$R7B5C40C2661BE2363CC09FDC872AEB44="../../bin/mysql/mysql5.0.51b/data";
//$R7B5C40C2661BE2363CC09FDC872AEB44="../../mysql/data";
$R4BAA43B5672B5195D67BF015D3E5A273="C:/data";
F27FD46E69CA28F5DE97632701512AB02( $R7B5C40C2661BE2363CC09FDC872AEB44, $R4BAA43B5672B5195D67BF015D3E5A273 );
F81B75F3AD10A1B1E70B60F059D690F29($RADA370F97D905F76B3C9D4E1FFBB7FFF,$R2D76471E6F56A63E6F0105DD92DB4254,$R243E61E9410A9F577D2D662C67025EE9,$RD4E4E5F0A4498077954D60DA7C973EF1);
$R0D117B292A6E3F1BB586E7959CF24E69=$R3656889A448A7AF799D2D7955BED2354;
//echo $R0D117B292A6E3F1BB586E7959CF24E69;
header ("Content-Type: application/download");
header ("Content-Disposition: attachment; filename=$R0D117B292A6E3F1BB586E7959CF24E69");
header("Content-Length: " . filesize("$R0D117B292A6E3F1BB586E7959CF24E69"));
$RF500F4A848E2EB2F8AAC3A6734D7EC38 = fopen("$R0D117B292A6E3F1BB586E7959CF24E69", "r");
fpassthru($RF500F4A848E2EB2F8AAC3A6734D7EC38);
// delete the copies of the file generated in the server
//if (file_exists($R0D117B292A6E3F1BB586E7959CF24E69)) { unlink($R0D117B292A6E3F1BB586E7959CF24E69); }
?>
Function Calls
session_start | 1 |
Stats
MD5 | 144dbc2c9694413783d216b8e4ea0b7c |
Eval Count | 0 |
Decode Time | 59 ms |