config

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KnownHostsPath string
)

Functions

func GenerateCombination

func GenerateCombination(ip string, user string, conf *MainConfig) (combinations chan []interface{})

GenerateCombination Generate objects for all port, user, and password combinations

func UpdateConfig

func UpdateConfig(conf *MainConfig) (writeRes bool)

Types

type MainConfig

type MainConfig struct {
	Main struct {
		Ports     []string `yaml:"ports,flow"`
		Users     []string `yaml:"users,flow"`
		Passwords []string `yaml:"passwords,flow"`
	} `yaml:"main"`
	ServerLists []ServerListConfig `yaml:"serverList"`
}

MainConfig Main config

func LoadConfig

func LoadConfig() (c *MainConfig)

type ServerListConfig

type ServerListConfig struct {
	Ip       string `yaml:"ip"`
	Port     string `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Alias    string `yaml:"alias"`
}

ServerListConfig Server information cache list

func SelectServerCache

func SelectServerCache(user string, ip string, conf *MainConfig) (*ServerListConfig, int, bool)

SelectServerCache Search cache from server list

Jump to

Keyboard shortcuts

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