Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
5366b2b8
Commit
5366b2b8
authored
Aug 27, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(configd/legacy) align result of "filter list osfp"
parent
57317188
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
list_osfp.py
src/opnsense/scripts/filter/list_osfp.py
+9
-1
actions_filter.conf
src/opnsense/service/conf/actions.d/actions_filter.conf
+1
-1
firewall_rules_edit.php
src/www/firewall_rules_edit.php
+1
-1
No files found.
src/opnsense/scripts/filter/list_osfp.py
View file @
5366b2b8
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
import
tempfile
import
tempfile
import
subprocess
import
subprocess
import
os
import
os
import
sys
import
ujson
import
ujson
result
=
[]
result
=
[]
...
@@ -42,4 +43,11 @@ with tempfile.NamedTemporaryFile() as output_stream:
...
@@ -42,4 +43,11 @@ with tempfile.NamedTemporaryFile() as output_stream:
for
line
in
data
.
split
(
'
\n
'
)[
2
:]:
for
line
in
data
.
split
(
'
\n
'
)[
2
:]:
result
.
append
(
line
.
replace
(
'
\t
'
,
' '
)
.
strip
())
result
.
append
(
line
.
replace
(
'
\t
'
,
' '
)
.
strip
())
print
(
ujson
.
dumps
(
result
))
# handle command line argument (type selection)
if
len
(
sys
.
argv
)
>
1
and
sys
.
argv
[
1
]
==
'json'
:
print
(
ujson
.
dumps
(
result
))
else
:
# output plain
print
(
'------------------------- OS fingerprints -------------------------'
)
for
ostype
in
result
:
print
(
ostype
)
src/opnsense/service/conf/actions.d/actions_filter.conf
View file @
5366b2b8
...
@@ -18,7 +18,7 @@ message:refresh url table aliasses
...
@@ -18,7 +18,7 @@ message:refresh url table aliasses
[
list
.
osfp
]
[
list
.
osfp
]
command
:/
usr
/
local
/
opnsense
/
scripts
/
filter
/
list_osfp
.
py
command
:/
usr
/
local
/
opnsense
/
scripts
/
filter
/
list_osfp
.
py
parameters
:
parameters
:
%
s
type
:
script_output
type
:
script_output
message
:
request
osfp
message
:
request
osfp
...
...
src/www/firewall_rules_edit.php
View file @
5366b2b8
...
@@ -36,7 +36,7 @@ require_once("interfaces.inc");
...
@@ -36,7 +36,7 @@ require_once("interfaces.inc");
$tcpflags
=
array
(
"syn"
,
"ack"
,
"fin"
,
"rst"
,
"psh"
,
"urg"
,
"ece"
,
"cwr"
);
$tcpflags
=
array
(
"syn"
,
"ack"
,
"fin"
,
"rst"
,
"psh"
,
"urg"
,
"ece"
,
"cwr"
);
/* OS types, request from backend */
/* OS types, request from backend */
$ostypes
=
json_decode
(
configd_run
(
'filter list osfp'
));
$ostypes
=
json_decode
(
configd_run
(
'filter list osfp
json
'
));
/**
/**
* build array with interface options for this form
* build array with interface options for this form
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment