id: seafile-api

info:
  name: Seafile API - Detect
  author: righettod
  severity: info
  description: |
    Seafile API was detected.
  reference:
    - https://download.seafile.com/published/web-api/home.md
    - https://manual.seafile.com/
    - https://www.seafile.com/en/home/
  classification:
    cpe: cpe:2.3:a:seafile:seafile:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: seafile
    product: seafile
    shodan-query: http.html:"seafile"
  tags: exposure,api,detect,discovery

http:
  - method: GET
    path:
      - '{{BaseURL}}/api2/server-info/'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'seafile-basic'
          - 'seafile-pro'
        condition: or

      - type: word
        part: header
        words:
          - 'application/json'

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        group: 1
        regex:
          - '"version":\s*"([0-9.]+)"'
# digest: 4b0a00483046022100d902ece0b9abb2a6c79b9e03a69119b21d3ba86e13c51e37b10a825f10d36f63022100dce5115ca5edf18f97688e8e6d125a19cd4ea9f8cce2ddf1c4160a27390c59b3:922c64590222798bb761d5b6d8e72950