-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Escape-Technologies/feat/major-refactor
feat: major refactor
- Loading branch information
Showing
29 changed files
with
559 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ testers | |
!internal/utils/assets/wordlist.txt | ||
|
||
# ignore builds | ||
goctopus | ||
/goctopus | ||
|
||
dist/ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package utils | ||
|
||
import ( | ||
"flag" | ||
"fmt" | ||
) | ||
|
||
func PrintUsage() { | ||
PrintASCII() | ||
fmt.Println("Usage: goctopus [options] [addresses]") | ||
fmt.Println("[addresses]: A list of addresses to fingerprint, comma separated.\nAddresses can be in the form of http://example.com/graphql or example.com.\n If an input file is specified, this argument is ignored.") | ||
fmt.Println("[options]:") | ||
flag.PrintDefaults() | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package endpoint | ||
|
||
import ( | ||
"github.com/Escape-Technologies/goctopus/pkg/graphql" | ||
"github.com/Escape-Technologies/goctopus/pkg/http" | ||
"github.com/Escape-Technologies/goctopus/pkg/introspection" | ||
"github.com/Escape-Technologies/goctopus/pkg/suggestion" | ||
) | ||
|
||
type _endpointFingerprinter struct { | ||
url string | ||
client http.Client | ||
} | ||
|
||
type endpointFingerprinter interface { | ||
IsOpenGraphql() (bool, error) | ||
IsAuthentifiedGraphql() (bool, error) | ||
HasFieldSuggestion() (bool, error) | ||
HasIntrospectionOpen() (bool, error) | ||
} | ||
|
||
func NewEndpointFingerprinter(url string, client http.Client) endpointFingerprinter { | ||
return &_endpointFingerprinter{ | ||
url: url, | ||
client: client, | ||
} | ||
} | ||
|
||
func (e *_endpointFingerprinter) IsOpenGraphql() (bool, error) { | ||
return graphql.FingerprintOpenGraphql(e.url, e.client) | ||
} | ||
|
||
func (e *_endpointFingerprinter) IsAuthentifiedGraphql() (bool, error) { | ||
return graphql.FingerprintAuthentifiedGraphql(e.url, e.client) | ||
} | ||
|
||
func (e *_endpointFingerprinter) HasFieldSuggestion() (bool, error) { | ||
return suggestion.FingerprintFieldSuggestion(e.url, e.client), nil | ||
} | ||
|
||
func (e *_endpointFingerprinter) HasIntrospectionOpen() (bool, error) { | ||
return introspection.FingerprintIntrospection(e.url, e.client) | ||
} |
Oops, something went wrong.