Esempio n. 1
0
        public static void Main(string[] args)
        {
            string       filename  = "D:\\asaNU\\Simple_MSIL_Decryptor.exe";
            AssemblyName asm_name1 = AssemblyName.GetAssemblyName(filename);
//AssemblyName name1 = AssemblyName.GetAssemblyName(filename);
            MetadataReader mr     = new MetadataReader();
            FileStream     input  = new FileStream(filename, FileMode.Open, System.IO.FileAccess.Read, FileShare.ReadWrite);
            BinaryReader   reader = new BinaryReader(input);

            if (mr.Initialize(reader))
            {
                AssemblyName asm_name = AssemblyNameInit.GetAssemblyName(mr);
                AssemblyNameInit.SetCodeBase(asm_name, filename);
                AssemblyName[] asm_refs = AssemblyNameInit.GetAsmRefsAssemblyName(mr);
                Assembly       asm      = Assembly.Load(asm_name);

                Console.WriteLine(asm.ManifestModule.MDStreamVersion.ToString("X8"));
                Console.ReadLine();
            }

            reader.Close();
            input.Close();
            mr = null;



            Console.WriteLine("Hello World!");

            // TODO: Implement Functionality Here

            Console.Write("Press any key to continue . . . ");
            Console.ReadKey(true);
        }
Esempio n. 2
0
        public static AssemblyName GetAssemblyName(BinaryReader reader)
        {
            AssemblyName   asm_name = null;
            MetadataReader mr       = new MetadataReader();

            if (mr.Initialize(reader))
            {
                asm_name = GetAssemblyName(mr);
            }

            mr = null;
            return(asm_name);
        }
Esempio n. 3
0
        public static AssemblyName[] GetAsmRefsAssemblyName(BinaryReader reader)
        {
            AssemblyName[] asm_refs = null;
            MetadataReader mr       = new MetadataReader();

            if (mr.Initialize(reader))
            {
                asm_refs = GetAsmRefsAssemblyName(mr);
            }

            mr = null;
            return(asm_refs);
        }