Reworked module system. Modules can now be individually set to be included in the agent. For example, it is possible to compile an agent only capable of executing BOFs and nothing else.
This commit is contained in:
@@ -3,17 +3,21 @@ import ../common/[types, utils]
|
||||
# Define function prototype
|
||||
proc executeScreenshot(ctx: AgentCtx, task: Task): TaskResult
|
||||
|
||||
# Command definition (as seq[Command])
|
||||
let commands*: seq[Command] = @[
|
||||
Command(
|
||||
name: protect("screenshot"),
|
||||
commandType: CMD_SCREENSHOT,
|
||||
description: protect("Take a screenshot of the target system."),
|
||||
example: protect("screenshot"),
|
||||
arguments: @[],
|
||||
execute: executeScreenshot
|
||||
)
|
||||
]
|
||||
# Module definition
|
||||
let module* = Module(
|
||||
name: protect("screenshot"),
|
||||
description: protect("Take and retrieve a screenshot of the target desktop."),
|
||||
commands: @[
|
||||
Command(
|
||||
name: protect("screenshot"),
|
||||
commandType: CMD_SCREENSHOT,
|
||||
description: protect("Take a screenshot of the target system."),
|
||||
example: protect("screenshot"),
|
||||
arguments: @[],
|
||||
execute: executeScreenshot
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
# Implement execution functions
|
||||
when defined(server):
|
||||
|
||||
Reference in New Issue
Block a user