public SetInfoStandard(byte[] buffer, int offset) { CreationDateTime = SMBHelper.ReadSMBDateTime(buffer, offset + 0); LastAccessDateTime = SMBHelper.ReadSMBDateTime(buffer, offset + 4); LastWriteDateTime = SMBHelper.ReadSMBDateTime(buffer, offset + 8); Reserved = ByteReader.ReadBytes(buffer, offset + 12, 10); }
public QueryInformationResponse(byte[] buffer, int offset) : base(buffer, offset, false) { FileAttributes = (FileAttributes)LittleEndianConverter.ToUInt16(this.SMBParameters, 0); LastWriteTime = SMBHelper.ReadSMBDateTime(this.SMBParameters, 2); FileSize = LittleEndianConverter.ToUInt32(this.SMBParameters, 6); Reserved = ByteReader.ReadBytes(this.SMBParameters, 10, 10); }
public QueryInfoStandard(byte[] buffer, int offset) { CreationDateTime = SMBHelper.ReadSMBDateTime(buffer, ref offset); LastAccessDateTime = SMBHelper.ReadSMBDateTime(buffer, ref offset); LastWriteDateTime = SMBHelper.ReadSMBDateTime(buffer, ref offset); FileDataSize = LittleEndianReader.ReadUInt32(buffer, ref offset); AllocationSize = LittleEndianReader.ReadUInt32(buffer, ref offset); Attributes = (FileAttributes)LittleEndianReader.ReadUInt16(buffer, ref offset); }
public static DateTime?ReadSetSMBDateTime(byte[] buffer, int offset) { uint value = LittleEndianConverter.ToUInt32(buffer, offset); if (value > 0) { return(SMBHelper.ReadSMBDateTime(buffer, offset)); } return(null); }
public FindInfoStandard(byte[] buffer, ref int offset, bool isUnicode, bool returnResumeKeys) : base(returnResumeKeys) { if (returnResumeKeys) { ResumeKey = LittleEndianReader.ReadUInt32(buffer, ref offset); } CreationDateTime = SMBHelper.ReadSMBDateTime(buffer, ref offset); LastAccessDateTime = SMBHelper.ReadSMBDateTime(buffer, ref offset); LastWriteDateTime = SMBHelper.ReadSMBDateTime(buffer, ref offset); FileDataSize = LittleEndianReader.ReadUInt32(buffer, ref offset); AllocationSize = LittleEndianReader.ReadUInt32(buffer, ref offset); Attributes = (FileAttributes)LittleEndianReader.ReadUInt16(buffer, ref offset); byte fileNameLength = ByteReader.ReadByte(buffer, ref offset); FileName = SMBHelper.ReadSMBString(buffer, ref offset, isUnicode); }
public FindInfoQueryExtendedAttributesFromList(byte[] buffer, ref int offset, bool isUnicode, bool returnResumeKeys) : base(returnResumeKeys) { if (returnResumeKeys) { ResumeKey = LittleEndianReader.ReadUInt32(buffer, ref offset); } CreationDateTime = SMBHelper.ReadSMBDateTime(buffer, ref offset); LastAccessDateTime = SMBHelper.ReadSMBDateTime(buffer, ref offset); LastWriteDateTime = SMBHelper.ReadSMBDateTime(buffer, ref offset); FileDataSize = LittleEndianReader.ReadUInt32(buffer, ref offset); AllocationSize = LittleEndianReader.ReadUInt32(buffer, ref offset); Attributes = (FileAttributes)LittleEndianReader.ReadUInt16(buffer, ref offset); ExtendedAttributeList = new FullExtendedAttributeList(buffer, offset); byte fileNameLength = ByteReader.ReadByte(buffer, ref offset); FileName = SMBHelper.ReadFixedLengthString(buffer, ref offset, isUnicode, fileNameLength); }