userinput

package
v1.2.6-0...-7939ba6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UserInput

type UserInput struct {
	// CLI
	OSArch               string `mapstructure:"osarch,omitempty"`
	Cmd                  string `mapstructure:"cmd,omitempty"`
	Debug                bool   `mapstructure:"debug,omitempty"`
	ExfilPort            int    `mapstructure:"exfilport,omitempty"`
	FilePath             string `mapstructure:"filepath,omitempty"`
	FileUpload           string `mapstructure:"fileupload,omitempty"`
	LocalIP              string `mapstructure:"localip,omitempty"`
	PayloadName          string `mapstructure:"payloadname,omitempty"`
	NoServe              bool   `mapstructure:"noserve,omitempty"`
	OSTarget             string `mapstructure:"ostarget,omitempty"`
	WebSrvPort           int    `mapstructure:"websrvport,omitempty"`
	RemoteUploadFilePath string `mapstructure:"remoteuploadpath,omitempty"`
	Rhost                string `mapstructure:"rhost,omitempty"`
	ServeSSL             bool   `mapstructure:"ssl,omitempty"`
	TimeToServe          int    `mapstructure:"tts,omitempty"`
	// Settings
	AnsibleBackupLoc    string `mapstructure:"AnsibleBackupLoc,omitempty"`
	ChefClientKey       string `mapstructure:"ChefClientKey,omitempty"`
	ChefNodeName        string `mapstructure:"ChefNodeName,omitempty"`
	ChefValidationKey   string `mapstructure:"ChefValidationKey,omitempty"`
	CleanupFile         string `mapstructure:"CleanupFile,omitempty"`
	ContainerName       string `mapstructure:"ContainerName,omitempty"`
	ImageName           string `mapstructure:"ImageName,omitempty"`
	PuppetBackupLoc     string `mapstructure:"PuppetBackupLoc,omitempty"`
	RemoteHost          string `mapstructure:"RemoteHost,omitempty"`
	SaltBackupLoc       string `mapstructure:"SaltBackupLoc,omitempty"`
	SSLCertPath         string `mapstructure:"SSLCertPath,omitempty"`
	SSLKeyPath          string `mapstructure:"SSLKeyPath,omitempty"`
	TargetChefServer    string `mapstructure:"TargetChefServer,omitempty"`
	TargetOrgName       string `mapstructure:"TargetOrgName,omitempty"`
	TargetValidatorName string `mapstructure:"TargetValidatorName,omitempty"`
	UploadFilePath      string `mapstructure:"UploadFilePath,omitempty"`
	PayloadDirectory    string `mapstructure:"payloads,omitempty"`

	CMTarget string `mapstructure:"cmtarget,omitempty"`
	BaseDir  string `mapstructure:"basedir,omitempty"`
	NoColor  bool   `mapstructure:"nocolor,omitempty"`
}

UserInput holds all values from command line arguments and the settings.json This is a necessity resulting from templates needing to take values from a single struct, and MOSE taking user input from multiple sources

func (*UserInput) GenerateParams

func (i *UserInput) GenerateParams()

GenerateParams adds the specified input parameters into the payload

func (*UserInput) GeneratePayload

func (i *UserInput) GeneratePayload()

GeneratePayload creates the payload to run on the target system

func (*UserInput) ServePayload

func (i *UserInput) ServePayload()

ServePayload will serve the payload with a web server

func (*UserInput) SetLocalIP

func (i *UserInput) SetLocalIP()

SetLocalIP sets the local IP address if specified as an input parameter (-l IPAddress)

func (*UserInput) StartTakeover

func (i *UserInput) StartTakeover()

StartTakeover kicks everything off for payload generation

Jump to

Keyboard shortcuts

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