Added monarch agent

This commit is contained in:
Jakob Friedl
2025-05-19 21:56:34 +02:00
parent 0a98d11df2
commit c55a9f9443
10 changed files with 215 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
import terminal, strformat, strutils, tables
import ./commands
import ./interact
import ../[types, globals, utils]
import ../db/database
@@ -131,11 +131,4 @@ proc register*(agent: Agent): bool =
cq.add(agent)
cq.writeLine(fgYellow, styleBright, fmt"[{agent.firstCheckin}] ", resetStyle, "Agent ", fgYellow, styleBright, agent.name, resetStyle, " connected to listener ", fgGreen, styleBright, agent.listener, resetStyle, ": ", fgYellow, styleBright, fmt"{agent.username}@{agent.hostname}", "\n")
return true
#[
Agent interaction mode
When interacting with a agent, the following functions are called:
- addTask, to add a new tasks to the agents task queue
- getTaskResult, get the result for the task from the agent
]#
return true

View File

@@ -2,7 +2,7 @@ import argparse, times, strformat, terminal
import ../[types]
#[
Agnet Argument parsing
Agent Argument parsing
]#
var parser = newParser:
help("Conquest Command & Control")
@@ -44,4 +44,11 @@ proc handleAgentCommand*(cq: Conquest, args: varargs[string]) =
except UsageError:
cq.writeLine(fgRed, styleBright, "[-] ", getCurrentExceptionMsg())
cq.writeLine("")
cq.writeLine("")
proc createTask*(args: varargs[string]): Task =
discard
proc addTask*(cq: Conquest, agent: Agent, task: Task) =
discard