From 872be8893e77df8b37983e1f32a469fd7d821a1a Mon Sep 17 00:00:00 2001 From: Anthony Rose <20302208+Cx01N@users.noreply.github.com> Date: Sat, 20 Jul 2024 14:28:37 -0400 Subject: [PATCH] removed duplicate code for ironpython agent loading libraries (#856) --- CHANGELOG.md | 2 +- .../Data/ReferenceSourceLibraries/CSharpPy/CSharpPy.cs | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45070e15d..c6b90b6f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed - +- Removed duplicate code for ironpython agent for loading path resetting (@Cx01N) - Fixed issue of Sharpire taskings not getting assigned correct id (@Cx01N) ## [5.11.0] - 2024-07-14 diff --git a/empire/server/csharp/Covenant/Data/ReferenceSourceLibraries/CSharpPy/CSharpPy.cs b/empire/server/csharp/Covenant/Data/ReferenceSourceLibraries/CSharpPy/CSharpPy.cs index 1106d418c..5bec75123 100644 --- a/empire/server/csharp/Covenant/Data/ReferenceSourceLibraries/CSharpPy/CSharpPy.cs +++ b/empire/server/csharp/Covenant/Data/ReferenceSourceLibraries/CSharpPy/CSharpPy.cs @@ -32,11 +32,6 @@ public static void Agent(string PyCode) sysScope.meta_path.append(importer); sysScope.path.append(importer); - // Clear search paths (if they exist) and add our library - sysScope.path.clear(); - sysScope.meta_path.append(importer); - sysScope.path.append(importer); - //execute ironpython code var script = engine.CreateScriptSourceFromString(PyCode, SourceCodeKind.Statements); script.Execute();