MCPcopy Index your code
hub / github.com/Escape-Technologies/goctopus

github.com/Escape-Technologies/goctopus @v0.0.18

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.18 ↗ · + Follow
97 symbols 282 edges 29 files 11 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

goctopus

Blazing fast graphql fingerprinting toolbox.

Go Reference Go Report Card Docker Pulls

⚠️ Goctopus is still in very early development. Breaking changes are expected.

goctopus -a rickandmortyapi.com

                    .-'   `'.
                   /         \
                   |         ;
                   |         |           ___.--,
          _.._     |0) ~ (0) |    _.---'`__.-( (_.
   __.--'`_.. '.__.\    '--. \_.-' ,.--'`     `""`
  ( ,.--'`   ',__ /./;   ;, '.__.'`    __
  _`) )  .---.__.' / |   |\   \__..--""  """--.,_
 `---' .'.''-._.-'`_./  /\ '.  \ _.-~~~````~~~-._`-.__.'
       | |  .' _.-' |  |  \  \  '.               `~---`
        \ \/ .'     \  \   '. '-._)
         \/ /        \  \    `=.__`~-.
     jgs / /\         `) )    / / `"".`\
   , _.-'.'\ \        / /    ( (     / /
    `--~`   ) )    .-'.'      '.'.  | (
           (/`    ( (`          ) )  '-;
            `      '-;         (-'
                  _
  __ _  ___   ___| |_ ___  _ __  _   _ ___
 / _` |/ _ \ / __| __/ _ \| '_ \| | | / __|
| (_| | (_) | (__| || (_) | |_) | |_| \__ \
 \__, |\___/ \___|\__\___/| .__/ \__,_|___/ v0.0.18
 |___/                    |_|
[INF] Enumerating subdomains for 'rickandmortyapi.com'
[INF] Found 5 subdomains for 'rickandmortyapi.com' in 15 seconds 276 milliseconds
INFO[0016] Done fingerprinting rickandmortyapi.com
INFO[0016] Found: {"authenticated":false,"domain":"rickandmortyapi.com","schema_status":"OPEN","source":"rickandmortyapi.com","url":"https://rickandmortyapi.com/graphql"}
INFO[0016] Done. Found 1 graphql endpoints

Usage

Using go:

go install -v github.com/Escape-Technologies/goctopus/cmd/goctopus@latest
goctopus -a example.com

Using docker:

docker run --rm -it escapetech/goctopus:latest -a example.com

Main options & features

It is recommended to use the -a flag as a shorthand to enable all the features (if you want detailed results, and don't care about speed).

Input

Goctopus takes a list of adresses (endpoints and/or urls) as input. Adresses can be specified directly in the command line or in a file.

Command line

The adresses can be specified directly in the command line, comma separated. Example:

goctopus -a example.com,https://example.com/graphql

Input file

The adresses can be specified in a file, one per line. The file path should be specified using the -f flag. Example:

example.com
https://example.com/graphql
escape.tech
https://example.com/api
goctopus -f input.txt

Introspection fingerprinting

The -introspect flag enables introspection fingerprinting. If enabled, goctopus will detect if the introspection of graphql endpoints is enabled.

Subdomain enumeration

The -subdomain flag enables subdomain enumeration. If enabled, goctopus will try to find graphql endpoints on subdomains of the given domains. The enumeration is done using subfinder.

Field suggestion fingerprinting

The -suggest flag enables field suggestion fingerprinting. This option needs the introspection fingerprinting (-introspect) to be enabled. When enabled, goctopus will try to detect if the graphql endpoint has field suggestion enabled, if the introspection is closed. This is useful to bruteforce fields and/or types when introspection is disabled, with tools such as ClairvoyaceNext.

Output

The -o is used to specify the output file path. It defaults to output.jsonl. The output file is in json-lines format. Each line corresponds to one found graphql endpoint and will contain at least the following fields:

{
  "domain": "subdomain.example.com",
  "authenticated": false,
  "url": "https://subdomain.example.com/graphql",
  "source": "example.com"
}

The authenticated field can be one of the following:

  • true: The endpoint is a graphql endpoint.
  • false: The endpoint is a graphql endpoint and requires authentication.

Additional options

Usage: goctopus [options] [addresses]
[addresses]: A list of addresses to fingerprint, comma separated.
Addresses can be in the form of http://example.com/graphql or example.com. If an input file is specified, this argument is ignored.
[options]:
  -a    (All) Enable all fingerprinting methods: introspection, field suggestion, subdomain enumeration
  -f string
        Input file
  -introspect
        Enable introspection fingerprinting
  -o string
        Output file (json-lines format)
  -s    Silent
  -subdomain
        Enable subdomain enumeration
  -suggest
        Enable fields suggestion fingerprinting.
        Needs "introspection" to be enabled.
  -t int
        Request timeout (seconds) (default 30)
  -v    Verbose
  -w int
        Max workers (default 40)
  -webhook string
        Webhook URL

Docker usage

Using volumes to load the input file and save to the output file:

docker run --rm -it -v $(pwd):/data escapetech/goctopus:latest -f /data/input.txt -o /data/output.jsonl

Using a specific version:

# for version vA.B.C
docker run --rm -it escapetech/goctopus:A.B.C [args]

Roadmap

  • [x] Better wordlist for field suggestion fingerprinting, to improve the detection performance and detection rate.
  • [ ] Engine fingerprinting.
  • [ ] Script analysis.
  • [x] Refactor to make goctopus usable as a go package.
  • [ ] Document goctopus as a go package.
  • [ ] Better flags.
  • [x] Better logs.
  • [x] Direct cli input.
  • [ ] Improve performance further.
  • [ ] Resume from output file. (maybe)
  • [ ] Custom ascii art. (maybe)
  • [x] Docker

Extension points exported contracts — how you extend this code

Client (Interface)
(no doc) [1 implementers]
pkg/http/http.go

Core symbols most depended-on inside this repo

MockHttpResponse
called by 21
internal/test/helpers/http.go
Get
called by 12
pkg/config/config.go
Done
called by 5
pkg/address/address.go
Post
called by 4
pkg/http/http.go
Copy
called by 4
pkg/address/address.go
FingerprintAddresses
called by 3
pkg/goctopus/fingerprint.go
marshalOutput
called by 2
pkg/output/output.go
MatchFieldSuggestionRegex
called by 2
pkg/suggestion/field_suggestion.go

Shape

Function 58
Method 25
Struct 10
Interface 2
TypeAlias 2

Languages

Go100%

Modules by API surface

pkg/http/http.go12 symbols
pkg/endpoint/endpoint.go11 symbols
pkg/endpoint/fingerprint_test.go8 symbols
pkg/address/address.go7 symbols
pkg/suggestion/field_suggestion.go6 symbols
pkg/config/config.go6 symbols
pkg/output/output.go5 symbols
pkg/graphql/graphql.go5 symbols
internal/utils/utils.go5 symbols
pkg/output/handler.go3 symbols
pkg/introspection/introspection.go3 symbols
pkg/goctopus/fingerprint.go3 symbols

For agents

$ claude mcp add goctopus \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact