20 lines
567 B
Bash
20 lines
567 B
Bash
#!/bin/bash
|
|
|
|
|
|
############################################################################
|
|
# Shellscript : Prüft auf gesperrte Kommunikation in der Firewall
|
|
# Autor : Andreas Vogel, macenterprise gmbh
|
|
# Copyright : macenterprise 2019
|
|
############################################################################
|
|
|
|
# Variable
|
|
Check=$(/usr/libexec/ApplicationFirewall/socketfilterfw --listapps | grep -B1 "Block" | cut -d ':' -f2 | cut -d '-' -f1)
|
|
|
|
if [[ "$Check" = "" ]]; then
|
|
output="Nichts gesperrt"
|
|
else
|
|
output="$Check"
|
|
fi
|
|
|
|
echo "<result>$output</result>"
|