core

package
v0.0.0-...-95086eb Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InputURLs         []string
	Threads           int
	InputFile         string
	OutputFile        string
	SecretsOutputFile string
	Greedy            bool
	Debug             bool = false
	Crawl             bool
	FindSecrets       bool = false
	Sig               string
	Silent            bool
	SSL               bool = false
	LocalPort         int
	UpsteamProxy      string

	Command string
)
View Source
var Blacklisted_extensions []string
View Source
var Certificate string
View Source
var PrintSecrets bool = false
View Source
var SSHFolder string
View Source
var Scope []string
View Source
var Signatures []Signature
View Source
var X509pair tls.Certificate

Functions

func AddNewSecret

func AddNewSecret(url string)

add string to newSecrets

func AddNewSubdomain

func AddNewSubdomain(url string)

add string to newSubdomains, thread safe

func AddUrlVisited

func AddUrlVisited(url string)

Add string to urlVisited, thread safe

func CreateAuthority

func CreateAuthority(certPath, keyPath string) error

createCertificateAuthority creates a new certificate authority

func ExecSearch

func ExecSearch() error

func FileExists

func FileExists(filename string) bool

fileExists returns a bool if the file exists or not

func Find

func Find(slice []string, val string) (int, bool)

Find searches a []string for a substring and return it's position in the array and a bool for if it's in the array

func FolderExists

func FolderExists(filename string) bool

folderExists returns a bool if the folder exists or not

func GetHTTprotocol

func GetHTTprotocol(url string) (protocol string, err error)

GetHTTprotocol parses a given URL to get it's protocol e.g http:// or https://

func IsNewSecret

func IsNewSecret(url string) bool

is string in newSecrets

func IsNewSubdomain

func IsNewSubdomain(url string) bool

is string in newSubdomains, thread safe

func IsUrlVisited

func IsUrlVisited(url string) bool

is string in urlVisited, thread safe

func ParseProxyResponse

func ParseProxyResponse(js JavaScript)

Process requests, print them to console and to file

func ReadCertificateDisk

func ReadCertificateDisk(certFile, keyFile string) error

readCertificateDisk reads a certificate and key file from disk

func ReadFile

func ReadFile(filePath string) (content []string, err error)

RadFile reads the content of a file and returns it in a slice

func ReadFileIntoBytes

func ReadFileIntoBytes(filePath string) (content []byte, err error)

func SaveResults

func SaveResults(fileLocation string, newContent []string) error

SaveResults saves the content to the spcified file

func StartProxy

func StartProxy(port string, upsteamProxySet bool) (err error)

start the proxy server

func TimeTrack

func TimeTrack(start time.Time, name string)

TimeTrack times a function just for testing

Types

type ConfigSignature

type ConfigSignature struct {
	Signatures []struct {
		Part    string `yaml:"part"`
		Match   string `yaml:"match,omitempty"`
		Name    string `yaml:"name"`
		Regex   string `yaml:"regex,omitempty"`
		Comment string `yaml:"comment,omitempty"`
	} `yaml:"signatures"`
}
var ConfigSigs ConfigSignature

func (*ConfigSignature) GetSignatures

func (config *ConfigSignature) GetSignatures() ([]Signature, error)

func (*ConfigSignature) ParseConfig

func (config *ConfigSignature) ParseConfig(fileName string) error

type JavaScript

type JavaScript struct {
	UrlAddr
	Content string //Content of the JS file
	// contains filtered or unexported fields
}

func (*JavaScript) GetSecrets

func (js *JavaScript) GetSecrets() error

GetSecrets uses regex to find secrets in the content of JS files

func (*JavaScript) GetSubDomains

func (js *JavaScript) GetSubDomains() error

GetSubDomains uses regex to find subdomains in the content of JS files

type PatternSignature

type PatternSignature struct {
	// contains filtered or unexported fields
}

func (*PatternSignature) Match

func (s *PatternSignature) Match(js *JavaScript) (secrets []string)

func (*PatternSignature) Name

func (s *PatternSignature) Name() string

type Signature

type Signature interface {
	Name() string
	Match(js *JavaScript) []string
}

type SimpleSignature

type SimpleSignature struct {
	// contains filtered or unexported fields
}

func (*SimpleSignature) Match

func (s *SimpleSignature) Match(js *JavaScript) (secrets []string)

func (*SimpleSignature) Name

func (s *SimpleSignature) Name() string

type UrlAddr

type UrlAddr struct {
	// contains filtered or unexported fields
}

func (*UrlAddr) GetContent

func (u *UrlAddr) GetContent(client *http.Client) (newContent string, isJS bool, err error)

GetContent retrieves the content of urls - #### MAYBE CHECK FOR redirects and follow them????

func (*UrlAddr) GetRootDomain

func (u *UrlAddr) GetRootDomain() (err error)

Get the Top Level Domain of the URL

type WebPage

type WebPage struct {
	UrlAddr
	Content string //Contant of the webpage
	JSFiles []JavaScript
}

func GetResults

func GetResults(url string) (wp WebPage)

Get Subdomains and secrets from URL's

func (wp *WebPage) GetJSLinks() (JSFile []JavaScript, err error)

GetJSLinks retrieves the links to JS files from the content of the url

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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