From e5b7dbfe8e0b87bf56d323acaf256fe9f1bb252b Mon Sep 17 00:00:00 2001 From: its-a-feature Date: Fri, 13 Dec 2024 09:52:57 -0600 Subject: [PATCH] updating payload syncing flags --- CHANGELOG.MD | 6 ++++++ VERSION | 2 +- mythic-docker/src/VERSION | 2 +- mythic-docker/src/rabbitmq/recv_pt_sync.go | 6 ++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 8e42d361..6f509217 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.3.1-rc31] - 2024-12-13 + +### Changed + +- Added an optional flag for payloads syncing to not retrigger the container's on_start functionality + ## [3.3.1-rc30] - 2024-12-12 ### Changed diff --git a/VERSION b/VERSION index 39c9b7af..02f2dcf6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.3.1-rc30 \ No newline at end of file +3.3.1-rc31 \ No newline at end of file diff --git a/mythic-docker/src/VERSION b/mythic-docker/src/VERSION index 39c9b7af..02f2dcf6 100644 --- a/mythic-docker/src/VERSION +++ b/mythic-docker/src/VERSION @@ -1 +1 @@ -3.3.1-rc30 \ No newline at end of file +3.3.1-rc31 \ No newline at end of file diff --git a/mythic-docker/src/rabbitmq/recv_pt_sync.go b/mythic-docker/src/rabbitmq/recv_pt_sync.go index afacc290..24a96dbc 100644 --- a/mythic-docker/src/rabbitmq/recv_pt_sync.go +++ b/mythic-docker/src/rabbitmq/recv_pt_sync.go @@ -26,6 +26,7 @@ type PayloadTypeSyncMessage struct { PayloadType PayloadType `json:"payload_type"` CommandList []Command `json:"commands"` ContainerVersion string `json:"container_version"` + ForcedSync bool `json:"forced_resync"` } type BuildParameterType = string @@ -399,9 +400,10 @@ func payloadTypeSync(in PayloadTypeSyncMessage) error { go SendAllOperationsMessage(fmt.Sprintf("Successfully synced %s with container version %s", payloadtype.Name, in.ContainerVersion), 0, "debug", "info") go database.ResolveAllOperationsMessage(getDownContainerMessage(payloadtype.Name), 0) checkContainerStatusAddPtChannel <- payloadtype - go CreateGraphQLSpectatorAPITokenAndSendOnStartMessage(payloadtype.Name) + if !in.ForcedSync { + go CreateGraphQLSpectatorAPITokenAndSendOnStartMessage(payloadtype.Name) + } return nil - } func updatePayloadTypeBuildParameters(in PayloadTypeSyncMessage, payloadtype databaseStructs.Payloadtype) error {