refactor: simplify logic

main
Marshall Hallenbeck 2023-10-14 17:44:52 -04:00
parent f3a358fd82
commit 4d2ab762bd
1 changed files with 4 additions and 7 deletions

View File

@ -107,11 +107,8 @@ class NXCModule:
conditionPasswordPolicy = False
if self.regex.search(description):
conditionPasswordPolicy = True
if self.FILTER and conditionFilter and self.PASSWORDPOLICY and conditionPasswordPolicy:
answersFiltered.append([answer[0], description])
elif not self.FILTER and self.PASSWORDPOLICY and conditionPasswordPolicy:
answersFiltered.append([answer[0], description])
elif not self.PASSWORDPOLICY and self.FILTER and conditionFilter:
answersFiltered.append([answer[0], description])
if (self.FILTER and conditionFilter) or (not self.FILTER and not conditionFilter):
if (self.PASSWORDPOLICY and conditionPasswordPolicy) or (not self.PASSWORDPOLICY and not conditionPasswordPolicy):
answersFiltered.append([answer[0], description])
return answersFiltered