Update DNR detection

This commit is contained in:
de4dot 2011-11-24 07:49:50 +01:00
parent f27ddb3ec7
commit 3bfb2e7dc7
2 changed files with 13 additions and 0 deletions

View File

@ -499,6 +499,14 @@ namespace de4dot.deobfuscators {
return list.Count == 0 ? null : list[0];
}
protected bool hasMetadataStream(string name) {
foreach (var stream in module.MetadataStreams) {
if (stream.name == name)
return true;
}
return false;
}
public virtual bool isValidNamespaceName(string ns) {
if (ns == null)
return false;

View File

@ -211,6 +211,11 @@ namespace de4dot.deobfuscators.dotNET_Reactor {
if (sum > 0)
val += 100 + 10 * (sum - 1);
if (sum == 0) {
if (hasMetadataStream("#GUlD") && hasMetadataStream("#Blop"))
val += 10;
}
return val;
}