Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- f = open("login_attempts.csv", "w")
- logfile = "ApacheLogFile2.log"
- with open(logfile) as fp:
- for line in fp:
- loginAttempt = re.findall(r'/.*pma_username=(.*)&pma_password=(.*) HTTP\/1.1/', line)[:1]
- f.write(loginAttempt[0])
- print(loginAttempt[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement