core

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: BSD-3-Clause Imports: 3 Imported by: 5

Documentation

Overview

Package core contains basic utility functions.

Index

Constants

View Source
const (
	Name    = "Muraena"
	Version = "1.21.1"
	Author  = "Muraena Team"
	Website = "https://phishing.click/"

)

Variables

This section is empty.

Functions

func IsError added in v1.21.1

func IsError(err error) bool

IsError https://mikeschinkel.me/2019/gos-unfortunate-err-nil-idiom/

func StringContains added in v1.21.1

func StringContains(v string, a []string) bool

StringContains checks if a string is contained in a slice of strings

Types

type Options

type Options struct {
	Verbose        *bool
	Debug          *bool
	Proxy          *bool
	Version        *bool
	NoColors       *bool
	ConfigFilePath *string
}

func GetDefaultOptions added in v1.21.1

func GetDefaultOptions() Options

func ParseOptions

func ParseOptions() (Options, error)

type Values added in v1.21.1

type Values map[string][]string

Values maps a string key to a list of values. It is typically used for query parameters and form values. Unlike in the http.Header map, the keys in a Values map are case-sensitive.

func ParseQuery added in v1.21.1

func ParseQuery(query string) (Values, error)

ParseQuery parses the URL-encoded query string and returns a map listing the values specified for each key. ParseQuery always returns a non-nil map containing all the valid query parameters found; err describes the first decoding error encountered, if any.

Query is expected to be a list of key=value settings separated by ampersands. A setting without an equals sign is interpreted as a key set to an empty value. Settings containing a non-URL-encoded semicolon are considered invalid.

func (Values) Encode added in v1.21.1

func (v Values) Encode() string

Encode encodes the values into "URL encoded" form ("bar=baz&foo=quux") NOT sorted by key.

Directories

Path Synopsis
Package proxy contains the core of the Muraena server
Package proxy contains the core of the Muraena server

Jump to

Keyboard shortcuts

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