UI: improve regex for domain matching

This commit is contained in:
Peter Stöckli 2019-05-06 15:51:27 +02:00
parent 5c8f7102c2
commit 7d815d9608
Failed to generate hash of commit

View file

@ -232,7 +232,7 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
else: else:
self._rule.operator.type = "regexp" self._rule.operator.type = "regexp"
self._rule.operator.operand = "dest.host" self._rule.operator.operand = "dest.host"
self._rule.operator.data = ".*%s" % '\.'.join(self._con.dst_host.split('.')[what_idx - 4:]) self._rule.operator.data = ".*\.%s" % '\.'.join(self._con.dst_host.split('.')[what_idx - 4:])
self._rule.name = slugify("%s %s %s" % (self._rule.action, self._rule.operator.type, self._rule.operator.data)) self._rule.name = slugify("%s %s %s" % (self._rule.action, self._rule.operator.type, self._rule.operator.data))