nmap_comprehensive_scan
Perform a comprehensive network scan using all detection methods to identify open ports, services, operating systems, and vulnerabilities on specified targets.
Instructions
Perform comprehensive scan with all detection methods
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"targets": "<targets>"
},
"name": "nmap_comprehensive_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targets | Yes | ||
| ports | No | all | |
| include_scripts | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- server.py:201-219 (handler)The async handler function implementing the nmap_comprehensive_scan tool logic, performing SYN scan, service version detection, OS detection, optional default scripts, with extended timeout.
async def nmap_comprehensive_scan( targets: str, ports: str = "all", include_scripts: bool = True ) -> str: """Perform comprehensive scan with all detection methods.""" args = ["-sS", "-sV", "-O", "-p", ports] if include_scripts: args.append("--script=default") args.append(targets) result = run_nmap_command(args, timeout=600) # Longer timeout for comprehensive scan if result["success"]: return f"Comprehensive scan completed:\n\n{result['stdout']}" else: return f"Comprehensive scan failed:\n\n{result['stderr']}" - server.py:197-200 (registration)The @app.tool decorator registering the nmap_comprehensive_scan tool with its name and description.
@app.tool( name="nmap_comprehensive_scan", description="Perform comprehensive scan with all detection methods" ) - server.py:201-205 (schema)Input schema defined by function parameters with type hints: targets (str), ports (str, default 'all'), include_scripts (bool, default True), output str.
async def nmap_comprehensive_scan( targets: str, ports: str = "all", include_scripts: bool = True ) -> str: