Implemented generating agent payloads from the ImGui client.
This commit is contained in:
@@ -205,7 +205,7 @@ proc draw*(component: ConsoleComponent, ws: WebSocket) =
|
||||
igText("Press CTRL+F to focus console filter.")
|
||||
igText("Use \",\" as a delimiter to filter for multiple values.")
|
||||
igText("Use \"-\" to exclude values.")
|
||||
igText("Example: \"-warning,a,b\" returns all lines that do not include \"warning\" but include \"a\" or \"b\".")
|
||||
igText("Example: \"-warning,a,b\" returns all lines that do not include \"warning\" but include either \"a\" or \"b\".")
|
||||
igEndTooltip()
|
||||
|
||||
if igIsWindowFocused(ImGui_FocusedFlags_ChildWindows.int32) and io.KeyCtrl and igIsKeyPressed_Bool(ImGuiKey_F, false):
|
||||
|
||||
@@ -43,7 +43,9 @@ proc draw*(component: ListenersTableComponent, showComponent: ptr bool, ws: WebS
|
||||
if listener != nil:
|
||||
ws.sendStartListener(listener)
|
||||
|
||||
component.generatePayloadModal.draw(component.listeners)
|
||||
let buildInformation = component.generatePayloadModal.draw(component.listeners)
|
||||
if buildInformation != nil:
|
||||
ws.sendAgentBuild(buildInformation)
|
||||
|
||||
#[
|
||||
Listener table
|
||||
|
||||
@@ -43,7 +43,7 @@ proc resetModalValues(component: AgentModalComponent) =
|
||||
component.spoofStack = false
|
||||
component.moduleSelection.reset()
|
||||
|
||||
proc draw*(component: AgentModalComponent, listeners: seq[UIListener]) =
|
||||
proc draw*(component: AgentModalComponent, listeners: seq[UIListener]): AgentBuildInformation =
|
||||
|
||||
let textSpacing = igGetStyle().ItemSpacing.x
|
||||
|
||||
@@ -114,18 +114,19 @@ proc draw*(component: AgentModalComponent, listeners: seq[UIListener]) =
|
||||
|
||||
if igButton("Build", vec2(availableSize.x * 0.5 - textSpacing * 0.5, 0.0f)):
|
||||
|
||||
# Get values
|
||||
echo listeners[component.listener].listenerId
|
||||
echo $component.sleepDelay
|
||||
echo component.sleepMaskTechniques[component.sleepMask]
|
||||
echo $component.spoofStack
|
||||
|
||||
# Iterate over modules
|
||||
var module: uint32 = 0
|
||||
var modules: uint32 = 0
|
||||
for m in component.moduleSelection.items[1]:
|
||||
module = module or uint32(m.moduleType)
|
||||
echo module
|
||||
modules = modules or uint32(m.moduleType)
|
||||
|
||||
result = AgentBuildInformation(
|
||||
listenerId: listeners[component.listener].listenerId,
|
||||
sleepDelay: component.sleepDelay,
|
||||
sleepTechnique: cast[SleepObfuscationTechnique](component.sleepMask),
|
||||
spoofStack: component.spoofStack,
|
||||
modules: modules
|
||||
)
|
||||
|
||||
component.resetModalValues()
|
||||
igCloseCurrentPopup()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user