id: gpc-json

info:
  name: Global Privacy Control (GPC) File Disclosure
  author: MihhailSokolov
  severity: info
  description: |
    The website defines a Global Privacy Control policy.
  metadata:
    verified: true
    max-request: 2
  tags: miscellaneous,misc,generic,gpc,vuln

http:
  - method: GET
    path:
      - "{{RootURL}}/.well-known/gpc.json"
      - "{{RootURL}}/gpc.json"

    stop-at-first-match: true

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '"gpc"'

      - type: status
        status:
          - 200

      - type: dsl
        dsl:
          - "len(body) <= 1024 && len(body) > 0"

    extractors:
      - type: json
        part: body
        name: gpc-version
        json:
          - ".version?"
# digest: 4a0a004730450220686abf24a4f7fe080f86556fecc0716b6442f494b936bbf6a7e3642cfa209dd0022100fdffdbf23158bec446b5b74246a32e3477246b730e6cf96fff61f8e5364e41bb:922c64590222798bb761d5b6d8e72950