Python - create blacklist file of IP addresses that have more than 5 failed login attempts in the au
Posted
by oz_babe
on Stack Overflow
See other posts from Stack Overflow
or by oz_babe
Published on 2010-03-24T17:51:47Z
Indexed on
2010/03/24
17:53 UTC
Read the original article
Hit count: 325
Basically I have an authlog/syslog file with a list of log in attempts and IP addresses - I need to make a Python program that will create a txt file with all the IP addresses that have more than 5 failed login attempts - a sort of "blacklist".
So basically something like:
if "uniqueipaddress" and "authentication failure" appear more than 5 times, add uniqueipaddress to txt file.
Any help would be greatly appreciated - please try and make it simple as I am very, very inexperienced in programming in Python! Thanks.
© Stack Overflow or respective owner