Skip to content

Instantly share code, notes, and snippets.

@Ignition
Created April 13, 2011 10:31
Show Gist options
  • Save Ignition/917328 to your computer and use it in GitHub Desktop.
Save Ignition/917328 to your computer and use it in GitHub Desktop.
Blog-p1-i3
#!/bin/sh
zcat -f /var/log/auth.log* | grep -f bad-phrases | awk '{print $1,$2}' | sort -k 1,1M -k 2n | grep -vf white-list | uniq -c
## Output
#
# 953 Mar 13
# 1420 Mar 14
# 1783 Mar 15
# 1366 Mar 16
# 4572 Mar 17
# 767 Mar 18
# 728 Mar 19
# 1078 Mar 20
# 514 Mar 21
# 2896 Mar 22
# 1 Mar 23
# 370 Mar 24
# 250 Mar 25
# 3 Mar 26
# 946 Mar 27
# 194 Mar 28
# 11 Mar 29
# 9 Mar 30
# 1 Apr 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment