Created
May 28, 2019 20:09
-
-
Save AndrewWCarson/da838316883496810ec0a1a7c489c42f to your computer and use it in GitHub Desktop.
Report True/False based on Stealth Mode settings.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if /usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode | grep enabled >& /dev/null; then | |
echo "true" | |
elif /usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode | grep disabled >& /dev/null; then | |
echo "false" | |
else | |
echo "Error: could not read valid Stealth Mode value." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment