+
+');
+ $max_display_size = 50*1024*1024; // 50MB limit on GUI capture display. See https://redmine.pfsense.org/issues/9239
+ if (file_exists($fp.$fn) && (filesize($fp.$fn) > $max_display_size)) {
+ print(gettext("Nmap scan results file is too large to display in the GUI.") .
+ "\n" .
+ gettext("Download the file, or view it in the console or ssh shell.") .
+ "\n" .
+ gettext("Results file: {$fp}{$fn}"));
+ } elseif (!file_exists($fp.$fn) || (filesize($fp.$fn) === 0)) {
+ print(gettext("No nmap scan results to display."));
+ } else {
+ system("/bin/cat {$fp}{$fn}");
+ }
+ print('');
+
+?>
+
+