You want to check for unusual login activity. Specifically, you want to read a log file that contains information on each login attempt, including whether it failed or was successful. You should then parse the data into a logins list, and then you should separate all failed log entries into a separate failed_logins list. If you want to automate this through Python, what would be part of your code? Select three answers.

Automate Cybersecurity Tasks with Python | Weekly challenge 4 Quiz | 

You want to check for unusual login activity. Specifically, you want to read a log file that contains information on each login attempt, including whether it failed or was successful. You should then parse the data into a logins list, and then you should separate all failed log entries into a separate failed_logins list. If you want to automate this through Python, what would be part of your code? Select three answers.

  • An if statement to check if a login attempt failed
  • A for loop to iterate through all items in the logins list
  • A counter variable to keep track of the number of failed logins
  • A split() function to split the login information into a list

 

Leave a Comment