SMBServer v1.0.5

This commit is contained in:
Tal Aloni 2016-12-22 20:51:16 +02:00
parent b75820452d
commit bd1006cb81
400 changed files with 28062 additions and 0 deletions

View file

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Utilities
{
public class LittleEndianReader
{
public static ushort ReadUInt16(byte[] buffer, ref int offset)
{
offset += 2;
return LittleEndianConverter.ToUInt16(buffer, offset - 2);
}
public static uint ReadUInt32(byte[] buffer, ref int offset)
{
offset += 4;
return LittleEndianConverter.ToUInt32(buffer, offset - 4);
}
public static ulong ReadUInt64(byte[] buffer, ref int offset)
{
offset += 8;
return LittleEndianConverter.ToUInt64(buffer, offset - 8);
}
public static Guid ReadGuid(byte[] buffer, ref int offset)
{
offset += 16;
return LittleEndianConverter.ToGuid(buffer, offset - 16);
}
}
}