From cf23a3df81de1e1b049a585c72b1b43ecaf40b69 Mon Sep 17 00:00:00 2001 From: si458 Date: Tue, 3 Sep 2024 20:03:05 +0100 Subject: [PATCH] fix volumes not closing powershell Signed-off-by: si458 --- agents/modules_meshcore/computer-identifiers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agents/modules_meshcore/computer-identifiers.js b/agents/modules_meshcore/computer-identifiers.js index 50ebfe16..1811f043 100644 --- a/agents/modules_meshcore/computer-identifiers.js +++ b/agents/modules_meshcore/computer-identifiers.js @@ -411,7 +411,7 @@ function windows_volumes() p1.child = child; child.promise = p1; child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); }); - child.stdin.write('Get-Volume | Select-Object -Property DriveLetter,FileSystemLabel,FileSystemType,Size,SizeRemaining,DriveType | ConvertTo-Csv -NoTypeInformation\nexit\n'); + child.stdin.write('Get-Volume | Select-Object -Property DriveLetter,FileSystemLabel,FileSystemType,Size,SizeRemaining,DriveType | ConvertTo-Csv -NoTypeInformation\r\nexit\r\n'); child.on('exit', function (c) { var a, i, tokens, key; @@ -447,7 +447,7 @@ function windows_volumes() child.promise = p2; child.tokens = tokens; child.stdout.str = ''; child.stdout.on('data', function (c) { this.str += c.toString(); }); - child.stdin.write('Get-BitLockerVolume | Select-Object -Property MountPoint,VolumeStatus,ProtectionStatus | ConvertTo-Csv -NoTypeInformation\nexit\n'); + child.stdin.write('Get-BitLockerVolume | Select-Object -Property MountPoint,VolumeStatus,ProtectionStatus | ConvertTo-Csv -NoTypeInformation\r\nexit\r\n'); child.on('exit', function () { var i;