core

package
v0.0.0-...-84b4dd5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Banner() string

this function simply returns main go-recon banner

func Check403

func Check403(url, word string, client *http.Client, user_agent string) ([]string, []int, error)

try different ways to bypass 403 status code urls returns slice of urls with payloads on them, a slice with their respective status codes, and finally an error

func CheckRedirect

func CheckRedirect(url string, client *http.Client, payloads []string, keyword string) ([]string, error)

this function checks if given url is vulnerable to open redirect with provided payloads if keyword has value, it will be replaced with payloads Example: vuln_urls, err := CheckRedirect("http://example.com/index.php?p=FUZZ", client, []string{"bing.com", "//bing.com"}, "FUZZ")

func CreateHttpClient

func CreateHttpClient(timeout int) *http.Client

create an http client with given timeout (in milliseconds), skip tls verify and some other useful settings don't follow redirects Example: client := CreateHttpClient(5000)

func CreateHttpClientFollowRedirects

func CreateHttpClientFollowRedirects(timeout int) *http.Client

this functions does the same as CreateHttpClient() but this one follows redirects

func DefaultHttpClient

func DefaultHttpClient() *http.Client

function which aids users if they want to use a default client instance instead of creating a new one

func DetectWaf

func DetectWaf(url string, payload string, keyword string, client *http.Client) (string, error)

this function send a request to url with an LFI payload to try to trigger the possible WAF (Web Application Firewall) i.e. Cloudflare Example: waf, err := gorecon.DetectWaf(url, "", "", gorecon.DefaultHttpClient())

func FetchEndpoints

func FetchEndpoints(urls <-chan string, results chan string, client *http.Client) error

this function receives urls from channel so it's better for concurrency and configuration

func FilterUrls

func FilterUrls(urls []string, filters []string) []string

remove useless urls, duplicates and more to optimize results as much as possible from a list of urls Example: new_urls := gorecon.FilterUrls(urls, []string{"hasparams"})

func FindSecrets

func FindSecrets(url string, client *http.Client) ([]string, error)

this function receives a url and a client to look for potential leaked secrets like API keys (using regex)

func GetAllPerms

func GetAllPerms() []string

this function returns all defined permutations for S3 buckets name generation

func GetAllUrls

func GetAllUrls(domain string, results chan string, client *http.Client, recursive bool) error

main function to enumerate urls about provided domain, urls are sent through channel set "recursive" to false if you don't want to get urls related to subdomains

func GetCommonPayloads

func GetCommonPayloads() []string

return common payloads

func GetEndpoints

func GetEndpoints(urls []string, results chan string, workers int, client *http.Client) error

main function to extract JS endpoints from a list of urls it receives a custom client for further customization Example: go gorecon.GetEndpointsFromFile(urls, results, 15, gorecon.DefaultClient())

func GetPayloads

func GetPayloads() []string

returns all defined payloads

func GetPerms

func GetPerms(level int) []string

this function returns more or less permutations based on given level 1 returns less permutations than 6 (1 lower, 5 higher)

func GetSubdomains

func GetSubdomains(dom string, results chan string, providers []string, client *http.Client) error

this function sents through provided channel all the gathered subdomains providers slice is used to configure the providers to use it also receives a client so you can custom most of the process Example: err := GetSubdomains("example.com", results, []string{"alienvault", "crt", "rapiddns", "wayback"}, gorecon.DefaultClient())

func GetTech

func GetTech(url string, client *http.Client) (map[string]struct{}, error)

this function send a request to given url and returns running technologies Example: techs, err := GetTech("http://github.com", gorecon.DefaultClient())

func Green

func Green(str string, c bool)

function to print given text as success log

func Magenta

func Magenta(str string, c bool)

function to print given text as information log

func Red

func Red(str string, c bool)

function to print given text as warning/error log

func StartTimer

func StartTimer() time.Time

return current time for later chaining with TimerDiff() to get elapsed time

func TimerDiff

func TimerDiff(t1 time.Time) time.Duration

this function receives a time and returns difference between current time and given time

func Version

func Version() string

func Warning

func Warning(str string, c bool)

func Whois

func Whois(domain string) (wp.WhoisInfo, error)

send WHOIS query to given domain to retrieve public info Example: info, err := gorecon.Whois("hackthebox.com")

Types

type DnsInfo

type DnsInfo struct {
	Domain string   `json:"domain"` // given domain
	CNAME  string   `json:"cname"`  // returns the canonical name for the given host
	TXT    []string `json:"txt"`    // returns the DNS TXT records for the given domain name
	MX     []MX     `json:"mx"`     // returns a slice of MX (Mail eXchanges)
	NS     []NS     `json:"ns"`     // returns a slice of NS (Name Server)
	Hosts  []string `json:"hosts"`  // returns a slice of given host's IPv4 and IPv6 addresses
}

struct used by main function

func Dns

func Dns(domain string) (DnsInfo, error)

main function for DNS information gathering it receives a domain and tries to find most important info and returns a DnsInfo struct and an error

type MX

type MX struct {
	Host string `json:"host"`
	Pref uint16 `json:"pref"`
}

same struct as net.MX

type NS

type NS struct {
	Host string `json:"host"`
}

same struct as net.NS

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL