예제 #1
0
        public OpenAndXResponse(byte[] buffer, int offset) : base(buffer, offset)
        {
            int parametersOffset = 4;

            FID           = LittleEndianReader.ReadUInt16(SMBParameters, ref parametersOffset);
            FileAttrs     = (SMBFileAttributes)LittleEndianReader.ReadUInt16(SMBParameters, ref parametersOffset);
            LastWriteTime = UTimeHelper.ReadNullableUTime(SMBParameters, ref parametersOffset);
            FileDataSize  = LittleEndianReader.ReadUInt32(SMBParameters, ref parametersOffset);
            AccessRights  = (AccessRights)LittleEndianReader.ReadUInt16(SMBParameters, ref parametersOffset);
            ResourceType  = (ResourceType)LittleEndianReader.ReadUInt16(SMBParameters, ref parametersOffset);
            NMPipeStatus  = NamedPipeStatus.Read(SMBParameters, ref parametersOffset);
            OpenResults   = OpenResults.Read(SMBParameters, ref parametersOffset);
            Reserved      = ByteReader.ReadBytes(SMBParameters, ref parametersOffset, 6);
        }
예제 #2
0
        public NTCreateAndXResponse(byte[] buffer, int offset) : base(buffer, offset)
        {
            int parametersOffset = 4;

            OpLockLevel       = (OpLockLevel)ByteReader.ReadByte(SMBParameters, ref parametersOffset);
            FID               = LittleEndianReader.ReadUInt16(SMBParameters, ref parametersOffset);
            CreateDisposition = (CreateDisposition)LittleEndianReader.ReadUInt32(SMBParameters, ref parametersOffset);
            CreateTime        = SMB1Helper.ReadNullableFileTime(SMBParameters, ref parametersOffset);
            LastAccessTime    = SMB1Helper.ReadNullableFileTime(SMBParameters, ref parametersOffset);
            LastWriteTime     = SMB1Helper.ReadNullableFileTime(SMBParameters, ref parametersOffset);
            LastChangeTime    = SMB1Helper.ReadNullableFileTime(SMBParameters, ref parametersOffset);
            ExtFileAttributes = (ExtendedFileAttributes)LittleEndianReader.ReadUInt32(SMBParameters, ref parametersOffset);
            AllocationSize    = LittleEndianReader.ReadInt64(SMBParameters, ref parametersOffset);
            EndOfFile         = LittleEndianReader.ReadInt64(SMBParameters, ref parametersOffset);
            ResourceType      = (ResourceType)LittleEndianReader.ReadUInt16(SMBParameters, ref parametersOffset);
            NMPipeStatus      = NamedPipeStatus.Read(SMBParameters, ref parametersOffset);
            Directory         = (ByteReader.ReadByte(SMBParameters, ref parametersOffset) > 0);
        }