Skip to content

Commit

Permalink
v0.4.7
Browse files Browse the repository at this point in the history
fixing indent issue
  • Loading branch information
its-a-feature committed Jan 22, 2024
1 parent c96c7a7 commit 443cee7
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 13 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@


## [v0.4.7] - 2024-01-22

### Changed

- Fixed a breaking bug in parsing tasking for old create_tasking style when checking for typedArray functions

## [v0.4.6] - 2024-01-22

### Changed

- Fixed a path that was too long on windows

## [v0.4.5] - 2024-01-16

### Changed
Expand Down
2 changes: 1 addition & 1 deletion mythic_container/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

containerVersion = "v1.1.4"

PyPi_version = "0.4.6"
PyPi_version = "0.4.7"

RabbitmqConnection = rabbitmqConnectionClass()

Expand Down
25 changes: 14 additions & 11 deletions mythic_container/agent_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,17 @@ async def initialize_task(
if not resp.Success:
raise Exception(resp.Error)
arg.value = resp.TypedArray
elif len(arg.value) > 0 and isinstance(arg.value[0], str):
resp = await arg.typedarray_parse_function(MythicCommandBase.PTRPCTypedArrayParseFunctionMessage(
command=command_class.cmd,
parameter_name=arg.name,
payload_type="",
callback=message_json["callback"]["id"],
input_array=arg.value
))
if not resp.Success:
raise Exception(resp.Error)
task.args.set_arg(arg.name, resp.TypedArray)
elif len(arg.value) > 0 and isinstance(arg.value[0], str):
resp = await arg.typedarray_parse_function(MythicCommandBase.PTRPCTypedArrayParseFunctionMessage(
command=command_class.cmd,
parameter_name=arg.name,
payload_type="",
callback=message_json["callback"]["id"],
input_array=arg.value
))
if not resp.Success:
raise Exception(resp.Error)
task.args.set_arg(arg.name, resp.TypedArray)

except Exception as pa:
message = {
Expand All @@ -187,13 +187,15 @@ async def initialize_task(
queue=error_routing_key,
body=message
)
logger.error(f"failed to parse arguments and hit exception: {pa}")
return None
try:
if error_routing_key == mythic_container.PT_TASK_OPSEC_PRE_CHECK_RESPONSE or \
error_routing_key == mythic_container.PT_TASK_CREATE_TASKING_RESPONSE:
await task.args.verify_required_args_have_values()
task.parameter_group_name = task.args.get_parameter_group_name()
except Exception as va:
logger.error(f"failed to verify args have values and hit exception: {va}")
message = {
"task_id": message_json["task"]["id"],
"message": f"[-] {message_json['task']['command_name']} has arguments with invalid values: {va} \n"
Expand Down Expand Up @@ -428,6 +430,7 @@ async def createTasking(msg: bytes) -> None:
task = await initialize_task(cmd, msgDict,
mythic_container.PT_TASK_CREATE_TASKING_RESPONSE)
if task is None:
print("task is none from initialize task")
# we hit an error and already sent the response, just return
return
createTaskingResponse = await cmd.create_tasking(task=task)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# This call to setup() does all the work
setup(
name="mythic_container",
version="0.4.6",
version="0.4.7",
description="Functionality for Mythic Services",
long_description=README,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 443cee7

Please sign in to comment.