示例#1
0
        public static void DumpModules(PE Pe, Action <IPrettyPrintable> Printer, int recursion_depth = 0)
        {
            if (Printer == JsonPrinter)
            {
                Console.Error.WriteLine("Json output is not currently supported when dumping the dependency chain.");
                return;
            }

            PeDependencies Deps = new PeDependencies(Pe, recursion_depth);

            Printer(Deps.GetModules);
        }
示例#2
0
        public static void DumpDependencyChain(PE Pe, Action <IPrettyPrintable> Printer)
        {
            if (Printer == JsonPrinter)
            {
                Console.Error.WriteLine("Json output is not currently supported when dumping the dependency chain.");
                return;
            }

            PeDependencies Deps = new PeDependencies(Pe);

            Printer(Deps);
        }
示例#3
0
        public PeDependencyItem(PeDependencies _Root, string _ModuleName, string ModuleFilepath, ModuleSearchStrategy Strategy, int Level)
        {
            Root       = _Root;
            ModuleName = _ModuleName;


            Imports        = new List <PeImportDll>();
            Filepath       = ModuleFilepath;
            SearchStrategy = Strategy;
            RecursionLevel = Level;

            DependenciesResolved = false;
            Dependencies         = new List <PeDependencyItem>();
            ResolvedImports      = new List <PeDependencyItem>();
        }
示例#4
0
        public PeDependencyItem(PeDependencies _Root, string _ModuleName, string ModuleFilepath, ModuleSearchStrategy Strategy, int Level)
        {
            Root       = _Root;
            ModuleName = _ModuleName;

            if (ModuleFilepath != null)
            {
                PE Module = BinaryCache.LoadPe(ModuleFilepath);
                Imports = Module.GetImports();
            }
            else
            {
                //Module = null;
                Imports = new List <PeImportDll>();
            }

            Filepath       = ModuleFilepath;
            SearchStrategy = Strategy;
            RecursionLevel = Level;

            DependenciesResolved = false;
        }
示例#5
0
        public PeDependencyItem(PeDependencies _Root, string _ModuleName, string ModuleFilepath, ModuleSearchStrategy Strategy, int Level)
        {
            Action action = () =>
            {
                Root       = _Root;
                ModuleName = _ModuleName;


                Imports        = new List <ImportDll>();
                Filepath       = ModuleFilepath;
                SearchStrategy = Strategy;
                RecursionLevel = Level;

                DependenciesResolved = false;
                FullDependencies     = new List <PeDependencyItem>();
                ResolvedImports      = new List <PeDependencyItem>();
                ModuleReferences     = new List <ImportDll>();
                AssemblyReferences   = new List <AssemblyNameReference>();
            };

            SafeExecutor(action);
        }
        public static void DumpDependencyChain(PE Pe, Action <IPrettyPrintable> Printer, int recursion_depth = 0)
        {
            PeDependencies Deps = new PeDependencies(Pe, recursion_depth);

            Printer(Deps);
        }