cybersecurity · beginner · ~15 min · safe pentest lab

Is the target in scope?

Enforce the scope list before acting.

Challenge

Implement int in_scope(const char *target, const char *allowed) returning 1 if target exactly matches the single allowed target, else 0.

Starter code

#include <string.h>

int in_scope(const char *target, const char *allowed) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.