Ejemplo n.º 1
0
 public Transaction2Open2Response(byte[] parameters, byte[] data, bool isUnicode) : base()
 {
     FID            = LittleEndianConverter.ToUInt16(parameters, 0);
     FileAttributes = (SMBFileAttributes)LittleEndianConverter.ToUInt16(parameters, 2);
     CreationTime   = UTimeHelper.ReadNullableUTime(parameters, 4);
     FileDataSize   = LittleEndianConverter.ToUInt32(parameters, 8);
     AccessMode     = new AccessModeOptions(parameters, 12);
     ResourceType   = (ResourceType)LittleEndianConverter.ToUInt16(parameters, 14);
     NMPipeStatus   = new NamedPipeStatus(parameters, 16);
     ActionTaken    = new ActionTaken(parameters, 18);
     Reserved       = LittleEndianConverter.ToUInt32(parameters, 20);
     ExtendedAttributeErrorOffset = LittleEndianConverter.ToUInt16(parameters, 24);
     ExtendedAttributeLength      = LittleEndianConverter.ToUInt32(parameters, 26);
 }
Ejemplo n.º 2
0
        public OpenAndXResponse(byte[] buffer, int offset) : base(buffer, offset, false)
        {
            int parametersOffset = 4;

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

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