v0.1.1 Latest Latest

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

Go to latest
Published: Apr 30, 2018 License: MIT Imports: 14 Imported by: 0




This section is empty.


View Source
var (
	Red   = "\033[31;1;4m" // red color
	Cyan  = "\033[36;6;2m" // cyan color
	Green = "\033[32;6;3m" // Green color
	Reset = "\033[0m"      // reset for default color

	Info = "\033[33;1;1m"
	Que  = "\033[34;1;1m"
	Bad  = "\033[31;1;1m"
	Good = "\033[32;1;1m"
	Run  = "\033[97;1;1m"

Use like this

fmt.Printf("[%sCRTSH%s] %s", r, rs, subdomain)


func CheckMaxPages

func CheckMaxPages(config *BaseSearchConfiguration) bool

CheckMaxPages checks if maximum number of pages per service was found.

func CheckMaxSubdomains

func CheckMaxSubdomains(config *BaseSearchConfiguration) bool

CheckMaxSubdomains checks if maximum number of domains was found.

func CreateDirIfNotExist

func CreateDirIfNotExist(dir string)

Create config directory if it does not exists

func GetHTTPCookieResponse

func GetHTTPCookieResponse(urls string, cookies []*http.Cookie, timeout int) (resp *http.Response, cookie []*http.Cookie, err error)

GetHTTPResponse : Returns a HTTP Response object It needs URL To Visit and a cookie array to send with request. Note, It needs full url with scheme and a timeout value. It returns a HTTP Response object with a cookie array.

func GetHTTPResponse

func GetHTTPResponse(url string, timeout int) (resp *http.Response, err error)

GetHTTPResponse : Returns a HTTP Response object It needs URL To Visit. Note, It needs full url with scheme and a timeout value. It returns a HTTP Response object

func GetHomeDir

func GetHomeDir() string

Gets current user directory

func InitializeWildcardDNS

func InitializeWildcardDNS(state *State) bool

Method to eliminate Wildcard Is based on OJ Reeves Work on Gobuster Project :-)

func NewUUID

func NewUUID() (string, error)

NewUUID generates a random UUID according to RFC 4122 Taken from :

Used for bruteforcing and detection of Wildcard Subdomains :-)

func Unique

func Unique(elements []string) []string

Returns unique items in a slice Adapted from

func Validate

func Validate(state *State, strslice []string) (subdomains []string)

Returns valid subdomains found ending with target domain


type BaseSearchConfiguration

type BaseSearchConfiguration struct {
	MaxDomains int // Max subdomains per page
	MaxPages   int // Max pages we should query

	CurrentPageNo  int // Current page we are checking
	CurrentRetries int // Retries we have already made

	PrevLinksFound    []string // Links we have previously found
	CurrentSubdomains []string // Subdomains we have already found on a page

	AllSubdomains []string // All Subdomains found so far

Configuration Structure which contains configuration for each search engine.

type BruteforceResult

type BruteforceResult struct {
	Entity string // Current Subdomain we found
	Error  error  // Error

Current Bruteforce structure

type Config

type Config struct {
	VirustotalAPIKey string `json:"virustotalApikey"` // Virustotal API Key

	PassivetotalUsername string `json:"passivetotalUsername"` // PassiveTotal Username (Email Address)
	PassivetotalKey      string `json:"passivetotalKey"`      // PassiveTotal api key

	SecurityTrailsKey string `json:"securitytrailsKey"` // SecurityTrails api key

	RiddlerEmail    string `json:"riddlerEmail"`    // Riddler Email
	RiddlerPassword string `json:"riddlerPassword"` // Riddler Password

	CensysUsername string `json:"censysUsername"` // Censys Username
	CensysSecret   string `json:"censysSecret"`   // Censys API Key

func ReadConfigFile

func ReadConfigFile() (configuration *Config, err error)

Reads a config file from disk and returns Configuration structure If not exists, create one and then return

type Result

type Result struct {
	Subdomains []string // Subdomains found
	Error      error    // Any error that has occured

Current result structure

type Setting

type Setting struct {
	CensysPages string // Censys pages to check. For All, use "all"

func InitializeSettings

func InitializeSettings() (setting *Setting)

type State

type State struct {
	Color          bool      // Whether to use color or not
	Threads        int       // Number of threads to use
	Timeout        int       // Timeout for requests to different passive sources
	Verbose        bool      // Show verbose information
	Domain         string    // Domain name to find subdomains for
	Recursive      bool      // Whether perform recursive subdomain discovery or not
	Output         string    // Name of output file
	Alive          bool      // Get only alive subdomains (x - no wildcards :-))
	IsJSON         bool      // Provide JSON output file
	Wordlist       string    // Wordlist file for subdomains bruteforcing
	Bruteforce     bool      // Flag to decide whether to bruteforce or not
	WildcardIPs    StringSet // Wildcard IP Structure
	IsWildcard     bool      // Does the host has wildcard subdomains, if yes parse them carefully
	WildcardForced bool      // Force processing of wildcard DNS Responses
	Sources        string    // Comma separated list of sources to use
	Silent         bool      // Show only silent output or not
	FinalResults   []string  // Contains final bruteforcing results
	SetConfig      string    // Used for changing the current configuration file details
	SetSetting     string    // Used for passing custom configuration to the application

	CurrentSettings Setting // Current application settings
	ConfigState     Config  // Current configuration file state

Holds the State read in from the CLI

func InitState

func InitState() (state State, err error)

type StringSet

type StringSet struct {
	Set map[string]bool

Shim type for "set" containing strings

func (*StringSet) Add

func (set *StringSet) Add(s string) bool

Add an element to a set

func (*StringSet) AddRange

func (set *StringSet) AddRange(ss []string)

Add a list of elements to a set

func (*StringSet) Contains

func (set *StringSet) Contains(s string) bool

Test if an element is in a set

func (*StringSet) ContainsAny

func (set *StringSet) ContainsAny(ss []string) bool

Check if any of the elements exist

func (*StringSet) Stringify

func (set *StringSet) Stringify() string

Stringify the set

Jump to

Keyboard shortcuts

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