id: mappproxy-detect

info:
  name: Mapproxy - Detect
  author: philippedelteil
  severity: info
  description: |
    Checks for a running MapProxy instance and obtain version number. Also checks if the demo page is enabled. MapProxy is an open source proxy for geospatial data. It caches, accelerates and transforms data from existing map services and serves any desktop or web GIS client.
  reference:
    - https://github.com/mapproxy/mapproxy
    - https://mapproxy.org
  metadata:
    max-request: 2
    shodan-query: http.html:"Welcome to MapProxy"
  tags: tech,mapproxy,detect,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}"
      - "{{BaseURL}}/demo"

    host-redirects: true
    max-redirects: 2

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Welcome to MapProxy"
          - "MapProxy Demo"
        condition: or

      - type: word
        part: header
        words:
          - "text/html"

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - MapProxy(?i) ([0-9]+\.[0-9]+\.[0-9]+)
# digest: 4a0a0047304502202d4cb3a731fd82e460fd5c01561bee8cd8bdc659b0fb47a76302da3931b72881022100a71789631f4cd0de3da70c74c1e2c4ebed23fde97e5a783498fb00bd43b05075:922c64590222798bb761d5b6d8e72950