cybersecurity · intermediate · ~15 min · safe pentest lab
Combine heuristics into a score.
Implement int phishy_score(const char *url) summing these traits: contains '@' (+1); length > 75 (+1); the host right after "//" starts with a digit (IP literal) (+1); more than 4 '.' characters (+1).
#include <string.h>
int phishy_score(const char *url) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.