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

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

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

      - type: word
        words:
          - 'Syntax Error GraphQL request (1:1) Unexpected Name "queryy"'
        part: body
# digest: 4b0a00483046022100c6a583b4169ea8d3c34e24d758debf2a953cca8e7f72fe93e511ac3f127ff72502210080ebb2cd023f909ba0e81abe625413e40a3db9fa65986e6be8d775abac6c2e0b:922c64590222798bb761d5b6d8e72950