swisskyrepo / GraphQLmap

GraphQLmap is a scripting engine to interact with a graphql endpoint for pentesting purposes. - Do not use for illegal testing ;)
MIT License
1.33k stars 187 forks source link

KeyError: 'data' on dump_via_fragment #42

Open Xplo8E opened 2 years ago

Xplo8E commented 2 years ago
GraphQLmap > dump_via_fragment
============= [SCHEMA] ===============
e.g: name[Type]: arg (Type!)

Traceback (most recent call last):
  File "/usr/local/bin/graphqlmap", line 4, in <module>
    __import__('pkg_resources').run_script('graphqlmap==0.0.1', 'graphqlmap')
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 651, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1455, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python3.10/site-packages/graphqlmap-0.0.1-py3.10.egg/EGG-INFO/scripts/graphqlmap", line 81, in <module>
  File "/usr/local/lib/python3.10/site-packages/graphqlmap-0.0.1-py3.10.egg/EGG-INFO/scripts/graphqlmap", line 59, in __init__
  File "/usr/local/lib/python3.10/site-packages/graphqlmap-0.0.1-py3.10.egg/graphqlmap/attacks.py", line 39, in dump_schema
KeyError: 'data'

When i try dump_via_fragment option , then it throws above error and it exit

nutt318 commented 1 year ago

Getting same errors:

`GraphQLmap > dump_via_introspection Traceback (most recent call last): File "/usr/lib/python3/dist-packages/requests/models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3/dist-packages/simplejson/init.py", line 525, in loads return _default_decoder.decode(s) File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode obj, end = self.raw_decode(s) File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/graphqlmap", line 4, in import('pkg_resources').run_script('graphqlmap==0.0.1', 'graphqlmap') File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 656, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 1460, in run_script exec(script_code, namespace, namespace) File "/usr/local/lib/python3.10/dist-packages/graphqlmap-0.0.1-py3.10.egg/EGG-INFO/scripts/graphqlmap", line 81, in File "/usr/local/lib/python3.10/dist-packages/graphqlmap-0.0.1-py3.10.egg/EGG-INFO/scripts/graphqlmap", line 56, in init File "/usr/local/lib/python3.10/dist-packages/graphqlmap-0.0.1-py3.10.egg/graphqlmap/attacks.py", line 32, in dump_schema File "/usr/lib/python3/dist-packages/requests/models.py", line 917, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: [Errno Expecting value] POST body missing, invalid Content-Type, or JSON object has no keys.: 0 `

taheroo commented 1 year ago

I have the same issue, did you find any fix ?

EastArctica commented 1 year ago

I'm getting this too. Looking into it a tiny bit, I'm getting {'errors': [{'message': '__schema cannot be queried.', 'locations': [{'line': 1, 'column': 957}]}]} returned from the server so that's my issue. I'm interested in what other people are getting though.

AdnanHussainTurki commented 1 year ago

Same issue.