mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-05-29 16:59:50 +02:00
Corrected implementaion SMB_COM_SESSION_SETUP_ANDX Extended Security response
This commit is contained in:
parent
9b58a2317f
commit
320a4cb969
1 changed files with 2 additions and 1 deletions
|
@ -69,6 +69,7 @@ namespace SMBLibrary.SMB1
|
||||||
LittleEndianWriter.WriteUInt32(this.SMBParameters, 10, SessionKey);
|
LittleEndianWriter.WriteUInt32(this.SMBParameters, 10, SessionKey);
|
||||||
LittleEndianWriter.WriteUInt16(this.SMBParameters, 14, SecurityBlobLength);
|
LittleEndianWriter.WriteUInt16(this.SMBParameters, 14, SecurityBlobLength);
|
||||||
LittleEndianWriter.WriteUInt32(this.SMBParameters, 16, Reserved);
|
LittleEndianWriter.WriteUInt32(this.SMBParameters, 16, Reserved);
|
||||||
|
LittleEndianWriter.WriteUInt32(this.SMBParameters, 20, (uint)Capabilities);
|
||||||
|
|
||||||
int padding = 0;
|
int padding = 0;
|
||||||
if (isUnicode)
|
if (isUnicode)
|
||||||
|
@ -76,7 +77,7 @@ namespace SMBLibrary.SMB1
|
||||||
// A Unicode string MUST be aligned to a 16-bit boundary with respect to the beginning of the SMB Header.
|
// A Unicode string MUST be aligned to a 16-bit boundary with respect to the beginning of the SMB Header.
|
||||||
// Note: SMBData starts at an odd offset.
|
// Note: SMBData starts at an odd offset.
|
||||||
padding = (SecurityBlobLength + 1) % 2;
|
padding = (SecurityBlobLength + 1) % 2;
|
||||||
this.SMBData = new byte[SecurityBlob.Length + (NativeOS.Length + 1) * 2 + (NativeLanMan.Length + 1) * 2];
|
this.SMBData = new byte[SecurityBlob.Length + padding + (NativeOS.Length + 1) * 2 + (NativeLanMan.Length + 1) * 2];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue