Skip to content

Commit

Permalink
lower
Browse files Browse the repository at this point in the history
  • Loading branch information
fcosantos committed Nov 24, 2023
1 parent f1f121a commit 9bac169
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/livehunt_network_watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def render_template(entity, domains):
rule_block = f.read()

for domain in domains:
domain_escaped = re.compile(r"[^[a-z\d]").sub("_", domain)
domain_escaped = domain.lower()
domain_escaped = re.compile(r"[^[a-z\d]").sub("_", domain_escaped)
domain_escaped = re.compile(r"(_(?i:_)+)").sub("_", domain_escaped)

if not domain_escaped in escaped_domains:
Expand Down Expand Up @@ -277,6 +278,7 @@ async def main():
new_domain_list.remove(deleted_domain)

new_domain_list = list(set(new_domain_list))
new_domain_list = [domain.lower() for domain in new_domain_list]
new_domain_list.sort()

if new_domain_list != domains:
Expand Down

0 comments on commit 9bac169

Please sign in to comment.