2
0
mirror of https://github.com/garabik/grc.git synced 2024-09-18 17:31:29 +02:00
bash-color-grc/colourfiles/conf.ss
Tasnad Kernetzky 66efc0dc3a
Fix: brackets, address scope; match process name
Newer versions of ss have a slightly different output syntax: IPv6 addresses are put in brackets (like in URLs).
tcp   LISTEN  0       32                       [::1]:53              [::]:*   
Also, the addresses' scope may be in the output:
192.168.1.1%eth0:68           0.0.0.0:*   users:(("NetworkManager",pid=82,fd=6)) ino:661155 sk:272 <->

I had to move the "status" regex or it would overwrite IPv6 addresses.
2018-06-05 18:57:20 +02:00

89 lines
1.4 KiB
Scheme

# status
regexp=\[.*\]
colours=green
=======
# Local Address:Port Peer Address:Port
regexp=\s((?:\d+\.){3}\d+|\*|\[?::1?\]?|[\w\d\-\_\.]+)(%[\w\d]+)?:(\S+)\s+\s((?:\d+\.){3}\d+|\*|\[?::1?\]?|[\w\d\-\_\.]+):(\S+)
colours=default,bright_green,blue,bright_red,cyan,magenta
=======
# process name
regexp=\("([^"]+)",
colours=blue
=======
# ipx hostname
regexp=^IPX.*[\dABCDEF]+:[\dABCDEF]+
colours=green
=======
# protocols
regexp=(^tcp|^udp|^unix|^IPX|STREAM|DGRAM)
colours=magenta
=======
# protocols UDP
regexp=^udp
colours=yellow
=======
# protocols TCP
regexp=^tcp
colours=blue
=======
# status UNCONN
regexp=UNCONN
colours=dark red
=======
# status
regexp=FIN_WAIT.*
colours=red
=======
# status
regexp=SYN.*?
colours=bold red
=======
# status
regexp=LISTEN(ING)?
colours=bold blue
=======
# status
regexp=TIME_WAIT
colours=bold red
=======
# status
regexp=CLOS(E(_WAIT)?|ING)
colours=red
skip=yes
=======
# status
regexp=LAST_ACK
colours=red
=======
# status
regexp=ESTAB.*?\b|CONNECTED
colours=bold yellow
=======
# status
regexp=FREE
colours=bold green
=======
# status
regexp=DISCONNECTING
colours=red
=======
# status
regexp=CONNECTING
colours=green
=======
# status
regexp=UNKNOWN
colours=blink bold red
=======
# path
regexp=(\@)[\dabcdef]+
colours=green, bold green
=======
# timer
regexp=\d+sec
colours=yellow
=======
#Skip header
regexp=(Netid|State).*$
colours=default