mirror of https://github.com/CISOfy/lynis.git
Add OpenBSD support to gather UDP/TCP ports which listen on network
This commit is contained in:
parent
0a3482b968
commit
28b31b95c8
|
@ -310,6 +310,16 @@
|
|||
fi
|
||||
FIND2=""
|
||||
;;
|
||||
OpenBSD)
|
||||
if [ ! "${NETSTATBINARY}" = "" ]; then
|
||||
# UDP
|
||||
FIND=`${NETSTATBINARY} -an 2> /dev/null | grep "^udp" | awk '{ print $4"|"$1"||" }'`
|
||||
# TCP
|
||||
FIND2=`${NETSTATBINARY} -an 2> /dev/null | grep "^tcp" | awk '{ if($6=="LISTEN") { print $4"|"$1"||" }}'`
|
||||
else
|
||||
ReportException "${TEST_NO}:3" "netstat missing to gather listening ports"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
# Got this exception? Provide your details and output of netstat or any other tool to determine this information.
|
||||
ReportException "${TEST_NO}:2" "Unclear what method to use, to determine listening port information"
|
||||
|
|
Loading…
Reference in New Issue