diff --git a/Mythic_CLI/Changelog.md b/Mythic_CLI/Changelog.md index bf4f4b14..f1ef27dd 100644 --- a/Mythic_CLI/Changelog.md +++ b/Mythic_CLI/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](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 0.3.12 - 2025-02-13 + +### Changed + +- Fixed an issue with mythic_sync where it looped forever asking for input + ## 0.3.11 - 2025-01-14 ### Changed diff --git a/Mythic_CLI/src/cmd/config/env.go b/Mythic_CLI/src/cmd/config/env.go index 08e2f353..c1374ffe 100644 --- a/Mythic_CLI/src/cmd/config/env.go +++ b/Mythic_CLI/src/cmd/config/env.go @@ -23,7 +23,6 @@ var MythicPossibleServices = []string{ "mythic_graphql", "mythic_documentation", "mythic_jupyter", - "mythic_sync", "mythic_grafana", "mythic_prometheus", "mythic_postgres_exporter", @@ -84,16 +83,6 @@ func GetIntendedMythicServiceNames() ([]string, error) { if mythicEnv.GetBool("postgres_debug") { containerList = append(containerList, service) } - /* - case "mythic_sync": - if mythicSyncPath, err := filepath.Abs(filepath.Join(utils.GetCwdFromExe(), InstalledServicesFolder, "mythic_sync")); err != nil { - fmt.Printf("[-] Failed to get the absolute path to mythic_sync: %v\n", err) - } else if _, err = os.Stat(mythicSyncPath); !os.IsNotExist(err) { - // this means that the mythic_sync folder _does_ exist - containerList = append(containerList, service) - } - - */ } } return containerList, nil @@ -673,7 +662,7 @@ func AskConfirm(prompt string) bool { input, err := reader.ReadString('\n') if err != nil { fmt.Printf("[-] Failed to read user input\n") - return false + continue } input = strings.ToLower(strings.TrimSpace(input)) if input == "y" || input == "yes" { @@ -692,10 +681,13 @@ func AskVariable(prompt string, environmentVariable string) { input, err := reader.ReadString('\n') if err != nil { fmt.Printf("[-] Failed to read user input\n") + continue } input = strings.TrimSpace(input) + mythicEnv.SetDefault(environmentVariable, input) mythicEnv.Set(environmentVariable, input) writeMythicEnvironmentVariables() + return } } func Initialize() { diff --git a/Mythic_CLI/src/cmd/config/vars.go b/Mythic_CLI/src/cmd/config/vars.go index 2e4f772d..94260b99 100644 --- a/Mythic_CLI/src/cmd/config/vars.go +++ b/Mythic_CLI/src/cmd/config/vars.go @@ -4,5 +4,5 @@ package config var ( // Version Mythic CLI version - Version = "v0.3.11" + Version = "v0.3.12" ) diff --git a/Mythic_CLI/src/cmd/manager/dockerComposeManager.go b/Mythic_CLI/src/cmd/manager/dockerComposeManager.go index bbdb1478..16eb532f 100644 --- a/Mythic_CLI/src/cmd/manager/dockerComposeManager.go +++ b/Mythic_CLI/src/cmd/manager/dockerComposeManager.go @@ -83,7 +83,7 @@ func (d *DockerComposeManager) IsServiceRunning(service string) bool { } if len(containers) > 0 { for _, c := range containers { - if c.Labels["name"] == strings.ToLower(service) { + if c.Labels["name"] == strings.ToLower(service) && c.State == "running" { return true } }