Skip to main content
Glama
SlanyCukr

Bug Bounty MCP Server

by SlanyCukr

dalfox_xss_scan

Scan web applications for Cross-Site Scripting vulnerabilities using advanced payload injection and DOM analysis techniques to identify security weaknesses.

Instructions

Execute Dalfox for advanced XSS vulnerability scanning with enhanced logging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
additional_argsNo
blindNo
custom_payloadNo
mining_dictNo
mining_domNo
pipe_modeNo
urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration (@mcp.tool()) and proxy handler for 'dalfox_xss_scan'. Forwards parameters to REST API endpoint '/api/dalfox-xss-scan'.
    @mcp.tool()
    def dalfox_xss_scan(
        url: str,
        pipe_mode: bool = False,
        blind: bool = False,
        mining_dom: bool = True,
        mining_dict: bool = True,
        custom_payload: str = "",
        additional_args: str = "",
    ) -> dict[str, Any]:
        """Run Dalfox for advanced XSS scanning with enhanced logging."""
        data = {
            "url": url,
            "pipe_mode": pipe_mode,
            "blind": blind,
            "mining_dom": mining_dom,
            "mining_dict": mining_dict,
            "custom_payload": custom_payload,
            "additional_args": additional_args,
        }
    
        logger.info(f"⚡ Starting Dalfox XSS scanning on {url}")
        result = api_client.safe_post("api/dalfox-xss-scan", data)
    
        if result.get("success"):
            logger.info(f"✅ Dalfox XSS scan completed on {url}")
        else:
            logger.error("❌ Dalfox XSS scan failed")
    
        return result
  • Primary handler function 'execute_dalfox' decorated with @tool decorator. Builds dalfox CLI command, executes it, and parses results.
    @tool(required_fields=["url"])
    def execute_dalfox():
        """Execute Dalfox for XSS vulnerability scanning."""
        data = request.get_json()
        params = _extract_dalfox_params(data)
    
        logger.info(f"Executing Dalfox XSS scan on {params['url']}")
    
        command = _build_dalfox_command(params)
        execution_result = execute_command(
            command, timeout=600
        )  # 10 minutes timeout for XSS scanning
    
        logger.info(f"Dalfox XSS scan completed for {params['url']}")
        return _parse_dalfox_result(execution_result, params, command)
  • Helper function to construct the dalfox CLI command from input parameters.
    def _build_dalfox_command(params):
        """Build dalfox command from parameters."""
        cmd_parts = ["dalfox"]
    
        # Build dalfox command
        if params["pipe_mode"]:
            cmd_parts.append("pipe")
        else:
            cmd_parts.extend(["url", params["url"]])
    
        # Add dalfox-specific parameters
        if params["blind"]:
            cmd_parts.append("--blind")
    
        if params["mining_dom"]:
            cmd_parts.append("--mining-dom")
    
        if params["mining_dict"]:
            cmd_parts.append("--mining-dict")
    
        if params["custom_payload"]:
            cmd_parts.extend(["--custom-payload", params["custom_payload"]])
    
        if params["workers"] != 100:
            cmd_parts.extend(["--worker", str(params["workers"])])
    
        if params["method"] != "GET":
            cmd_parts.extend(["--method", params["method"]])
    
        if params["headers"]:
            cmd_parts.extend(["--header", params["headers"]])
    
        if params["cookies"]:
            cmd_parts.extend(["--cookie", params["cookies"]])
    
        if params["timeout"] != 10:
            cmd_parts.extend(["--timeout", str(params["timeout"])])
    
        # Handle additional arguments
        if params["additional_args"]:
            cmd_parts.extend(params["additional_args"].split())
    
        return " ".join(cmd_parts)
  • Helper function to extract and validate input parameters, including aggressive mode preset.
    def _extract_dalfox_params(data):
        """Extract and validate dalfox parameters from request data."""
        # Check for aggressive mode
        aggressive = data.get("aggressive", False)
    
        # Base parameters
        base_params = {
            "url": data.get("url", data.get("target", "")),
            "blind": data.get("blind", False),
            "deep": data.get("deep", False),
            "mining": data.get("mining", False),
            "workers": data.get("workers", 25),
            "delay": data.get("delay", 1),
            "timeout": data.get("timeout", 10),
            "waf_evasion": data.get("waf_evasion", False),
            "follow_redirects": data.get("follow_redirects", False),
            "custom_payload": data.get("custom_payload", ""),
            "additional_args": data.get("additional_args", ""),
            "pipe_mode": data.get("pipe_mode", False),
            "mining_dom": data.get("mining_dom", False),
            "mining_dict": data.get("mining_dict", False),
            "method": data.get("method", "GET"),
            "headers": data.get("headers", ""),
            "cookies": data.get("cookies", ""),
        }
    
        # Apply aggressive preset if requested
        # Apply aggressive preset if requested (local implementation)
        if aggressive:
            # Dalfox aggressive preset
            base_params.update(
                {
                    "blind": True,
                    "deep": True,
                    "mining": True,
                    "workers": 100,
                    "delay": 0,
                    "timeout": 30,
                    "waf_evasion": True,
                    "follow_redirects": True,
                    "mining_dom": True,
                    "mining_dict": True,
                }
            )
        return base_params
  • Helper function to parse and format the dalfox execution results into standardized response.
    def _parse_dalfox_result(execution_result, params, command):
        """Parse dalfox execution result and format response."""
        return {
            "tool": "dalfox",
            "target": params["url"],
            "command": command,
            "success": execution_result["success"],
            "stdout": execution_result.get("stdout", ""),
            "stderr": execution_result.get("stderr", ""),
            "return_code": execution_result.get("return_code", 0),
            "parameters": {
                "url": params["url"],
                "pipe_mode": params["pipe_mode"],
                "blind": params["blind"],
                "mining_dom": params["mining_dom"],
                "mining_dict": params["mining_dict"],
                "custom_payload": params["custom_payload"],
                "workers": params["workers"],
                "method": params["method"],
                "headers": params["headers"],
                "cookies": params["cookies"],
                "timeout": params["timeout"],
                "additional_args": params["additional_args"],
            },
        }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'enhanced logging,' which adds some context about output behavior, but fails to cover critical aspects like whether this is a read-only or destructive operation, permission requirements, rate limits, or error handling. For a security scanning tool with potential system impacts, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads key information: tool execution, purpose, and a feature. There is no wasted verbiage, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, 1 required) and lack of annotations, the description is incomplete. It covers the basic purpose but misses parameter explanations, usage guidelines, and behavioral details. The presence of an output schema helps with return values, but the overall context for effective tool selection and invocation is inadequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning none of the 7 parameters have descriptions in the schema. The tool description does not mention any parameters, leaving all semantics undocumented. This forces the agent to infer meaning from parameter names alone, which is insufficient for complex inputs like 'additional_args' or 'custom_payload.'

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Execute Dalfox for advanced XSS vulnerability scanning with enhanced logging.' It specifies the action ('Execute Dalfox'), the domain ('XSS vulnerability scanning'), and a key feature ('enhanced logging'). However, it doesn't explicitly differentiate from sibling tools like 'jaeles_vulnerability_scan' or 'nuclei_scan' that might also perform vulnerability scanning, though 'XSS' provides some distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'advanced XSS vulnerability scanning' but doesn't specify scenarios, prerequisites, or exclusions. With many sibling tools for scanning and vulnerability assessment, this lack of comparative context leaves the agent without clear usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SlanyCukr/bugbounty-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server