id: graphql-apiforwp-detect
info:
  name: Graphql apiforwp Detect
  author: princechaddha
  severity: info
  reference: https://github.com/dolevf/graphw00f/blob/main/graphw00f/lib.py
  tags: tech,graphql,wordpress

http:
  - method: POST
    path:
      - "{{BaseURL}}/graphql"
      - "{{BaseURL}}/api/graphql"
      - "{{BaseURL}}/query"
      - "{{BaseURL}}/"
    body: '{"query":"query aa#aa { __typename }"}'
    headers:
      Content-Type: application/json
    redirects: true

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200
          - 400

      - type: word
        words:
          - "Unexpected token \"END\""
        part: body
# digest: 4a0a0047304502210087e520b6c1e8999aec877c08ca93f9dbe42fb024b79e70955e9022b776c56e14022048d98c0ed634599caa8b8b23ee976f6af210ddf45d07d5535cedecfe1ce61d24:922c64590222798bb761d5b6d8e72950