id: gitea-detect

info:
  name: Gitea Detect
  author: pikpikcu
  severity: info
  metadata:
    max-request: 2
  tags: tech,gitea

http:
  - method: GET
    path:
      - "{{BaseURL}}"
      - "{{BaseURL}}/user/login"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Powered by Gitea"

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        regex:
          - "Powered by Gitea(\\s*)Version:(\\s*)([\\d.]+)"
# digest: 490a004630440220791687a21e5f46c7a6eb923d809d18340770e0c193af81f0a9934a3f199169780220280ffe146a31762152e070e81bffa10978320384487251c5643d87884f18867e:922c64590222798bb761d5b6d8e72950