Example #1
0
        public Transaction2QueryFileInformationRequest(byte[] parameters, byte[] data, bool isUnicode) : base()
        {
            FID = LittleEndianConverter.ToUInt16(parameters, 0);
            InformationLevel = (QueryInformationLevel)LittleEndianConverter.ToUInt16(parameters, 2);

            if (InformationLevel == QueryInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST)
            {
                GetExtendedAttributeList = new FullExtendedAttributeList(data, 0);
            }
        }
        public Transaction2QueryFileInformationRequest(byte[] parameters, byte[] data)
        {
            FID = LittleEndianConverter.ToUInt16(parameters, 0);
            InformationLevel = LittleEndianConverter.ToUInt16(parameters, 2);

            if (!IsPassthroughInformationLevel && QueryInformationLevel == QueryInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST)
            {
                GetExtendedAttributeList = new FullExtendedAttributeList(data, 0);
            }
        }
Example #3
0
        public Transaction2QueryPathInformationRequest(byte[] parameters, byte[] data, bool isUnicode) : base()
        {
            InformationLevel = (QueryInformationLevel)LittleEndianConverter.ToUInt16(parameters, 0);
            Reserved         = LittleEndianConverter.ToUInt32(parameters, 4);
            FileName         = SMB1Helper.ReadSMBString(parameters, 6, isUnicode);

            if (InformationLevel == QueryInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST)
            {
                GetExtendedAttributeList = new FullExtendedAttributeList(data, 0);
            }
        }
        public Transaction2Open2Request(byte[] parameters, byte[] data, bool isUnicode) : base()
        {
            Flags = (Open2Flags)LittleEndianConverter.ToUInt16(parameters, 0);
            AccessMode = new AccessModeOptions(parameters, 2);
            Reserved1 = LittleEndianConverter.ToUInt16(parameters, 4);
            FileAttributes = (FileAttributes)LittleEndianConverter.ToUInt16(parameters, 6);
            CreationTime = SMBHelper.ReadUTime(parameters, 8);
            OpenMode = new OpenMode(parameters, 12);
            AllocationSize = LittleEndianConverter.ToUInt32(parameters, 14);
            Reserved = ByteReader.ReadBytes(parameters, 18, 10);
            FileName = SMBHelper.ReadSMBString(parameters, 28, isUnicode);

            ExtendedAttributeList = new FullExtendedAttributeList(data, 0);
        }
Example #5
0
        public Transaction2FindFirst2Request(byte[] parameters, byte[] data, bool isUnicode) : base()
        {
            SearchAttributes  = (FileAttributes)LittleEndianConverter.ToUInt16(parameters, 0);
            SearchCount       = LittleEndianConverter.ToUInt16(parameters, 2);
            Flags             = (FindFlags)LittleEndianConverter.ToUInt16(parameters, 4);
            InformationLevel  = (FindInformationLevel)LittleEndianConverter.ToUInt16(parameters, 6);
            SearchStorageType = (SearchStorageType)LittleEndianConverter.ToUInt32(parameters, 8);
            FileName          = SMBHelper.ReadSMBString(parameters, 12, isUnicode);

            if (InformationLevel == FindInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST)
            {
                GetExtendedAttributeList = new FullExtendedAttributeList(data, 0);
            }
        }
Example #6
0
        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);
        }
Example #7
0
 public QueryAllExtendedAttributes(byte[] buffer, int offset)
 {
     ExtendedAttributeList = new FullExtendedAttributeList(buffer, offset);
 }
Example #8
0
 public QueryAllExtendedAttributes()
 {
     ExtendedAttributeList = new FullExtendedAttributeList();
 }
Example #9
0
 public Transaction2CreateDirectoryRequest(byte[] parameters, byte[] data, bool isUnicode) : base()
 {
     Reserved              = LittleEndianConverter.ToUInt32(parameters, 0);
     DirectoryName         = SMB1Helper.ReadSMBString(parameters, 4, isUnicode);
     ExtendedAttributeList = new FullExtendedAttributeList(data);
 }
Example #10
0
        FullExtendedAttributeList GetExtendedAttributeList; // Used with FindInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST

        public Transaction2FindFirst2Request() : base()
        {
            GetExtendedAttributeList = new FullExtendedAttributeList();
        }
Example #11
0
        FullExtendedAttributeList GetExtendedAttributeList; // Used with QueryInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST

        public Transaction2QueryPathInformationRequest() : base()
        {
            GetExtendedAttributeList = new FullExtendedAttributeList();
        }
        public FullExtendedAttributeList GetExtendedAttributeList; // Used with QueryInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST

        public Transaction2QueryFileInformationRequest()
        {
            GetExtendedAttributeList = new FullExtendedAttributeList();
        }
 public SetExtendedAttributes()
 {
     ExtendedAttributeList = new FullExtendedAttributeList();
 }
Example #14
0
 public QueryExtendedAttributesFromList()
 {
     ExtendedAttributeList = new FullExtendedAttributeList();
 }