Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash #9

Open
math-ematics opened this issue Dec 3, 2023 · 1 comment
Open

Crash #9

math-ematics opened this issue Dec 3, 2023 · 1 comment

Comments

@math-ematics
Copy link

[+] Mutation enabled! Name: Mutation
[+] Located mutation in schema : 312
[+] I'll leave this for you to test, scipts arent gentle with editing data
[+] Located queries location in schema : 10
[+] Located sensative query in schema : 0
[+] 1 sensative queries found
[+] products is a sensative query
[+] Checking authorization...
[+] Found easy query in schema : 0
[+] Found easy query in schema : 1
[+] Found easy query in schema : 2
[+] Found easy query in schema : 3
[+] Found easy query in schema : 4
[+] Found easy query in schema : 6
[+] Found easy query in schema : 10
[+] Found easy query in schema : 11
[+] Found easy query in schema : 14
[+] Found easy query in schema : 16
[+] Found easy query in schema : 20
[+] Found easy query in schema : 24
[+] Found easy query in schema : 37
[+] Found easy query in schema : 38
[+] Testing easy query : products
Traceback (most recent call last):
File "/root/tools/GraphCrawler/graphCrawler.py", line 469, in
main(args.url, args)
File "/root/tools/GraphCrawler/graphCrawler.py", line 373, in main
query = gql(
File "/usr/local/lib/python3.10/dist-packages/gql/gql.py", line 17, in gql
return parse(source)
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 113, in parse
return parser.parse_document()
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 241, in parse_document
definitions=self.many(TokenKind.SOF, self.parse_definition, TokenKind.EOF),
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 1149, in many
nodes = [parse_fn()]
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 300, in parse_definition
return getattr(self, f"parse_{method_name}")()
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 325, in parse_operation_definition
selection_set=self.parse_selection_set(),
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 366, in parse_selection_set
selections=self.many(
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 1149, in many
nodes = [parse_fn()]
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 374, in parse_selection
return (
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 393, in parse_field
selection_set=self.parse_selection_set()
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 366, in parse_selection_set
selections=self.many(
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 1149, in many
nodes = [parse_fn()]
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 374, in parse_selection
return (
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 381, in parse_field
name_or_alias = self.parse_name()
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 232, in parse_name
token = self.expect_token(TokenKind.NAME)
File "/usr/local/lib/python3.10/dist-packages/graphql/language/parser.py", line 1045, in expect_token
raise GraphQLSyntaxError(
graphql.error.syntax_error.GraphQLSyntaxError: Syntax Error: Expected Name, found '}'.

GraphQL request:2:31
1 |
2 | query {products{}}
| ^
3 |

@gsmith257-cyber
Copy link
Owner

Thanks for reporting. Looks like it incorrectly parsed the schema and thought it found a query without any parameters and tried it, causing that error. If your able to give me the url to try to debug I'm more than happy to but if not I can't replicate on my end. I will add a try catch statement to it though so it won't fail and will at least spit out results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants