Newer
Older
CVSS_3.0_GUI / Recursive_PEaS.php
root on 7 May 2019 709 bytes Initial commit
  1. <?php
  2. $handle = fopen("URLs.txt", "r");
  3. if ($handle) {
  4. while (($line = fgets($handle)) !== false) {
  5. // process the line read.
  6. $url = rtrim($line);
  7. $cleanUrl = clean($line);
  8. echo "scanning: ".$url."\nFolder: ".$cleanUrl."\n";
  9. system("perl /opt/CHaS/PEaS.pl /location/to/create/folder/of/output/$cleanUrl $url");
  10. }
  11.  
  12. fclose($handle);
  13. } else {
  14. // error opening the file.
  15. }
  16.  
  17.  
  18. function clean($string) {
  19. $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.
  20. $string = preg_replace('/[^A-Za-z0-9\-]/', '_', $string); // Removes special chars.
  21.  
  22. return preg_replace('/_+/', '_', $string); // Replaces multiple hyphens with single one.
  23. }
  24. ?>
Buy Me A Coffee