now supports multiple test types in same document
1 parent e241b9d commit 6a112955de7b9c559be14ebad55d3821d47e2514
root authored on 16 Dec 2020
Showing 1 changed file
View
8
ReportToolz/rep2.php
 
// 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);
}
* 6 = next is risk level
* 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':
$sub2++; $sub3 = 1;
* 6 = next is risk level
* 7 = next is hosts
* 8 = next possibly title
*/
echo $line[$i]."\n";
switch ($line[$i]) {
case 'Discovered Vulnerabilities':
$switch = 0;
break;
Buy Me A Coffee