From c0e98bc0d1b1120322ec9b62ade6c71b5b43130c Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Wed, 21 Sep 2022 18:25:38 +0000 Subject: [PATCH] Island: Fix mypy issues in T1065.py --- .../cc/services/attack/technique_reports/T1065.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/services/attack/technique_reports/T1065.py b/monkey/monkey_island/cc/services/attack/technique_reports/T1065.py index d28c5e9e0..9c273cca0 100644 --- a/monkey/monkey_island/cc/services/attack/technique_reports/T1065.py +++ b/monkey/monkey_island/cc/services/attack/technique_reports/T1065.py @@ -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 + ]