cybersecurity · beginner · ~15 min · safe pentest lab
Combine loopback and private checks for lab safety.
Implement int lab_safe(int a, int b, int c, int d) returning 1 if the address is loopback (127.x) or private (10.x / 192.168.x / 172.16-31.x), else 0.
int lab_safe(int a, int b, int c, int d) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.