From d99eee7f32b4feb40ceeeb449c9a254e9a1d0f92 Mon Sep 17 00:00:00 2001 From: D-Ace0 Date: Thu, 20 Jun 2024 20:10:09 +0300 Subject: [PATCH] detection enhancement --- graphw00f/helpers.py | 3 +++ graphw00f/lib.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/graphw00f/helpers.py b/graphw00f/helpers.py index 9ec80af..ff3a7e0 100644 --- a/graphw00f/helpers.py +++ b/graphw00f/helpers.py @@ -71,6 +71,9 @@ def possible_graphql_paths(): '/v1/graphiql', '/v2/graphiql', '/v3/graphiql', + '/graphql/v1', + '/graphql/v2', + '/graphql/v3', '/api/graphql', '/api/graphiql', '/console', diff --git a/graphw00f/lib.py b/graphw00f/lib.py index 5894b81..a202094 100644 --- a/graphw00f/lib.py +++ b/graphw00f/lib.py @@ -34,7 +34,7 @@ def check(self, url): if response.get('data'): if response.get('data', {}).get('__typename', '') in ('Query', 'QueryRoot', 'query_root'): return True - elif response.get('errors') and (any('locations' in i for i in response['errors']) or (any('extensions' in i for i in response))): + elif response.get('errors') and (any('locations' in i for i in response['errors']) or any('extensions' in i for i in response['errors'])): return True elif response.get('data'): return True