mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-03 08:13:18 +02:00
SMB2Header: Initalize Signature field on creation, added SignatureOffset constant
This commit is contained in:
parent
832b791fcc
commit
6bb9aa323b
1 changed files with 3 additions and 0 deletions
|
@ -12,6 +12,8 @@ namespace SMBLibrary.SMB2
|
|||
public class SMB2Header
|
||||
{
|
||||
public const int Length = 64;
|
||||
public const int SignatureOffset = 48;
|
||||
|
||||
public static readonly byte[] ProtocolSignature = new byte[] { 0xFE, 0x53, 0x4D, 0x42 };
|
||||
|
||||
public byte[] ProtocolId; // 4 bytes, 0xFE followed by "SMB"
|
||||
|
@ -34,6 +36,7 @@ namespace SMBLibrary.SMB2
|
|||
ProtocolId = ProtocolSignature;
|
||||
StructureSize = Length;
|
||||
Command = commandName;
|
||||
Signature = new byte[16];
|
||||
}
|
||||
|
||||
public SMB2Header(byte[] buffer, int offset)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue