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

json error with method POST and headers #14

Closed yakir2b closed 2 years ago

yakir2b commented 4 years ago

Hi,

When i tried using it with the parameters method=POST and headers like the example. i received this error- AttributeError: 'NoneType' object has no attribute 'json'

Tnx

orangecms commented 4 years ago

Can you post your full command line (just exchange your URL for example.com or something)?

I have tried this myself and it worked. :)

marz-hunter commented 4 years ago

Traceback (most recent call last): File "graphqlmap.py", line 75, in GraphQLmap(args) File "graphqlmap.py", line 50, in init dump_schema(self.url, self.method, 15, self.headers) File "/root/GraphQLmap/attacks.py", line 31, in dump_schema schema = r.json() AttributeError: 'NoneType' object has no attribute 'json'

orangecms commented 4 years ago

Traceback (most recent call last): File "graphqlmap.py", line 75, in GraphQLmap(args) File "graphqlmap.py", line 50, in init dump_schema(self.url, self.method, 15, self.headers) File "/root/GraphQLmap/attacks.py", line 31, in dump_schema schema = r.json() AttributeError: 'NoneType' object has no attribute 'json'

That's the stack trace; what is the full command line that you entered?

secjey commented 4 years ago

Hi @yakir2b,

I believe you might want to take a look at @orangecms pull request #20 for JSON support. I had the same issue as you and this fixed it. Thanks @orangecms by the way!

oscarsanden commented 3 years ago

I got this error message too and I was missing --json in the command line.