diff --git a/ReportToolz/rep2.php b/ReportToolz/rep2.php index 3c78093..d53efa3 100755 --- a/ReportToolz/rep2.php +++ b/ReportToolz/rep2.php @@ -99,7 +99,8 @@ // find the content we want $start = 0; $end = 0; foreach($line as $key => $val){ - if(strpos($val, "Discovered Vulnerabilities") === 0){ $start = $key; } + //if(strpos($val, "Discovered Vulnerabilities") === 0){ $start = $key; } + if(preg_match('/Discovered *\w* Vulnerabilities/', $val, $matches) === true){ $start = $key; } //if(strpos($val, "This section provides a quick guide to plan your remediation for the vulnerabilities discovered during the test.") === 0){ $end = $key-2; } if(strpos($val, "Observed Hosts and Services") === 0){ $end = $key-2; } $line[$key] = trim($val); @@ -127,8 +128,9 @@ * 7 = next is hosts * 8 = next possibly title */ + switch ($line[$i]) { - case 'Discovered Vulnerabilities': + case (preg_match('/Discovered *\w* Vulnerabilities/', $val, $matches) === true): $switch = 0; break; case 'Serious Risk Vulnerabilities': @@ -251,6 +253,7 @@ * 7 = next is hosts * 8 = next possibly title */ + echo $line[$i]."\n"; switch ($line[$i]) { case 'Discovered Vulnerabilities': $switch = 0;