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 | |
# print an anchor subset (r, n or A) | |
function pfprint() { | |
# avoid trusting PATH and . | |
/usr/bin/sudo pfctl -a "$2" -s"$1" 2>/dev/null | |
} |
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 | |
function pfprint() { | |
if [ -n "$1" ];then | |
sudo pfctl -a "$2" -s"$1" 2>/dev/null | |
else | |
sudo pfctl -s"$1" 2>/dev/null | |
fi | |
} |