Skip to content

Commit

Permalink
GraphQLmap Package
Browse files Browse the repository at this point in the history
  • Loading branch information
swisskyrepo committed Jan 17, 2022
1 parent 7df7ae2 commit 08413ed
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ You can also contribute with a :beers: IRL or using Github Sponsoring button.

```basic
$ git clone https://github.com/swisskyrepo/GraphQLmap
$ python graphqlmap.py
$ python setup.py install
$ graphqlmap
_____ _ ____ _
/ ____| | | / __ \| |
| | __ _ __ __ _ _ __ | |__ | | | | | _ __ ___ __ _ _ __
Expand Down Expand Up @@ -54,10 +55,10 @@ optional arguments:

```py
# Connect using POST and providing an authentication token
python3 graphqlmap.py -u https://yourhostname.com/graphql -v --method POST --headers '{"Authorization" : "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0Ijoibm8gc2VjcmV0cyBoZXJlID1QIn0.JqqdOesC-R4LtOS9H0y7bIq-M8AGYjK92x4K3hcBA6o"}'
graphqlmap -u https://yourhostname.com/graphql -v --method POST --headers '{"Authorization" : "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0Ijoibm8gc2VjcmV0cyBoZXJlID1QIn0.JqqdOesC-R4LtOS9H0y7bIq-M8AGYjK92x4K3hcBA6o"}'

# Pass request through Burp Proxy
python graphqlmap.py -u "http://172.17.0.1:5013/graphql" --proxy http://127.0.0.1:8080
graphqlmap -u "http://172.17.0.1:5013/graphql" --proxy http://127.0.0.1:8080
```

### Dump a GraphQL schema
Expand Down
2 changes: 1 addition & 1 deletion graphqlmap.py → bin/graphqlmap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
except ImportError:
import pyreadline as readline

from attacks import *
from graphqlmap.attacks import *
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

Expand Down
Empty file added graphqlmap/__init__.py
Empty file.
2 changes: 1 addition & 1 deletion attacks.py → graphqlmap/attacks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/python
from utils import *
from graphqlmap.utils import *
import re
import time

Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import setuptools

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="graphqlmap",
version="0.0.1",
description="scripting engine to interact with a GraphQL endpoint for pentesting purposes",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/swisskyrepo/GraphQLmap",
packages=setuptools.find_packages(),
scripts=["bin/graphqlmap"],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',
)

0 comments on commit 08413ed

Please sign in to comment.