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

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:
          - 'Unexpected "queryy"'
        part: body
# digest: 4a0a00473045022100810fb57062e8b5ab4cae4b57734f2bd18e7b8ae091d080ace1c40937c99230b202207bc5eb5f242d463bfd269b135c5ecbd7ae60eaea9ece0cea69971aefc208ca7e:922c64590222798bb761d5b6d8e72950