cybersecurity · beginner · ~15 min · safe pentest lab

Is the action ethical?

Distinguish ethical from unethical responses.

Challenge

Implement int is_ethical(const char *action) returning 1 for "report-and-stop" and "request-authorization", and 0 for "exploit-without-permission".

Starter code

#include <string.h>

int is_ethical(const char *action) {
    /* TODO */
    return 0;
}

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