Created
January 13, 2022 14:39
-
-
Save crypt0rr/d5a3e403a4ff52b7ac2b54bd761b1d39 to your computer and use it in GitHub Desktop.
Objective Development Little Snitch - Simple '.lsrules' creating scripts
This file contains hidden or 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 | |
curl -s https://dbl.oisd.nl/basic -o tmp_out && sed '/#/d' tmp_out > input | |
echo '{ | |
"description": "", | |
"name": "", | |
"rules": [ | |
{ | |
"action": "deny", | |
"notes": "", | |
"owner": "me", | |
"process": "any", | |
"remote-domains": [' > little-snitch.lsrules | |
for i in $(cat input); do | |
echo '"'$i'",' >> little-snitch.lsrules; done | |
echo "]} | |
]}" >> little-snitch.lsrules | |
rm input tmp_out |
This file contains hidden or 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 | |
curl -s https://dbl.oisd.nl/basic -o tmp_out && sed '/#/d' tmp_out > input | |
echo '{ | |
"description": "", | |
"name": "", | |
"rules": [' > little-snitch.lsrules | |
for i in $(cat input); do | |
echo ' { | |
"action": "deny", | |
"notes": "", | |
"owner": "me", | |
"process": "any", | |
"remote-domains": "'$i'" | |
},' >> little-snitch.lsrules; done | |
echo "]}" >> little-snitch.lsrules | |
rm input tmp_out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment