public ObjectId(byte[] rawBytes) : base(rawBytes) { var content = new byte[AttributeContentLength]; Buffer.BlockCopy(rawBytes, ContentOffset, content, 0, AttributeContentLength); var residentData = new ResidentData(content); var guidRaw0 = new byte[16]; var guidRaw1 = new byte[16]; var guidRaw2 = new byte[16]; var guidRaw3 = new byte[16]; Buffer.BlockCopy(residentData.Data, 0x00, guidRaw0, 0, 16); FileDroid = new Guid(guidRaw0); if (residentData.Data.Length == 16) { return; } Buffer.BlockCopy(residentData.Data, 0x0A, guidRaw1, 0, 16); Buffer.BlockCopy(residentData.Data, 0x20, guidRaw2, 0, 16); Buffer.BlockCopy(residentData.Data, 0x30, guidRaw3, 0, 16); VolumeDroidBirth = new Guid(guidRaw1); FileDroidBirth = new Guid(guidRaw2); DomainDroidBirth = new Guid(guidRaw3); }
public LoggedUtilityStream(byte[] rawBytes) : base(rawBytes) { var content = new byte[AttributeContentLength]; Buffer.BlockCopy(rawBytes, ContentOffset, content, 0, AttributeContentLength); ResidentData = new ResidentData(content); }
public LoggedUtilityStream(byte[] rawBytes) : base(rawBytes) { var content = new byte[AttributeContentLength]; Buffer.BlockCopy(rawBytes, ContentOffset, content, 0, AttributeContentLength); //TODO decode content based on Name? $EFS, etc. ResidentData = new ResidentData(content); }
public VolumeName(byte[] rawBytes) : base(rawBytes) { var residentData = new ResidentData(rawBytes); VolName = string.Empty; if (residentData.Data.Length > 0) { VolName = Encoding.Unicode.GetString(residentData.Data); } }
public VolumeInformation(byte[] rawBytes) : base(rawBytes) { var residentData = new ResidentData(rawBytes); //our data is in residentData.Data UnknownBytes = new byte[8]; Buffer.BlockCopy(residentData.Data, 0, UnknownBytes, 0, 8); MajorVersion = residentData.Data[0x8]; MinorVersion = residentData.Data[0x9]; VolumeFlags = (VolumeFlag)BitConverter.ToInt16(residentData.Data, 0xA); }
public VolumeName(byte[] rawBytes) : base(rawBytes) { var residentData = new ResidentData(rawBytes); VolName = string.Empty; if (residentData.Data.Length > 0) { VolName = Encoding.Unicode .GetString(residentData.Data, ContentOffset, residentData.Data.Length - ContentOffset) .TrimEnd('\0'); } }
public Data(byte[] rawBytes) : base(rawBytes) { if (IsResident) { var content = new byte[AttributeContentLength]; Buffer.BlockCopy(rawBytes, ContentOffset, content, 0, AttributeContentLength); ResidentData = new ResidentData(content); } else { NonResidentData = new NonResidentData(rawBytes); } }
public SecurityDescriptor(byte[] rawBytes) : base(rawBytes) { if (NonResident) { NonResidentData = new NonResidentData(rawBytes); } else { var content = new byte[AttributeContentLength]; Buffer.BlockCopy(rawBytes, ContentOffset, content, 0, AttributeContentLength); ResidentData = new ResidentData(content); } if (NonResident) { return; } SecurityInfo = new SKSecurityDescriptor(ResidentData.Data); }
public override string ToString() { var sb = new StringBuilder(); sb.AppendLine("**** DATA ****"); sb.AppendLine(base.ToString()); sb.AppendLine(); if (ResidentData == null) { sb.AppendLine("Non Resident Data"); sb.AppendLine(NonResidentData.ToString()); } else { sb.AppendLine("Resident Data"); sb.AppendLine(ResidentData.ToString()); } return(sb.ToString()); }