Write a warning message if runtime files are missing

This commit is contained in:
de4dot 2013-11-16 20:04:38 +01:00
parent 50eb86acfd
commit 120289d12b

View File

@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using dnlib.DotNet;
using AssemblyData;
using de4dot.code.AssemblyClient;
@ -31,6 +32,7 @@ namespace de4dot.code.deobfuscators.ILProtector {
}
protected override void DecryptInternal() {
CheckRuntimeFiles();
IList<DecryptedMethodInfo> decryptedData;
var serverVersion = NewProcessAssemblyClientFactory.GetServerClrVersion(module);
using (var client = new NewProcessAssemblyClientFactory(serverVersion).Create(AssemblyServiceType.Generic)) {
@ -49,6 +51,13 @@ namespace de4dot.code.deobfuscators.ILProtector {
methodInfos[info.id] = info;
}
void CheckRuntimeFiles() {
foreach (var info in mainType.RuntimeFileInfos) {
if (!File.Exists(info.PathName))
Logger.w(string.Format("ILProtector runtime file '{0}' is missing.", info.PathName));
}
}
IList<int> GetMethodIds() {
var ids = new List<int>();