Check for native code assemblies a little later
This commit is contained in:
parent
1e7dbfad97
commit
ceca34e12c
|
@ -128,7 +128,18 @@ namespace de4dot.cui {
|
|||
KeepObfuscatorTypes = options.KeepObfuscatorTypes,
|
||||
CreateDestinationDir = !onlyScan,
|
||||
});
|
||||
return loader.load();
|
||||
|
||||
bool ignoreNativeCodeFiles = !onlyScan;
|
||||
foreach (var file in loader.load()) {
|
||||
if (ignoreNativeCodeFiles) {
|
||||
if ((file.ModuleDefinition.Attributes & ModuleAttributes.ILOnly) == 0) {
|
||||
Log.w("Ignoring assembly with native code {0}", file.Filename);
|
||||
removeModule(file.ModuleDefinition);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
yield return file;
|
||||
}
|
||||
}
|
||||
|
||||
class DotNetFileLoader {
|
||||
|
@ -198,12 +209,6 @@ namespace de4dot.cui {
|
|||
return false;
|
||||
}
|
||||
|
||||
if ((file.ModuleDefinition.Attributes & ModuleAttributes.ILOnly) == 0) {
|
||||
Log.w("Ignoring assembly with native code {0}", file.Filename);
|
||||
removeModule(file.ModuleDefinition);
|
||||
return false;
|
||||
}
|
||||
|
||||
var deob = file.Deobfuscator;
|
||||
if (skipUnknownObfuscator && deob.Type == "un") {
|
||||
Log.v("Skipping unknown obfuscator: {0}", file.Filename);
|
||||
|
|
Loading…
Reference in New Issue
Block a user