Documentation ¶
Index ¶
- func GenUID() (uid string)
- func GetJsonStruct(input string) (winlocal WinLocal, winremote WinRemote, web Web, linlocal LinuxLocal, ...)
- func ScriptCompileAndRun(scropts interface{}, input ...string)
- func ScriptList(input ...string)
- func ScriptRun(scropts interface{}, input ...string)
- func ScriptSend(scriptname, NodeID string, scropts interface{})
- func ScriptSendandReturn(scriptname, NodeID string, scropts interface{})
- type CompileAndRun
- type LinuxLocal
- type LinuxRemote
- type ScriptOps
- type Web
- type WinLocal
- type WinRemote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetJsonStruct ¶
func GetJsonStruct(input string) (winlocal WinLocal, winremote WinRemote, web Web, linlocal LinuxLocal, linremote LinuxRemote, compileandrun CompileAndRun)
GetJsonStruct extracts options from kdz script, and matches script type with appropriate struct. This was tricky without generics
func ScriptCompileAndRun ¶
func ScriptCompileAndRun(scropts interface{}, input ...string)
ScriptCompileAndRun temporarily compiles script to tmp/UID.go, uses go run to execute, then clears the go source from tmp dir
func ScriptList ¶
func ScriptList(input ...string)
ScriptList lists scripts, can be modified with a filter
func ScriptSend ¶
func ScriptSend(scriptname, NodeID string, scropts interface{})
ScriptSend populates a script with a given struct and sends it to a node for processing
func ScriptSendandReturn ¶
func ScriptSendandReturn(scriptname, NodeID string, scropts interface{})
ScriptSendandReturn populates a script with a given struct and sends it to a node for processing
Types ¶
type CompileAndRun ¶
type CompileAndRun struct { Use bool `json:"Use"` NodeID string `json:"NodeID"` Username string `json:"Username"` Password string `json:"Password"` Domain string `json:"Domain"` Cmd string `json:"Cmd"` Lhost string `json:"Lhost"` Lport string `json:"Lport"` Rhost string `json:"Rhost"` Rport string `json:"Rport"` Hostname string `json:"Hostname"` Directory string `json:"Directory"` Filename string `json:"Filename"` }
CompileAndRun holds options for scripts that dont play well with yaegi
type LinuxLocal ¶
type LinuxLocal struct { Use bool `json:"Use"` NodeID string `json:"NodeID"` Username string `json:"Username"` Password string `json:"Password"` Cmd string `json:"Cmd"` Lhost string `json:"Lhost"` Lport string `json:"Lport"` Rhost string `json:"Rhost"` Rport string `json:"Rport"` Hostname string `json:"Hostname"` Directory string `json:"Directory"` Filename string `json:"Filename"` }
LinuxLocal holds options for local linux scripts
type LinuxRemote ¶
type LinuxRemote struct { Use bool `json:"Use"` NodeID string `json:"NodeID"` Username string `json:"Username"` Password string `json:"Password"` Cmd string `json:"Cmd"` Lhost string `json:"Lhost"` Lport string `json:"Lport"` Rhost string `json:"Rhost"` Rport string `json:"Rport"` Hostname string `json:"Hostname"` Directory string `json:"Directory"` Filename string `json:"Filename"` }
LinuxRemote holds options for remote linux scripts
type ScriptOps ¶
type ScriptOps struct {
LHOST, RHOST, CMD, LPORT, RPORT string
}
ScriptOps will hold all the options for our scripts
type Web ¶
type Web struct { Use bool `json:"Use"` NodeID string `json:"NodeID"` Username string `json:"Username"` Password string `json:"Password"` URL string `json:"Domain"` Cmd string `json:"Cmd"` Lhost string `json:"Lhost"` Lport string `json:"Lport"` Rhost string `json:"Rhost"` Rport string `json:"Rport"` Hostname string `json:"Hostname"` Directory string `json:"Directory"` Filename string `json:"Filename"` }
Web holds options for web scripts
type WinLocal ¶
type WinLocal struct { Use bool `json:"Use"` NodeID string `json:"NodeID"` Username string `json:"Username"` Password string `json:"Password"` Domain string `json:"Domain"` Cmd string `json:"Cmd"` Lhost string `json:"Lhost"` Lport string `json:"Lport"` Rhost string `json:"Rhost"` Rport string `json:"Rport"` Hostname string `json:"Hostname"` Directory string `json:"Directory"` Filename string `json:"Filename"` }
WinLocal holds options for local windows scripts
type WinRemote ¶
type WinRemote struct { Use bool `json:"Use"` NodeID string `json:"NodeID"` Username string `json:"Username"` Password string `json:"Password"` Domain string `json:"Domain"` Cmd string `json:"Cmd"` Lhost string `json:"Lhost"` Lport string `json:"Lport"` Rhost string `json:"Rhost"` Rport string `json:"Rport"` Hostname string `json:"Hostname"` Directory string `json:"Directory"` Filename string `json:"Filename"` }
WinRemote holds options for remote windows scripts