Feature #12968 » diag_packet_capture.patch-v2.patch
| src/usr/local/www/diag_packet_capture.php | ||
|---|---|---|
|
$action = gettext("Start");
|
||
|
//delete previous packet capture if it exists
|
||
|
if (file_exists($fp.$fn)) {
|
||
|
unlink ($fp.$fn);
|
||
|
}
|
||
|
unlink_if_exists($fp.$fn);
|
||
|
} elseif ($_POST['stopbtn'] != "") {
|
||
|
$action = gettext("Stop");
|
||
|
$processes_running = trim(shell_exec("/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep {$fn} | /usr/bin/egrep -v '(pflog|grep)'"));
|
||
| ... | ... | |
|
} elseif ($_POST['downloadbtn'] != "") {
|
||
|
//download file
|
||
|
send_user_download('file', $fp.$fn);
|
||
|
} elseif ($_POST['clearbtn'] != "") {
|
||
|
//delete previous packet capture if it exists
|
||
|
unlink_if_exists($fp.$fn);
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
| ... | ... | |
|
null,
|
||
|
'fa-download'
|
||
|
))->addClass('btn-primary');
|
||
|
$form->addGlobal(new Form_Button(
|
||
|
'clearbtn',
|
||
|
'Clear Capture',
|
||
|
null,
|
||
|
'fa-undo'
|
||
|
))->addClass('btn-danger restore');
|
||
|
if (file_exists($fp.$fns)) {
|
||
|
$section->addInput(new Form_StaticText(
|
||