cybersecurity · beginner · ~15 min · safe pentest lab

Does the code call system()?

Find the shell-invoking call.

Challenge

Implement int uses_system(const char *code) returning 1 if the source contains "system(", else 0 — a red flag for command injection.

Starter code

#include <string.h>

int uses_system(const char *code) {
    /* TODO */
    return 0;
}

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