diff --git a/SMBLibrary/Authentication/NTLM/Structures/NegotiateMessage.cs b/SMBLibrary/Authentication/NTLM/Structures/NegotiateMessage.cs index 1cace34..87bd8f4 100644 --- a/SMBLibrary/Authentication/NTLM/Structures/NegotiateMessage.cs +++ b/SMBLibrary/Authentication/NTLM/Structures/NegotiateMessage.cs @@ -46,6 +46,16 @@ namespace SMBLibrary.Authentication.NTLM public byte[] GetBytes() { + if ((NegotiateFlags & NegotiateFlags.DomainNameSupplied) == 0) + { + DomainName = String.Empty; + } + + if ((NegotiateFlags & NegotiateFlags.WorkstationNameSupplied) == 0) + { + Workstation = String.Empty; + } + int fixedLength = 32; if ((NegotiateFlags & NegotiateFlags.Version) > 0) {