Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-sonnet-4-20250514· AnthropicHugging Face LMArena Human Preference 140K

Help me write a structured and detailed prompt for a LLM to write a bash script to do a…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-opus-4-20250514-thinking-16k’s answer.
  1. User

    Help me write a structured and detailed prompt for a LLM to write a bash script to do a first scan of a domain to discover services, web applications, tls versions, ... The script should take the domain as a parameter and put all tools output in a specific folder in separate files.

  2. Claude Assistant

    Here's a structured prompt for generating a comprehensive domain reconnaissance bash script:

    Create a bash script for automated domain reconnaissance that performs initial service discovery and enumeration. The script should meet these specifications:
    
    ## Script Requirements:
    - Accept a domain name as a command-line parameter
    - Create a timestamped output directory structure: ./recon_[domain]_[timestamp]/
    - Store each tool's output in separate, clearly named files
    - Include error handling and progress indicators
    - Make the script executable and well-commented
    
    ## Reconnaissance Tasks to Include:
    
    ### Network Discovery:
    - Subdomain enumeration (using tools like subfinder, assetfinder, or amass)
    - DNS record enumeration (A, AAAA, MX, TXT, NS, CNAME records)
    - Port scanning of discovered hosts (common ports and full scans)
    - Service version detection on open ports
    
    ### Web Application Analysis:
    - HTTP/HTTPS service identification
    - Web server fingerprinting
    - Directory and file discovery (using tools like dirb, gobuster, or ffuf)
    - Technology stack identification (using tools like whatweb or wappalyzer-cli)
    - SSL/TLS certificate analysis and supported cipher suites
    - HTTP security headers analysis
    
    ### Additional Enumeration:
    - WHOIS information gathering
    - Certificate transparency log searches
    - Social media and public information gathering (OSINT)
    - Email address harvesting
    - Potential vulnerability scanning (basic checks)
    
    ## Output Organization:
    Structure the output directory with subdirectories like:
    - network/ (for port scans, DNS records)
    - web/ (for web-related discoveries)
    - certificates/ (for SSL/TLS analysis)
    - osint/ (for public information)
    - raw/ (for raw tool outputs)
    
    ## Technical Specifications:
    - Include dependency checks for required tools
    - Add command-line help and usage information
    - Implement logging with timestamps
    - Handle cases where tools aren't installed
    - Include options for verbose output
    - Add basic input validation for domain format
    - Consider rate limiting to avoid being blocked
    
    ## Tools to Integrate:
    Suggest appropriate tools for each task, with fallbacks if primary tools aren't available. Include both active and passive reconnaissance techniques.
    
    The script should be production-ready with proper error handling, clear documentation, and modular design for easy maintenance and extension.
    

    This prompt provides clear structure and comprehensive requirements while allowing the LLM to make informed decisions about specific tool choices and implementation details.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.