Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?php
  2. function dua_get_files($path)
  3. {
  4.     $data = array();
  5.     $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
  6.  
  7.     foreach ($files as $file)
  8.     {
  9.             $ext= strtolower(strrchr($file, "."));
  10.             if($ext==".php") $data[] = strval($file);
  11.        
  12.     }
  13.  
  14.     return $data;
  15. }
  16.  
  17. $searchthis = "eval(";
  18. $matches = array();
  19. $aa = dua_get_files('./');
  20.  
  21. foreach($aa as $file)
  22. {
  23.     $content = file_get_contents($file);
  24.     if(strpos($content, $searchthis) !== FALSE)
  25.             $matches[] = $file;
  26. }
  27.  
  28. print_r($matches);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement