mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-26 02:38:15 +02:00
SMB1: Corrected implementation of SMB_COM_TRANSACTION subcommand requests
This commit is contained in:
parent
62556a1bdc
commit
144f5c1cbd
10 changed files with 23 additions and 20 deletions
|
@ -23,7 +23,6 @@ namespace SMBLibrary.SMB1
|
||||||
|
|
||||||
public TransactionCallNamedPipeRequest() : base()
|
public TransactionCallNamedPipeRequest() : base()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TransactionCallNamedPipeRequest(byte[] setup, byte[] data) : base()
|
public TransactionCallNamedPipeRequest(byte[] setup, byte[] data) : base()
|
||||||
|
@ -38,7 +37,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] setup = new byte[4];
|
byte[] setup = new byte[4];
|
||||||
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
||||||
LittleEndianWriter.WriteUInt16(setup, 2, Priority);
|
LittleEndianWriter.WriteUInt16(setup, 2, Priority);
|
||||||
return base.GetSetup();
|
return setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] GetData()
|
public override byte[] GetData()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* 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,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -20,7 +20,8 @@ namespace SMBLibrary.SMB1
|
||||||
public ushort FID;
|
public ushort FID;
|
||||||
|
|
||||||
public TransactionPeekNamedPipeRequest() : base()
|
public TransactionPeekNamedPipeRequest() : base()
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public TransactionPeekNamedPipeRequest(byte[] setup) : base()
|
public TransactionPeekNamedPipeRequest(byte[] setup) : base()
|
||||||
{
|
{
|
||||||
|
@ -32,7 +33,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] setup = new byte[4];
|
byte[] setup = new byte[4];
|
||||||
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
||||||
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
||||||
return base.GetSetup();
|
return setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override TransactionSubcommandName SubcommandName
|
public override TransactionSubcommandName SubcommandName
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* 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,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -37,7 +37,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] setup = new byte[4];
|
byte[] setup = new byte[4];
|
||||||
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
||||||
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
||||||
return base.GetSetup();
|
return setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] GetParameters(bool isUnicode)
|
public override byte[] GetParameters(bool isUnicode)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* 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,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -33,7 +33,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] setup = new byte[4];
|
byte[] setup = new byte[4];
|
||||||
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
||||||
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
||||||
return base.GetSetup();
|
return setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override TransactionSubcommandName SubcommandName
|
public override TransactionSubcommandName SubcommandName
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* 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,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -24,6 +24,7 @@ namespace SMBLibrary.SMB1
|
||||||
public TransactionRawWriteNamedPipeRequest() : base()
|
public TransactionRawWriteNamedPipeRequest() : base()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public TransactionRawWriteNamedPipeRequest(byte[] setup, byte[] data) : base()
|
public TransactionRawWriteNamedPipeRequest(byte[] setup, byte[] data) : base()
|
||||||
{
|
{
|
||||||
FID = LittleEndianConverter.ToUInt16(setup, 2);
|
FID = LittleEndianConverter.ToUInt16(setup, 2);
|
||||||
|
@ -36,7 +37,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] setup = new byte[4];
|
byte[] setup = new byte[4];
|
||||||
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
||||||
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
||||||
return base.GetSetup();
|
return setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] GetData()
|
public override byte[] GetData()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* 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,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -20,7 +20,8 @@ namespace SMBLibrary.SMB1
|
||||||
public ushort FID;
|
public ushort FID;
|
||||||
|
|
||||||
public TransactionReadNamedPipeRequest() : base()
|
public TransactionReadNamedPipeRequest() : base()
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public TransactionReadNamedPipeRequest(byte[] setup): base()
|
public TransactionReadNamedPipeRequest(byte[] setup): base()
|
||||||
{
|
{
|
||||||
|
@ -32,7 +33,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] setup = new byte[4];
|
byte[] setup = new byte[4];
|
||||||
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
||||||
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
||||||
return base.GetSetup();
|
return setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override TransactionSubcommandName SubcommandName
|
public override TransactionSubcommandName SubcommandName
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* 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,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -37,7 +37,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] setup = new byte[4];
|
byte[] setup = new byte[4];
|
||||||
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
||||||
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
||||||
return base.GetSetup();
|
return setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] GetParameters(bool isUnicode)
|
public override byte[] GetParameters(bool isUnicode)
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] setup = new byte[4];
|
byte[] setup = new byte[4];
|
||||||
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
||||||
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
||||||
return base.GetSetup();
|
return setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] GetData()
|
public override byte[] GetData()
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] setup = new byte[4];
|
byte[] setup = new byte[4];
|
||||||
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
||||||
LittleEndianWriter.WriteUInt16(setup, 2, Priority);
|
LittleEndianWriter.WriteUInt16(setup, 2, Priority);
|
||||||
return base.GetSetup();
|
return setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override TransactionSubcommandName SubcommandName
|
public override TransactionSubcommandName SubcommandName
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||||
*
|
*
|
||||||
* You can redistribute this program and/or modify it under the terms of
|
* 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,
|
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||||
|
@ -28,6 +28,7 @@ namespace SMBLibrary.SMB1
|
||||||
public TransactionWriteNamedPipeRequest(byte[] setup, byte[] data): base()
|
public TransactionWriteNamedPipeRequest(byte[] setup, byte[] data): base()
|
||||||
{
|
{
|
||||||
FID = LittleEndianConverter.ToUInt16(setup, 2);
|
FID = LittleEndianConverter.ToUInt16(setup, 2);
|
||||||
|
|
||||||
WriteData = data;
|
WriteData = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +37,7 @@ namespace SMBLibrary.SMB1
|
||||||
byte[] setup = new byte[4];
|
byte[] setup = new byte[4];
|
||||||
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
LittleEndianWriter.WriteUInt16(setup, 0, (ushort)this.SubcommandName);
|
||||||
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
LittleEndianWriter.WriteUInt16(setup, 2, FID);
|
||||||
return base.GetSetup();
|
return setup;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] GetData()
|
public override byte[] GetData()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue