From dde1d07210ddad54347545d807e5c1922579000c Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Fri, 3 Oct 2025 16:59:41 -0600 Subject: [PATCH] Misc Updates to Assembly Editor Design --- .../Examples/Write Canary to C Drive Root.ps1 | 5 - .../Examples/Write_Canary.txt_to_C_.json | 26 ---- .../Write_Canary_File_to_C_Drive.json | 24 +++ .../WebUI/src/Assemblies/Assembly_Editor.jsx | 138 ++++++++++-------- 4 files changed, 98 insertions(+), 95 deletions(-) delete mode 100644 Assemblies/Scripts/Examples/Write Canary to C Drive Root.ps1 delete mode 100644 Assemblies/Scripts/Examples/Write_Canary.txt_to_C_.json create mode 100644 Assemblies/Scripts/Examples/Write_Canary_File_to_C_Drive.json diff --git a/Assemblies/Scripts/Examples/Write Canary to C Drive Root.ps1 b/Assemblies/Scripts/Examples/Write Canary to C Drive Root.ps1 deleted file mode 100644 index a1d7a2a..0000000 --- a/Assemblies/Scripts/Examples/Write Canary to C Drive Root.ps1 +++ /dev/null @@ -1,5 +0,0 @@ -# Define the file path -$filePath = "C:\Canary.txt" - -# Write some content into the file -"SYSTEM Canary is alive." | Out-File -FilePath $filePath -Encoding UTF8 diff --git a/Assemblies/Scripts/Examples/Write_Canary.txt_to_C_.json b/Assemblies/Scripts/Examples/Write_Canary.txt_to_C_.json deleted file mode 100644 index bace9c0..0000000 --- a/Assemblies/Scripts/Examples/Write_Canary.txt_to_C_.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "version": 1, - "name": "Write Canary File to C:\\Canary.txt", - "description": "Self-explanatory.", - "category": "script", - "type": "powershell", - "script": "# Define the file path\n$filePath = \"C:\\Canary.txt\"\n\n# Write some content into the file\n\"SYSTEM Canary is alive.\"ddss | Out-File -FilePath $filePath -Encoding UTF8\n", - "timeout_seconds": 3600, - "sites": { - "mode": "specific", - "values": [ - "1" - ] - }, - "variables": [ - { - "name": "Example Variable", - "label": "Important Label", - "type": "string", - "default": "Blah", - "required": false, - "description": "Put something into this variable!" - } - ], - "files": [] -} \ No newline at end of file diff --git a/Assemblies/Scripts/Examples/Write_Canary_File_to_C_Drive.json b/Assemblies/Scripts/Examples/Write_Canary_File_to_C_Drive.json new file mode 100644 index 0000000..2cd3b67 --- /dev/null +++ b/Assemblies/Scripts/Examples/Write_Canary_File_to_C_Drive.json @@ -0,0 +1,24 @@ +{ + "version": 1, + "name": "Write Canary File to C Drive", + "description": "Writes a simple text file to the C:\\ drive of the computer. Requires SYSTEM level execution context to work.", + "category": "script", + "type": "powershell", + "script": "# Define the file path\n$filePath = \"C:\\Canary.txt\"\n\n# Write some content into the file\n$env:canaryMessage | Out-File -FilePath $filePath -Encoding UTF8\n", + "timeout_seconds": 3600, + "sites": { + "mode": "all", + "values": [] + }, + "variables": [ + { + "name": "canaryMessage", + "label": "Canary Message", + "type": "string", + "default": "Hello world!", + "required": true, + "description": "This is the text that will be written into the canary file." + } + ], + "files": [] +} \ No newline at end of file diff --git a/Data/Server/WebUI/src/Assemblies/Assembly_Editor.jsx b/Data/Server/WebUI/src/Assemblies/Assembly_Editor.jsx index 318bfec..5d6e342 100644 --- a/Data/Server/WebUI/src/Assemblies/Assembly_Editor.jsx +++ b/Data/Server/WebUI/src/Assemblies/Assembly_Editor.jsx @@ -624,19 +624,84 @@ export default function AssemblyEditor({ flex: 1, height: "100%", overflow: "hidden", + ml: -0.95, + mt: -0.95, bgcolor: PAGE_BACKGROUND }} > - - - Assembly Editor - - - Create and edit variables, scripts, and other fields related to assemblies. - + + + {/* Left half */} + + + Assembly Editor + Create and edit variables, scripts, and other fields related to assemblies. + + + {/* Right half */} + + + {currentPath ? ( + + + + ) : null} + {currentPath ? ( + + + + ) : null} + + + + + - - {currentPath ? ( - - - - ) : null} - {currentPath ? ( - - - - ) : null} - - @@ -1137,6 +1145,7 @@ export default function AssemblyEditor({ No files uploaded yet. )} +