Awk’ing about

Having got the sed/awk book for 1p, decided to play about. Googling for some cool scripts, also found this cool site
netstat -ant | awk ‘{print $NF}’ | grep -v ‘[a-z]’ | sort | uniq -c
Quite like this one 🙂 maybe i should make a honeypot ^^

sudo zcat /var/log/auth.log.*.gz | awk ‘/Failed Password/&&!/for invalid user/{a[$9]++}/Failed password for invalid user/{a[“*”$11]++}END{for(i in a) printf “%6s\t%s\n”, a[i],i|”sort -n”}

be sure to change the quotes tho.. think wordpress is having a funny moment and convert the ‘ .