Skip to content

Commit ca042d2

Browse files
committed
Update to support 2.4.x pfSense version
1 parent f1eae4d commit ca042d2

File tree

5 files changed

+56
-83
lines changed

5 files changed

+56
-83
lines changed

files/etc/inc/priv/bro.priv.inc

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
<?php
22
/*
3-
bro.priv.inc
4-
part of pfSense (http://www.pfSense.org/)
5-
Copyright (C) 2015 ESF, LLC
6-
All rights reserved.
7-
8-
Redistribution and use in source and binary forms, with or without
9-
modification, are permitted provided that the following conditions are met:
10-
11-
1. Redistributions of source code must retain the above copyright notice,
12-
this list of conditions and the following disclaimer.
13-
14-
2. Redistributions in binary form must reproduce the above copyright
15-
notice, this list of conditions and the following disclaimer in the
16-
documentation and/or other materials provided with the distribution.
17-
18-
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
19-
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20-
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21-
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
22-
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27-
POSSIBILITY OF SUCH DAMAGE.
3+
* bro.priv.inc
4+
* part of pfSense (https://www.pfSense.org/)
5+
* Copyright (c) 2018 Prosper Doko
6+
* All rights reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
2819
*/
2920
global $priv_list;
3021

files/usr/local/pkg/bro.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
/*
3-
*bro.inc
4-
*part of pfSense (https://www.pfSense.org/)
5-
*Copyright (c) 2018 Prosper Doko
3+
* bro.inc
4+
* part of pfSense (https://www.pfSense.org/)
5+
* Copyright (c) 2018 Prosper Doko
66
* All rights reserved.
77
*
88
* Licensed under the Apache License, Version 2.0 (the "License");

files/usr/local/www/bro_alert_data.php

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,29 @@
11
<?php
22
/*
3-
bro_monitor_data.php
4-
part of pfSense (https://www.pfSense.org/)
5-
Copyright (C) 2015-2016 Prosper Doko
6-
All rights reserved.
7-
8-
Redistribution and use in source and binary forms, with or without
9-
modification, are permitted provided that the following conditions are met:
10-
11-
1. Redistributions of source code must retain the above copyright notice,
12-
this list of conditions and the following disclaimer.
13-
14-
2. Redistributions in binary form must reproduce the above copyright
15-
notice, this list of conditions and the following disclaimer in the
16-
documentation and/or other materials provided with the distribution.
17-
18-
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
19-
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20-
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21-
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
22-
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27-
POSSIBILITY OF SUCH DAMAGE.
3+
* bro_monitor_data.php
4+
* part of pfSense (https://www.pfSense.org/)
5+
* Copyright (c) 2018 Prosper Doko
6+
* All rights reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
2819
*/
20+
2921
require_once("guiconfig.inc");
3022

3123
/* Requests */
3224
if ($_POST) {
3325
global $program, $logfile;
34-
// Actions
35-
//$filter = preg_replace('/(@|!|>|<)/', "", htmlspecialchars($_POST['strfilter']));
26+
3627
$program = strtolower($_POST['program']);
3728
$logfile = $_POST['logfile'];
3829

@@ -45,7 +36,6 @@
4536

4637
foreach ($loghead as $value) {
4738
if (preg_match("/\bfields\b/", $value)) {
48-
// $headfield = preg_split("/[\s,]+/", $value);
4939
$headfield = preg_split("/[\t,]/", $value);
5040
show_tds($headfield);
5141
break;
@@ -76,7 +66,7 @@
7666
/* Functions */
7767
function fetch_head($log) {
7868
$log = escapeshellarg($log);
79-
// Get logs based in filter expression
69+
// Get logs first 10 lines
8070
exec("/usr/bin/head -n 10 {$log}", $loghead);
8171
// Return logs head
8272
return $loghead;

files/usr/local/www/bro_alerts.php

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
11
<?php
22
/*
3-
bro_alerts.php
4-
part of pfSense (https://www.pfSense.org/)
5-
Copyright (C) 2015-2016 Prosper Doko
6-
All rights reserved.
7-
8-
Redistribution and use in source and binary forms, with or without
9-
modification, are permitted provided that the following conditions are met:
10-
11-
1. Redistributions of source code must retain the above copyright notice,
12-
this list of conditions and the following disclaimer.
13-
14-
2. Redistributions in binary form must reproduce the above copyright
15-
notice, this list of conditions and the following disclaimer in the
16-
documentation and/or other materials provided with the distribution.
17-
18-
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
19-
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
20-
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21-
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
22-
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27-
POSSIBILITY OF SUCH DAMAGE.
3+
* bro_alerts.php
4+
* part of pfSense (https://www.pfSense.org/)
5+
* Copyright (c) 2018 Prosper Doko
6+
* All rights reserved.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
2819
*/
20+
2921
require_once("/etc/inc/util.inc");
3022
require_once("/etc/inc/functions.inc");
3123
require_once("/etc/inc/pkg-utils.inc");

files/usr/local/www/select_box_file.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//list_by_ext: returns an array containing an alphabetic list of files in the specified directory ($path) with a file extension that matches $extension
33

44
function list_by_ext($extension, $path){
5-
$list = array(); //initialise a variable
5+
$list = array();
66
$dir_handle = @opendir($path) or die("Unable to open $path"); //attempt to open path
77
while($file = readdir($dir_handle)){ //loop through all the files in the path
88
if($file == "." || $file == ".."){continue;} //ignore these

0 commit comments

Comments
 (0)