Skip to content

Instantly share code, notes, and snippets.

@nathants
Last active August 20, 2022 08:05
Show Gist options
  • Save nathants/daa1aa0dee88bc6dc8710c82965b4704 to your computer and use it in GitHub Desktop.
Save nathants/daa1aa0dee88bc6dc8710c82965b4704 to your computer and use it in GitHub Desktop.
a small and colorful format to tail tinysnitch logs
# tinysnitch: https://github.com/nathants/tinysnitch
# color: https://gist.github.com/nathants/336bc5e501ad174aeeb7986f2b0633e4
# count-last: https://gist.github.com/nathants/f6d3f2cd4147af102c65a69a7e729b53
# The MIT License (MIT)
# Copyright (c) 2022-present Nathan Todd-Stone
# https://en.wikipedia.org/wiki/MIT_License#License_terms
# colorful snitch logs
tail -f /tmp/tinysnitch.log \
| sed -ur 's:(tcp|udp) [^ ]+ \->:\1:' \
| grep --line-buffered -v -e :51820$ -e :53$ \
| color tcp:blue udp:cyan dns:magenta icmp:yellow allow:green deny:red \
| count-last
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment