Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Invoke-AtomicTest.ps1 #182

Merged
merged 1 commit into from
Dec 28, 2023
Merged

Update Invoke-AtomicTest.ps1 #182

merged 1 commit into from
Dec 28, 2023

Conversation

cyberbuff
Copy link
Collaborator

@cyberbuff cyberbuff commented Dec 28, 2023

Fixing an issue where short form T1555.003-14 doesn't work when NoExecutionLog param is passed.

Tested locally on MacOS

Comment on lines -196 to -213
# Since there might a comma(T1559-1,2,3) Powershell takes it as array.
# So converting it back to string.
if ($AtomicTechnique -is [array]) {
$AtomicTechnique = $AtomicTechnique -join ","
}

# Splitting Atomic Technique short form into technique and test numbers.
$AtomicTechniqueParams = ($AtomicTechnique -split '-')
$AtomicTechnique = $AtomicTechniqueParams[0]

if ($AtomicTechniqueParams.Length -gt 1) {
$ShortTestNumbers = $AtomicTechniqueParams[-1]
}

if ($null -eq $TestNumbers -and $null -ne $ShortTestNumbers) {
$TestNumbers = $ShortTestNumbers -split ','
}

Copy link
Collaborator Author

@cyberbuff cyberbuff Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code for converting short form to TestNumbers lies within the isLoggingModuleSet condition. This should happen regardless of whether LoggingModule has been defined.

@clr2of8 clr2of8 merged commit 05bfb2b into master Dec 28, 2023
4 checks passed
@cyberbuff cyberbuff deleted the cyberbuff-patch-2 branch August 6, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants