utils

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Permission0755 = 0755
	Permission0644 = 0644
)

Variables

This section is empty.

Functions

func CreateOutputFile

func CreateOutputFile(target string, subcommand string, format string) string

CreateOutputFile takes a target (of the attack), a subcommand (PORT-DNS-DIR-SUBDOMAIN-REPORT) and a format (json-html-txt). It creates the output folder if needed, then checks if the output file already exists, if yes asks the user if scilla has to overwrite it; if no scilla creates it. Whenever an instruction fails, it exits with an error message.

func CreateOutputFolder

func CreateOutputFolder()

CreateOutputFolder creates the output folder If it fails exits with an error message.

func ElementExists

func ElementExists(path string) (bool, error)

ElementExists returns whether the given file or directory exists.

func ReadEntireFile

func ReadEntireFile(inputFile string) []byte

ReadEntireFile returns the content of the inputted file.

func ReadFile

func ReadFile(inputFile string) []string

ReadFile reads a file line per line and returns a slice of strings.

func ReadHTTPRequestFromFile

func ReadHTTPRequestFromFile(inputFile string) (*http.Request, error)

ReadHTTPRequestFromFile reads from a file an HTTP request and returns a *http.Request object.

func ReplaceBadCharacterOutput

func ReplaceBadCharacterOutput(input string) string

ReplaceBadCharacterOutput replaces forward-slashes with dashes (to avoid problems with output folder).

Types

This section is empty.

Jump to

Keyboard shortcuts

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