cybersecurity · beginner · ~15 min · safe pentest lab

Is it a known Kali tool?

Match against a known-tool list.

Challenge

Recognise a name from the standard Kali toolkit by matching it against a fixed list.

Task

Implement int is_kali_tool(const char *name) that returns 1 if name is one of the known tools, else 0.

Known tools: nmap, metasploit, wireshark, burpsuite, hydra, john.

Input

  • name: a NUL-terminated tool name the grader passes.

Output

Returns int: 1 if name exactly matches a known tool, else 0.

Example

is_kali_tool("nmap")     ->   1
is_kali_tool("hydra")    ->   1
is_kali_tool("notepad")  ->   0

Edge cases

  • Any name not in the list returns 0.

Rules

  • Exact string comparison against the allowlist.

Input format

A NUL-terminated tool name name.

Output format

An int: 1 if name is a known Kali tool, else 0.

Constraints

Exact match against {nmap, metasploit, wireshark, burpsuite, hydra, john}.

Starter code

#include <string.h>

int is_kali_tool(const char *name) {
    /* TODO */
    return 0;
}

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