utils

package
v0.0.0-...-86d29b1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultThreads = 200
	DNSTimeout     = 5 * time.Second
)

Variables

View Source
var (
	ErrorPrintf   = color.Red
	WarnPrintf    = color.Yellow
	InfoPrintf    = color.Cyan
	SuccessPrintf = color.Green
)
View Source
var DefaultNameservers = []string{"8.8.8.8:53", "1.1.1.1:53"}

Functions

func CleanDomain

func CleanDomain(host string) string

func ColorLevel

func ColorLevel(level string) string

func ExpandIPRange

func ExpandIPRange(ipOrNet string) []string

func FormatOutput

func FormatOutput(platform string, domains, ips []string, logToFile bool, domain, timestamp string)

func GetDNSDumpsterKey

func GetDNSDumpsterKey() string

func GetFOFAKey

func GetFOFAKey() string

func GetFOFAQuery

func GetFOFAQuery() string

func GetShodanKey

func GetShodanKey() string

func GetVirusTotalKey

func GetVirusTotalKey() string

func IsIPInNetworks

func IsIPInNetworks(ip string, networks []string) bool

func IsValidDomain

func IsValidDomain(host string) bool

func IsValidIP

func IsValidIP(ip string) bool

func Timestamp

func Timestamp() string

Types

type AssetLogger

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

func SetupLogger

func SetupLogger(platform string, logToFile bool, domain, timestamp string) *AssetLogger

func (*AssetLogger) Close

func (l *AssetLogger) Close()

func (*AssetLogger) Error

func (l *AssetLogger) Error(format string, args ...interface{})

func (*AssetLogger) Host

func (l *AssetLogger) Host(domain string)

func (*AssetLogger) IP

func (l *AssetLogger) IP(ip string)

func (*AssetLogger) Info

func (l *AssetLogger) Info(format string, args ...interface{})

func (*AssetLogger) Warn

func (l *AssetLogger) Warn(format string, args ...interface{})

Jump to

Keyboard shortcuts

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