mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-07-20 08:05:53 +02:00
RPC: FaultPDU is now using FaultStatus enum
This commit is contained in:
parent
7d1555af8b
commit
0bbbcb2ace
3 changed files with 15 additions and 4 deletions
11
SMBLibrary/RPC/Enums/FaultStatus.cs
Normal file
11
SMBLibrary/RPC/Enums/FaultStatus.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
namespace SMBLibrary.RPC
|
||||
{
|
||||
public enum FaultStatus : uint
|
||||
{
|
||||
OpRangeError = 0x1C010002, // nca_op_rng_error
|
||||
UnknownInterface = 0x1C010003, // nca_unk_if
|
||||
RPCVersionMismatch = 0x1C000008, // nca_rpc_version_mismatch
|
||||
ProtocolError = 0x1C01000B, // nca_proto_error
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Utilities;
|
||||
|
||||
namespace SMBLibrary.RPC
|
||||
|
@ -22,7 +21,7 @@ namespace SMBLibrary.RPC
|
|||
public ushort ContextID;
|
||||
public byte CancelCount;
|
||||
public byte Reserved;
|
||||
public uint Status;
|
||||
public FaultStatus Status;
|
||||
public uint Reserved2;
|
||||
public byte[] Data;
|
||||
public byte[] AuthVerifier;
|
||||
|
@ -41,7 +40,7 @@ namespace SMBLibrary.RPC
|
|||
ContextID = LittleEndianReader.ReadUInt16(buffer, ref offset);
|
||||
CancelCount = ByteReader.ReadByte(buffer, ref offset);
|
||||
Reserved = ByteReader.ReadByte(buffer, ref offset);
|
||||
Status = LittleEndianReader.ReadUInt32(buffer, ref offset);
|
||||
Status = (FaultStatus)LittleEndianReader.ReadUInt32(buffer, ref offset);
|
||||
Reserved2 = LittleEndianReader.ReadUInt32(buffer, ref offset);
|
||||
int dataLength = FragmentLength - AuthLength - offset;
|
||||
Data = ByteReader.ReadBytes(buffer, ref offset, dataLength);
|
||||
|
@ -58,7 +57,7 @@ namespace SMBLibrary.RPC
|
|||
LittleEndianWriter.WriteUInt16(buffer, ref offset, ContextID);
|
||||
ByteWriter.WriteByte(buffer, ref offset, CancelCount);
|
||||
ByteWriter.WriteByte(buffer, ref offset, Reserved);
|
||||
LittleEndianWriter.WriteUInt32(buffer, ref offset, Status);
|
||||
LittleEndianWriter.WriteUInt32(buffer, ref offset, (uint)Status);
|
||||
LittleEndianWriter.WriteUInt32(buffer, ref offset, Reserved2);
|
||||
ByteWriter.WriteBytes(buffer, ref offset, Data);
|
||||
ByteWriter.WriteBytes(buffer, ref offset, AuthVerifier);
|
||||
|
|
|
@ -183,6 +183,7 @@
|
|||
<Compile Include="NTFileStore\Structures\SecurityInformation\SecurityDescriptor.cs" />
|
||||
<Compile Include="NTFileStore\Structures\SecurityInformation\SID.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RPC\Enums\FaultStatus.cs" />
|
||||
<Compile Include="RPC\Enums\NegotiationResult.cs" />
|
||||
<Compile Include="RPC\Enums\PacketFlags.cs" />
|
||||
<Compile Include="RPC\Enums\PacketTypeName.cs" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue