modules

package
v0.0.0-...-9d62925 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllModules = &Modules{mutex: sync.RWMutex{}, List: map[string]*Module{}}

AllModules is a varibales to store the modules in

Functions

func ModuleServer

func ModuleServer(data modulescommon.ModuleCom)

ModuleServer takes in the data being passed to modules and passes it to where it needs to go At this point the server should have already been registered and be waiting for some sort of input from the main binary

func Parse

func Parse(data string, args []string) ([]byte, error)

Parse is the initial entry point for all extended modules. All validation checks and processing will be performed here The function input types are limited to strings and therefore require additional processing

func SendModule

func SendModule(data modulescommon.ModuleCom) string

SendModule will take in the name and type of the module and return the binary data Module will be precompiled THIS NEEDS TO BE CHANGED

func StartModule

func StartModule(data modulescommon.ModuleCom, ft string)

StartModule will start a module up and set the data to be sent to it

func StartModuleServer

func StartModuleServer()

StartModuleServer will start up the RPC server required for module communication This will only be called from main when the server starts up initially

Types

type AgentPair

type AgentPair struct {
	AgentKey   string //Name of the agent
	ModuleName string //Name of the module requested
}

AgentPair is used for the queue of agents that need to be paired with the correct module

type DllOptions

type DllOptions struct {
	Options []string
}

DllOptions is a struct for passinng DLL arguments

type ModData

type ModData int

ModData is used for RPC

func (*ModData) ModInit

func (t *ModData) ModInit(m Module, reply *[]byte) error

ModInit -> Called when a module first spins up and we send the first bit of data expected to them

func (*ModData) ModSendData

func (t *ModData) ModSendData(m modulescommon.ModOutput, reply *[]byte) error

ModSendData -> Called when a module needs to send data back to the main server

type Module

type Module struct {
	Name string //Holds the name of the module
	Port int    //Holds the RPC port of the module server
}

Module is a struct for the module to be identified by

type Modules

type Modules struct {
	List map[string]*Module
	// contains filtered or unexported fields
}

Modules holds a list of modules that have data coming to them

Jump to

Keyboard shortcuts

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