cybersecurity · intermediate · ~15 min · safe pentest lab
Tally a marker in tool output.
Implement int count_open_ports(const char *xml) returning the number of occurrences of the substring state="open".
#include <string.h>
int count_open_ports(const char *xml) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.