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