-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added cache to build, version command
- Loading branch information
1 parent
8dbbc97
commit 3eb279b
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# setup for local testing | ||
rabbitmq_config.json | ||
rabbitmq_config.json.kali | ||
rabbitmq_config.json.ubuntu | ||
|
||
__pycache__/ | ||
mythic_go_services* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
Payload_Type/sliverapi/sliverapi/agent_functions/version.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
from ..SliverRequests import SliverAPI | ||
|
||
from mythic_container.MythicCommandBase import * | ||
from mythic_container.MythicRPC import * | ||
from mythic_container.PayloadBuilder import * | ||
|
||
|
||
class VersionArguments(TaskArguments): | ||
def __init__(self, command_line, **kwargs): | ||
super().__init__(command_line, **kwargs) | ||
self.args = [] | ||
|
||
async def parse_arguments(self): | ||
pass | ||
|
||
|
||
class Version(CommandBase): | ||
cmd = "version" | ||
needs_admin = False | ||
help_cmd = "version" | ||
description = "Display version information" | ||
version = 1 | ||
author = "Spencer Adolph" | ||
argument_class = VersionArguments | ||
attackmapping = [] | ||
|
||
async def create_go_tasking(self, taskData: MythicCommandBase.PTTaskMessageAllData) -> MythicCommandBase.PTTaskCreateTaskingMessageResponse: | ||
# Display version information | ||
|
||
# Usage: | ||
# ====== | ||
# version [flags] | ||
|
||
# Flags: | ||
# ====== | ||
# TODO: -h, --help display help | ||
# TODO: -t, --timeout int command timeout in seconds (default: 60) | ||
|
||
response = await SliverAPI.version(taskData) | ||
|
||
await SendMythicRPCResponseCreate(MythicRPCResponseCreateMessage( | ||
TaskID=taskData.Task.ID, | ||
Response=response.encode("UTF8"), | ||
)) | ||
|
||
taskResponse = MythicCommandBase.PTTaskCreateTaskingMessageResponse( | ||
TaskID=taskData.Task.ID, | ||
Success=True, | ||
Completed=True, | ||
) | ||
|
||
return taskResponse | ||
|
||
async def process_response(self, task: PTTaskMessageAllData, response: any) -> PTTaskProcessResponseMessageResponse: | ||
resp = PTTaskProcessResponseMessageResponse(TaskID=task.Task.ID, Success=True) | ||
return resp | ||
|