Add a new random name regex

This commit is contained in:
de4dot 2011-11-24 07:57:31 +01:00
parent 3bfb2e7dc7
commit 73d1316b2d

View File

@ -151,10 +151,13 @@ namespace de4dot.deobfuscators.dotNET_Reactor {
base.init(module);
}
static Regex isRandomName = new Regex(@"^[A-Z]{30,40}$");
static Regex isRandomNameMembers = new Regex(@"^[a-zA-Z0-9]{9,11}$"); // methods, fields, props, events
static Regex isRandomNameTypes = new Regex(@"^[a-zA-Z0-9]{18,19}(?:`\d+)?$"); // types, namespaces
bool checkValidName(string name, Regex regex) {
if (isRandomName.IsMatch(name))
return false;
if (regex.IsMatch(name)) {
if (RandomNameChecker.isRandom(name))
return false;