Added NT_TRANSACT_NOTIFY_CHANGE response implementation

This commit is contained in:
Tal Aloni 2017-02-22 20:44:15 +02:00
parent ae50cac87b
commit 4cb219f61f
2 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,53 @@
/* Copyright (C) 2017 Tal Aloni <tal.aloni.il@gmail.com>. 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,
* either version 3 of the License, or (at your option) any later version.
*/
using System;
using System.Collections.Generic;
using Utilities;
namespace SMBLibrary.SMB1
{
/// <summary>
/// NT_TRANSACT_NOTIFY_CHANGE Response
/// </summary>
public class NTTransactNotifyChangeResponse : NTTransactSubcommand
{
// Parameters:
public byte[] FileNotifyInformationBytes;
public NTTransactNotifyChangeResponse() : base()
{
}
public NTTransactNotifyChangeResponse(byte[] parameters) : base()
{
FileNotifyInformationBytes = parameters;
}
public override byte[] GetParameters(bool isUnicode)
{
return FileNotifyInformationBytes;
}
public List<FileNotifyInformation> GetFileNotifyInformation()
{
return FileNotifyInformation.ReadList(FileNotifyInformationBytes, 0);
}
public void SetFileNotifyInformation(List<FileNotifyInformation> notifyInformationList)
{
FileNotifyInformationBytes = FileNotifyInformation.GetBytes(notifyInformationList);
}
public override NTTransactSubcommandName SubcommandName
{
get
{
return NTTransactSubcommandName.NT_TRANSACT_NOTIFY_CHANGE;
}
}
}
}

View file

@ -364,6 +364,7 @@
<Compile Include="SMB1\NTTransactSubcommands\NTTransactIOCTLRequest.cs" /> <Compile Include="SMB1\NTTransactSubcommands\NTTransactIOCTLRequest.cs" />
<Compile Include="SMB1\NTTransactSubcommands\NTTransactIOCTLResponse.cs" /> <Compile Include="SMB1\NTTransactSubcommands\NTTransactIOCTLResponse.cs" />
<Compile Include="SMB1\NTTransactSubcommands\NTTransactNotifyChangeRequest.cs" /> <Compile Include="SMB1\NTTransactSubcommands\NTTransactNotifyChangeRequest.cs" />
<Compile Include="SMB1\NTTransactSubcommands\NTTransactNotifyChangeResponse.cs" />
<Compile Include="SMB1\NTTransactSubcommands\NTTransactQuerySecurityDescriptorRequest.cs" /> <Compile Include="SMB1\NTTransactSubcommands\NTTransactQuerySecurityDescriptorRequest.cs" />
<Compile Include="SMB1\NTTransactSubcommands\NTTransactQuerySecurityDescriptorResponse.cs" /> <Compile Include="SMB1\NTTransactSubcommands\NTTransactQuerySecurityDescriptorResponse.cs" />
<Compile Include="SMB1\NTTransactSubcommands\NTTransactSetSecurityDescriptor.cs" /> <Compile Include="SMB1\NTTransactSubcommands\NTTransactSetSecurityDescriptor.cs" />