コード例 #1
0
        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);
        }
コード例 #2
0
        public LoggedUtilityStream(byte[] rawBytes) : base(rawBytes)
        {
            var content = new byte[AttributeContentLength];

            Buffer.BlockCopy(rawBytes, ContentOffset, content, 0, AttributeContentLength);

            ResidentData = new ResidentData(content);
        }
コード例 #3
0
ファイル: LoggedUtilityStream.cs プロジェクト: muyen2/MFT-1
        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);
        }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
        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);
        }
コード例 #6
0
        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');
            }
        }
コード例 #7
0
ファイル: Data.cs プロジェクト: muyen2/MFT-1
        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);
            }
        }
コード例 #8
0
        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);
        }
コード例 #9
0
ファイル: Data.cs プロジェクト: muyen2/MFT-1
        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());
        }