cybersecurity · intermediate · ~15 min · safe pentest lab
Flag traversal indicators in a path.
Implement int is_suspicious_path(const char *path) returning 1 if it contains "../" (traversal) or "etc/passwd", else 0.
#include <string.h>
int is_suspicious_path(const char *path) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.