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,discovery

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