| |
---|
| | |
---|
| | // 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; |
---|
| |
---|
| | |