Add a new random name regex
This commit is contained in:
parent
3bfb2e7dc7
commit
73d1316b2d
|
@ -151,10 +151,13 @@ namespace de4dot.deobfuscators.dotNET_Reactor {
|
||||||
base.init(module);
|
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 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
|
static Regex isRandomNameTypes = new Regex(@"^[a-zA-Z0-9]{18,19}(?:`\d+)?$"); // types, namespaces
|
||||||
|
|
||||||
bool checkValidName(string name, Regex regex) {
|
bool checkValidName(string name, Regex regex) {
|
||||||
|
if (isRandomName.IsMatch(name))
|
||||||
|
return false;
|
||||||
if (regex.IsMatch(name)) {
|
if (regex.IsMatch(name)) {
|
||||||
if (RandomNameChecker.isRandom(name))
|
if (RandomNameChecker.isRandom(name))
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user