From 94d6924d0075a5e473423946f2bc8a2b6d9adc85 Mon Sep 17 00:00:00 2001 From: clr2of8 Date: Tue, 12 Dec 2023 18:00:51 -0600 Subject: [PATCH] parse hostname correctly with dash --- Public/config.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Public/config.ps1 b/Public/config.ps1 index f064fc6..14174bd 100644 --- a/Public/config.ps1 +++ b/Public/config.ps1 @@ -2,7 +2,7 @@ $artConfig = [PSCustomObject]@{ # [optional] These two configs are calculated programatically, you probably don't need to change them - basehostname = $((hostname).split("-")[0]) + basehostname = $((hostname | Select-String -Pattern "(.*?)(-[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12})?$").Matches.Groups[1].value) OS = $( if ($IsLinux) { "linux" } elseif ($IsMacOS) { "macos" } else { "windows" }) # [optional(if using default install paths)] Paths to your Atomic Red Team "atomics" folder and your "invoke-atomicredteam" folder