rpc

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthLoginReq

type AuthLoginReq struct {
	Method   string
	Username string // The username
	Password string // The password
}

type AuthLoginRes

type AuthLoginRes struct {
	Result Result `msgpack:"result"`
	Token  string `msgpack:"token"`
}

type AuthLogoutReq

type AuthLogoutReq struct {
	Method string
	Token  string
}

type AuthLogoutRes

type AuthLogoutRes struct {
	Result Result `msgpack:"result"`
}

type AuthTokenListReq added in v0.0.7

type AuthTokenListReq struct {
	Method string
	Token  string
}

type AuthTokenListRes added in v0.0.7

type AuthTokenListRes struct {
	Tokens []string `msgpack:"tokens"`
}

type ConsoleCreateReq

type ConsoleCreateReq struct {
	Method string
	Token  string
}

type ConsoleCreateRes

type ConsoleCreateRes struct {
	ID     string `msgpack:"id"`
	Prompt string `msgpack:"prompt"`
	Busy   bool   `msgpack:"busy"`
}

type ConsoleDestroyReq

type ConsoleDestroyReq struct {
	Method    string
	Token     string
	ConsoleID string
}

type ConsoleDestroyRes

type ConsoleDestroyRes struct {
	Result Result `msgpack:"result"`
}

type ConsoleListReq

type ConsoleListReq struct {
	Method string
	Token  string
}

type ConsoleListRes

type ConsoleListRes map[string][]struct {
	ID     string `msgpack:"id"`
	Prompt string `msgpack:"prompt"`
	Busy   bool   `msgpack:"busy"`
}

type ConsoleReadReq

type ConsoleReadReq struct {
	Method    string
	Token     string
	ConsoleID string
}

type ConsoleReadRes

type ConsoleReadRes struct {
	Data   string `msgpack:"data"`
	Prompt string `msgpack:"prompt"`
	Busy   bool   `msgpack:"busy"`
}

type ConsoleSessionDetachReq

type ConsoleSessionDetachReq struct {
	Method    string
	Token     string
	ConsoleID string
}

type ConsoleSessionDetachRes

type ConsoleSessionDetachRes struct {
	Result Result `msgpack:"result"`
}

type ConsoleSessionKillReq

type ConsoleSessionKillReq struct {
	Method    string
	Token     string
	ConsoleID string
}

type ConsoleSessionKillRes

type ConsoleSessionKillRes struct {
	Result Result `msgpack:"result"`
}

type ConsoleTabsReq

type ConsoleTabsReq struct {
	Method    string
	Token     string
	ConsoleID string
	InputLine string
}

type ConsoleTabsRes

type ConsoleTabsRes struct {
	Tabs []string `msgpack:"tabs"`
}

type ConsoleWriteReq

type ConsoleWriteReq struct {
	Method    string
	Token     string
	ConsoleID string
	Command   string
}

type ConsoleWriteRes

type ConsoleWriteRes struct {
	Wrote uint32 `msgpack:"wrote"`
}

type CoreAddModulePathReq

type CoreAddModulePathReq struct {
	Method string
	Token  string
	Path   string
}

type CoreAddModulePathRes

type CoreAddModulePathRes struct {
	Exploits  uint32 `msgpack:"exploits"`
	Auxiliary uint32 `msgpack:"auxiliary"`
	Post      uint32 `msgpack:"post"`
	Encoders  uint32 `msgpack:"encoders"`
	Nops      uint32 `msgpack:"nops"`
	Payloads  uint32 `msgpack:"payloads"`
}

type CoreGetgReq

type CoreGetgReq struct {
	Method     string
	Token      string
	OptionName string
}

type CoreGetgRes

type CoreGetgRes struct {
	Result string
}

type CoreModuleStatsReq

type CoreModuleStatsReq struct {
	Method string
	Token  string
}

type CoreModuleStatsRes

type CoreModuleStatsRes struct {
	Exploits  uint32 `msgpack:"exploits"`
	Auxiliary uint32 `msgpack:"auxiliary"`
	Post      uint32 `msgpack:"post"`
	Encoders  uint32 `msgpack:"encoders"`
	Nops      uint32 `msgpack:"nops"`
	Payloads  uint32 `msgpack:"payloads"`
}

type CoreReloadModulesReq

type CoreReloadModulesReq struct {
	Method string
	Token  string
}

type CoreReloadModulesRes

type CoreReloadModulesRes struct {
	Exploits  uint32 `msgpack:"exploits"`
	Auxiliary uint32 `msgpack:"auxiliary"`
	Post      uint32 `msgpack:"post"`
	Encoders  uint32 `msgpack:"encoders"`
	Nops      uint32 `msgpack:"nops"`
	Payloads  uint32 `msgpack:"payloads"`
}

type CoreSaveReq

type CoreSaveReq struct {
	Method string
	Token  string
}

type CoreSaveRes

type CoreSaveRes struct {
	Result Result `msgpack:"result"`
}

type CoreSetgReq

type CoreSetgReq struct {
	Method      string
	Token       string
	OptionName  string
	OptionValue string
}

type CoreSetgRes

type CoreSetgRes struct {
	Result Result `msgpack:"result"`
}

type CoreStopReq

type CoreStopReq struct {
	Method string
	Token  string
}

type CoreStopRes

type CoreStopRes struct {
	Result Result `msgpack:"result"`
}

type CoreThreadKillReq

type CoreThreadKillReq struct {
	Method   string
	Token    string
	ThreadID string
}

type CoreThreadKillRes

type CoreThreadKillRes struct {
	Result Result `msgpack:"result"`
}

type CoreThreadListReq

type CoreThreadListReq struct {
	Method string
	Token  string
}

type CoreThreadListRes

type CoreThreadListRes map[int]struct {
	Status   string `msgpack:"status"`
	Critical bool   `msgpack:"critical"`
	Name     string `msgpack:"name"`
	Started  string `msgpack:"started"`
}

type CoreUnsetgReq

type CoreUnsetgReq struct {
	Method     string
	Token      string
	OptionName string
}

type CoreUnsetgRes

type CoreUnsetgRes struct {
	Result Result `msgpack:"result"`
}

type CoreVersionReq

type CoreVersionReq struct {
	Method string
	Token  string
}

type CoreVersionRes

type CoreVersionRes struct {
	Version string `msgpack:"version"` // Framework version
	Ruby    string `msgpack:"ruby"`    // Ruby version
	API     string `msgpack:"api"`     // API version
}

type HealthCheckReq

type HealthCheckReq struct {
	Method string
}

type JobInfoReq

type JobInfoReq struct {
	Method string
	Token  string
	JobID  string
}

type JobInfoRes

type JobInfoRes struct {
	JobID     int                    `msgpack:"jid"`
	Name      string                 `msgpack:"name"`
	StartTime int                    `msgpack:"start_time"`
	URIPath   interface{}            `msgpack:"uripath,omitempty"`
	Datastore map[string]interface{} `msgpack:"datastore,omitempty"`
}

type JobListReq

type JobListReq struct {
	Method string
	Token  string
}

type JobListRes

type JobListRes map[string]string

type JobStopReq

type JobStopReq struct {
	Method string
	Token  string
	JobID  string
}

type JobStopRes

type JobStopRes struct {
	Result Result `msgpack:"result"`
}

type ModuleArchitecturesReq

type ModuleArchitecturesReq struct {
	Method string
	Token  string
}

type ModuleArchitecturesRes

type ModuleArchitecturesRes []string

type ModuleAuxiliaryReq

type ModuleAuxiliaryReq struct {
	Method string
	Token  string
}

type ModuleAuxiliaryRes

type ModuleAuxiliaryRes struct {
	Modules []string `msgpack:"modules"`
}

type ModuleCheckReq added in v0.0.6

type ModuleCheckReq struct {
	Method     string
	Token      string
	ModuleType string
	ModuleName string
	Options    map[string]string
}

type ModuleCompatibleEvasionPayloadsReq added in v0.0.7

type ModuleCompatibleEvasionPayloadsReq struct {
	Method     string
	Token      string
	ModuleName string
	Target     int
}

type ModuleCompatibleEvasionPayloadsRes added in v0.0.7

type ModuleCompatibleEvasionPayloadsRes struct {
	Payloads []string `msgpack:"payloads"`
}

type ModuleCompatiblePayloadsReq

type ModuleCompatiblePayloadsReq struct {
	Method     string
	Token      string
	ModuleName string
	Target     int
}

type ModuleCompatiblePayloadsRes

type ModuleCompatiblePayloadsRes struct {
	Payloads []string `msgpack:"payloads"`
}

type ModuleCompatibleSessionsReq

type ModuleCompatibleSessionsReq struct {
	Method     string
	Token      string
	ModuleName string
}

type ModuleCompatibleSessionsRes

type ModuleCompatibleSessionsRes struct {
	Sessions []string `msgpack:"sessions"`
}

type ModuleEncodeReq

type ModuleEncodeReq struct {
	Method        string
	Token         string
	Data          string
	EncoderModule string
	Options       map[string]string
}

type ModuleEncodeRes

type ModuleEncodeRes struct {
	Encoded []byte `msgpack:"encoded"`
}

type ModuleEncodersReq

type ModuleEncodersReq struct {
	Method string
	Token  string
}

type ModuleEncodersRes

type ModuleEncodersRes struct {
	Modules []string `msgpack:"modules"`
}

type ModuleEncryptionFormatsReq added in v0.0.6

type ModuleEncryptionFormatsReq struct {
	Method string
	Token  string
}

type ModuleEncryptionFormatsRes added in v0.0.6

type ModuleEncryptionFormatsRes []string

type ModuleEvasionReq added in v0.0.6

type ModuleEvasionReq struct {
	Method string
	Token  string
}

type ModuleEvasionRes added in v0.0.6

type ModuleEvasionRes struct {
	Modules []string `msgpack:"modules"`
}

type ModuleExecuteReq

type ModuleExecuteReq struct {
	Method     string
	Token      string
	ModuleType string
	ModuleName string
	Options    map[string]string
}

type ModuleExecuteRes

type ModuleExecuteRes struct {
	JobID uint32 `msgpack:"job_id"`
	UUID  string `msgpack:"uuid"`
}

type ModuleExploitsReq

type ModuleExploitsReq struct {
	Method string
	Token  string
}

type ModuleExploitsRes

type ModuleExploitsRes struct {
	Modules []string `msgpack:"modules"`
}

type ModuleInfoHTMLReq added in v0.0.7

type ModuleInfoHTMLReq struct {
	Method     string
	Token      string
	ModuleType string
	ModuleName string
}

type ModuleInfoHTMLRes added in v0.0.7

type ModuleInfoHTMLRes string

type ModuleInfoReq

type ModuleInfoReq struct {
	Method     string
	Token      string
	ModuleType string
	ModuleName string
}

type ModuleInfoRes

type ModuleInfoRes struct {
	Name        string     `msgpack:"name"`
	Description string     `msgpack:"description"`
	License     string     `msgpack:"license"`
	FilePath    string     `msgpack:"filepath"`
	Version     string     `msgpack:"version"`
	Rank        string     `msgpack:"rank"`
	References  [][]string `msgpack:"references"`
	Authors     []string   `msgpack:"authors"`
}

type ModuleNopsReq

type ModuleNopsReq struct {
	Method string
	Token  string
}

type ModuleNopsRes

type ModuleNopsRes struct {
	Modules []string `msgpack:"modules"`
}

type ModuleOptionsReq

type ModuleOptionsReq struct {
	Method     string
	Token      string
	ModuleType string
	ModuleName string
}

type ModuleOptionsRes

type ModuleOptionsRes map[string]struct {
	Type     string      `msgpack:"type"`
	Required bool        `msgpack:"required"`
	Advanced bool        `msgpack:"advanced"`
	Evasion  bool        `msgpack:"evasion"`
	Desc     string      `msgpack:"desc"`
	Default  interface{} `msgpack:"default"`
	Enums    []string    `msgpack:"enums,omitempty"`
}

type ModulePayloadsReq

type ModulePayloadsReq struct {
	Method string
	Token  string
}

type ModulePayloadsRes

type ModulePayloadsRes struct {
	Modules []string `msgpack:"modules"`
}

type ModulePlatformsReq added in v0.0.6

type ModulePlatformsReq struct {
	Method string
	Token  string
}

type ModulePlatformsRes added in v0.0.6

type ModulePlatformsRes []string

type ModulePostReq

type ModulePostReq struct {
	Method string
	Token  string
}

type ModulePostRes

type ModulePostRes struct {
	Modules []string `msgpack:"modules"`
}

type ModuleTargetCompatiblePayloadsReq

type ModuleTargetCompatiblePayloadsReq struct {
	Method     string
	Token      string
	ModuleName string
	ArchNumber uint32
}

type ModuleTargetCompatiblePayloadsRes

type ModuleTargetCompatiblePayloadsRes struct {
	Payloads []string `msgpack:"payloads"`
}

type PluginLoadReq

type PluginLoadReq struct {
	Method     string
	Token      string
	PluginName string
	Options    map[string]string
}

type PluginLoadRes

type PluginLoadRes struct {
	Result Result `msgpack:"result"`
}

type PluginLoadedReq

type PluginLoadedReq struct {
	Method string
	Token  string
}

type PluginLoadedRes

type PluginLoadedRes struct {
	Plugins []string `msgpack:"plugins"`
}

type PluginUnLoadReq

type PluginUnLoadReq struct {
	Method     string
	Token      string
	PluginName string
}

type PluginUnLoadRes

type PluginUnLoadRes struct {
	Result Result `msgpack:"result"`
}

type RPC

type RPC struct {
	Auth    *auth
	Console *console
	Core    *core
	Health  *health
	Job     *job
	Module  *module
	Plugin  *plugin
	Session *session
	// contains filtered or unexported fields
}

func NewRPC

func NewRPC(http *http.Client, url string) *RPC

func (*RPC) Call

func (r *RPC) Call(req, res interface{}) error

func (*RPC) SetToken

func (r *RPC) SetToken(token string)

func (*RPC) Token

func (r *RPC) Token() string

type Result

type Result string
const (
	SUCCESS Result = "success"
	FAILURE Result = "failure"
)

type SessionCompatibleModulesReq

type SessionCompatibleModulesReq struct {
	Method    string
	Token     string
	SessionID int
}

type SessionCompatibleModulesRes

type SessionCompatibleModulesRes struct {
	Modules []string `msgpack:"modules"`
}

type SessionListReq

type SessionListReq struct {
	Method string
	Token  string
}

type SessionListRes

type SessionListRes map[uint32]struct {
	Type        string `msgpack:"type"`
	TunnelLocal string `msgpack:"tunnel_local"`
	TunnelPeer  string `msgpack:"tunnel_peer"`
	ViaExploit  string `msgpack:"via_exploit"`
	ViaPayload  string `msgpack:"via_payload"`
	Description string `msgpack:"desc"`
	Info        string `msgpack:"info"`
	Workspace   string `msgpack:"workspace"`
	SessionHost string `msgpack:"session_host"`
	SessionPort int    `msgpack:"session_port"`
	Username    string `msgpack:"username"`
	UUID        string `msgpack:"uuid"`
	ExploitUUID string `msgpack:"exploit_uuid"`
}

type SessionMeterpreterDetachReq

type SessionMeterpreterDetachReq struct {
	Method    string
	Token     string
	SessionID int
}

type SessionMeterpreterDetachRes

type SessionMeterpreterDetachRes SessionMeterpreterWriteRes

type SessionMeterpreterKillReq

type SessionMeterpreterKillReq struct {
	Method    string
	Token     string
	SessionID int
}

type SessionMeterpreterKillRes

type SessionMeterpreterKillRes SessionMeterpreterWriteRes

type SessionMeterpreterReadReq

type SessionMeterpreterReadReq struct {
	Method    string
	Token     string
	SessionID int
}

type SessionMeterpreterReadRes

type SessionMeterpreterReadRes struct {
	Data string `msgpack:"data"`
}

type SessionMeterpreterRunSingleReq

type SessionMeterpreterRunSingleReq struct {
	Method    string
	Token     string
	SessionID int
	Command   string
}

type SessionMeterpreterRunSingleRes

type SessionMeterpreterRunSingleRes SessionMeterpreterWriteRes

type SessionMeterpreterTabsReq

type SessionMeterpreterTabsReq struct {
	Method    string
	Token     string
	SessionID int
	InputLine string
}

type SessionMeterpreterTabsRes

type SessionMeterpreterTabsRes struct {
	Tabs []string `msgpack:"tabs"`
}

type SessionMeterpreterWriteReq

type SessionMeterpreterWriteReq struct {
	Method    string
	Token     string
	SessionID int
	Command   string
}

type SessionMeterpreterWriteRes

type SessionMeterpreterWriteRes struct {
	Result Result `msgpack:"result"`
}

type SessionRingClearReq

type SessionRingClearReq struct {
	Method    string
	Token     string
	SessionID int
}

type SessionRingClearRes

type SessionRingClearRes SessionMeterpreterWriteRes

type SessionRingLastReq

type SessionRingLastReq struct {
	Method    string
	Token     string
	SessionID int
}

type SessionRingLastRes

type SessionRingLastRes struct {
	Seq uint32 `msgpack:"seq"`
}

type SessionRingPutReq

type SessionRingPutReq struct {
	Method    string
	Token     string
	SessionID int
	Command   string
}

type SessionRingPutRes

type SessionRingPutRes struct {
	WriteCount uint32 `msgpack:"write_count"`
}

type SessionShellReadReq

type SessionShellReadReq struct {
	Method      string
	Token       string
	SessionID   int
	ReadPointer uint32
}

type SessionShellReadRes

type SessionShellReadRes struct {
	Seq  uint32 `msgpack:"seq"`
	Data string `msgpack:"data"`
}

type SessionShellUpgradeReq

type SessionShellUpgradeReq struct {
	Method     string
	Token      string
	SessionID  int
	IPAddress  string
	PortNumber uint32
}

type SessionShellUpgradeRes

type SessionShellUpgradeRes SessionMeterpreterWriteRes

type SessionShellWriteReq

type SessionShellWriteReq struct {
	Method    string
	Token     string
	SessionID int
	Command   string
}

type SessionShellWriteRes

type SessionShellWriteRes struct {
	WriteCount string `msgpack:"write_count"`
}

Jump to

Keyboard shortcuts

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