Implemented agent kill date.
This commit is contained in:
@@ -17,10 +17,10 @@ let commands* = @[
|
||||
execute: executeExit
|
||||
),
|
||||
Command(
|
||||
name: protect("self-destroy"),
|
||||
commandType: CMD_SELF_DESTROY,
|
||||
name: protect("self-destruct"),
|
||||
commandType: CMD_SELF_DESTRUCT,
|
||||
description: protect("Exit the agent and delete the executable from disk."),
|
||||
example: protect("self-destroy"),
|
||||
example: protect("self-destruct"),
|
||||
arguments: @[
|
||||
],
|
||||
execute: executeSelfDestroy
|
||||
@@ -55,7 +55,7 @@ when defined(agent):
|
||||
|
||||
proc executeSelfDestroy(ctx: AgentCtx, task: Task): TaskResult =
|
||||
try:
|
||||
print " [>] Self-destroying."
|
||||
print " [>] Self-destructing."
|
||||
exit(EXIT_PROCESS, true)
|
||||
|
||||
except CatchableError as err:
|
||||
|
||||
@@ -103,7 +103,7 @@ proc getModules*(modules: uint32 = 0): seq[Module] =
|
||||
proc getCommands*(modules: uint32 = 0): seq[Command] =
|
||||
# House-keeping
|
||||
result.add(manager.commandsByType[CMD_EXIT])
|
||||
result.add(manager.commandsByType[CMD_SELF_DESTROY])
|
||||
result.add(manager.commandsByType[CMD_SELF_DESTRUCT])
|
||||
|
||||
# Modules
|
||||
if modules == 0:
|
||||
|
||||
Reference in New Issue
Block a user