Island: Fix mypy issues in T1065.py

This commit is contained in:
Kekoa Kaaikala 2022-09-21 18:25:38 +00:00
parent 5f3d757965
commit c0e98bc0d1
1 changed files with 5 additions and 1 deletions

View File

@ -25,4 +25,8 @@ class T1065(AttackTechnique):
@staticmethod
def get_tunnel_ports() -> Sequence[str]:
telems = Telemetry.objects(telem_category="tunnel", data__proxy__ne=None)
return [address_to_ip_port(telem["data"]["proxy"])[1] for telem in telems]
return [
p
for p in (address_to_ip_port(telem["data"]["proxy"])[1] for telem in telems)
if p is not None
]