cybersecurity · intermediate · ~15 min · safe pentest lab
Count auth failures in a log.
Implement int failed_logins(const char *log) returning the number of lines containing "Failed password".
#include <string.h>
int failed_logins(const char *log) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.