cybersecurity · beginner · ~15 min · safe pentest lab

Is this a port scan?

Apply a detection threshold.

Challenge

Implement int is_port_scan(int distinct, int threshold) returning 1 if distinct >= threshold, else 0.

Starter code

int is_port_scan(int distinct, int threshold) {
    /* TODO */
    return 0;
}

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