diff --git a/SMBLibrary/SMB1/Transaction2Subcommands/Transaction2FindFirst2Request.cs b/SMBLibrary/SMB1/Transaction2Subcommands/Transaction2FindFirst2Request.cs index 1331874..e86ce7c 100644 --- a/SMBLibrary/SMB1/Transaction2Subcommands/Transaction2FindFirst2Request.cs +++ b/SMBLibrary/SMB1/Transaction2Subcommands/Transaction2FindFirst2Request.cs @@ -24,11 +24,11 @@ namespace SMBLibrary.SMB1 public SearchStorageType SearchStorageType; public string FileName; // SMB_STRING // Data: - public FullExtendedAttributeList GetExtendedAttributeList; // Used with FindInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST + public ExtendedAttributeNameList GetExtendedAttributeList; // Used with FindInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST public Transaction2FindFirst2Request() : base() { - GetExtendedAttributeList = new FullExtendedAttributeList(); + GetExtendedAttributeList = new ExtendedAttributeNameList(); } public Transaction2FindFirst2Request(byte[] parameters, byte[] data, bool isUnicode) : base() @@ -42,7 +42,7 @@ namespace SMBLibrary.SMB1 if (InformationLevel == FindInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST) { - GetExtendedAttributeList = new FullExtendedAttributeList(data, 0); + GetExtendedAttributeList = new ExtendedAttributeNameList(data, 0); } } diff --git a/SMBLibrary/SMB1/Transaction2Subcommands/Transaction2FindNext2Request.cs b/SMBLibrary/SMB1/Transaction2Subcommands/Transaction2FindNext2Request.cs index 28461a3..6574b02 100644 --- a/SMBLibrary/SMB1/Transaction2Subcommands/Transaction2FindNext2Request.cs +++ b/SMBLibrary/SMB1/Transaction2Subcommands/Transaction2FindNext2Request.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Tal Aloni . All rights reserved. +/* Copyright (C) 2014-2017 Tal Aloni . All rights reserved. * * You can redistribute this program and/or modify it under the terms of * the GNU Lesser Public License as published by the Free Software Foundation, @@ -23,9 +23,12 @@ namespace SMBLibrary.SMB1 public uint ResumeKey; public FindFlags Flags; public string FileName; // SMB_STRING + // Data: + public ExtendedAttributeNameList GetExtendedAttributeList; // Used with FindInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST public Transaction2FindNext2Request() : base() { + GetExtendedAttributeList = new ExtendedAttributeNameList(); } public Transaction2FindNext2Request(byte[] parameters, byte[] data, bool isUnicode) : base() @@ -36,6 +39,11 @@ namespace SMBLibrary.SMB1 ResumeKey = LittleEndianConverter.ToUInt32(parameters, 6); Flags = (FindFlags)LittleEndianConverter.ToUInt16(parameters, 10); FileName = SMB1Helper.ReadSMBString(parameters, 12, isUnicode); + + if (InformationLevel == FindInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST) + { + GetExtendedAttributeList = new ExtendedAttributeNameList(data, 0); + } } public override byte[] GetSetup() @@ -66,6 +74,18 @@ namespace SMBLibrary.SMB1 return parameters; } + public override byte[] GetData(bool isUnicode) + { + if (InformationLevel == FindInformationLevel.SMB_INFO_QUERY_EAS_FROM_LIST) + { + return GetExtendedAttributeList.GetBytes(); + } + else + { + return new byte[0]; + } + } + public override Transaction2SubcommandName SubcommandName { get