Implemented initial version of logging system. Log formatting and content needs to be reworked.

This commit is contained in:
Jakob Friedl
2025-08-20 12:55:09 +02:00
parent 24208f3b4b
commit f69adc53a2
10 changed files with 139 additions and 74 deletions

View File

@@ -1,6 +1,6 @@
import terminal, strformat, strutils, tables, times, system, parsetoml
import ./task
import ./[task, logger]
import ../utils
import ../db/database
import ../../common/types
@@ -118,6 +118,8 @@ proc agentInteract*(cq: Conquest, name: string) =
cq.setStatusBar(@[("[mode]", "interact"), ("[username]", fmt"{agent.username}"), ("[hostname]", fmt"{agent.hostname}"), ("[ip]", fmt"{agent.ip}"), ("[domain]", fmt"{agent.domain}")])
cq.writeLine(fgYellow, styleBright, "[+] ", resetStyle, fmt"Started interacting with agent ", fgYellow, styleBright, agent.agentId, resetStyle, ". Type 'help' to list available commands.\n")
cq.interactAgent = agent
cq.log(fmt"Started interacting with agent {agent.agentId}.")
while command.replace(" ", "") != "back":
command = cq.readLine()