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

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: 4a0a0047304502210097026ac137bf5ef0c3f5e76e6465f96ec1947f00a5ab0fa6104a88995692c534022015b32f0d8930b9c45ae66a4fd64346f81f5dedb9eb13de36803fce2e22d3e41e:922c64590222798bb761d5b6d8e72950