id: spip-detect

info:
  name: SPIP - Detect
  author: s4e-io
  severity: info
  description: |
    Detects a SPIP and SPIP version.
  reference:
    - https://www.spip.net/
  metadata:
    max-request: 1
    vendor: spip
    product: spip
    fofa-query: app="SPIP"
  tags: spip,tech,detect

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

    matchers-condition: and
    matchers:
      - type: regex
        part: header
        regex:
          - 'Composed-By: SPIP'
          - 'X-Spip-Cache:'
        condition: or

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        name: spip_version
        group: 1
        part: header
        regex:
          - 'Composed-By: SPIP ([0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2}) @ www.spip.net'
# digest: 490a00463044022041899a959b92c9150271488c5669a6c412204bcf90d484f0779d1069469033100220202ab5119bd0cf8183350abafbe1337a42aa42e76bdbaf7758ca4fbf3d471b94:922c64590222798bb761d5b6d8e72950