From 85211c312050f0c76ef80d2b18093f50b2bfcd1f Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 27 Jul 2022 10:41:05 -0400 Subject: [PATCH] Agent: Add TODO about using Python's ipaddress library --- monkey/infection_monkey/network/info.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monkey/infection_monkey/network/info.py b/monkey/infection_monkey/network/info.py index e26df1989..14f06acfe 100644 --- a/monkey/infection_monkey/network/info.py +++ b/monkey/infection_monkey/network/info.py @@ -18,6 +18,8 @@ SIOCGIFNETMASK = 0x891B # get network PA mask RTF_UP = 0x0001 # Route usable RTF_REJECT = 0x0200 +# TODO: We can probably replace both of these namedtuples with classes in Python's ipaddress +# library: https://docs.python.org/3/library/ipaddress.html NetworkInterface = namedtuple("NetworkInterface", ("address", "netmask")) NetworkAddress = namedtuple("NetworkAddress", ("ip", "domain"))