Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on run argv
- set appName to "" & item 1 of argv & ""
- set dispMessage to appName & return & return & tab & " tries to establish an outgoing connection"
- try
- set diagIn to (display dialog dispMessage with title "TCPBlock Alert" buttons {"Whitelist", "Blacklist", "Cancel"} default button 3 with icon file ((path to current user folder) & "bin:TCPBlock.icns" as string))
- set buttName to the button returned of diagIn
- if buttName is equal to "Cancel" then
- return
- else if buttName is equal to "Blacklist" then
- do shell script "echo " & appName & " >> ~/bin/tcpblock_blacklist.log"
- else
- do shell script "/usr/local/bin/tcpblock -a '" & appName & "'" with administrator privileges
- do shell script "/usr/local/bin/tcpblock -c"
- end if
- end try
- end run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement