Help: I need to 'rate' a text list of IPs

Zeus

Registered
Hi all,
this is a problem i can't resolve. (and i'm quite sure ya can ;-) )

I'm running an ftp server and now i've detected someone is trying to brute-forcing it.
I want to do something cause i really can't shutdown the ftp service and my ip is static.

So, 'grep'ing and 'awk'ing log files i've get a list of attacking ips.
Now i'd like to extract from this list all IP repeated for more than 10 times.

i really have no idea on how to do it.
Please, is there any one can help me ?

Thanks in advance
 
You want to pipe the list through uniq -c that will print out each unique line with the number of times it has been seen. Then pipe it through sort -n to sort the list numerically. Now you can just read them off in order. If you really want to sort out those less than 10 you can make a quick awk script for that.

Good Luck!
 
Back
Top