utils

package
v0.0.0-...-2353871 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToFile

func AppendToFile(filePath string, content []byte) error
func Banner(bannerPath string)

print banner in ascii art format

func CheckInstallations

func CheckInstallations(tools []string) error

func CleanUp

func CleanUp()

Clean unnecessary resources such as tmp files

func CopyFile

func CopyFile(src, dst string) error

Copy file from src to dst

func CountLines

func CountLines(filename string) (int, error)

func CreateDir

func CreateDir(dirName, domain string) (string, error)

func ExtractEmbeddedFileToTempDir

func ExtractEmbeddedFileToTempDir(docFS embed.FS, embeddedFilePath, tempFileName string) (string, error)

ExtractEmbeddedFileToTempDir reads an embedded file and writes it to a temporary directory named ".tmp", returning the path to the newly created temporary file.

func LogElapsedTime

func LogElapsedTime(startTime time.Time, operation string)

func MergeFiles

func MergeFiles(pathToDir, outFileName string, specificFiles []string) error

It search for existence of specificFiles in the given directory and merge them to a new file

func RemoveDuplicatesFromFile

func RemoveDuplicatesFromFile(filename string) error

Remove duplicates from the given file

func RunCommand

func RunCommand(command string, args ...interface{}) ([]byte, error)

func ShowProgress

func ShowProgress()

Types

type Config

type Config struct {
	OutDir                         string `mapstructure:"OUT_DIR"`
	EnableSubkill3r                bool   `mapstructure:"ENABLE_SUBKILL3R"`
	EnableAssetfinder              bool   `mapstructure:"ENABLE_ASSETFINDER"`
	EnableAmass                    bool   `mapstructure:"ENABLE_AMASS"`
	EnableGowitness                bool   `mapstructure:"ENABLE_GOWITNESS"`
	EnableFFUF                     bool   `mapstructure:"ENABLE_FFUF"`
	Subkill3rWorkerCount           int    `mapstructure:"SUBKILL3R_WORKER_COUNT"`
	Subkill3rServerAddr            string `mapstructure:"SUBKILL3R_SERVER_ADDR"`
	Subkill3rWordlist              string `mapstructure:"SUBKILL3R_WORDLIST"`
	PurednsWordlist                string `mapstructure:"PUREDNS_WORDLIST"`
	PurednsResolvers               string `mapstructure:"PUREDNS_RESOLVERS"`
	PurednsNumOfThreads            int    `mapstructure:"PUREDNS_NUM_OF_THREADS"`
	GotatorPermlist                string `mapstructure:"GOTATOR_PERMLIST"`
	GotatorDepth                   int    `mapstructure:"GOTATOR_DEPTH"`
	GotatorNumbers                 int    `mapstructure:"GOTATOR_NUMBERS"`
	GotatorNumOfThreads            int    `mapstructure:"GOTATOR_NUM_OF_THREADS"`
	GotatorMindup                  bool   `mapstructure:"GOTATOR_MINDUP"`
	GotatorAdv                     bool   `mapstructure:"GOTATOR_ADV"`
	GotatorMd                      bool   `mapstructure:"GOTATOR_MD"`
	SubfinderNumOfThreads          int    `mapstructure:"SUBFINDER_NUM_OF_THREADS"`
	AmassTimeout                   int    `mapstructure:"AMASS_TIMEOUT"`
	GowitnessTimeout               int    `mapstructure:"GOWITNESS_TIMEOUT"`
	GowitnessResolutionX           int    `mapstructure:"GOWITNESS_RESOLUTION_X"`
	GowitnessResolutionY           int    `mapstructure:"GOWITNESS_RESOLUTION_Y"`
	GowitnessNumOfThreads          int    `mapstructure:"GOWITNESS_NUM_OF_THREADS"`
	GowitnessFullpage              bool   `mapstructure:"GOWITNESS_FULLPAGE"`
	GowitnessScreenshotFilter      bool   `mapstructure:"GOWITNESS_SCREENSHOT_FILTER"`
	GowitnessScreenshotFilterCodes string `mapstructure:"GOWITNESS_SCREENSHOT_FILTER_CODES"`
	FFUFNumOfThreads               int    `mapstructure:"FFUF_NUM_OF_THREADS"`
	FFUFMaxtime                    int    `mapstructure:"FFUF_MAXTIME"`
	FFUFRate                       int    `mapstructure:"FFUF_RATE"`
	FFUFTimeout                    int    `mapstructure:"FFUF_TIMEOUT"`
	FFUFWordlist                   string `mapstructure:"FFUF_WORDLIST"`
	FFUFMatchHTTPCode              string `mapstructure:"FFUF_MATCH_HTTP_CODE"`
	FFUFFilterResponseSize         string `mapstructure:"FFUF_FILTER_RESPONSE_SIZE"`
	FFUFOutputFormat               string `mapstructure:"FFUF_OUTPUT_FORMAT"`
	FFUFOutput                     string `mapstructure:"FFUF_OUTPUT"`
	FFUFSF                         bool   `mapstructure:"FFUF_SF"`
	FFUFSE                         bool   `mapstructure:"FFUF_SE"`
}

func LoadConfig

func LoadConfig(path string, docFS embed.FS) (config Config, err error)

Jump to

Keyboard shortcuts

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