refactor: simplify logic
parent
f3a358fd82
commit
4d2ab762bd
|
@ -107,11 +107,8 @@ class NXCModule:
|
||||||
conditionPasswordPolicy = False
|
conditionPasswordPolicy = False
|
||||||
if self.regex.search(description):
|
if self.regex.search(description):
|
||||||
conditionPasswordPolicy = True
|
conditionPasswordPolicy = True
|
||||||
|
|
||||||
if self.FILTER and conditionFilter and self.PASSWORDPOLICY and conditionPasswordPolicy:
|
if (self.FILTER and conditionFilter) or (not self.FILTER and not conditionFilter):
|
||||||
answersFiltered.append([answer[0], description])
|
if (self.PASSWORDPOLICY and conditionPasswordPolicy) or (not self.PASSWORDPOLICY and not conditionPasswordPolicy):
|
||||||
elif not self.FILTER and self.PASSWORDPOLICY and conditionPasswordPolicy:
|
answersFiltered.append([answer[0], description])
|
||||||
answersFiltered.append([answer[0], description])
|
|
||||||
elif not self.PASSWORDPOLICY and self.FILTER and conditionFilter:
|
|
||||||
answersFiltered.append([answer[0], description])
|
|
||||||
return answersFiltered
|
return answersFiltered
|
||||||
|
|
Loading…
Reference in New Issue