(Aug-16-2019, 06:16 PM)ichabod801 Wrote: For step 2, you should be checking in line, not in auth_log. Once you have that fixed, do you see a pattern in the output from step 2? If so, you use that pattern in step 3.
thank you I just figured that out prior to checking back in I am now working on step 3, with 1 and 2 functional.
(Aug-16-2019, 06:19 PM)nilamo Wrote: What does it do from the terminal? That's the only place that matters (unless you have different instructions for the course).It works fine in terminal. I now have step 1 and 2 complete thank you
My step 3
The word before every user name is user and the word after is from. I wrote this code which i think is the right format (ofcorse it doesnt work)
intruder_log = {} with open("auth.log.1") as auth_log: for line in auth_log: if "Failed password" in line: start = intruder_log.find("user") end = intruder_log.find("from") invalid_user = intruder_log[start : end ] print("invalid_user: {}".format(invalid_user))