mirror of
https://github.com/CISOfy/lynis.git
synced 2025-04-08 17:15:25 +02:00
Merge pull request #1060 from Varbin/solaris-netstat
[NETW-3012] Use netstat on Solaris to gather listening ports
This commit is contained in:
commit
701be9852b
@ -512,6 +512,15 @@
|
||||
ReportException "${TEST_NO}:3" "netstat missing to gather listening ports"
|
||||
fi
|
||||
;;
|
||||
Solaris)
|
||||
if [ -n "${NETSTATBINARY}" ]; then
|
||||
LogText "Test: Retrieving netstat information to find listening ports"
|
||||
FIND=$(${NETSTATBINARY} -an -P udp | ${AWKBINARY} '{ if($7=="LISTEN") { print $1"|udp|LISTEN|" }}')
|
||||
FIND2=$(${NETSTATBINARY} -an -P tcp | ${AWKBINARY} '{ if($7=="LISTEN") { print $1"|tcp|LISTEN|" }}')
|
||||
else
|
||||
ReportException "${TEST_NO}:4" "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…
x
Reference in New Issue
Block a user