id: cups-detect

info:
  name: CUPS - Detect
  author: rxerium
  severity: info
  description: |
    An instance running CUPS was detected.
  metadata:
    verified: true
    max-request: 1
    shodan-query: product:"CUPS (IPP)"
  tags: cups,tech,detect

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

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Web Interface is Disabled - CUPS"
          - "Forbidden - CUPS"
          - "Server: CUPS"
        condition: or

      - type: status
        status:
          - 200
          - 404
          - 403
        condition: or

    extractors:
      - type: regex
        part: body
        name: version
        regex:
          - 'CUPS v([0-9.]+)>'
# digest: 4b0a004830460221009085b454366e1eeb662dc734a524cc97b25be31d0fbcd1e1f97198ecdcb95abe022100f0d12d701cc898fe99bf914fa793f20d1e4de1ddd39a68c781838e371cd05a0c:922c64590222798bb761d5b6d8e72950