From dd89af0d7405a46ce684f9300cca793950caf0d3 Mon Sep 17 00:00:00 2001 From: Ilya Date: Sat, 29 Dec 2018 10:30:59 +0500 Subject: [PATCH 1/4] Revert change in AMSI test --- .../Microsoft.PowerShell.Security/AmsiInterface.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Security/AmsiInterface.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Security/AmsiInterface.Tests.ps1 index f3054afd550..f342afcd3fa 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Security/AmsiInterface.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Security/AmsiInterface.Tests.ps1 @@ -20,7 +20,7 @@ try $EICAR_STRING_B64 = "awZ8EmMWc3JjaAdvY2lrBgcbY20aBHBwGgROF3Z6cHJhHmBncn13cmF3HnJ9Z3plemFmYB5ndmBnHnV6f3YSF3sYexk= " $bytes = [System.Convert]::FromBase64String($EICAR_STRING_B64) - $EICAR_STRING = -join ($bytes | ForeEach-Object { [char]($_ -bxor 0x33) }) + $EICAR_STRING = -join ($bytes | % { [char]($_ -bxor 0x33) }) { Invoke-Expression -Command "echo '$EICAR_STRING'" } | Should -Throw -ErrorId "ScriptContainedMaliciousContent,Microsoft.PowerShell.Commands.InvokeExpressionCommand" } From 69cdb8c16104b4445fd379632116b6d4c380dce6 Mon Sep 17 00:00:00 2001 From: Ilya Date: Sat, 29 Dec 2018 10:34:07 +0500 Subject: [PATCH 2/4] [Feature] From 59d2df5733092c51236dbc05f2b43c7d3d6f278e Mon Sep 17 00:00:00 2001 From: Ilya Date: Sat, 29 Dec 2018 10:55:27 +0500 Subject: [PATCH 3/4] Fix cmdlet name --- .../Microsoft.PowerShell.Security/AmsiInterface.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Security/AmsiInterface.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Security/AmsiInterface.Tests.ps1 index f342afcd3fa..ebff106cbff 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Security/AmsiInterface.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Security/AmsiInterface.Tests.ps1 @@ -20,7 +20,7 @@ try $EICAR_STRING_B64 = "awZ8EmMWc3JjaAdvY2lrBgcbY20aBHBwGgROF3Z6cHJhHmBncn13cmF3HnJ9Z3plemFmYB5ndmBnHnV6f3YSF3sYexk= " $bytes = [System.Convert]::FromBase64String($EICAR_STRING_B64) - $EICAR_STRING = -join ($bytes | % { [char]($_ -bxor 0x33) }) + $EICAR_STRING = -join ($bytes | ForEach-Object { [char]($_ -bxor 0x33) }) { Invoke-Expression -Command "echo '$EICAR_STRING'" } | Should -Throw -ErrorId "ScriptContainedMaliciousContent,Microsoft.PowerShell.Commands.InvokeExpressionCommand" } From 3c159a26b7939a9c0c98fa3c843f8ac066037d5e Mon Sep 17 00:00:00 2001 From: Ilya Date: Sat, 29 Dec 2018 11:19:53 +0500 Subject: [PATCH 4/4] [Feature]