nmap_vulnerability_scan
Identify vulnerabilities on network targets using predefined detection scripts. Specify targets, ports, and categories to pinpoint security weaknesses for assessment.
Instructions
Run vulnerability detection scripts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ports | No | common | |
| targets | Yes | ||
| vuln_category | No | all |
Implementation Reference
- server.py:272-290 (handler)The main handler function for the nmap_vulnerability_scan tool. It constructs Nmap arguments for vulnerability scanning based on the provided targets, ports, and vulnerability category, executes the scan using run_nmap_command, and returns the results or error message.async def nmap_vulnerability_scan( targets: str, ports: str = "common", vuln_category: str = "all" ) -> str: """Run vulnerability detection scripts.""" if vuln_category == "all": scripts = "vuln" else: scripts = f"vuln and {vuln_category}" args = [f"--script={scripts}", "-p", ports, targets] result = run_nmap_command(args, timeout=600) if result["success"]: return f"Vulnerability scan completed:\n\n{result['stdout']}" else: return f"Vulnerability scan failed:\n\n{result['stderr']}"
- server.py:268-271 (registration)The @app.tool decorator that registers the nmap_vulnerability_scan tool with the FastMCP app, specifying its name and description.@app.tool( name="nmap_vulnerability_scan", description="Run vulnerability detection scripts" )