Exemple #1
0
        public void Boot()
        {
            var bb = BootFile.Load(@"..\..\TestFiles\Boot\$Boot");

            Debug.WriteLine($"$Boot.BootEntryPoint: {bb.BootEntryPoint}");
            Debug.WriteLine($"$Boot.FileSystemSignature: {bb.FileSystemSignature}");

            Debug.WriteLine($"$Boot.BytesPerSector: {bb.BytesPerSector}");
            Debug.WriteLine($"$Boot.SectorsPerCluster: {bb.SectorsPerCluster}");
            Debug.WriteLine($"$Boot.ReservedSectors: {bb.ReservedSectors}");
            Debug.WriteLine($"$Boot.MediaDescriptor: {bb.MediaDescriptor:X} ({bb.DecodeMediaDescriptor()})");

            Debug.WriteLine($"$Boot.SectorsPerTrack: {bb.SectorsPerTrack}");
            Debug.WriteLine($"$Boot.NumberOfHeads: {bb.NumberOfHeads}");
            Debug.WriteLine($"$Boot.NumberOfHiddenSectors: {bb.NumberOfHiddenSectors}");

            Debug.WriteLine($"$Boot.TotalSectors: {bb.TotalSectors}");

            Debug.WriteLine($"$Boot.MftClusterBlockNumber: {bb.MftClusterBlockNumber}");
            Debug.WriteLine($"$Boot.MirrorMftClusterBlockNumber: {bb.MirrorMftClusterBlockNumber}");

            Debug.WriteLine($"$Boot.MftEntrySize: {bb.MftEntrySize}");
            Debug.WriteLine($"$Boot.IndexEntrySize: {bb.IndexEntrySize}");

            Debug.WriteLine($"$Boot.VolumeSerialNumber 64: {bb.GetVolumeSerialNumber()}");
            Debug.WriteLine($"$Boot.VolumeSerialNumber 32: {bb.GetVolumeSerialNumber(true)}");
            Debug.WriteLine($"$Boot.VolumeSerialNumber 32 rev: {bb.GetVolumeSerialNumber(true, true)}");


            Debug.WriteLine($"$Boot.SectorSignature: {bb.GetSectorSignature()}");
        }
Exemple #2
0
            protected sealed override bool Perform(BootFile file)
            {
                DataBootTable table = new DataBootTable(file as DataBootFile, mListing);

                if (table.IsValid)
                {
                    Loader results = new Loader(this, mField);

                    table.Load(results.Load);

                    foreach (BootFile result in results.mFiles)
                    {
                        if (!result.IsValid)
                        {
                            continue;
                        }

                        Perform(result);
                    }
                }
                else
                {
                    PerformFile(file);
                }

                return(true);
            }
Exemple #3
0
            protected override bool Perform(BootFile file)
            {
                DataBootTable table = new DataBootTable(file as DataBootFile, mListing);

                if (!table.IsValid)
                {
                    return(false);
                }

                table.Load(Perform);
                return(true);
            }
Exemple #4
0
            public virtual void Perform(bool testDirect)
            {
                try
                {
                    BootFile straightFile = null;
                    if (testDirect)
                    {
                        straightFile = GetBootFile(mReference, mReference, true);
                    }

                    if ((straightFile != null) && (straightFile.IsValid))
                    {
                        Perform(straightFile);
                    }
                    else
                    {
                        List <BootFile> files;
                        if (!sFiles.TryGetValue(mReference, out files))
                        {
                            files = new List <BootFile>();
                            sFiles.Add(mReference, files);

                            foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
                            {
                                if (assembly.GetType(mReference) == null)
                                {
                                    continue;
                                }

                                BootFile file = GetBootFile(mReference, assembly.GetName().Name + ".dll", true);
                                if (file.IsValid)
                                {
                                    files.Add(file);
                                }
                            }
                        }

                        foreach (BootFile file in files)
                        {
                            Perform(file);
                        }
                    }
                }
                catch (Exception e)
                {
                    Common.Exception(mReference, e);
                }
            }
Exemple #5
0
            protected sealed override void PerformFile(BootFile file)
            {
                DataBootTable table = new DataBootTable(file as DataBootFile, mTable);

                if (!table.IsValid)
                {
                    if (file.mPrimary)
                    {
                        BooterLogger.AddTrace(file + ": No " + mTable + " Table");
                    }
                    else
                    {
                        BooterLogger.AddError(file + ": No " + mTable + " Table");
                    }
                    return;
                }

                table.Load(Perform);
            }
Exemple #6
0
 protected abstract void Perform(BootFile file, XmlDbRow row);
Exemple #7
0
 public void Load(BootFile file, XmlDbRow row)
 {
     mFiles.Add(mBooter.GetBootFile(file.ToString(), row.GetString(mField), false));
 }
Exemple #8
0
 protected abstract void PerformFile(BootFile file);
Exemple #9
0
 protected abstract bool Perform(BootFile file);
Exemple #10
0
            protected sealed override void PerformFile(BootFile file)
            {
                DataBootTable table = new DataBootTable(file as DataBootFile, mTable);
                if (!table.IsValid)
                {
                    if (file.mPrimary)
                    {
                        BooterLogger.AddTrace(file + ": No " + mTable + " Table");
                    }
                    else
                    {
                        BooterLogger.AddError(file + ": No " + mTable + " Table");
                    }
                    return;
                }

                table.Load(Perform);
            }
Exemple #11
0
 protected abstract void Perform(BootFile file, XmlDbRow row);
Exemple #12
0
 public void Load(BootFile file, XmlDbRow row)
 {
     mFiles.Add(mBooter.GetBootFile(file.ToString(), row.GetString(mField), false));
 }
Exemple #13
0
 protected abstract void PerformFile(BootFile file);
Exemple #14
0
            protected sealed override bool Perform(BootFile file)
            {
                DataBootTable table = new DataBootTable(file as DataBootFile, mListing);
                if (table.IsValid)
                {
                    Loader results = new Loader(this, mField);

                    table.Load(results.Load);

                    foreach (BootFile result in results.mFiles)
                    {
                        if (!result.IsValid) continue;

                        Perform(result);
                    }
                }
                else
                {
                    PerformFile(file);
                }

                return true;
            }
Exemple #15
0
            protected override bool Perform(BootFile file)
            {
                DataBootTable table = new DataBootTable(file as DataBootFile, mListing);
                if (!table.IsValid) return false;

                table.Load(Perform);
                return true;
            }
Exemple #16
0
 protected abstract bool Perform(BootFile file);