From 849b99ad837f23ee8199f4d443c51c479819275e Mon Sep 17 00:00:00 2001 From: Tal Aloni Date: Fri, 10 Dec 2021 10:21:50 +0200 Subject: [PATCH] Client: Correct NetrShareEnum ServerName syntax --- SMBLibrary/Client/Helpers/ServerServiceHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SMBLibrary/Client/Helpers/ServerServiceHelper.cs b/SMBLibrary/Client/Helpers/ServerServiceHelper.cs index f37e12f..39d0645 100644 --- a/SMBLibrary/Client/Helpers/ServerServiceHelper.cs +++ b/SMBLibrary/Client/Helpers/ServerServiceHelper.cs @@ -38,7 +38,7 @@ namespace SMBLibrary.Client shareEnumRequest.InfoStruct.Level = 1; shareEnumRequest.InfoStruct.Info = new ShareInfo1Container(); shareEnumRequest.PreferedMaximumLength = UInt32.MaxValue; - shareEnumRequest.ServerName = serverName; + shareEnumRequest.ServerName = @"\\" + serverName; RequestPDU requestPDU = new RequestPDU(); requestPDU.Flags = PacketFlags.FirstFragment | PacketFlags.LastFragment; requestPDU.DataRepresentation.CharacterFormat = CharacterFormat.ASCII;