fix: Fix undefined variable error

This commit is contained in:
Ryan Prather 2019-01-22 10:49:50 -05:00
parent 2a6edd119f
commit aebd3ba0f9
No known key found for this signature in database
GPG Key ID: 66FDE2B4E8AB87A7

View File

@ -94,7 +94,13 @@ foreach ($lines as $line_num => $line) {
$line = trim($line, "\t\n\r"); # chomp would be nice...
$matches = [];
if (!isset($filetype)) {
if (preg_match('/Starting|\-oN/', $line)) {
if (preg_match('/\.nmap/', $cmd['f'])) {
$filetype = "text";
}
elseif (preg_match('/\.gnmap/', $cmd['f'])) {
$filetype = "grep";
}
elseif (preg_match('/Starting|\-oN/', $line)) {
$filetype = "text";
}
elseif (preg_match('/\-oG/', $line)) {