From 1a599c2ccae788c752b13b6c5e76ed973a741cd6 Mon Sep 17 00:00:00 2001 From: Tal Aloni Date: Thu, 24 Aug 2017 18:22:01 +0300 Subject: [PATCH] SMB1Command: Mark SMBParameters and SMBData as protected --- SMBLibrary/SMB1/Commands/EchoRequest.cs | 14 +++++++++++++- SMBLibrary/SMB1/Commands/EchoResponse.cs | 14 +++++++++++++- SMBLibrary/SMB1/Commands/SMB1Command.cs | 4 ++-- SMBLibrary/Server/SMB1/EchoHelper.cs | 2 +- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/SMBLibrary/SMB1/Commands/EchoRequest.cs b/SMBLibrary/SMB1/Commands/EchoRequest.cs index cec13e5..555cff5 100644 --- a/SMBLibrary/SMB1/Commands/EchoRequest.cs +++ b/SMBLibrary/SMB1/Commands/EchoRequest.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, @@ -37,6 +37,18 @@ namespace SMBLibrary.SMB1 return base.GetBytes(isUnicode); } + + public byte[] Data + { + get + { + return this.SMBData; + } + set + { + this.SMBData = value; + } + } public override CommandName CommandName { diff --git a/SMBLibrary/SMB1/Commands/EchoResponse.cs b/SMBLibrary/SMB1/Commands/EchoResponse.cs index dc4eaf2..1fc1e2d 100644 --- a/SMBLibrary/SMB1/Commands/EchoResponse.cs +++ b/SMBLibrary/SMB1/Commands/EchoResponse.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, @@ -36,6 +36,18 @@ namespace SMBLibrary.SMB1 return base.GetBytes(isUnicode); } + + public byte[] Data + { + get + { + return this.SMBData; + } + set + { + this.SMBData = value; + } + } public override CommandName CommandName { diff --git a/SMBLibrary/SMB1/Commands/SMB1Command.cs b/SMBLibrary/SMB1/Commands/SMB1Command.cs index 516fda5..eb4a460 100644 --- a/SMBLibrary/SMB1/Commands/SMB1Command.cs +++ b/SMBLibrary/SMB1/Commands/SMB1Command.cs @@ -13,8 +13,8 @@ namespace SMBLibrary.SMB1 { public abstract class SMB1Command { - public byte[] SMBParameters; // SMB_Parameters - public byte[] SMBData; // SMB_Data + protected byte[] SMBParameters; // SMB_Parameters + protected byte[] SMBData; // SMB_Data public SMB1Command() { diff --git a/SMBLibrary/Server/SMB1/EchoHelper.cs b/SMBLibrary/Server/SMB1/EchoHelper.cs index a7b2222..1f4ea6c 100644 --- a/SMBLibrary/Server/SMB1/EchoHelper.cs +++ b/SMBLibrary/Server/SMB1/EchoHelper.cs @@ -19,7 +19,7 @@ namespace SMBLibrary.Server.SMB1 { EchoResponse echo = new EchoResponse(); echo.SequenceNumber = (ushort)index; - echo.SMBData = request.SMBData; + echo.Data = request.Data; response.Add(echo); } return response;